From 501dfd78a8332e876c2f135d1d7c24760c3588cf Mon Sep 17 00:00:00 2001 From: Anthony Rose Date: Wed, 6 Nov 2024 09:53:41 +0000 Subject: [PATCH] Stop using coc --- init.lua | 4 + pack/ant/start/coc.nvim/.gitignore | 13 - pack/ant/start/coc.nvim/LICENSE.md | 7 - pack/ant/start/coc.nvim/Readme.md | 611 - pack/ant/start/coc.nvim/autoload/coc.vim | 183 - pack/ant/start/coc.nvim/autoload/coc/api.vim | 678 - .../start/coc.nvim/autoload/coc/client.vim | 340 - .../ant/start/coc.nvim/autoload/coc/color.vim | 283 - .../start/coc.nvim/autoload/coc/compat.vim | 244 - .../start/coc.nvim/autoload/coc/cursor.vim | 60 - .../start/coc.nvim/autoload/coc/dialog.vim | 684 - pack/ant/start/coc.nvim/autoload/coc/dict.vim | 32 - .../ant/start/coc.nvim/autoload/coc/float.vim | 1423 -- .../start/coc.nvim/autoload/coc/helper.vim | 148 - .../start/coc.nvim/autoload/coc/highlight.vim | 734 - pack/ant/start/coc.nvim/autoload/coc/list.vim | 303 - pack/ant/start/coc.nvim/autoload/coc/math.vim | 11 - .../start/coc.nvim/autoload/coc/notify.vim | 532 - .../start/coc.nvim/autoload/coc/prompt.vim | 214 - pack/ant/start/coc.nvim/autoload/coc/pum.vim | 490 - pack/ant/start/coc.nvim/autoload/coc/rpc.vim | 130 - .../start/coc.nvim/autoload/coc/snippet.vim | 155 - .../start/coc.nvim/autoload/coc/string.vim | 154 - pack/ant/start/coc.nvim/autoload/coc/task.vim | 179 - .../start/coc.nvim/autoload/coc/terminal.vim | 115 - pack/ant/start/coc.nvim/autoload/coc/ui.vim | 446 - pack/ant/start/coc.nvim/autoload/coc/util.vim | 625 - .../start/coc.nvim/autoload/coc/window.vim | 205 - .../start/coc.nvim/autoload/health/coc.vim | 100 - pack/ant/start/coc.nvim/bin/prompt.js | 97 - .../start/coc.nvim/bin/terminateProcess.sh | 12 - pack/ant/start/coc.nvim/build/index.js | 338 - pack/ant/start/coc.nvim/data/schema.json | 1666 -- pack/ant/start/coc.nvim/doc/coc-config.txt | 1250 -- pack/ant/start/coc.nvim/doc/coc.txt | 3534 ---- pack/ant/start/coc.nvim/history.md | 1475 -- pack/ant/start/coc.nvim/package.json | 17 - pack/ant/start/coc.nvim/plugin/coc.vim | 703 - .../nvim-lspconfig/.codespellignorewords | 4 + pack/ant/start/nvim-lspconfig/.editorconfig | 13 + .../start/nvim-lspconfig/.github/CODEOWNERS | 6 + .../.github/ISSUE_TEMPLATE/bug_report.yml | 16 + .../.github/ISSUE_TEMPLATE/config.yml | 5 + .../pull_request_template.md | 5 + .../.github/ci/run_sanitizer.sh | 16 + .../nvim-lspconfig/.github/dependabot.yml | 8 + .../.github/workflows/codespell.yml | 11 + .../workflows/comment-config-changes.yml | 19 + .../.github/workflows/commit_lint.yml | 12 + .../.github/workflows/docgen.yml | 32 + .../nvim-lspconfig/.github/workflows/lint.yml | 37 + .../workflows/problem_matchers/selene.json | 30 + .../.github/workflows/release.yml | 21 + .../.github/workflows/sanitizer.yml | 14 + .../nvim-lspconfig/.github/workflows/test.yml | 36 + pack/ant/start/nvim-lspconfig/.gitignore | 3 + pack/ant/start/nvim-lspconfig/.luacheckrc | 15 + pack/ant/start/nvim-lspconfig/.stylua.toml | 6 + pack/ant/start/nvim-lspconfig/CONTRIBUTING.md | 127 + pack/ant/start/nvim-lspconfig/LICENSE.md | 176 + pack/ant/start/nvim-lspconfig/Makefile | 12 + pack/ant/start/nvim-lspconfig/README.md | 156 + .../start/nvim-lspconfig/doc/lspconfig.txt | 591 + .../doc/server_configurations.md | 14126 ++++++++++++++++ .../doc/server_configurations.txt | 14126 ++++++++++++++++ pack/ant/start/nvim-lspconfig/flake.lock | 60 + pack/ant/start/nvim-lspconfig/flake.nix | 21 + .../start/nvim-lspconfig/lua/lspconfig.lua | 67 + .../nvim-lspconfig/lua/lspconfig/async.lua | 70 + .../nvim-lspconfig/lua/lspconfig/configs.lua | 296 + .../nvim-lspconfig/lua/lspconfig/manager.lua | 302 + .../server_configurations/agda_ls.lua | 17 + .../lspconfig/server_configurations/aiken.lua | 25 + .../lspconfig/server_configurations/als.lua | 41 + .../anakin_language_server.lua | 78 + .../server_configurations/angularls.lua | 67 + .../server_configurations/ansiblels.lua | 43 + .../server_configurations/antlersls.lua | 19 + .../server_configurations/apex_ls.lua | 46 + .../arduino_language_server.lua | 90 + .../server_configurations/asm_lsp.lua | 19 + .../server_configurations/ast_grep.lua | 37 + .../lspconfig/server_configurations/astro.lua | 35 + .../server_configurations/autotools_ls.lua | 29 + .../server_configurations/awk_ls.lua | 22 + .../azure_pipelines_ls.lua | 44 + .../server_configurations/bacon_ls.lua | 39 + .../server_configurations/ballerina.lua | 17 + .../server_configurations/basedpyright.lua | 80 + .../server_configurations/bashls.lua | 37 + .../server_configurations/bazelrc_lsp.lua | 26 + .../server_configurations/beancount.lua | 21 + .../lspconfig/server_configurations/bicep.lua | 47 + .../lspconfig/server_configurations/biome.lua | 36 + .../bitbake_language_server.lua | 14 + .../server_configurations/bitbake_ls.lua | 27 + .../server_configurations/blueprint_ls.lua | 30 + .../server_configurations/bqnlsp.lua | 45 + .../server_configurations/bright_script.lua | 23 + .../server_configurations/bsl_ls.lua | 19 + .../lspconfig/server_configurations/buck2.lua | 27 + .../server_configurations/buddy_ls.lua | 18 + .../lspconfig/server_configurations/bufls.lua | 26 + .../lspconfig/server_configurations/bzl.lua | 22 + .../server_configurations/cadence.lua | 32 + .../server_configurations/cairo_ls.lua | 30 + .../lspconfig/server_configurations/ccls.lua | 50 + .../server_configurations/cds_lsp.lua | 33 + .../server_configurations/circom-lsp.lua | 17 + .../server_configurations/clangd.lua | 119 + .../server_configurations/clarity_lsp.lua | 19 + .../server_configurations/clojure_lsp.lua | 19 + .../lspconfig/server_configurations/cmake.lua | 26 + .../server_configurations/cobol_ls.lua | 17 + .../server_configurations/codeqlls.lua | 48 + .../server_configurations/coffeesense.lua | 21 + .../server_configurations/contextive.lua | 21 + .../server_configurations/coq_lsp.lua | 17 + .../server_configurations/crystalline.lua | 20 + .../server_configurations/csharp_ls.lua | 25 + .../server_configurations/css_variables.lua | 65 + .../lspconfig/server_configurations/cssls.lua | 43 + .../server_configurations/cssmodules_ls.lua | 24 + .../cucumber_language_server.lua | 26 + .../custom_elements_ls.lua | 39 + .../server_configurations/cypher_ls.lua | 23 + .../lspconfig/server_configurations/dafny.lua | 22 + .../server_configurations/dagger.lua | 22 + .../server_configurations/dartls.lua | 32 + .../lspconfig/server_configurations/dcmls.lua | 19 + .../server_configurations/debputy.lua | 16 + .../server_configurations/delphi_ls.lua | 49 + .../server_configurations/denols.lua | 127 + .../dhall_lsp_server.lua | 26 + .../server_configurations/diagnosticls.lua | 22 + .../server_configurations/digestif.lua | 21 + .../lspconfig/server_configurations/djlsp.lua | 17 + .../docker_compose_language_service.lua | 27 + .../server_configurations/dockerls.lua | 38 + .../server_configurations/dolmenls.lua | 20 + .../lspconfig/server_configurations/dotls.lua | 20 + .../server_configurations/dprint.lua | 33 + .../server_configurations/drools_lsp.lua | 81 + .../server_configurations/ds_pinyin_lsp.lua | 80 + .../server_configurations/earthlyls.lua | 16 + .../server_configurations/ecsact.lua | 21 + .../lspconfig/server_configurations/efm.lua | 43 + .../server_configurations/elixirls.lua | 44 + .../lspconfig/server_configurations/elmls.lua | 40 + .../lspconfig/server_configurations/elp.lua | 21 + .../lspconfig/server_configurations/ember.lua | 23 + .../emmet_language_server.lua | 36 + .../server_configurations/emmet_ls.lua | 39 + .../erg_language_server.lua | 27 + .../server_configurations/erlangls.lua | 29 + .../server_configurations/esbonio.lua | 55 + .../server_configurations/eslint.lua | 202 + .../facility_language_server.lua | 17 + .../fennel_language_server.lua | 18 + .../server_configurations/fennel_ls.lua | 22 + .../server_configurations/fish_lsp.lua | 26 + .../lspconfig/server_configurations/flow.lua | 27 + .../server_configurations/flux_lsp.lua | 22 + .../server_configurations/foam_ls.lua | 25 + .../server_configurations/fortls.lua | 36 + .../server_configurations/fsautocomplete.lua | 53 + .../fsharp_language_server.lua | 29 + .../lspconfig/server_configurations/fstar.lua | 19 + .../server_configurations/futhark_lsp.lua | 22 + .../server_configurations/gdscript.lua | 26 + .../server_configurations/gdshader_lsp.lua | 16 + .../server_configurations/ghcide.lua | 21 + .../server_configurations/ghdl_ls.lua | 22 + .../server_configurations/ginko_ls.lua | 21 + .../server_configurations/gitlab_ci_ls.lua | 33 + .../server_configurations/glasgow.lua | 38 + .../lspconfig/server_configurations/gleam.lua | 25 + .../lspconfig/server_configurations/glint.lua | 59 + .../server_configurations/glsl_analyzer.lua | 18 + .../server_configurations/glslls.lua | 28 + .../golangci_lint_ls.lua | 42 + .../lspconfig/server_configurations/gopls.lua | 37 + .../server_configurations/gradle_ls.lua | 43 + .../server_configurations/grammarly.lua | 34 + .../server_configurations/graphql.lua | 26 + .../server_configurations/groovyls.lua | 36 + .../server_configurations/guile_ls.lua | 30 + .../server_configurations/harper_ls.lua | 51 + .../haxe_language_server.lua | 74 + .../server_configurations/hdl_checker.lua | 20 + .../server_configurations/helm_ls.lua | 36 + .../lspconfig/server_configurations/hhvm.lua | 21 + .../lspconfig/server_configurations/hie.lua | 34 + .../lspconfig/server_configurations/hlasm.lua | 20 + .../lspconfig/server_configurations/hls.lua | 52 + .../server_configurations/hoon_ls.lua | 22 + .../lspconfig/server_configurations/html.lua | 41 + .../lspconfig/server_configurations/htmx.lua | 71 + .../server_configurations/hydra_lsp.lua | 20 + .../server_configurations/hyprls.lua | 24 + .../server_configurations/idris2_lsp.lua | 41 + .../server_configurations/intelephense.lua | 43 + .../server_configurations/janet_lsp.lua | 21 + .../java_language_server.lua | 18 + .../lspconfig/server_configurations/jdtls.lua | 173 + .../jedi_language_server.lua | 29 + .../server_configurations/jinja_lsp.lua | 28 + .../lspconfig/server_configurations/jqls.lua | 30 + .../server_configurations/jsonls.lua | 41 + .../server_configurations/jsonnet_ls.lua | 44 + .../server_configurations/julials.lua | 75 + .../lspconfig/server_configurations/kcl.lua | 20 + .../lspconfig/server_configurations/koka.lua | 21 + .../kotlin_language_server.lua | 57 + .../server_configurations/lean3ls.lua | 46 + .../server_configurations/leanls.lua | 52 + .../server_configurations/lelwel_ls.lua | 21 + .../server_configurations/lemminx.lua | 23 + .../server_configurations/lexical.lua | 23 + .../lspconfig/server_configurations/ltex.lua | 95 + .../server_configurations/lua_ls.lua | 88 + .../server_configurations/luau_lsp.lua | 28 + .../server_configurations/lwc_ls.lua | 37 + .../lspconfig/server_configurations/m68k.lua | 29 + .../server_configurations/markdown_oxide.lua | 42 + .../server_configurations/marksman.lua | 30 + .../server_configurations/matlab_ls.lua | 25 + .../server_configurations/mdx_analyzer.lua | 32 + .../server_configurations/mesonlsp.lua | 19 + .../server_configurations/metals.lua | 40 + .../server_configurations/millet.lua | 24 + .../lspconfig/server_configurations/mint.lua | 20 + .../server_configurations/mlir_lsp_server.lua | 19 + .../mlir_pdll_lsp_server.lua | 20 + .../server_configurations/mm0_ls.lua | 20 + .../lspconfig/server_configurations/mojo.lua | 22 + .../server_configurations/motoko_lsp.lua | 23 + .../server_configurations/move_analyzer.lua | 31 + .../msbuild_project_tools_server.lua | 30 + .../server_configurations/mutt_ls.lua | 25 + .../server_configurations/nelua_lsp.lua | 36 + .../server_configurations/neocmake.lua | 35 + .../server_configurations/nextls.lua | 18 + .../nginx_language_server.lua | 23 + .../server_configurations/nickel_ls.lua | 37 + .../server_configurations/nil_ls.lua | 25 + .../server_configurations/nim_langserver.lua | 23 + .../lspconfig/server_configurations/nimls.lua | 23 + .../lspconfig/server_configurations/nixd.lua | 25 + .../server_configurations/nomad_lsp.lua | 36 + .../lspconfig/server_configurations/ntt.lua | 28 + .../server_configurations/nushell.lua | 20 + .../lspconfig/server_configurations/nxls.lua | 24 + .../server_configurations/ocamlls.lua | 22 + .../server_configurations/ocamllsp.lua | 38 + .../lspconfig/server_configurations/ols.lua | 19 + .../server_configurations/omnisharp.lua | 144 + .../server_configurations/opencl_ls.lua | 21 + .../server_configurations/openedge_ls.lua | 55 + .../server_configurations/openscad_ls.lua | 32 + .../server_configurations/openscad_lsp.lua | 22 + .../server_configurations/pact_ls.lua | 17 + .../lspconfig/server_configurations/pasls.lua | 28 + .../lspconfig/server_configurations/pbls.lua | 26 + .../server_configurations/perlls.lua | 38 + .../server_configurations/perlnavigator.lua | 33 + .../server_configurations/perlpls.lua | 29 + .../server_configurations/pest_ls.lua | 17 + .../lspconfig/server_configurations/phan.lua | 40 + .../server_configurations/phpactor.lua | 26 + .../server_configurations/pico8_ls.lua | 17 + .../pkgbuild_language_server.lua | 19 + .../server_configurations/please.lua | 19 + .../server_configurations/postgres_lsp.lua | 20 + .../server_configurations/powershell_es.lua | 72 + .../server_configurations/prismals.lua | 27 + .../server_configurations/prolog_ls.lua | 27 + .../server_configurations/prosemd_lsp.lua | 22 + .../server_configurations/protols.lua | 22 + .../lspconfig/server_configurations/psalm.lua | 23 + .../lspconfig/server_configurations/pug.lua | 18 + .../server_configurations/puppet.lua | 38 + .../server_configurations/purescriptls.lua | 29 + .../lspconfig/server_configurations/pylsp.lua | 48 + .../server_configurations/pylyzer.lua | 34 + .../lspconfig/server_configurations/pyre.lua | 22 + .../server_configurations/pyright.lua | 80 + .../server_configurations/qml_lsp.lua | 16 + .../lspconfig/server_configurations/qmlls.lua | 19 + .../server_configurations/quick_lint_js.lua | 19 + .../r_language_server.lua | 28 + .../racket_langserver.lua | 21 + .../server_configurations/raku_navigator.lua | 33 + .../server_configurations/reason_ls.lua | 16 + .../lspconfig/server_configurations/regal.lua | 28 + .../server_configurations/regols.lua | 28 + .../server_configurations/relay_lsp.lua | 110 + .../server_configurations/remark_ls.lua | 52 + .../server_configurations/rescriptls.lua | 52 + .../lspconfig/server_configurations/rls.lua | 42 + .../lspconfig/server_configurations/rnix.lua | 28 + .../robotframework_ls.lua | 23 + .../server_configurations/roc_ls.lua | 21 + .../lspconfig/server_configurations/rome.lua | 37 + .../server_configurations/rubocop.lua | 17 + .../server_configurations/ruby_lsp.lua | 33 + .../lspconfig/server_configurations/ruff.lua | 48 + .../server_configurations/ruff_lsp.lua | 42 + .../rune_languageserver.lua | 21 + .../server_configurations/rust_analyzer.lua | 122 + .../server_configurations/salt_ls.lua | 24 + .../scheme_langserver.lua | 22 + .../lspconfig/server_configurations/scry.lua | 22 + .../server_configurations/serve_d.lua | 20 + .../shopify_theme_ls.lua | 32 + .../server_configurations/sixtyfps.lua | 28 + .../server_configurations/slangd.lua | 44 + .../server_configurations/slint_lsp.lua | 29 + .../server_configurations/smarty_ls.lua | 39 + .../server_configurations/smithy_ls.lua | 30 + .../server_configurations/snakeskin_ls.lua | 19 + .../server_configurations/snyk_ls.lua | 37 + .../server_configurations/solang.lua | 27 + .../server_configurations/solargraph.lua | 31 + .../lspconfig/server_configurations/solc.lua | 19 + .../server_configurations/solidity.lua | 49 + .../server_configurations/solidity_ls.lua | 36 + .../solidity_ls_nomicfoundation.lua | 36 + .../server_configurations/somesass_ls.lua | 40 + .../server_configurations/sorbet.lua | 26 + .../server_configurations/sourcekit.lua | 25 + .../server_configurations/sourcery.lua | 83 + .../server_configurations/spectral.lua | 29 + .../spyglassmc_language_server.lua | 29 + .../lspconfig/server_configurations/sqlls.lua | 18 + .../lspconfig/server_configurations/sqls.lua | 25 + .../server_configurations/standardrb.lua | 19 + .../server_configurations/starlark_rust.lua | 20 + .../server_configurations/starpls.lua | 16 + .../server_configurations/statix.lua | 20 + .../lspconfig/server_configurations/steep.lua | 21 + .../server_configurations/stimulus_ls.lua | 26 + .../server_configurations/stylelint_lsp.lua | 57 + .../server_configurations/superhtml.lua | 32 + .../server_configurations/svelte.lua | 24 + .../server_configurations/svlangserver.lua | 58 + .../lspconfig/server_configurations/svls.lua | 24 + .../server_configurations/swift_mesonls.lua | 19 + .../server_configurations/syntax_tree.lua | 28 + .../server_configurations/tabby_ml.lua | 23 + .../server_configurations/tailwindcss.lua | 130 + .../lspconfig/server_configurations/taplo.lua | 25 + .../tblgen_lsp_server.lua | 20 + .../server_configurations/teal_ls.lua | 31 + .../lspconfig/server_configurations/templ.lua | 21 + .../server_configurations/terraform_lsp.lua | 43 + .../server_configurations/terraformls.lua | 47 + .../server_configurations/texlab.lua | 249 + .../server_configurations/textlsp.lua | 50 + .../server_configurations/tflint.lua | 20 + .../server_configurations/theme_check.lua | 31 + .../server_configurations/thriftls.lua | 20 + .../server_configurations/tilt_ls.lua | 26 + .../server_configurations/tinymist.lua | 16 + .../lspconfig/server_configurations/ts_ls.lua | 90 + .../server_configurations/tsp_server.lua | 24 + .../lspconfig/server_configurations/ttags.lua | 17 + .../server_configurations/turtle_ls.lua | 45 + .../tvm_ffi_navigator.lua | 19 + .../twiggy_language_server.lua | 23 + .../server_configurations/typeprof.lua | 19 + .../server_configurations/typos_lsp.lua | 20 + .../server_configurations/typst_lsp.lua | 19 + .../lspconfig/server_configurations/uiua.lua | 31 + .../server_configurations/unison.lua | 17 + .../server_configurations/unocss.lua | 31 + .../lspconfig/server_configurations/uvls.lua | 29 + .../server_configurations/v_analyzer.lua | 21 + .../server_configurations/vacuum.lua | 28 + .../server_configurations/vala_ls.lua | 40 + .../server_configurations/vale_ls.lua | 17 + .../lspconfig/server_configurations/vdmj.lua | 134 + .../server_configurations/verible.lua | 21 + .../server_configurations/veridian.lua | 23 + .../server_configurations/veryl_ls.lua | 24 + .../server_configurations/vhdl_ls.lua | 45 + .../lspconfig/server_configurations/vimls.lua | 34 + .../server_configurations/visualforce_ls.lua | 38 + .../lspconfig/server_configurations/vls.lua | 21 + .../lspconfig/server_configurations/volar.lua | 113 + .../lspconfig/server_configurations/vtsls.lua | 35 + .../lspconfig/server_configurations/vuels.lua | 61 + .../server_configurations/wgsl_analyzer.lua | 23 + .../server_configurations/yamlls.lua | 80 + .../server_configurations/yang_lsp.lua | 19 + .../lspconfig/server_configurations/yls.lua | 21 + .../lspconfig/server_configurations/ziggy.lua | 21 + .../server_configurations/ziggy_schema.lua | 21 + .../lspconfig/server_configurations/zk.lua | 79 + .../lspconfig/server_configurations/zls.lua | 20 + .../lua/lspconfig/ui/lspinfo.lua | 369 + .../lua/lspconfig/ui/windows.lua | 129 + .../nvim-lspconfig/lua/lspconfig/util.lua | 431 + pack/ant/start/nvim-lspconfig/neovim.yml | 25 + .../nvim-lspconfig-scm-1.rockspec | 31 + .../start/nvim-lspconfig/plugin/lspconfig.lua | 159 + .../nvim-lspconfig/scripts/README_template.md | 12 + .../start/nvim-lspconfig/scripts/docgen.lua | 281 + .../start/nvim-lspconfig/scripts/docgen.sh | 2 + pack/ant/start/nvim-lspconfig/selene.toml | 7 + .../nvim-lspconfig/test/lspconfig_spec.lua | 282 + .../nvim-lspconfig/test/minimal_init.lua | 69 + .../test/test_dir/a/a_marker.txt | 0 .../test/test_dir/root_marker.txt | 0 vimrc | 1 - 415 files changed, 43881 insertions(+), 18192 deletions(-) delete mode 100644 pack/ant/start/coc.nvim/.gitignore delete mode 100644 pack/ant/start/coc.nvim/LICENSE.md delete mode 100644 pack/ant/start/coc.nvim/Readme.md delete mode 100644 pack/ant/start/coc.nvim/autoload/coc.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/api.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/client.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/color.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/compat.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/cursor.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/dialog.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/dict.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/float.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/helper.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/highlight.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/list.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/math.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/notify.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/prompt.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/pum.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/rpc.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/snippet.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/string.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/task.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/terminal.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/ui.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/util.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/coc/window.vim delete mode 100644 pack/ant/start/coc.nvim/autoload/health/coc.vim delete mode 100644 pack/ant/start/coc.nvim/bin/prompt.js delete mode 100755 pack/ant/start/coc.nvim/bin/terminateProcess.sh delete mode 100644 pack/ant/start/coc.nvim/build/index.js delete mode 100644 pack/ant/start/coc.nvim/data/schema.json delete mode 100644 pack/ant/start/coc.nvim/doc/coc-config.txt delete mode 100644 pack/ant/start/coc.nvim/doc/coc.txt delete mode 100644 pack/ant/start/coc.nvim/history.md delete mode 100644 pack/ant/start/coc.nvim/package.json delete mode 100644 pack/ant/start/coc.nvim/plugin/coc.vim create mode 100644 pack/ant/start/nvim-lspconfig/.codespellignorewords create mode 100644 pack/ant/start/nvim-lspconfig/.editorconfig create mode 100644 pack/ant/start/nvim-lspconfig/.github/CODEOWNERS create mode 100644 pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/config.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md create mode 100644 pack/ant/start/nvim-lspconfig/.github/ci/run_sanitizer.sh create mode 100644 pack/ant/start/nvim-lspconfig/.github/dependabot.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/codespell.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/comment-config-changes.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/commit_lint.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/docgen.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/lint.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/problem_matchers/selene.json create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/release.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/sanitizer.yml create mode 100644 pack/ant/start/nvim-lspconfig/.github/workflows/test.yml create mode 100644 pack/ant/start/nvim-lspconfig/.gitignore create mode 100644 pack/ant/start/nvim-lspconfig/.luacheckrc create mode 100644 pack/ant/start/nvim-lspconfig/.stylua.toml create mode 100644 pack/ant/start/nvim-lspconfig/CONTRIBUTING.md create mode 100644 pack/ant/start/nvim-lspconfig/LICENSE.md create mode 100644 pack/ant/start/nvim-lspconfig/Makefile create mode 100644 pack/ant/start/nvim-lspconfig/README.md create mode 100644 pack/ant/start/nvim-lspconfig/doc/lspconfig.txt create mode 100644 pack/ant/start/nvim-lspconfig/doc/server_configurations.md create mode 100644 pack/ant/start/nvim-lspconfig/doc/server_configurations.txt create mode 100644 pack/ant/start/nvim-lspconfig/flake.lock create mode 100644 pack/ant/start/nvim-lspconfig/flake.nix create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/async.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/configs.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/manager.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/agda_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/aiken.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/als.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/anakin_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/angularls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ansiblels.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/antlersls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/apex_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/arduino_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/asm_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ast_grep.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/astro.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/autotools_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/awk_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/azure_pipelines_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bacon_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ballerina.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/basedpyright.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bashls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bazelrc_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/beancount.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bicep.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/biome.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/blueprint_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bqnlsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bright_script.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bsl_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buck2.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buddy_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bufls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bzl.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cadence.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cairo_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ccls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cds_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/circom-lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clangd.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clarity_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clojure_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cmake.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cobol_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/codeqlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coffeesense.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/contextive.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coq_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/crystalline.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/csharp_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/css_variables.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssmodules_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cucumber_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/custom_elements_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cypher_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dafny.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dagger.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dartls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dcmls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/debputy.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/delphi_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/denols.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dhall_lsp_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/diagnosticls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/digestif.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/djlsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/docker_compose_language_service.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dockerls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dolmenls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dotls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dprint.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/drools_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ds_pinyin_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/earthlyls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ecsact.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/efm.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elixirls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elmls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ember.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erg_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erlangls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/esbonio.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/eslint.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/facility_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fish_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flow.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flux_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/foam_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fortls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsautocomplete.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsharp_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fstar.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/futhark_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdscript.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdshader_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghcide.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghdl_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ginko_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gitlab_ci_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glasgow.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gleam.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glint.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glsl_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glslls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/golangci_lint_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gopls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gradle_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/grammarly.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/graphql.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/groovyls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/guile_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/harper_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/haxe_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hdl_checker.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/helm_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hhvm.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hie.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hlasm.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hoon_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/html.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/htmx.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hydra_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hyprls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/idris2_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/intelephense.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/janet_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/java_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jdtls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jedi_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jinja_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jqls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonnet_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/julials.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kcl.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/koka.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kotlin_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lean3ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/leanls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lelwel_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lemminx.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lexical.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ltex.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lua_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/luau_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lwc_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/m68k.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/markdown_oxide.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/marksman.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/matlab_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mdx_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mesonlsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/metals.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/millet.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mint.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_lsp_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_pdll_lsp_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mm0_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mojo.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/motoko_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/move_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/msbuild_project_tools_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mutt_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nelua_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/neocmake.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nextls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nginx_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nickel_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nil_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nim_langserver.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nimls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nixd.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nomad_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ntt.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nushell.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nxls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamllsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ols.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/omnisharp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/opencl_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openedge_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pact_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pasls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pbls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlnavigator.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlpls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pest_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phan.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phpactor.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pico8_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pkgbuild_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/please.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/postgres_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/powershell_es.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prismals.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prolog_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prosemd_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/protols.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/psalm.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pug.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/puppet.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/purescriptls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyre.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyright.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qml_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qmlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/quick_lint_js.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/r_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/racket_langserver.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/raku_navigator.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/reason_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regal.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regols.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/relay_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/remark_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rescriptls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rnix.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/robotframework_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/roc_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rome.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rubocop.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruby_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rune_languageserver.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rust_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/salt_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scheme_langserver.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scry.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/serve_d.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/shopify_theme_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sixtyfps.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slangd.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slint_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smarty_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smithy_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snakeskin_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snyk_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solang.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solargraph.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solc.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/somesass_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sorbet.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcekit.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcery.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spectral.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spyglassmc_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/standardrb.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starlark_rust.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starpls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/statix.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/steep.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stimulus_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stylelint_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/superhtml.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svelte.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svlangserver.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/swift_mesonls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/syntax_tree.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tabby_ml.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tailwindcss.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/taplo.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tblgen_lsp_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/teal_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/templ.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraform_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraformls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/texlab.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/textlsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tflint.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/theme_check.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/thriftls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tilt_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tinymist.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ts_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tsp_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ttags.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/turtle_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tvm_ffi_navigator.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/twiggy_language_server.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typeprof.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typos_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typst_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uiua.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unison.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unocss.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uvls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/v_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vacuum.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vala_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vale_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vdmj.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/verible.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veridian.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veryl_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vhdl_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vimls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/visualforce_ls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/volar.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vtsls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vuels.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/wgsl_analyzer.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yamlls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yang_lsp.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy_schema.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zk.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zls.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/lspinfo.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/windows.lua create mode 100644 pack/ant/start/nvim-lspconfig/lua/lspconfig/util.lua create mode 100644 pack/ant/start/nvim-lspconfig/neovim.yml create mode 100644 pack/ant/start/nvim-lspconfig/nvim-lspconfig-scm-1.rockspec create mode 100644 pack/ant/start/nvim-lspconfig/plugin/lspconfig.lua create mode 100644 pack/ant/start/nvim-lspconfig/scripts/README_template.md create mode 100644 pack/ant/start/nvim-lspconfig/scripts/docgen.lua create mode 100755 pack/ant/start/nvim-lspconfig/scripts/docgen.sh create mode 100644 pack/ant/start/nvim-lspconfig/selene.toml create mode 100644 pack/ant/start/nvim-lspconfig/test/lspconfig_spec.lua create mode 100644 pack/ant/start/nvim-lspconfig/test/minimal_init.lua create mode 100644 pack/ant/start/nvim-lspconfig/test/test_dir/a/a_marker.txt create mode 100644 pack/ant/start/nvim-lspconfig/test/test_dir/root_marker.txt diff --git a/init.lua b/init.lua index 2e1437e..2c77f5f 100644 --- a/init.lua +++ b/init.lua @@ -1 +1,5 @@ vim.cmd("runtime vimrc") + +require'lspconfig'.powershell_es.setup{ + bundle_path = os.getenv("HOME") .. '/opt/PowerShellEditorServices', +} diff --git a/pack/ant/start/coc.nvim/.gitignore b/pack/ant/start/coc.nvim/.gitignore deleted file mode 100644 index f9ec5e3..0000000 --- a/pack/ant/start/coc.nvim/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -lib -*.map -coverage -__pycache__ -.pyc -.log -src -publish.sh -doc/tags -doc/tags-cn -node_modules -src/__tests__/tags -typings diff --git a/pack/ant/start/coc.nvim/LICENSE.md b/pack/ant/start/coc.nvim/LICENSE.md deleted file mode 100644 index bee2bf1..0000000 --- a/pack/ant/start/coc.nvim/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2018-2018 by Qiming Zhao aaa - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/pack/ant/start/coc.nvim/Readme.md b/pack/ant/start/coc.nvim/Readme.md deleted file mode 100644 index 008ff55..0000000 --- a/pack/ant/start/coc.nvim/Readme.md +++ /dev/null @@ -1,611 +0,0 @@ -

- - Logo - -

Make your Vim/Neovim as smart as VSCode.

-

- Software License - Actions - Codecov Coverage Status - Doc - Gitter -

-

- ---- - -## Why? - -- 🚀 **Fast**: [instant increment completion](https://github.com/neoclide/coc.nvim/wiki/Completion-with-sources), increment buffer sync using buffer update events. -- 💎 **Reliable**: typed language, tested with CI. -- 🌟 **Featured**: [full LSP support](https://github.com/neoclide/coc.nvim/wiki/Language-servers#supported-features) -- ❤️ **Flexible**: [configured like VSCode](https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file), [extensions work like in VSCode](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions) - -## Quick Start - -Install [nodejs](https://nodejs.org/en/download/) >= 12.12: - -```bash -curl -sL install-node.vercel.app/lts | bash -``` - -For [vim-plug](https://github.com/junegunn/vim-plug) users: - -```vim -" Use release branch (recommend) -Plug 'neoclide/coc.nvim', {'branch': 'release'} - -" Or build from source code by using yarn: https://yarnpkg.com -Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'} -``` - -in your `.vimrc` or `init.vim`, then restart Vim and run `:PlugInstall`. - -Checkout [Install -coc.nvim](https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim) for -more info. - -You **have to** install coc extension or configure language servers for -LSP support. - -Install extensions like: - - :CocInstall coc-json coc-tsserver - -Or configure language server in `coc-settings.json` opened by -`:CocConfig`, like: - -```json -{ - "languageserver": { - "go": { - "command": "gopls", - "rootPatterns": ["go.mod"], - "trace.server": "verbose", - "filetypes": ["go"] - } - } -} -``` - -Checkout wiki for more details: - -- [Completion with sources](https://github.com/neoclide/coc.nvim/wiki/Completion-with-sources) -- [Using the configuration file](https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file) -- [Using coc extensions](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions) -- [Configure language servers](https://github.com/neoclide/coc.nvim/wiki/Language-servers) -- [F.A.Q](https://github.com/neoclide/coc.nvim/wiki/F.A.Q) - -Checkout `:h coc-nvim` for vim interface. - -## Example vim configuration - -Configuration is required to make coc.nvim easier to work with, since it -doesn't change your key-mappings or Vim options. This is done as much as -possible to avoid conflict with your other plugins. - -**❗️Important**: Some Vim plugins could change key mappings. Please use -command like`:verbose imap ` to make sure that your keymap has taken effect. - -```vim -" Some servers have issues with backup files, see #649. -set nobackup -set nowritebackup - -" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable -" delays and poor user experience. -set updatetime=300 - -" Always show the signcolumn, otherwise it would shift the text each time -" diagnostics appear/become resolved. -set signcolumn=yes - -"Use and for navigate completion list like built in completion. -inoremap coc#pum#visible() ? coc#pum#next(1) : "\" -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - -" Use tab for trigger completion with characters ahead and navigate. -" NOTE: Use command ':verbose imap ' to make sure tab is not mapped by -" other plugin before putting this into your config. -inoremap - \ coc#pum#visible() ? coc#pum#next(1): - \ CheckBackspace() ? "\" : - \ coc#refresh() -inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - -function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -" Use to trigger completion. -if has('nvim') - inoremap coc#refresh() -else - inoremap coc#refresh() -endif - -" Make to accept selected completion item or notify coc.nvim to format -" u starts a new undo break, please make your own choice. -inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" - -" Use `[g` and `]g` to navigate diagnostics -" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. -nmap [g (coc-diagnostic-prev) -nmap ]g (coc-diagnostic-next) - -" GoTo code navigation. -nmap gd (coc-definition) -nmap gy (coc-type-definition) -nmap gi (coc-implementation) -nmap gr (coc-references) - -" Use K to show documentation in preview window. -nnoremap K :call ShowDocumentation() - -function! ShowDocumentation() - if CocAction('hasProvider', 'hover') - call CocActionAsync('doHover') - else - call feedkeys('K', 'in') - endif -endfunction - -" Highlight the symbol and its references when holding the cursor. -autocmd CursorHold * silent call CocActionAsync('highlight') - -" Symbol renaming. -nmap rn (coc-rename) - -" Formatting selected code. -xmap f (coc-format-selected) -nmap f (coc-format-selected) - -augroup mygroup - autocmd! - " Setup formatexpr specified filetype(s). - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - " Update signature help on jump placeholder. - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -augroup end - -" Applying codeAction to the selected region. -" Example: `aap` for current paragraph -xmap a (coc-codeaction-selected) -nmap a (coc-codeaction-selected) - -" Remap keys for applying codeAction to the current buffer. -nmap ac (coc-codeaction) -" Apply AutoFix to problem on the current line. -nmap qf (coc-fix-current) - -" Run the Code Lens action on the current line. -nmap cl (coc-codelens-action) - -" Map function and class text objects -" NOTE: Requires 'textDocument.documentSymbol' support from the language server. -xmap if (coc-funcobj-i) -omap if (coc-funcobj-i) -xmap af (coc-funcobj-a) -omap af (coc-funcobj-a) -xmap ic (coc-classobj-i) -omap ic (coc-classobj-i) -xmap ac (coc-classobj-a) -omap ac (coc-classobj-a) - -" Remap and for scroll float windows/popups. -if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" -endif - -" Use CTRL-S for selections ranges. -" Requires 'textDocument/selectionRange' support of language server. -nmap (coc-range-select) -xmap (coc-range-select) - -" Add `:Format` command to format current buffer. -command! -nargs=0 Format :call CocActionAsync('format') - -" Add `:Fold` command to fold current buffer. -command! -nargs=? Fold :call CocAction('fold', ) - -" Add `:OR` command for organize imports of the current buffer. -command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') - -" Add (Neo)Vim's native statusline support. -" NOTE: Please see `:h coc-status` for integrations with external plugins that -" provide custom statusline: lightline.vim, vim-airline. -set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} - -" Mappings for CoCList -" Show all diagnostics. -nnoremap a :CocList diagnostics -" Manage extensions. -nnoremap e :CocList extensions -" Show commands. -nnoremap c :CocList commands -" Find symbol of current document. -nnoremap o :CocList outline -" Search workspace symbols. -nnoremap s :CocList -I symbols -" Do default action for next item. -nnoremap j :CocNext -" Do default action for previous item. -nnoremap k :CocPrev -" Resume latest coc list. -nnoremap p :CocListResume -``` - -## Articles - -- [coc.nvim 插件体系介绍](https://zhuanlan.zhihu.com/p/65524706) -- [CocList 入坑指南](https://zhuanlan.zhihu.com/p/71846145) -- [Create coc.nvim extension to improve Vim experience](https://medium.com/@chemzqm/create-coc-nvim-extension-to-improve-vim-experience-4461df269173) -- [How to write a coc.nvim extension (and why)](https://samroeca.com/coc-plugin.html) - -## Troubleshooting - -Try these steps when you have problem with coc.nvim. - -- Make sure your Vim version >= 8.0 by command `:version`. -- If service failed to start, use command `:CocInfo` or `:checkhealth` on Neovim. -- Checkout the log of coc.nvim by command `:CocOpenLog`. -- When you have issues with the language server, it's recommended to [checkout - the output](https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel). - -## Feedback - -- If you think Coc is useful, consider giving it a star. -- If you have a question, [ask on gitter](https://gitter.im/neoclide/coc.nvim) -- 中文用户请到 [中文 gitter](https://gitter.im/neoclide/coc-cn) 讨论 -- If something is not working, [create an - issue](https://github.com/neoclide/coc.nvim/issues/new). - -## Backers - -[Become a backer](https://opencollective.com/cocnvim#backer) and get your image on our README on GitHub with a link to your site. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Contributors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Qiming zhao

💻

Heyward Fann

💻

Raidou

💻

kevinhwang91

💻

年糕小豆汤

💻

Avi Dessauer

💻

最上川

💻

Yatao Li

💻

wongxy

💻

Sam McCall

💻

Samuel Roeca

💻

Amirali Esmaeili

💻

Jack Rowlingson

💻

Jaehwang Jung

💻

Antoine

💻

Cosmin Popescu

💻

Duc Nghiem Xuan

💻

Francisco Lopes

💻

daquexian

💻

dependabot[bot]

💻

greenkeeper[bot]

💻

Chris Kipp

💻

Dmytro Meleshko

💻

Kirill Bobyrev

💻

Gontran Baerts

💻

Andy

💻

Cheng JIANG

💻

Corin

💻

Daniel Zhang

💻

Ferdinand Bachmann

💻

Guangqing Chen

💻

Jade Meskill

💻

Jasper Poppe

💻

Jean Jordaan

💻

Kid

💻

Pieter van Loon

💻

Robert Liebowitz

💻

Seth Messer

💻

UncleBill

💻

ZERO

💻

fsouza

💻

XiaoZhang

💻

whyreal

💻

yehuohan

💻

バクダンくん

💻

Raphael

💻

tbodt

💻

Aaron McDaid

💻

Aasif Versi

💻

Abner Silva

💻

Adam Stankiewicz

💻

Adamansky Anton

💻

Ahmed El Gabri

💻

Alexandr Kondratev

💻

Andrew Shim

💻

Andy Lindeman

💻

Augustin

💻

Bastien Orivel

💻

Ben Lu

💻

Ben

💻

Brendan Roy

💻

brianembry

💻

br

💻

Cason Adams

💻

Chang Y

💻

Chayoung You

💻

Chen Lijun

💻

Chen Mulong

💻

Chris Weyl

💻

dezza

💻

Cody Allen

💻

Damien Rajon

💻

Daniel Eriksson

💻

Daniel Jenson

💻

David Mejorado

💻

Deric Pang

💻

Ding Tao

💻

Doron Behar

💻

Egor Kovetskiy

💻

ElKowar

💻

Emeliov Dmitrii

💻

Fabian Becker

💻

FallenWarrior2k

💻

Fausto Núñez Alberro

💻

Felipe Ramos

💻

Fredrik Borg

💻

Gavin Sim

💻

Gibson Fahnestock

💻

Giovanni Giordano

💻

Gopal Adhikari

💻

Hanh Le

💻

hedy

💻

Hendrik Lammers

💻

Henry Barreto

💻

Hugo

💻

Jackie Li

💻

Jakub Nowak

💻

James Pickard

💻

Jia Sui

💻

Ellie Hermaszewska

💻

Joel Bradshaw

💻

John Carlo Roberto

💻

Jonas Holst Damtoft

💻

Jonathan Lehman

💻

Joosep Alviste

💻

Josa Gesell

💻

Joshua Rubin

💻

Julian Grinblat

💻

Julian Valentin

💻

KabbAmine

💻

Kay Gosho

💻

Kenny Huynh

💻

Kevin Rambaud

💻

Kian Cross

💻

Kristijan Husak

💻

NullVoxPopuli

💻

Lasse Peters

💻

Noel Errenil

💻

LinArcX

💻

Liu-Cheng Xu

💻

Marc

💻

Marius Gawrisch

💻

Mark Hintz

💻

Mathieu Le Tiec

💻

Matt White

💻

Matthew Evans

💻

Me1onRind

💻

Qyriad

💻

Narcis B.

💻

Neur1n

💻

Nicolas Dermine

💻

Noah

💻

PENG Rui

💻

Paco

💻

Peng Guanwen

💻

Petter Wahlman

💻

Pooya Moradi

💻

Quade Morrison

💻

Ralf Vogler

💻

Ran Chen

💻

Ricardo García Vega

💻

Rick Jones

💻

Ryan Christian

💻

Salo

💻

Sam Nolan

💻

Saurav

💻

Sean Mackesey

💻

Sheel Patel

💻

Solomon Ng

💻

Sri Kadimisetty

💻

Stephen Prater

💻

Sune Kibsgaard

💻

Aquaakuma

💻

Takumi Kawase

💻

The Blob SCP

💻

Tomasz N

💻

Tomoyuki Harada

💻

Tony Fettes

💻

Tony Narlock

💻

Tony Wang

💻

Victor Quach

💻

Whisperity

💻

William Turner

💻

Xiaochao Dong

💻

Hugh Hou

💻

Jackie Li

💻

Zachary Freed

💻

akiyosi

💻

alexjg

💻

aste4

💻

clyfish

💻

dev7ba

💻

diartyz

💻

doza-daniel

💻

equal-l2

💻

fong

💻

hexh

💻

hhiraba

💻

ic-768

💻

javiertury

💻

karasu

💻

kevineato

💻

Eduardo Costa

💻

micchy326

💻

midchildan

💻

minefuto

💻

miyanokomiya

💻

miyaviee

💻

monkoose

💻 🐛

mujx

💻

mvilim

💻

naruaway

💻

piersy

💻

ryantig

💻

rydesun

💻

sc00ter

💻

smhc

💻

Sam Kaplan

💻

tasuten

💻

todesking

💻

typicode

💻

李鸣飞

💻

Ikko Ashimine

📖

Rammiah

🐛
- - - - - - - - - - - - -This project follows the [all-contributors](https://allcontributors.org) specification. -Contributions of any kind are welcome! - -## License - -Anti 996 diff --git a/pack/ant/start/coc.nvim/autoload/coc.vim b/pack/ant/start/coc.nvim/autoload/coc.vim deleted file mode 100644 index d5cdaf6..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc.vim +++ /dev/null @@ -1,183 +0,0 @@ -scriptencoding utf-8 -let g:coc#_context = {'start': 0, 'preselect': -1,'candidates': []} -let g:coc_user_config = get(g:, 'coc_user_config', {}) -let g:coc_global_extensions = get(g:, 'coc_global_extensions', []) -let g:coc_selected_text = '' -let g:coc_vim_commands = [] -let s:watched_keys = [] -let s:is_vim = !has('nvim') -let s:error_sign = get(g:, 'coc_status_error_sign', has('mac') ? '❌ ' : 'E') -let s:warning_sign = get(g:, 'coc_status_warning_sign', has('mac') ? '⚠️ ' : 'W') -let s:select_api = exists('*nvim_select_popupmenu_item') -let s:callbacks = {} -let s:hide_pum = has('nvim-0.6.1') || has('patch-8.2.3389') - -function! coc#expandable() abort - return coc#rpc#request('snippetCheck', [1, 0]) -endfunction - -function! coc#jumpable() abort - return coc#rpc#request('snippetCheck', [0, 1]) -endfunction - -function! coc#expandableOrJumpable() abort - return coc#rpc#request('snippetCheck', [1, 1]) -endfunction - -" add vim command to CocCommand list -function! coc#add_command(id, cmd, ...) - let config = {'id':a:id, 'cmd':a:cmd, 'title': get(a:,1,'')} - call add(g:coc_vim_commands, config) - if !coc#rpc#ready() | return | endif - call coc#rpc#notify('addCommand', [config]) -endfunction - -function! coc#on_enter() - call coc#rpc#notify('CocAutocmd', ['Enter', bufnr('%')]) - return '' -endfunction - -function! coc#_insert_key(method, key, ...) abort - let prefix = '' - if get(a:, 1, 1) - if pumvisible() - if s:hide_pum - let prefix = "\\" - else - let g:coc_disable_space_report = 1 - let prefix = "\\" - endif - endif - endif - return prefix."\=coc#rpc#".a:method."('doKeymap', ['".a:key."'])\" -endfunction - -function! coc#_complete() abort - let items = get(g:coc#_context, 'candidates', []) - let preselect = get(g:coc#_context, 'preselect', -1) - let startcol = g:coc#_context.start + 1 - if s:select_api && len(items) && preselect != -1 - noa call complete(startcol, items) - call nvim_select_popupmenu_item(preselect, v:false, v:false, {}) - " use specific key to preselect item at once - call feedkeys("\\" , 'i') - else - if pumvisible() - let g:coc_disable_complete_done = 1 - endif - call complete(startcol, items) - endif - return '' -endfunction - -function! coc#_do_complete(start, items, preselect, changedtick) - if b:changedtick != a:changedtick - return - endif - let g:coc#_context = { - \ 'start': a:start, - \ 'candidates': a:items, - \ 'preselect': a:preselect - \} - if mode() =~# 'i' - call coc#_complete() - endif -endfunction - -function! coc#_cancel(...) - call coc#pum#close() -endfunction - -" used for statusline -function! coc#status() - let info = get(b:, 'coc_diagnostic_info', {}) - let msgs = [] - if !empty(info) && get(info, 'error', 0) - call add(msgs, s:error_sign . info['error']) - endif - if !empty(info) && get(info, 'warning', 0) - call add(msgs, s:warning_sign . info['warning']) - endif - return coc#compat#trim(join(msgs, ' ') . ' ' . get(g:, 'coc_status', '')) -endfunction - -function! coc#config(section, value) - let g:coc_user_config[a:section] = a:value - call coc#rpc#notify('updateConfig', [a:section, a:value]) -endfunction - -function! coc#add_extension(...) - if a:0 == 0 | return | endif - call extend(g:coc_global_extensions, a:000) -endfunction - -function! coc#_watch(key) - if s:is_vim | return | endif - if index(s:watched_keys, a:key) == -1 - call add(s:watched_keys, a:key) - call dictwatcheradd(g:, a:key, function('s:GlobalChange')) - endif -endfunction - -function! coc#_unwatch(key) - if s:is_vim | return | endif - let idx = index(s:watched_keys, a:key) - if idx != -1 - call remove(s:watched_keys, idx) - call dictwatcherdel(g:, a:key, function('s:GlobalChange')) - endif -endfunction - -function! s:GlobalChange(dict, key, val) - call coc#rpc#notify('GlobalChange', [a:key, get(a:val, 'old', v:null), get(a:val, 'new', v:null)]) -endfunction - -function! coc#on_notify(id, method, Cb) - let key = a:id. '-'.a:method - let s:callbacks[key] = a:Cb - call coc#rpc#notify('registNotification', [a:id, a:method]) -endfunction - -function! coc#do_notify(id, method, result) - let key = a:id. '-'.a:method - let Fn = s:callbacks[key] - if !empty(Fn) - call Fn(a:result) - endif -endfunction - -function! coc#start(...) - let opt = coc#util#get_complete_option() - call CocActionAsync('startCompletion', extend(opt, get(a:, 1, {}))) - return '' -endfunction - -function! coc#refresh() abort - return "\=coc#start()\" -endfunction - -function! coc#_select_confirm() abort - call timer_start(10, { -> coc#pum#select_confirm()}) - return s:is_vim || has('nvim-0.5.0') ? "\" : "\\" -endfunction - -function! coc#complete_indent() abort - let curpos = getcurpos() - let indent_len = len(matchstr(getline('.'), '^\s*')) - let startofline = &startofline - let virtualedit = &virtualedit - set nostartofline - set virtualedit=all - normal! == - let &startofline = startofline - let &virtualedit = virtualedit - let shift = len(matchstr(getline('.'), '^\s*')) - indent_len - let curpos[2] += shift - let curpos[4] += shift - call cursor(curpos[1:]) - if shift != 0 - if s:is_vim - call timer_start(0, { -> execute('redraw')}) - endif - endif -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/api.vim b/pack/ant/start/coc.nvim/autoload/coc/api.vim deleted file mode 100644 index b3af8b1..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/api.vim +++ /dev/null @@ -1,678 +0,0 @@ -" ============================================================================ -" Description: Client api used by vim8 -" Author: Qiming Zhao -" Licence: Anti 996 licence -" Last Modified: Jun 03, 2022 -" ============================================================================ -if has('nvim') | finish | endif -scriptencoding utf-8 -let s:funcs = {} -let s:prop_offset = get(g:, 'coc_text_prop_offset', 1000) -let s:namespace_id = 1 -let s:namespace_cache = {} -let s:max_src_id = 1000 -" bufnr => max textprop id -let s:buffer_id = {} -" srcId => list of types -let s:id_types = {} - -" helper {{ -function! s:buf_line_count(bufnr) abort - if bufnr('%') == a:bufnr - return line('$') - endif - if exists('*getbufinfo') - let info = getbufinfo(a:bufnr) - if empty(info) - return 0 - endif - " vim 8.1 has getbufinfo but no linecount - if has_key(info[0], 'linecount') - return info[0]['linecount'] - endif - endif - if exists('*getbufline') - let lines = getbufline(a:bufnr, 1, '$') - return len(lines) - endif - let curr = bufnr('%') - execute 'noa buffer '.a:bufnr - let n = line('$') - execute 'noa buffer '.curr - return n -endfunction - -function! s:execute(cmd) - if a:cmd =~# '^echo' - execute a:cmd - else - silent! execute a:cmd - endif -endfunction -" }}" - -" nvim client methods {{ -function! s:funcs.set_current_dir(dir) abort - execute 'cd '.a:dir -endfunction - -function! s:funcs.set_var(name, value) abort - execute 'let g:'.a:name.'= a:value' -endfunction - -function! s:funcs.del_var(name) abort - execute 'unlet g:'.a:name -endfunction - -function! s:funcs.set_option(name, value) abort - execute 'let &'.a:name.' = a:value' -endfunction - -function! s:funcs.set_current_buf(bufnr) abort - if !bufexists(a:bufnr) | return | endif - execute 'buffer '.a:bufnr -endfunction - -function! s:funcs.set_current_win(win_id) abort - let [tabnr, winnr] = win_id2tabwin(a:win_id) - if tabnr == 0 | return | endif - execute 'normal! '.tabnr.'gt' - execute winnr.' wincmd w' -endfunction - -function! s:funcs.set_current_tabpage(tabnr) abort - execute 'normal! '.a:tabnr.'gt' -endfunction - -function! s:funcs.list_wins() abort - return map(getwininfo(), 'v:val["winid"]') -endfunction - -function s:inspect_type(v) abort - let types = ['Number', 'String', 'Funcref', 'List', 'Dictionary', 'Float', 'Boolean', 'Null'] - return get(types, type(a:v), 'Unknown') -endfunction - -function! s:funcs.call_atomic(calls) - let res = [] - for i in range(len(a:calls)) - let [key, arglist] = a:calls[i] - let name = key[5:] - try - call add(res, call(s:funcs[name], arglist)) - catch /.*/ - return [res, [i, "VimException(".s:inspect_type(v:exception).")", v:exception . ' on '.v:throwpoint]] - endtry - endfor - return [res, v:null] -endfunction - -function! s:funcs.set_client_info(...) abort -endfunction - -function! s:funcs.subscribe(...) abort -endfunction - -function! s:funcs.unsubscribe(...) abort -endfunction - -function! s:funcs.call_function(method, args) abort - return call(a:method, a:args) -endfunction - -function! s:funcs.call_dict_function(dict, method, args) abort - return call(a:method, a:args, a:dict) -endfunction - -function! s:funcs.command(command) abort - " command that could cause cursor vanish - if a:command =~# '^echo' || a:command =~# '^redraw' || a:command =~# '^sign place' - call timer_start(0, {-> s:execute(a:command)}) - else - execute a:command - let err = get(g:, 'errmsg', '') - " get error from python script run. - if !empty(err) - unlet g:errmsg - throw err - endif - endif -endfunction - -function! s:funcs.eval(expr) abort - return eval(a:expr) -endfunction - -function! s:funcs.get_api_info() - let names = coc#api#func_names() - return [1, {'functions': map(names, '{"name": "nvim_".v:val}')}] -endfunction - -function! s:funcs.list_bufs() - return map(getbufinfo({'bufloaded': 1}), 'v:val["bufnr"]') -endfunction - -function! s:funcs.feedkeys(keys, mode, escape_csi) - call feedkeys(a:keys, a:mode) -endfunction - -function! s:funcs.list_runtime_paths() - return globpath(&runtimepath, '', 0, 1) -endfunction - -function! s:funcs.command_output(cmd) - return execute(a:cmd) -endfunction - -function! s:funcs.get_current_line() - return getline('.') -endfunction - -function! s:funcs.set_current_line(line) - call setline('.', a:line) -endfunction - -function! s:funcs.del_current_line(line) - execute 'normal! dd' -endfunction - -function! s:funcs.get_var(var) - return get(g:, a:var, v:null) -endfunction - -function! s:funcs.get_vvar(var) - return get(v:, a:var, v:null) -endfunction - -function! s:funcs.get_option(name) - return eval('&'.a:name) -endfunction - -function! s:funcs.get_current_buf() - return bufnr('%') -endfunction - -function! s:funcs.get_current_win() - return win_getid() -endfunction - -function! s:funcs.get_current_tabpage() - return tabpagenr() -endfunction - -function! s:funcs.list_tabpages() - return range(1, tabpagenr('$')) -endfunction - -function! s:funcs.get_mode() - return {'blocking': v:false, 'mode': mode()} -endfunction - -function! s:funcs.strwidth(str) - return strwidth(a:str) -endfunction - -function! s:funcs.out_write(str) - echon a:str - call timer_start(0, {-> s:execute('redraw')}) -endfunction - -function! s:funcs.err_write(str) - "echoerr a:str -endfunction - -function! s:funcs.err_writeln(str) - echohl ErrorMsg - echom a:str - echohl None - call timer_start(0, {-> s:execute('redraw')}) -endfunction - -function! s:funcs.create_namespace(name) abort - if empty(a:name) - let id = s:namespace_id - let s:namespace_id = s:namespace_id + 1 - return id - endif - let id = get(s:namespace_cache, a:name, 0) - if !id - let id = s:namespace_id - let s:namespace_id = s:namespace_id + 1 - let s:namespace_cache[a:name] = id - endif - return id -endfunction -" }} - -" buffer methods {{ -function! s:funcs.buf_set_option(bufnr, name, val) - let val = a:val - if val is v:true - let val = 1 - elseif val is v:false - let val = 0 - endif - return setbufvar(a:bufnr, '&'.a:name, val) -endfunction - -function! s:funcs.buf_get_changedtick(bufnr) - return getbufvar(a:bufnr, 'changedtick') -endfunction - -function! s:funcs.buf_is_valid(bufnr) - return bufloaded(a:bufnr) ? v:true : v:false -endfunction - -function! s:funcs.buf_get_mark(bufnr, name) - let nr = bufnr('%') - if a:bufnr != 0 || a:bufnr != nr - throw 'buf_get_mark support current buffer only' - endif - return [line("'" . a:name), col("'" . a:name)] -endfunction - -function! s:funcs.buf_add_highlight(bufnr, srcId, hlGroup, line, colStart, colEnd, ...) abort - if !has('patch-8.1.1719') - return - endif - if a:srcId == 0 - let srcId = s:max_src_id + 1 - let s:max_src_id = srcId - else - let srcId = a:srcId - endif - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - let type = a:hlGroup.'_'.srcId - let types = get(s:id_types, srcId, []) - if index(types, type) == -1 - call add(types, type) - let s:id_types[srcId] = types - call prop_type_add(type, extend({'highlight': a:hlGroup}, get(a:, 1, {}))) - endif - let end = a:colEnd == -1 ? strlen(getbufline(bufnr, a:line + 1)[0]) + 1 : a:colEnd + 1 - if end < a:colStart + 1 - return - endif - let id = s:generate_id(a:bufnr) - try - call prop_add(a:line + 1, a:colStart + 1, {'bufnr': bufnr, 'type': type, 'id': id, 'end_col': end}) - catch /^Vim\%((\a\+)\)\=:E967/ - " ignore 967 - endtry - if a:srcId == 0 - " return generated srcId - return srcId - endif -endfunction - -function! s:funcs.buf_clear_namespace(bufnr, srcId, startLine, endLine) abort - if !has('patch-8.1.1719') - return - endif - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - let start = a:startLine + 1 - let end = a:endLine == -1 ? len(getbufline(bufnr, 1, '$')) : a:endLine - if a:srcId == -1 - if has_key(s:buffer_id, a:bufnr) - unlet s:buffer_id[a:bufnr] - endif - call prop_clear(start, end, {'bufnr' : bufnr}) - else - for type in get(s:id_types, a:srcId, []) - try - call prop_remove({'bufnr': bufnr, 'all': 1, 'type': type}, start, end) - catch /^Vim\%((\a\+)\)\=:E968/ - " ignore 968 - endtry - endfor - endif -endfunction - -function! s:funcs.buf_line_count(bufnr) abort - return s:buf_line_count(a:bufnr) -endfunction - -function! s:funcs.buf_attach(...) - " not supported - return 1 -endfunction - -function! s:funcs.buf_detach() - " not supported - return 1 -endfunction - -function! s:funcs.buf_get_lines(bufnr, start, end, strict) abort - let lines = getbufline(a:bufnr, 1, '$') - let start = a:start < 0 ? a:start + 1 : a:start - let end = a:end < 0 ? a:end + 1 : a:end - if a:strict && end > len(lines) - throw 'line number out of range: '. end - endif - return lines[start : end - 1] -endfunction - -function! s:funcs.buf_set_lines(bufnr, start, end, strict, ...) abort - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - if !bufloaded(bufnr) - return - endif - let replacement = get(a:, 1, []) - let lineCount = s:buf_line_count(bufnr) - let startLnum = a:start >= 0 ? a:start + 1 : lineCount + a:start + 2 - let end = a:end >= 0 ? a:end : lineCount + a:end + 1 - if end == lineCount + 1 - let end = lineCount - endif - let delCount = end - (startLnum - 1) - let changeBuffer = 0 - let curr = bufnr('%') - if bufnr != curr && !exists('*setbufline') - let changeBuffer = 1 - exe 'buffer '.bufnr - endif - if bufnr == curr || changeBuffer - " replace - let storeView = winsaveview() - if delCount == len(replacement) - call setline(startLnum, replacement) - else - if len(replacement) - call append(startLnum - 1, replacement) - endif - if delCount - let start = startLnum + len(replacement) - let saved_reg = @" - let system_reg = @* - if exists('*deletebufline') - silent call deletebufline(curr, start, start + delCount - 1) - else - silent execute start . ','.(start + delCount - 1).'d' - endif - let @" = saved_reg - let @* = system_reg - endif - endif - call winrestview(storeView) - if changeBuffer - exe 'buffer '.curr - endif - elseif exists('*setbufline') - " replace - if delCount == len(replacement) - " 8.0.1039 - call setbufline(bufnr, startLnum, replacement) - else - if len(replacement) - " 8.10037 - call appendbufline(bufnr, startLnum - 1, replacement) - endif - if delCount - let start = startLnum + len(replacement) - let saved_reg = @" - let system_reg = @* - "8.1.0039 - silent call deletebufline(bufnr, start, start + delCount - 1) - let @" = saved_reg - let @* = system_reg - endif - endif - endif -endfunction - -function! s:funcs.buf_set_name(bufnr, name) abort - let nr = bufnr('%') - if a:bufnr != nr - throw 'buf_set_name support current buffer only' - else - execute '0f' - execute 'file '.fnameescape(a:name) - endif -endfunction - -function! s:funcs.buf_get_var(bufnr, name) - return getbufvar(a:bufnr, a:name) -endfunction - -function! s:funcs.buf_set_var(bufnr, name, val) - if !bufloaded(a:bufnr) | return | endif - call setbufvar(a:bufnr, a:name, a:val) -endfunction - -function! s:funcs.buf_del_var(bufnr, name) - if bufnr == bufnr('%') - execute 'unlet! b:'.a:name - elseif exists('*win_execute') - let winid = coc#compat#buf_win_id(a:bufnr) - if winid != -1 - call win_execute(winid, 'unlet! b:'.a:name) - endif - endif -endfunction - -function! s:funcs.buf_get_option(bufnr, name) - return getbufvar(a:bufnr, '&'.a:name) -endfunction - -function! s:funcs.buf_get_name(bufnr) - return bufname(a:bufnr) -endfunction -" }} - -" window methods {{ -function! s:funcs.win_get_buf(winid) - return winbufnr(a:winid) -endfunction - -function! s:funcs.win_get_position(win_id) abort - let [row, col] = win_screenpos(a:win_id) - if row == 0 && col == 0 - throw 'Invalid window '.a:win_id - endif - return [row - 1, col - 1] -endfunction - -function! s:funcs.win_get_height(win_id) abort - return winheight(a:win_id) -endfunction - -function! s:funcs.win_get_width(win_id) abort - return winwidth(a:win_id) -endfunction - -if exists('*win_execute') - function! s:win_execute(win_id, cmd, ...) abort - let ref = get(a:000, 0, v:null) - let cmd = ref is v:null ? a:cmd : 'let ref["out"] = ' . a:cmd - call win_execute(a:win_id, cmd) - endfunction -else - function! s:win_execute(win_id, cmd, ...) abort - let ref = get(a:000, 0, v:null) - let cmd = ref is v:null ? a:cmd : 'let ref["out"] = ' . a:cmd - let winid = win_getid() - if winid == a:win_id - execute cmd - else - let goto_status = win_gotoid(a:win_id) - if !goto_status - return - endif - execute cmd - call win_gotoid(winid) - endif - endfunction -endif - -function! s:get_tabnr(winid) abort - let ref = {} - call s:win_execute(a:winid, 'tabpagenr()', ref) - return get(ref, 'out', 0) -endfunction - -function! s:funcs.win_get_cursor(win_id) abort - let ref = {} - call s:win_execute(a:win_id, "[line('.'), col('.')-1]", ref) - return get(ref, 'out', 0) -endfunction - -function! s:funcs.win_get_var(win_id, name, ...) abort - let tabnr = s:get_tabnr(a:win_id) - if tabnr - return gettabwinvar(tabnr, a:win_id, a:name, get(a:, 1, v:null)) - endif - throw 'window '.a:win_id. ' not a visible window' -endfunction - -function! s:funcs.win_set_width(win_id, width) abort - call s:win_execute(a:win_id, 'vertical resize '.a:width) -endfunction - -function! s:funcs.win_set_buf(win_id, buf_id) abort - call s:win_execute(a:win_id, 'buffer '.a:buf_id) -endfunction - -function! s:funcs.win_get_option(win_id, name) abort - let tabnr = s:get_tabnr(a:win_id) - if tabnr - return gettabwinvar(tabnr, a:win_id, '&'.a:name) - endif - throw 'window '.a:win_id. ' not a valid window' -endfunction - -function! s:funcs.win_set_height(win_id, height) abort - return s:win_execute(a:win_id, 'resize '.a:height) -endfunction - -function! s:funcs.win_set_option(win_id, name, value) abort - let val = a:value - if val is v:true - let val = 1 - elseif val is v:false - let val = 0 - endif - let tabnr = s:get_tabnr(a:win_id) - if tabnr - call settabwinvar(tabnr, a:win_id, '&'.a:name, val) - else - throw 'window '.a:win_id. ' not a valid window' - endif -endfunction - -function! s:funcs.win_set_var(win_id, name, value) abort - let tabnr = s:get_tabnr(a:win_id) - if tabnr - call settabwinvar(tabnr, a:win_id, a:name, a:value) - else - throw "Invalid window id ".a:win_id - endif -endfunction - -function! s:funcs.win_del_var(win_id, name) abort - call s:win_execute(a:win_id, 'unlet! w:'.a:name) -endfunction - -function! s:funcs.win_is_valid(win_id) abort - let info = getwininfo(a:win_id) - return empty(info) ? v:false : v:true -endfunction - -function! s:funcs.win_get_number(win_id) abort - let info = getwininfo(a:win_id) - if empty(info) - throw 'Invalid window id '.a:win_id - endif - return info[0]['winnr'] -endfunction - -function! s:funcs.win_set_cursor(win_id, pos) abort - let [line, col] = a:pos - call s:win_execute(a:win_id, 'call cursor('.line.','.(col + 1).')') -endfunction - -function! s:funcs.win_close(win_id, ...) abort - let force = get(a:, 1, 0) - call s:win_execute(a:win_id, 'close'.(force ? '!' : '')) -endfunction - -function! s:funcs.win_get_tabpage(win_id) abort - let tabnr = s:get_tabnr(a:win_id) - if !tabnr - throw 'Invalid window id '.a:win_id - endif - return tabnr -endfunction -" }} - -" tabpage methods {{ -function! s:funcs.tabpage_get_number(id) - return a:id -endfunction - -function! s:funcs.tabpage_list_wins(tabnr) - let info = getwininfo() - return map(filter(info, 'v:val["tabnr"] == a:tabnr'), 'v:val["winid"]') -endfunction - -function! s:funcs.tabpage_get_var(tabnr, name) - return gettabvar(a:tabnr, a:name, v:null) -endfunction - -function! s:funcs.tabpage_set_var(tabnr, name, value) - call settabvar(a:tabnr, a:name, a:value) -endfunction - -function! s:funcs.tabpage_del_var(tabnr, name) - call settabvar(a:tabnr, a:name, v:null) -endfunction - -function! s:funcs.tabpage_is_valid(tabnr) - let max = tabpagenr('$') - return a:tabnr <= max -endfunction - -function! s:funcs.tabpage_get_win(tabnr) - let wnr = tabpagewinnr(a:tabnr) - return win_getid(wnr, a:tabnr) -endfunction - -function! s:generate_id(bufnr) abort - let max = get(s:buffer_id, a:bufnr, s:prop_offset) - let id = max + 1 - let s:buffer_id[a:bufnr] = id - return id -endfunction -" }} - -function! coc#api#get_types(srcId) abort - return get(s:id_types, a:srcId, []) -endfunction - -function! coc#api#func_names() abort - return keys(s:funcs) -endfunction - -function! coc#api#call(method, args) abort - let err = v:null - let res = v:null - try - let res = call(s:funcs[a:method], a:args) - catch /.*/ - let err = v:exception .' on api "'.a:method.'" '.json_encode(a:args) - endtry - return [err, res] -endfunction - -function! coc#api#exec(method, args) abort - return call(s:funcs[a:method], a:args) -endfunction - -function! coc#api#notify(method, args) abort - try - call call(s:funcs[a:method], a:args) - catch /.*/ - let g:b = v:exception - call coc#rpc#notify('nvim_error_event', [0, v:exception.' on api "'.a:method.'" '.json_encode(a:args)]) - endtry -endfunction -" vim: set sw=2 ts=2 sts=2 et tw=78 foldmarker={{,}} foldmethod=marker foldlevel=0: diff --git a/pack/ant/start/coc.nvim/autoload/coc/client.vim b/pack/ant/start/coc.nvim/autoload/coc/client.vim deleted file mode 100644 index dae1e77..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/client.vim +++ /dev/null @@ -1,340 +0,0 @@ -scriptencoding utf-8 -let s:root = expand(':h:h:h') -let s:is_vim = !has('nvim') -let s:is_win = has("win32") || has("win64") -let s:clients = {} - -if get(g:, 'node_client_debug', 0) - echohl WarningMsg | echo '[coc.nvim] Enable g:node_client_debug could impact your vim experience' | echohl None - let $NODE_CLIENT_LOG_LEVEL = 'debug' - if exists('$NODE_CLIENT_LOG_FILE') - let s:logfile = resolve($NODE_CLIENT_LOG_FILE) - else - let s:logfile = tempname() - let $NODE_CLIENT_LOG_FILE = s:logfile - endif -endif - -" create a client -function! coc#client#create(name, command) - let client = {} - let client['command'] = a:command - let client['name'] = a:name - let client['running'] = 0 - let client['async_req_id'] = 1 - let client['async_callbacks'] = {} - " vim only - let client['channel'] = v:null - " neovim only - let client['chan_id'] = 0 - let client['start'] = function('s:start', [], client) - let client['request'] = function('s:request', [], client) - let client['notify'] = function('s:notify', [], client) - let client['request_async'] = function('s:request_async', [], client) - let client['on_async_response'] = function('s:on_async_response', [], client) - let s:clients[a:name] = client - return client -endfunction - -function! s:start() dict - if self.running | return | endif - if !isdirectory(getcwd()) - echohl Error | echon '[coc.nvim] Current cwd is not a valid directory.' | echohl None - return - endif - let timeout = string(get(g:, 'coc_channel_timeout', 30)) - let tmpdir = fnamemodify(tempname(), ':p:h') - if s:is_vim - if get(g:, 'node_client_debug', 0) - let file = tmpdir . '/coc.log' - call ch_logfile(file, 'w') - echohl MoreMsg | echo '[coc.nvim] channel log to '.file | echohl None - endif - let options = { - \ 'in_mode': 'json', - \ 'out_mode': 'json', - \ 'err_mode': 'nl', - \ 'err_cb': {channel, message -> s:on_stderr(self.name, split(message, "\n"))}, - \ 'exit_cb': {channel, code -> s:on_exit(self.name, code)}, - \ 'env': { - \ 'NODE_NO_WARNINGS': '1', - \ 'VIM_NODE_RPC': '1', - \ 'COC_NVIM': '1', - \ 'COC_CHANNEL_TIMEOUT': timeout, - \ 'TMPDIR': tmpdir, - \ } - \} - if has("patch-8.1.350") - let options['noblock'] = 1 - endif - let job = job_start(self.command, options) - let status = job_status(job) - if status !=# 'run' - let self.running = 0 - echohl Error | echom 'Failed to start '.self.name.' service' | echohl None - return - endif - let self['running'] = 1 - let self['channel'] = job_getchannel(job) - else - let original = {} - let opts = { - \ 'rpc': 1, - \ 'on_stderr': {channel, msgs -> s:on_stderr(self.name, msgs)}, - \ 'on_exit': {channel, code -> s:on_exit(self.name, code)}, - \ } - if has('nvim-0.5.0') - " could use env option - let opts['env'] = { - \ 'COC_NVIM': '1', - \ 'NODE_NO_WARNINGS': '1', - \ 'COC_CHANNEL_TIMEOUT': timeout, - \ 'TMPDIR': tmpdir - \ } - else - if exists('*getenv') - let original = { - \ 'NODE_NO_WARNINGS': getenv('NODE_NO_WARNINGS'), - \ 'TMPDIR': getenv('TMPDIR'), - \ } - endif - if exists('*setenv') - call setenv('COC_NVIM', '1') - call setenv('NODE_NO_WARNINGS', '1') - call setenv('COC_CHANNEL_TIMEOUT', timeout) - call setenv('TMPDIR', tmpdir) - else - let $NODE_NO_WARNINGS = 1 - let $TMPDIR = tmpdir - endif - endif - let chan_id = jobstart(self.command, opts) - if !empty(original) - if exists('*setenv') - for key in keys(original) - call setenv(key, original[key]) - endfor - else - let $TMPDIR = original['TMPDIR'] - endif - endif - if chan_id <= 0 - echohl Error | echom 'Failed to start '.self.name.' service' | echohl None - return - endif - let self['chan_id'] = chan_id - let self['running'] = 1 - endif -endfunction - -function! s:on_stderr(name, msgs) - if get(g:, 'coc_vim_leaving', 0) | return | endif - if get(g:, 'coc_disable_uncaught_error', 0) | return | endif - let data = filter(copy(a:msgs), '!empty(v:val)') - if empty(data) | return | endif - let client = a:name ==# 'coc' ? '[coc.nvim]' : '['.a:name.']' - let data[0] = client.': '.data[0] - call coc#ui#echo_messages('Error', data) -endfunction - -function! s:on_exit(name, code) abort - if get(g:, 'coc_vim_leaving', 0) | return | endif - let client = get(s:clients, a:name, v:null) - if empty(client) | return | endif - if client['running'] != 1 | return | endif - let client['running'] = 0 - let client['chan_id'] = 0 - let client['channel'] = v:null - let client['async_req_id'] = 1 - if a:code != 0 && a:code != 143 - echohl Error | echom 'client '.a:name. ' abnormal exit with: '.a:code | echohl None - endif -endfunction - -function! coc#client#get_client(name) abort - return get(s:clients, a:name, v:null) -endfunction - -function! coc#client#get_channel(client) - if s:is_vim - return a:client['channel'] - endif - return a:client['chan_id'] -endfunction - -function! s:request(method, args) dict - let channel = coc#client#get_channel(self) - if empty(channel) | return '' | endif - try - if s:is_vim - let res = ch_evalexpr(channel, [a:method, a:args], {'timeout': 60 * 1000}) - if type(res) == 1 && res ==# '' - throw 'request '.a:method. ' '.string(a:args).' timeout after 60s' - endif - let [l:errmsg, res] = res - if !empty(l:errmsg) - throw l:errmsg - else - return res - endif - else - return call('rpcrequest', [channel, a:method] + a:args) - endif - catch /.*/ - if v:exception =~# 'E475' - if get(g:, 'coc_vim_leaving', 0) | return | endif - echohl Error | echom '['.self.name.'] server connection lost' | echohl None - let name = self.name - call s:on_exit(name, 0) - execute 'silent do User ConnectionLost'.toupper(name[0]).name[1:] - elseif v:exception =~# 'E12' - " neovim's bug, ignore it - else - echohl Error | echo 'Error on request ('.a:method.'): '.v:exception | echohl None - endif - endtry -endfunction - -function! s:notify(method, args) dict - let channel = coc#client#get_channel(self) - if empty(channel) - return '' - endif - try - if s:is_vim - call ch_sendraw(channel, json_encode([0, [a:method, a:args]])."\n") - else - call call('rpcnotify', [channel, a:method] + a:args) - endif - catch /.*/ - if v:exception =~# 'E475' - if get(g:, 'coc_vim_leaving', 0) - return - endif - echohl Error | echom '['.self.name.'] server connection lost' | echohl None - let name = self.name - call s:on_exit(name, 0) - execute 'silent do User ConnectionLost'.toupper(name[0]).name[1:] - elseif v:exception =~# 'E12' - " neovim's bug, ignore it - else - echohl Error | echo 'Error on notify ('.a:method.'): '.v:exception | echohl None - endif - endtry -endfunction - -function! s:request_async(method, args, cb) dict - let channel = coc#client#get_channel(self) - if empty(channel) | return '' | endif - if type(a:cb) != 2 - echohl Error | echom '['.self['name'].'] Callback should be function' | echohl None - return - endif - let id = self.async_req_id - let self.async_req_id = id + 1 - let self.async_callbacks[id] = a:cb - call self['notify']('nvim_async_request_event', [id, a:method, a:args]) -endfunction - -function! s:on_async_response(id, resp, isErr) dict - let Callback = get(self.async_callbacks, a:id, v:null) - if empty(Callback) - " should not happen - echohl Error | echom 'callback not found' | echohl None - return - endif - call remove(self.async_callbacks, a:id) - if a:isErr - call call(Callback, [a:resp, v:null]) - else - call call(Callback, [v:null, a:resp]) - endif -endfunction - -function! coc#client#is_running(name) abort - let client = get(s:clients, a:name, v:null) - if empty(client) | return 0 | endif - if !client['running'] | return 0 | endif - if s:is_vim - let status = job_status(ch_getjob(client['channel'])) - return status ==# 'run' - else - let chan_id = client['chan_id'] - let [code] = jobwait([chan_id], 10) - return code == -1 - endif -endfunction - -function! coc#client#stop(name) abort - let client = get(s:clients, a:name, v:null) - if empty(client) | return 1 | endif - let running = coc#client#is_running(a:name) - if !running - echohl WarningMsg | echom 'client '.a:name. ' not running.' | echohl None - return 1 - endif - if s:is_vim - call job_stop(ch_getjob(client['channel']), 'term') - else - call jobstop(client['chan_id']) - endif - sleep 200m - if coc#client#is_running(a:name) - echohl Error | echom 'client '.a:name. ' stop failed.' | echohl None - return 0 - endif - call s:on_exit(a:name, 0) - echohl MoreMsg | echom 'client '.a:name.' stopped!' | echohl None - return 1 -endfunction - -function! coc#client#request(name, method, args) - let client = get(s:clients, a:name, v:null) - if !empty(client) - return client['request'](a:method, a:args) - endif -endfunction - -function! coc#client#notify(name, method, args) - let client = get(s:clients, a:name, v:null) - if !empty(client) - call client['notify'](a:method, a:args) - endif -endfunction - -function! coc#client#request_async(name, method, args, cb) - let client = get(s:clients, a:name, v:null) - if !empty(client) - call client['request_async'](a:method, a:args, a:cb) - endif -endfunction - -function! coc#client#on_response(name, id, resp, isErr) - let client = get(s:clients, a:name, v:null) - if !empty(client) - call client['on_async_response'](a:id, a:resp, a:isErr) - endif -endfunction - -function! coc#client#restart(name) abort - let stopped = coc#client#stop(a:name) - if !stopped | return | endif - let client = get(s:clients, a:name, v:null) - if !empty(client) - call client['start']() - endif -endfunction - -function! coc#client#restart_all() - for key in keys(s:clients) - call coc#client#restart(key) - endfor -endfunction - -function! coc#client#open_log() - if !get(g:, 'node_client_debug', 0) - echohl Error | echon '[coc.nvim] use let g:node_client_debug = 1 in your vimrc to enabled debug mode.' | echohl None - return - endif - execute 'vs '.s:logfile -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/color.vim b/pack/ant/start/coc.nvim/autoload/coc/color.vim deleted file mode 100644 index fbe515a..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/color.vim +++ /dev/null @@ -1,283 +0,0 @@ -scriptencoding utf-8 - -let s:activate = "" -let s:quit = "" -if has("gui_macvim") && has('gui_running') - let s:app = "MacVim" -elseif $TERM_PROGRAM ==# "Apple_Terminal" - let s:app = "Terminal" -elseif $TERM_PROGRAM ==# "iTerm.app" - let s:app = "iTerm2" -elseif has('mac') - let s:app = "System Events" - let s:quit = "quit" - let s:activate = 'activate' -endif - -" Returns an approximate grey index for the given grey level -fun! s:grey_number(x) - if &t_Co == 88 - if a:x < 23 - return 0 - elseif a:x < 69 - return 1 - elseif a:x < 103 - return 2 - elseif a:x < 127 - return 3 - elseif a:x < 150 - return 4 - elseif a:x < 173 - return 5 - elseif a:x < 196 - return 6 - elseif a:x < 219 - return 7 - elseif a:x < 243 - return 8 - else - return 9 - endif - else - if a:x < 14 - return 0 - else - let l:n = (a:x - 8) / 10 - let l:m = (a:x - 8) % 10 - if l:m < 5 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" Returns the actual grey level represented by the grey index -fun! s:grey_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 46 - elseif a:n == 2 - return 92 - elseif a:n == 3 - return 115 - elseif a:n == 4 - return 139 - elseif a:n == 5 - return 162 - elseif a:n == 6 - return 185 - elseif a:n == 7 - return 208 - elseif a:n == 8 - return 231 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 8 + (a:n * 10) - endif - endif -endfun - -" Returns the palette index for the given grey index -fun! s:grey_colour(n) - if &t_Co == 88 - if a:n == 0 - return 16 - elseif a:n == 9 - return 79 - else - return 79 + a:n - endif - else - if a:n == 0 - return 16 - elseif a:n == 25 - return 231 - else - return 231 + a:n - endif - endif -endfun - -" Returns an approximate colour index for the given colour level -fun! s:rgb_number(x) - if &t_Co == 88 - if a:x < 69 - return 0 - elseif a:x < 172 - return 1 - elseif a:x < 230 - return 2 - else - return 3 - endif - else - if a:x < 75 - return 0 - else - let l:n = (a:x - 55) / 40 - let l:m = (a:x - 55) % 40 - if l:m < 20 - return l:n - else - return l:n + 1 - endif - endif - endif -endfun - -" Returns the palette index for the given R/G/B colour indices -fun! s:rgb_colour(x, y, z) - if &t_Co == 88 - return 16 + (a:x * 16) + (a:y * 4) + a:z - else - return 16 + (a:x * 36) + (a:y * 6) + a:z - endif -endfun - -" Returns the actual colour level for the given colour index -fun! s:rgb_level(n) - if &t_Co == 88 - if a:n == 0 - return 0 - elseif a:n == 1 - return 139 - elseif a:n == 2 - return 205 - else - return 255 - endif - else - if a:n == 0 - return 0 - else - return 55 + (a:n * 40) - endif - endif -endfun - -" Returns the palette index to approximate the given R/G/B colour levels -fun! s:colour(r, g, b) - " Get the closest grey - let l:gx = s:grey_number(a:r) - let l:gy = s:grey_number(a:g) - let l:gz = s:grey_number(a:b) - - " Get the closest colour - let l:x = s:rgb_number(a:r) - let l:y = s:rgb_number(a:g) - let l:z = s:rgb_number(a:b) - - if l:gx == l:gy && l:gy == l:gz - " There are two possibilities - let l:dgr = s:grey_level(l:gx) - a:r - let l:dgg = s:grey_level(l:gy) - a:g - let l:dgb = s:grey_level(l:gz) - a:b - let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) - let l:dr = s:rgb_level(l:gx) - a:r - let l:dg = s:rgb_level(l:gy) - a:g - let l:db = s:rgb_level(l:gz) - a:b - let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) - if l:dgrey < l:drgb - " Use the grey - return s:grey_colour(l:gx) - else - " Use the colour - return s:rgb_colour(l:x, l:y, l:z) - endif - else - " Only one possibility - return s:rgb_colour(l:x, l:y, l:z) - endif -endfun - -function! coc#color#rgb2term(rgb) - let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 - let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 - let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 - return s:colour(l:r, l:g, l:b) -endfun - -" [r, g, b] ['255', '255', '255'] -" return ['65535', '65535', '65535'] or return v:false to cancel -function! coc#color#pick_color(default_color) - if has('mac') - let default_color = map(a:default_color, {idx, val -> str2nr(val) * 65535 / 255 }) - " This is the AppleScript magic: - let ascrpt = ['-e "tell application \"' . s:app . '\""', - \ '-e "' . s:activate . '"', - \ "-e \"set AppleScript's text item delimiters to {\\\",\\\"}\"", - \ '-e "set theColor to (choose color default color {' . default_color[0] . ", " . default_color[1] . ", " . default_color[2] . '}) as text"', - \ '-e "' . s:quit . '"', - \ '-e "end tell"', - \ '-e "return theColor"'] - let res = trim(system("osascript " . join(ascrpt, ' ') . " 2>/dev/null")) - if empty(res) - return v:false - else - return split(trim(res), ',') - endif - endif - - let hex_color = printf('#%02x%02x%02x', a:default_color[0], a:default_color[1], a:default_color[2]) - - if has('unix') - if executable('zenity') - let res = trim(system('zenity --title="Select a color" --color-selection --color="' . hex_color . '" 2> /dev/null')) - if empty(res) - return v:false - else - " res format is rgb(255,255,255) - return map(split(res[4:-2], ','), {idx, val -> string(str2nr(trim(val)) * 65535 / 255)}) - endif - endif - endif - - let rgb = v:false - if !has('python') - echohl Error | echom 'python support required, checkout :echo has(''python'')' | echohl None - return - endif - try - execute 'py import gtk' - catch /.*/ - echohl Error | echom 'python gtk module not found' | echohl None - return - endtry -python << endpython - -import vim -import gtk, sys - -# message strings -wnd_title_insert = "Insert a color" - -csd = gtk.ColorSelectionDialog(wnd_title_insert) -cs = csd.colorsel - -cs.set_current_color(gtk.gdk.color_parse(vim.eval("hex_color"))) - -cs.set_current_alpha(65535) -cs.set_has_opacity_control(False) -# cs.set_has_palette(int(vim.eval("s:display_palette"))) - -if csd.run()==gtk.RESPONSE_OK: - c = cs.get_current_color() - s = [str(int(c.red)),',',str(int(c.green)),',',str(int(c.blue))] - thecolor = ''.join(s) - vim.command(":let rgb = split('%s',',')" % thecolor) - -csd.destroy() - -endpython - return rgb -endfunction - diff --git a/pack/ant/start/coc.nvim/autoload/coc/compat.vim b/pack/ant/start/coc.nvim/autoload/coc/compat.vim deleted file mode 100644 index 9353c60..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/compat.vim +++ /dev/null @@ -1,244 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') - -" first window id for bufnr -" builtin bufwinid returns window of current tab only -function! coc#compat#buf_win_id(bufnr) abort - let info = filter(getwininfo(), 'v:val["bufnr"] =='.a:bufnr) - if empty(info) - return -1 - endif - return info[0]['winid'] -endfunction - -function! coc#compat#buf_set_lines(bufnr, start, end, replacement) abort - if s:is_vim - call coc#api#exec('buf_set_lines', [a:bufnr, a:start, a:end, 0, a:replacement]) - else - call nvim_buf_set_lines(a:bufnr, a:start, a:end, 0, a:replacement) - endif -endfunction - -function! coc#compat#buf_line_count(bufnr) abort - if exists('*nvim_buf_line_count') - return nvim_buf_line_count(a:bufnr) - endif - if bufnr('%') == a:bufnr - return line('$') - endif - if exists('*getbufinfo') - let info = getbufinfo(a:bufnr) - if empty(info) - return 0 - endif - " vim 8.1 has getbufinfo but no linecount - if has_key(info[0], 'linecount') - return info[0]['linecount'] - endif - endif - if exists('*getbufline') - let lines = getbufline(a:bufnr, 1, '$') - return len(lines) - endif - let curr = bufnr('%') - execute 'noa buffer '.a:bufnr - let n = line('$') - execute 'noa buffer '.curr - return n -endfunction - -function! coc#compat#prepend_lines(bufnr, replacement) abort - if exists('*appendbufline') - call appendbufline(a:bufnr, 0, a:replacement) - elseif !s:is_vim - call nvim_buf_set_lines(a:bufnr, 0, 0, 0, a:replacement) - else - throw 'appendbufline() required for prepend lines.' - endif -endfunction - -function! coc#compat#win_is_valid(winid) abort - if exists('*nvim_win_is_valid') - return nvim_win_is_valid(a:winid) - endif - return !empty(getwininfo(a:winid)) -endfunction - -" clear matches by window id, not throw on none exists window. -" may not work on vim < 8.1.1084 & neovim < 0.4.0 -function! coc#compat#clear_matches(winid) abort - if !coc#compat#win_is_valid(a:winid) - return - endif - let curr = win_getid() - if curr == a:winid - call clearmatches() - return - endif - if s:is_vim - if has('patch-8.1.1084') - call clearmatches(a:winid) - endif - else - if exists('*nvim_set_current_win') - noa call nvim_set_current_win(a:winid) - call clearmatches() - noa call nvim_set_current_win(curr) - endif - endif -endfunction - -function! coc#compat#matchaddpos(group, pos, priority, winid) abort - let curr = win_getid() - if curr == a:winid - call matchaddpos(a:group, a:pos, a:priority, -1) - else - if s:is_vim - if has('patch-8.1.0218') - call matchaddpos(a:group, a:pos, a:priority, -1, {'window': a:winid}) - endif - else - if has('nvim-0.4.0') - call matchaddpos(a:group, a:pos, a:priority, -1, {'window': a:winid}) - elseif exists('*nvim_set_current_win') - noa call nvim_set_current_win(a:winid) - call matchaddpos(a:group, a:pos, a:priority, -1) - noa call nvim_set_current_win(curr) - endif - endif - endif -endfunction - -function! coc#compat#buf_del_var(bufnr, name) abort - if !bufloaded(a:bufnr) - return - endif - if exists('*nvim_buf_del_var') - silent! call nvim_buf_del_var(a:bufnr, a:name) - else - if a:bufnr == bufnr('%') - execute 'unlet! b:'.a:name - elseif exists('*win_execute') - let winid = coc#compat#buf_win_id(a:bufnr) - if winid != -1 - call win_execute(winid, 'unlet! b:'.a:name) - endif - endif - endif -endfunction - -" hlGroup, pos, priority -function! coc#compat#matchaddgroups(winid, groups) abort - " add by winid - if has('patch-8.1.0218') || has('nvim-0.4.0') - for group in a:groups - call matchaddpos(group['hlGroup'], [group['pos']], group['priority'], -1, {'window': a:winid}) - endfor - return - endif - let curr = win_getid() - if curr == a:winid - for group in a:groups - call matchaddpos(group['hlGroup'], [group['pos']], group['priority'], -1) - endfor - elseif exists('*nvim_set_current_win') - noa call nvim_set_current_win(a:winid) - for group in a:groups - call matchaddpos(group['hlGroup'], [group['pos']], group['priority'], -1) - endfor - noa call nvim_set_current_win(curr) - endif -endfunction - -function! coc#compat#del_var(name) abort - if exists('*nvim_del_var') - silent! call nvim_del_var(a:name) - else - execute 'unlet! '.a:name - endif -endfunction - -" remove keymap for specific buffer -function! coc#compat#buf_del_keymap(bufnr, mode, lhs) abort - if !bufloaded(a:bufnr) - return - endif - if exists('*nvim_buf_del_keymap') - try - call nvim_buf_del_keymap(a:bufnr, a:mode, a:lhs) - catch /^Vim\%((\a\+)\)\=:E5555/ - " ignore keymap doesn't exist - endtry - return - endif - if bufnr == a:bufnr - execute 'silent! '.a:mode.'unmap '.a:lhs - return - endif - if exists('*win_execute') - let winid = coc#compat#buf_win_id(a:bufnr) - if winid != -1 - call win_execute(winid, a:mode.'unmap '.a:lhs, 'silent!') - endif - endif -endfunction - -function! coc#compat#buf_add_keymap(bufnr, mode, lhs, rhs, opts) abort - if !bufloaded(a:bufnr) - return - endif - if exists('*nvim_buf_set_keymap') - call nvim_buf_set_keymap(a:bufnr, a:mode, a:lhs, a:rhs, a:opts) - else - let cmd = a:mode . 'noremap ' - for key in keys(a:opts) - if get(a:opts, key, 0) - let cmd .= '<'.key.'>' - endif - endfor - let cmd .= ' '.a:lhs.' '.a:rhs - if bufnr('%') == a:bufnr - execute cmd - elseif exists('*win_execute') - let winid = coc#compat#buf_win_id(a:bufnr) - if winid != -1 - call win_execute(winid, cmd) - endif - endif - endif -endfunction - -" execute command or list of commands in window -function! coc#compat#execute(winid, command, ...) abort - if exists('*win_execute') - if type(a:command) == v:t_string - keepalt call win_execute(a:winid, a:command, get(a:, 1, '')) - elseif type(a:command) == v:t_list - keepalt call win_execute(a:winid, join(a:command, "\n"), get(a:, 1, '')) - endif - elseif has('nvim') - if !nvim_win_is_valid(a:winid) - return - endif - let curr = nvim_get_current_win() - noa keepalt call nvim_set_current_win(a:winid) - if type(a:command) == v:t_string - exe get(a:, 1, '').' '.a:command - elseif type(a:command) == v:t_list - for cmd in a:command - exe get(a:, 1, '').' '.cmd - endfor - endif - noa keepalt call nvim_set_current_win(curr) - else - throw 'win_execute does not exist, please upgrade vim.' - endif -endfunc - -function! coc#compat#trim(str) - if exists('*trim') - return trim(a:str) - endif - " TODO trim from beginning - return substitute(a:str, '\s\+$', '', '') -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/cursor.vim b/pack/ant/start/coc.nvim/autoload/coc/cursor.vim deleted file mode 100644 index d9cfa2c..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/cursor.vim +++ /dev/null @@ -1,60 +0,0 @@ -scriptencoding utf-8 - -" Position of cursor relative to screen cell -function! coc#cursor#screen_pos() abort - let nr = winnr() - let [row, col] = win_screenpos(nr) - return [row + winline() - 2, col + wincol() - 2] -endfunction - -function! coc#cursor#move_by_col(delta) - let pos = getcurpos() - call cursor(pos[1], pos[2] + a:delta) -endfunction - -" Get cursor position. -function! coc#cursor#position() - return [line('.') - 1, strchars(strpart(getline('.'), 0, col('.') - 1))] -endfunction - -" Move cursor to position. -function! coc#cursor#move_to(line, character) abort - let content = getline(a:line + 1) - let pre = strcharpart(content, 0, a:character) - let col = strlen(pre) + 1 - call cursor(a:line + 1, col) -endfunction - -" Character offset of current cursor, vim provide bytes offset only. -function! coc#cursor#char_offset() abort - let offset = 0 - let lnum = line('.') - for i in range(1, lnum) - if i == lnum - let offset += strchars(strpart(getline('.'), 0, col('.')-1)) - else - let offset += strchars(getline(i)) + 1 - endif - endfor - return offset -endfunction - -" Returns latest selection range -function! coc#cursor#get_selection(char) abort - let m = a:char ? 'char' : visualmode() - if empty(m) - return v:null - endif - let [_, sl, sc, soff] = getpos(m ==# 'char' ? "'[" : "'<") - let [_, el, ec, eoff] = getpos(m ==# 'char' ? "']" : "'>") - let start_idx = coc#string#get_character(getline(sl), sc) - if m ==# 'V' - return [sl - 1, start_idx, el, 0] - endif - let line = getline(el) - let end_idx = coc#string#get_character(line, ec) - if m !=# 'char' - let end_idx = end_idx == strchars(line) ? end_idx : end_idx + 1 - endif - return [sl - 1, start_idx, el - 1, end_idx] -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/dialog.vim b/pack/ant/start/coc.nvim/autoload/coc/dialog.vim deleted file mode 100644 index 036c1d7..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/dialog.vim +++ /dev/null @@ -1,684 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:root = expand(':h:h:h') -let s:prompt_win_bufnr = 0 -let s:list_win_bufnr = 0 -let s:prompt_win_width = get(g:, 'coc_prompt_win_width', 32) -let s:frames = ['· ', '·· ', '···', ' ··', ' ·', ' '] -let s:sign_group = 'PopUpCocDialog' -let s:detail_bufnr = 0 - -" Float window aside pum -function! coc#dialog#create_pum_float(lines, config) abort - let winid = coc#float#get_float_by_kind('pumdetail') - if empty(a:lines) || !coc#pum#visible() - if winid - call coc#float#close(winid) - endif - return - endif - let pumbounding = coc#pum#info() - let border = get(a:config, 'border', []) - let pw = pumbounding['width'] + (empty(border) ? get(pumbounding, 'scrollbar', 0) : 0) - let rp = &columns - pumbounding['col'] - pw - let showRight = pumbounding['col'] > rp ? 0 : 1 - let maxWidth = showRight ? coc#math#min(rp - 1, a:config['maxWidth']) : coc#math#min(pumbounding['col'] - 1, a:config['maxWidth']) - let bh = get(border, 0 ,0) + get(border, 2, 0) - let maxHeight = &lines - pumbounding['row'] - &cmdheight - 1 - bh - if maxWidth <= 2 || maxHeight < 1 - return v:null - endif - let width = 0 - for line in a:lines - let dw = max([1, strdisplaywidth(line)]) - let width = max([width, dw + 2]) - endfor - let width = float2nr(coc#math#min(maxWidth, width)) - let ch = coc#string#content_height(a:lines, width - 2) - let height = float2nr(coc#math#min(maxHeight, ch)) - let lines = map(a:lines, {_, s -> s =~# '^─' ? repeat('─', width - 2 + (s:is_vim && ch > height ? -1 : 0)) : s}) - let opts = { - \ 'lines': lines, - \ 'highlights': get(a:config, 'highlights', []), - \ 'relative': 'editor', - \ 'col': showRight ? pumbounding['col'] + pw : pumbounding['col'] - width, - \ 'row': pumbounding['row'], - \ 'height': height, - \ 'width': width - 2 + (s:is_vim && ch > height ? -1 : 0), - \ 'scrollinside': showRight ? 0 : 1, - \ 'codes': get(a:config, 'codes', []), - \ } - for key in ['border', 'highlight', 'borderhighlight', 'winblend', 'focusable', 'shadow', 'rounded'] - if has_key(a:config, key) - let opts[key] = a:config[key] - endif - endfor - call s:close_auto_hide_wins(winid) - let result = coc#float#create_float_win(winid, s:detail_bufnr, opts) - if empty(result) - return - endif - let s:detail_bufnr = result[1] - call setwinvar(result[0], 'kind', 'pumdetail') - if !s:is_vim - call coc#float#nvim_scrollbar(result[0]) - endif -endfunction - -" Float window below/above cursor -function! coc#dialog#create_cursor_float(winid, bufnr, lines, config) abort - if coc#prompt#activated() - return v:null - endif - let pumAlignTop = get(a:config, 'pumAlignTop', 0) - let modes = get(a:config, 'modes', ['n', 'i', 'ic', 's']) - let mode = mode() - let currbuf = bufnr('%') - let pos = [line('.'), col('.')] - if index(modes, mode) == -1 - return v:null - endif - if !s:is_vim && !has('nvim-0.5.0') && mode ==# 'i' - " helps to fix undo issue, don't know why. - call feedkeys("\u", 'n') - endif - if mode ==# 's' && has('patch-8.2.4969') && !has('patch-8.2.4996') - echohl WarningMsg | echon 'Popup not created to avoid issue #10466 on vim >= 8.2.4969' | echohl None - return v:null - endif - let dimension = coc#dialog#get_config_cursor(a:lines, a:config) - if empty(dimension) - return v:null - endif - if coc#pum#visible() && ((pumAlignTop && dimension['row'] <0)|| (!pumAlignTop && dimension['row'] > 0)) - return v:null - endif - let width = dimension['width'] - let lines = map(a:lines, {_, s -> s =~# '^─' ? repeat('─', width) : s}) - let config = extend(extend({'lines': lines, 'relative': 'cursor'}, a:config), dimension) - call s:close_auto_hide_wins(a:winid) - let res = coc#float#create_float_win(a:winid, a:bufnr, config) - if empty(res) - return v:null - endif - let alignTop = dimension['row'] < 0 - let winid = res[0] - let bufnr = res[1] - redraw - if has('nvim') - call coc#float#nvim_scrollbar(winid) - endif - return [currbuf, pos, winid, bufnr, alignTop] -endfunction - -" Create float window for input -function! coc#dialog#create_prompt_win(title, default, opts) abort - call s:close_auto_hide_wins() - let bufnr = has('nvim') ? s:prompt_win_bufnr : 0 - if s:is_vim - execute 'hi link CocPopupTerminal '.get(a:opts, 'highlight', 'CocFloating') - let node = expand(get(g:, 'coc_node_path', 'node')) - let bufnr = term_start([node, s:root . '/bin/prompt.js', a:default], { - \ 'term_rows': 1, - \ 'term_highlight': 'CocPopupTerminal', - \ 'hidden': 1, - \ 'term_finish': 'close' - \ }) - call term_setapi(bufnr, 'Coc') - call setbufvar(bufnr, 'current', type(a:default) == v:t_string ? a:default : '') - endif - let config = s:get_prompt_dimension(a:title, a:default, a:opts) - let res = coc#float#create_float_win(0, bufnr, extend(config, { - \ 'style': 'minimal', - \ 'border': get(a:opts, 'border', [1,1,1,1]), - \ 'rounded': get(a:opts, 'rounded', 1), - \ 'prompt': 1, - \ 'title': a:title, - \ 'lines': s:is_vim ? v:null : [a:default], - \ 'highlight': get(a:opts, 'highlight', 'CocFloating'), - \ 'borderhighlight': [get(a:opts, 'borderhighlight', 'CocFloating')], - \ })) - if empty(res) - return - endif - let winid = res[0] - let bufnr = res[1] - if has('nvim') - let s:prompt_win_bufnr = res[1] - execute 'sign unplace 6 buffer='.s:prompt_win_bufnr - call nvim_set_current_win(winid) - inoremap - inoremap pumvisible() ? "\" : "\" - exe 'imap ' - exe 'nnoremap :call coc#float#close('.winid.')' - exe 'inoremap "\=coc#dialog#prompt_insert(getline(''.''))\\"' - if get(a:opts, 'list', 0) - for key in ['', '', '', '', '', '', '', '', ''] - " Can't use < in remap - let escaped = key ==# '' ? "C-@" : strcharpart(key, 1, strchars(key) - 2) - exe 'inoremap '.key.' call coc#rpc#notify("PromptKeyPress", ['.bufnr.', "'.escaped.'"])' - endfor - endif - call feedkeys('A', 'in') - endif - call coc#util#do_autocmd('CocOpenFloatPrompt') - if s:is_vim - let pos = popup_getpos(winid) - " width height row col - let dimension = [pos['width'], pos['height'], pos['line'] - 1, pos['col'] - 1] - else - let id = coc#float#get_related(winid, 'border') - if !has('nvim-0.6.0') - redraw - endif - let pos = nvim_win_get_position(id) - let dimension = [nvim_win_get_width(id), nvim_win_get_height(id), pos[0], pos[1]] - endif - return [bufnr, winid, dimension] -endfunction - -" Create list window under target window -function! coc#dialog#create_list(target, dimension, opts) abort - let maxHeight = get(a:opts, 'maxHeight', 10) - let height = max([1, len(get(a:opts, 'lines', []))]) - let height = min([maxHeight, height, &lines - &cmdheight - 1 - a:dimension['row'] + a:dimension['height']]) - let chars = get(a:opts, 'rounded', 1) ? ['╯', '╰'] : ['┘', '└'] - let config = extend(copy(a:opts), { - \ 'relative': 'editor', - \ 'row': a:dimension['row'] + a:dimension['height'], - \ 'col': a:dimension['col'], - \ 'width': a:dimension['width'] - 2, - \ 'height': height, - \ 'border': [1, 1, 1, 1], - \ 'scrollinside': 1, - \ 'borderchars': extend(['─', '│', '─', '│', '├', '┤'], chars) - \ }) - let bufnr = 0 - let result = coc#float#create_float_win(0, s:list_win_bufnr, config) - if empty(result) - return - endif - let winid = result[0] - call coc#float#add_related(winid, a:target) - call setwinvar(winid, 'auto_height', get(a:opts, 'autoHeight', 1)) - call setwinvar(winid, 'max_height', maxHeight) - call setwinvar(winid, 'target_winid', a:target) - call setwinvar(winid, 'kind', 'list') - call coc#dialog#check_scroll_vim(a:target) - return result -endfunction - -" Create menu picker for pick single item -function! coc#dialog#create_menu(lines, config) abort - call s:close_auto_hide_wins() - let highlight = get(a:config, 'highlight', 'CocFloating') - let borderhighlight = get(a:config, 'borderhighlight', [highlight]) - let relative = get(a:config, 'relative', 'cursor') - let lines = copy(a:lines) - let content = get(a:config, 'content', '') - let maxWidth = get(a:config, 'maxWidth', 80) - let highlights = get(a:config, 'highlights', []) - let contentCount = 0 - if !empty(content) - let contentLines = coc#string#reflow(split(content, '\r\?\n'), maxWidth) - let contentCount = len(contentLines) - let lines = extend(contentLines, lines) - if !empty(highlights) - for item in highlights - let item['lnum'] = item['lnum'] + contentCount - endfor - endif - endif - let opts = { - \ 'lines': lines, - \ 'highlight': highlight, - \ 'title': get(a:config, 'title', ''), - \ 'borderhighlight': borderhighlight, - \ 'maxWidth': maxWidth, - \ 'maxHeight': get(a:config, 'maxHeight', 80), - \ 'rounded': get(a:config, 'rounded', 0), - \ 'border': [1, 1, 1, 1], - \ 'highlights': highlights, - \ 'relative': relative, - \ } - if relative ==# 'editor' - let dimension = coc#dialog#get_config_editor(lines, opts) - else - let dimension = coc#dialog#get_config_cursor(lines, opts) - endif - call extend(opts, dimension) - let ids = coc#float#create_float_win(0, s:prompt_win_bufnr, opts) - if empty(ids) - return - endif - let s:prompt_win_bufnr = ids[1] - call coc#dialog#set_cursor(ids[0], ids[1], contentCount + 1) - redraw - if has('nvim') - call coc#float#nvim_scrollbar(ids[0]) - endif - return [ids[0], ids[1], contentCount] -endfunction - -" Create dialog at center of screen -function! coc#dialog#create_dialog(lines, config) abort - call s:close_auto_hide_wins() - " dialog always have borders - let title = get(a:config, 'title', '') - let buttons = get(a:config, 'buttons', []) - let highlight = get(a:config, 'highlight', 'CocFloating') - let borderhighlight = get(a:config, 'borderhighlight', [highlight]) - let opts = { - \ 'title': title, - \ 'rounded': get(a:config, 'rounded', 0), - \ 'relative': 'editor', - \ 'border': [1,1,1,1], - \ 'close': get(a:config, 'close', 1), - \ 'highlight': highlight, - \ 'highlights': get(a:config, 'highlights', []), - \ 'buttons': buttons, - \ 'borderhighlight': borderhighlight, - \ 'getchar': get(a:config, 'getchar', 0) - \ } - call extend(opts, coc#dialog#get_config_editor(a:lines, a:config)) - let bufnr = coc#float#create_buf(0, a:lines) - let res = coc#float#create_float_win(0, bufnr, opts) - if empty(res) - return - endif - if get(a:config, 'cursorline', 0) - call coc#dialog#place_sign(bufnr, 1) - endif - if has('nvim') - redraw - call coc#float#nvim_scrollbar(res[0]) - endif - return res -endfunction - -function! coc#dialog#prompt_confirm(title, cb) abort - call s:close_auto_hide_wins() - if s:is_vim && exists('*popup_dialog') - try - call popup_dialog(a:title. ' (y/n)?', { - \ 'highlight': 'Normal', - \ 'filter': 'popup_filter_yesno', - \ 'callback': {id, res -> a:cb(v:null, res)}, - \ 'borderchars': get(g:, 'coc_borderchars', ['─', '│', '─', '│', '╭', '╮', '╯', '╰']), - \ 'borderhighlight': ['MoreMsg'] - \ }) - catch /.*/ - call a:cb(v:exception) - endtry - return - endif - if has('nvim-0.4.0') - let text = ' '. a:title . ' (y/n)? ' - let maxWidth = coc#math#min(78, &columns - 2) - let width = coc#math#min(maxWidth, strdisplaywidth(text)) - let maxHeight = &lines - &cmdheight - 1 - let height = coc#math#min(maxHeight, float2nr(ceil(str2float(string(strdisplaywidth(text)))/width))) - let arr = coc#float#create_float_win(0, s:prompt_win_bufnr, { - \ 'col': &columns/2 - width/2 - 1, - \ 'row': maxHeight/2 - height/2 - 1, - \ 'width': width, - \ 'height': height, - \ 'border': [1,1,1,1], - \ 'focusable': v:false, - \ 'relative': 'editor', - \ 'highlight': 'Normal', - \ 'borderhighlight': 'MoreMsg', - \ 'style': 'minimal', - \ 'lines': [text], - \ }) - if empty(arr) - call a:cb('Window create failed!') - return - endif - let winid = arr[0] - let s:prompt_win_bufnr = arr[1] - let res = 0 - redraw - " same result as vim - while 1 - let key = nr2char(getchar()) - if key == "\" - let res = -1 - break - elseif key == "\" || key == 'n' || key == 'N' - let res = 0 - break - elseif key == 'y' || key == 'Y' - let res = 1 - break - endif - endw - call coc#float#close(winid) - call a:cb(v:null, res) - " use relative editor since neovim doesn't support center position - elseif exists('*confirm') - let choice = confirm(a:title, "&Yes\n&No") - call a:cb(v:null, choice == 1) - else - echohl MoreMsg - echom a:title.' (y/n)' - echohl None - let confirm = nr2char(getchar()) - redraw! - if !(confirm ==? "y" || confirm ==? "\r") - echohl Moremsg | echo 'Cancelled.' | echohl None - return 0 - call a:cb(v:null, 0) - end - call a:cb(v:null, 1) - endif -endfunction - -function! coc#dialog#get_config_editor(lines, config) abort - let title = get(a:config, 'title', '') - let maxheight = min([get(a:config, 'maxHeight', 78), &lines - &cmdheight - 6]) - let maxwidth = min([get(a:config, 'maxWidth', 78), &columns - 2]) - let buttons = get(a:config, 'buttons', []) - let minwidth = s:min_btns_width(buttons) - if maxheight <= 0 || maxwidth <= 0 || minwidth > maxwidth - throw 'Not enough spaces for float window' - endif - let ch = 0 - let width = min([strdisplaywidth(title) + 1, maxwidth]) - for line in a:lines - let dw = max([1, strdisplaywidth(line)]) - if dw < maxwidth && dw > width - let width = dw - elseif dw >= maxwidth - let width = maxwidth - endif - let ch += float2nr(ceil(str2float(string(dw))/maxwidth)) - endfor - let width = max([minwidth, width]) - let height = coc#math#min(ch ,maxheight) - return { - \ 'row': &lines/2 - (height + 4)/2, - \ 'col': &columns/2 - (width + 2)/2, - \ 'width': width, - \ 'height': height, - \ } -endfunction - -function! coc#dialog#prompt_insert(text) abort - call coc#rpc#notify('PromptInsert', [a:text, bufnr('%')]) - return '' -endfunction - -" Dimension of window with lines relative to cursor -" Width & height excludes border & padding -function! coc#dialog#get_config_cursor(lines, config) abort - let preferTop = get(a:config, 'preferTop', 0) - let title = get(a:config, 'title', '') - let border = get(a:config, 'border', []) - if empty(border) && len(title) - let border = [1, 1, 1, 1] - endif - let bh = get(border, 0, 0) + get(border, 2, 0) - let vh = &lines - &cmdheight - 1 - if vh <= 0 - return v:null - endif - let maxWidth = coc#math#min(get(a:config, 'maxWidth', &columns - 1), &columns - 1) - if maxWidth < 3 - return v:null - endif - let maxHeight = coc#math#min(get(a:config, 'maxHeight', vh), vh) - let width = coc#math#min(40, strdisplaywidth(title)) + 3 - for line in a:lines - let dw = max([1, strdisplaywidth(line)]) - let width = max([width, dw + 2]) - endfor - let width = coc#math#min(maxWidth, width) - let ch = coc#string#content_height(a:lines, width - 2) - let [lineIdx, colIdx] = coc#cursor#screen_pos() - " How much we should move left - let offsetX = coc#math#min(get(a:config, 'offsetX', 0), colIdx) - let showTop = 0 - let hb = vh - lineIdx -1 - if lineIdx > bh + 2 && (preferTop || (lineIdx > hb && hb < ch + bh)) - let showTop = 1 - endif - let height = coc#math#min(maxHeight, ch + bh, showTop ? lineIdx - 1 : hb) - if height <= bh - return v:null - endif - let col = - max([offsetX, colIdx - (&columns - 1 - width)]) - let row = showTop ? - height + bh : 1 - return { - \ 'row': row, - \ 'col': col, - \ 'width': width - 2, - \ 'height': height - bh - \ } -endfunction - -function! coc#dialog#change_border_hl(winid, hlgroup) abort - if !hlexists(a:hlgroup) - return - endif - if s:is_vim - if coc#float#valid(a:winid) - call popup_setoptions(a:winid, {'borderhighlight': repeat([a:hlgroup], 4)}) - redraw - endif - else - let winid = coc#float#get_related(a:winid, 'border') - if winid > 0 - call setwinvar(winid, '&winhl', 'Normal:'.a:hlgroup.',NormalNC:'.a:hlgroup) - endif - endif -endfunction - -function! coc#dialog#change_title(winid, title) abort - if s:is_vim - if coc#float#valid(a:winid) - call popup_setoptions(a:winid, {'title': a:title}) - redraw - endif - else - let winid = coc#float#get_related(a:winid, 'border') - if winid > 0 - let bufnr = winbufnr(winid) - let line = getbufline(bufnr, 1)[0] - let top = strcharpart(line, 0, 1) - \.repeat('─', strchars(line) - 2) - \.strcharpart(line, strchars(line) - 1, 1) - if !empty(a:title) - let top = coc#string#compose(top, 1, a:title.' ') - endif - call nvim_buf_set_lines(bufnr, 0, 1, v:false, [top]) - endif - endif -endfunction - -function! coc#dialog#change_loading(winid, loading) abort - if coc#float#valid(a:winid) - let winid = coc#float#get_related(a:winid, 'loading') - if !a:loading && winid > 0 - call coc#float#close(winid) - endif - if a:loading && winid == 0 - let bufnr = s:create_loading_buf() - if s:is_vim - let pos = popup_getpos(a:winid) - let winid = popup_create(bufnr, { - \ 'line': pos['line'] + 1, - \ 'col': pos['col'] + pos['width'] - 4, - \ 'maxheight': 1, - \ 'maxwidth': 3, - \ 'zindex': 999, - \ 'highlight': get(popup_getoptions(a:winid), 'highlight', 'CocFloating') - \ }) - else - let pos = nvim_win_get_position(a:winid) - let width = nvim_win_get_width(a:winid) - let opts = { - \ 'relative': 'editor', - \ 'row': pos[0], - \ 'col': pos[1] + width - 3, - \ 'focusable': v:false, - \ 'width': 3, - \ 'height': 1, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.1') - let opts['zindex'] = 900 - endif - let winid = nvim_open_win(bufnr, v:false, opts) - call setwinvar(winid, '&winhl', getwinvar(a:winid, '&winhl')) - endif - call setwinvar(winid, 'kind', 'loading') - call setbufvar(bufnr, 'target_winid', a:winid) - call setbufvar(bufnr, 'popup', winid) - call coc#float#add_related(winid, a:winid) - endif - endif -endfunction - -" Update list with new lines and highlights -function! coc#dialog#update_list(winid, bufnr, lines, highlights) abort - if coc#window#tabnr(a:winid) == tabpagenr() - if getwinvar(a:winid, 'auto_height', 0) - let row = coc#float#get_row(a:winid) - " core height - let height = max([1, len(copy(a:lines))]) - let height = min([getwinvar(a:winid, 'max_height', 10), height, &lines - &cmdheight - 1 - row]) - let curr = s:is_vim ? popup_getpos(a:winid)['core_height'] : nvim_win_get_height(a:winid) - let delta = height - curr - if delta != 0 - call coc#float#change_height(a:winid, delta) - endif - endif - call coc#compat#buf_set_lines(a:bufnr, 0, -1, a:lines) - call coc#highlight#add_highlights(a:winid, [], a:highlights) - if s:is_vim - let target = getwinvar(a:winid, 'target_winid', -1) - if target != -1 - call coc#dialog#check_scroll_vim(target) - endif - call win_execute(a:winid, 'exe 1') - endif - endif -endfunction - -" Fix width of prompt window same as list window on scrollbar change -function! coc#dialog#check_scroll_vim(winid) abort - if s:is_vim && coc#float#valid(a:winid) - let winid = coc#float#get_related(a:winid, 'list') - if winid - redraw - let pos = popup_getpos(winid) - let width = pos['width'] + (pos['scrollbar'] ? 1 : 0) - if width != popup_getpos(a:winid)['width'] - call popup_move(a:winid, { - \ 'minwidth': width - 2, - \ 'maxwidth': width - 2, - \ }) - endif - endif - endif -endfunction - -function! coc#dialog#set_cursor(winid, bufnr, line) abort - if s:is_vim - call coc#compat#execute(a:winid, 'exe '.a:line, 'silent!') - call popup_setoptions(a:winid, {'cursorline' : 1}) - call popup_setoptions(a:winid, {'cursorline' : 0}) - else - call nvim_win_set_cursor(a:winid, [a:line, 0]) - endif - call coc#dialog#place_sign(a:bufnr, a:line) -endfunction - -function! coc#dialog#place_sign(bufnr, line) abort - call sign_unplace(s:sign_group, { 'buffer': a:bufnr }) - if a:line > 0 - call sign_place(6, s:sign_group, 'CocCurrentLine', a:bufnr, {'lnum': a:line}) - endif -endfunction - -" Could be center(with optional marginTop) or cursor -function! s:get_prompt_dimension(title, default, opts) abort - let relative = get(a:opts, 'position', 'cursor') ==# 'cursor' ? 'cursor' : 'editor' - let curr = win_screenpos(winnr())[1] + wincol() - 2 - let minWidth = get(a:opts, 'minWidth', s:prompt_win_width) - let width = min([max([strwidth(a:default) + 2, strwidth(a:title) + 2, minWidth]), &columns - 2]) - if get(a:opts, 'maxWidth', 0) - let width = min([width, a:opts['maxWidth']]) - endif - if relative ==# 'cursor' - let [lineIdx, colIdx] = coc#cursor#screen_pos() - if width == &columns - 2 - let col = 0 - curr - else - let col = curr + width <= &columns - 2 ? 0 : curr + width - &columns + 2 - endif - let config = { - \ 'row': lineIdx == 0 ? 1 : 0, - \ 'col': colIdx == 0 ? 0 : col - 1, - \ } - else - let marginTop = get(a:opts, 'marginTop', v:null) - if marginTop is v:null - let row = (&lines - &cmdheight - 2) / 2 - else - let row = marginTop < 2 ? 1 : min([marginTop, &columns - &cmdheight]) - endif - let config = { - \ 'col': float2nr((&columns - width) / 2), - \ 'row': row - s:is_vim, - \ } - endif - return extend(config, {'relative': relative, 'width': width, 'height': 1}) -endfunction - -function! s:min_btns_width(buttons) abort - if empty(a:buttons) - return 0 - endif - let minwidth = len(a:buttons)*3 - 1 - for txt in a:buttons - let minwidth = minwidth + strdisplaywidth(txt) - endfor - return minwidth -endfunction - -" Close windows that should auto hide -function! s:close_auto_hide_wins(...) abort - let winids = coc#float#get_float_win_list() - let except = get(a:, 1, 0) - for id in winids - if except && id == except - continue - endif - if coc#window#get_var(id, 'autohide', 0) - call coc#float#close(id) - endif - endfor -endfunction - -function! s:create_loading_buf() abort - let bufnr = coc#float#create_buf(0) - call s:change_loading_buf(bufnr, 0) - return bufnr -endfunction - -function! s:change_loading_buf(bufnr, idx) abort - if bufloaded(a:bufnr) - let target = getbufvar(a:bufnr, 'target_winid', v:null) - if !empty(target) && !coc#float#valid(target) - call coc#float#close(getbufvar(a:bufnr, 'popup')) - return - endif - let line = get(s:frames, a:idx, ' ') - call setbufline(a:bufnr, 1, line) - call coc#highlight#add_highlight(a:bufnr, -1, 'CocNotificationProgress', 0, 0, -1) - let idx = a:idx == len(s:frames) - 1 ? 0 : a:idx + 1 - call timer_start(100, { -> s:change_loading_buf(a:bufnr, idx)}) - endif -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/dict.vim b/pack/ant/start/coc.nvim/autoload/coc/dict.vim deleted file mode 100644 index 00c494b..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/dict.vim +++ /dev/null @@ -1,32 +0,0 @@ -scriptencoding utf-8 - -function! coc#dict#equal(one, two) abort - for key in keys(a:one) - if a:one[key] != a:two[key] - return 0 - endif - endfor - return 1 -endfunction - -" Return new dict with keys removed -function! coc#dict#omit(dict, keys) abort - let res = {} - for key in keys(a:dict) - if index(a:keys, key) == -1 - let res[key] = a:dict[key] - endif - endfor - return res -endfunction - -" Return new dict with keys only -function! coc#dict#pick(dict, keys) abort - let res = {} - for key in keys(a:dict) - if index(a:keys, key) != -1 - let res[key] = a:dict[key] - endif - endfor - return res -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/float.vim b/pack/ant/start/coc.nvim/autoload/coc/float.vim deleted file mode 100644 index 65c83a2..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/float.vim +++ /dev/null @@ -1,1423 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:borderchars = get(g:, 'coc_borderchars', ['─', '│', '─', '│', '┌', '┐', '┘', '└']) -let s:rounded_borderchars = s:borderchars[0:3] + ['╭', '╮', '╯', '╰'] -let s:borderjoinchars = get(g:, 'coc_border_joinchars', ['┬', '┤', '┴', '├']) -let s:popup_list_api = exists('*popup_list') -" Popup ids, used when popup_list() doesn't exist -let s:popup_list = [] -let s:pad_bufnr = -1 - -" Check visible float/popup exists. -function! coc#float#has_float(...) abort - return len(coc#float#get_float_win_list(get(a:, 1, 0))) > 0 -endfunction - -function! coc#float#close_all(...) abort - let winids = coc#float#get_float_win_list(get(a:, 1, 0)) - for id in winids - try - call coc#float#close(id) - catch /E5555:/ - " ignore - endtry - endfor -endfunction - -function! coc#float#jump() abort - if has('nvim') - let winids = coc#float#get_float_win_list() - if !empty(winids) - call win_gotoid(winids[0]) - endif - endif -endfunction - -function! coc#float#valid(winid) abort - if a:winid <= 0 - return 0 - endif - if !s:is_vim - if !nvim_win_is_valid(a:winid) - return 0 - endif - return !empty(nvim_win_get_config(a:winid)['relative']) - endif - try - return !empty(popup_getpos(a:winid)) - catch /^Vim\%((\a\+)\)\=:E993/ - " not a popup window - return 0 - endtry -endfunction - -function! coc#float#get_height(winid) abort - if !s:is_vim - let borderwin = coc#float#get_related(a:winid, 'border') - if borderwin - return nvim_win_get_height(borderwin) - endif - return nvim_win_get_height(a:winid) - endif - return get(popup_getpos(a:winid), 'height', 0) -endfunction - -function! coc#float#change_height(winid, delta) abort - if s:is_vim - let curr = get(popup_getpos(a:winid), 'core_height', v:null) - if curr isnot v:null - call popup_move(a:winid, { - \ 'maxheight': max([1, curr + a:delta]), - \ 'minheight': max([1, curr + a:delta]), - \ }) - endif - else - let winids = copy(coc#window#get_var(a:winid, 'related', [])) - call filter(winids, 'index(["border","pad","scrollbar"],coc#window#get_var(v:val,"kind","")) >= 0') - call add(winids, a:winid) - for winid in winids - if coc#window#get_var(winid, 'kind', '') ==# 'border' - let bufnr = winbufnr(winid) - if a:delta > 0 - call appendbufline(bufnr, 1, repeat(getbufline(bufnr, 2), a:delta)) - else - call deletebufline(bufnr, 2, 2 - a:delta - 1) - endif - endif - let height = nvim_win_get_height(winid) - call nvim_win_set_height(winid, max([1, height + a:delta])) - endfor - endif -endfunction - -" create or config float window, returns [winid, bufnr], config including: -" - relative: could be 'editor' 'cursor' -" - row: line count relative to editor/cursor, nagetive number means abover cursor. -" - col: column count relative to editor/cursor, nagetive number means left of cursor. -" - width: content width without border and title. -" - height: content height without border and title. -" - lines: (optional) lines to insert, default to v:null. -" - title: (optional) title. -" - border: (optional) border as number list, like [1, 1, 1 ,1]. -" - cursorline: (optional) enable cursorline when is 1. -" - autohide: (optional) window should be closed on CursorMoved when is 1. -" - highlight: (optional) highlight of window, default to 'CocFloating' -" - borderhighlight: (optional) should be array or string for border highlights, -" highlight all borders with first value. -" - close: (optional) show close button when is 1. -" - highlights: (optional) highlight items. -" - buttons: (optional) array of button text for create buttons at bottom. -" - codes: (optional) list of CodeBlock. -" - winblend: (optional) winblend option for float window, neovim only. -" - shadow: (optional) use shadow as border style, neovim only. -" - focusable: (optional) neovim only, default to true. -" - scrollinside: (optional) neovim only, create scrollbar inside window. -" - rounded: (optional) use rounded borderchars, ignored when borderchars exists. -" - borderchars: (optional) borderchars, should be length of 8 -" - nopad: (optional) not add pad when 1 -" - index: (optional) line index -function! coc#float#create_float_win(winid, bufnr, config) abort - let lines = get(a:config, 'lines', v:null) - let bufnr = a:bufnr - try - let bufnr = coc#float#create_buf(a:bufnr, lines, 'hide') - catch /E523:/ - " happens when using getchar() #3921 - return [] - endtry - let lnum = max([1, get(a:config, 'index', 0) + 1]) - " use exists - if a:winid && coc#float#valid(a:winid) - if s:is_vim - let [line, col] = s:popup_position(a:config) - let opts = { - \ 'firstline': 1, - \ 'line': line, - \ 'col': col, - \ 'minwidth': a:config['width'], - \ 'minheight': a:config['height'], - \ 'maxwidth': a:config['width'], - \ 'maxheight': a:config['height'], - \ 'title': get(a:config, 'title', ''), - \ 'highlight': get(a:config, 'highlight', 'CocFloating'), - \ 'borderhighlight': [s:get_borderhighlight(a:config)], - \ } - if !s:empty_border(get(a:config, 'border', [])) - let opts['border'] = a:config['border'] - endif - call popup_setoptions(a:winid, opts) - call win_execute(a:winid, 'exe '.lnum) - call coc#float#vim_buttons(a:winid, a:config) - call s:add_highlights(a:winid, a:config, 0) - return [a:winid, winbufnr(a:winid)] - else - let config = s:convert_config_nvim(a:config, 0) - let hlgroup = get(a:config, 'highlight', 'CocFloating') - let winhl = 'Normal:'.hlgroup.',NormalNC:'.hlgroup.',FoldColumn:'.hlgroup - if winhl !=# getwinvar(a:winid, '&winhl', '') - call setwinvar(a:winid, '&winhl', winhl) - endif - call nvim_win_set_buf(a:winid, bufnr) - call nvim_win_set_config(a:winid, config) - call nvim_win_set_cursor(a:winid, [lnum, 0]) - call coc#float#nvim_create_related(a:winid, config, a:config) - call s:add_highlights(a:winid, a:config, 0) - return [a:winid, bufnr] - endif - endif - let winid = 0 - if s:is_vim - let [line, col] = s:popup_position(a:config) - let title = get(a:config, 'title', '') - let buttons = get(a:config, 'buttons', []) - let hlgroup = get(a:config, 'highlight', 'CocFloating') - let nopad = get(a:config, 'nopad', 0) - let border = s:empty_border(get(a:config, 'border', [])) ? [0, 0, 0, 0] : a:config['border'] - let opts = { - \ 'title': title, - \ 'line': line, - \ 'col': col, - \ 'fixed': 1, - \ 'padding': [0, !nopad && !border[1], 0, !nopad && !border[3]], - \ 'borderchars': s:get_borderchars(a:config), - \ 'highlight': hlgroup, - \ 'minwidth': a:config['width'], - \ 'minheight': a:config['height'], - \ 'maxwidth': a:config['width'], - \ 'maxheight': a:config['height'], - \ 'close': get(a:config, 'close', 0) ? 'button' : 'none', - \ 'border': border, - \ 'callback': { -> coc#float#on_close(winid)}, - \ 'borderhighlight': [s:get_borderhighlight(a:config)], - \ } - let winid = popup_create(bufnr, opts) - if !s:popup_list_api - call add(s:popup_list, winid) - endif - call s:set_float_defaults(winid, a:config) - call win_execute(winid, 'exe '.lnum) - call coc#float#vim_buttons(winid, a:config) - else - let config = s:convert_config_nvim(a:config, 1) - let border = get(a:config, 'border', []) - if has('nvim-0.5.0') && get(a:config, 'shadow', 0) && empty(get(a:config, 'buttons', v:null)) && empty(get(border, 2, 0)) - let config['border'] = 'shadow' - endif - noa let winid = nvim_open_win(bufnr, 0, config) - if winid is 0 - return [] - endif - " cursorline highlight not work on old neovim - call s:set_float_defaults(winid, a:config) - call nvim_win_set_cursor(winid, [lnum, 0]) - call coc#float#nvim_create_related(winid, config, a:config) - call coc#float#nvim_set_winblend(winid, get(a:config, 'winblend', v:null)) - endif - call s:add_highlights(winid, a:config, 1) - let g:coc_last_float_win = winid - call coc#util#do_autocmd('CocOpenFloat') - return [winid, bufnr] -endfunction - -function! coc#float#nvim_create_related(winid, config, opts) abort - let related = getwinvar(a:winid, 'related', []) - let exists = !empty(related) - let border = get(a:opts, 'border', []) - let borderhighlight = s:get_borderhighlight(a:opts) - let buttons = get(a:opts, 'buttons', []) - let pad = !get(a:opts, 'nopad', 0) && (empty(border) || get(border, 1, 0) == 0) - let shadow = get(a:opts, 'shadow', 0) - if get(a:opts, 'close', 0) - call coc#float#nvim_close_btn(a:config, a:winid, border, borderhighlight, related) - elseif exists - call coc#float#close_related(a:winid, 'close') - endif - if !empty(buttons) - call coc#float#nvim_buttons(a:config, a:winid, buttons, get(a:opts, 'getchar', 0), get(border, 2, 0), pad, borderhighlight, shadow, related) - elseif exists - call coc#float#close_related(a:winid, 'buttons') - endif - if !s:empty_border(border) - let borderchars = s:get_borderchars(a:opts) - call coc#float#nvim_border_win(a:config, borderchars, a:winid, border, get(a:opts, 'title', ''), !empty(buttons), borderhighlight, shadow, related) - elseif exists - call coc#float#close_related(a:winid, 'border') - endif - " Check right border - if pad - call coc#float#nvim_right_pad(a:config, a:winid, related) - elseif exists - call coc#float#close_related(a:winid, 'pad') - endif - call setwinvar(a:winid, 'related', filter(related, 'nvim_win_is_valid(v:val)')) -endfunction - -" border window for neovim, content config with border -function! coc#float#nvim_border_win(config, borderchars, winid, border, title, hasbtn, hlgroup, shadow, related) abort - let winid = coc#float#get_related(a:winid, 'border') - let row = a:border[0] ? a:config['row'] - 1 : a:config['row'] - let col = a:border[3] ? a:config['col'] - 1 : a:config['col'] - let width = a:config['width'] + a:border[1] + a:border[3] - let height = a:config['height'] + a:border[0] + a:border[2] + (a:hasbtn ? 2 : 0) - let lines = coc#float#create_border_lines(a:border, a:borderchars, a:title, a:config['width'], a:config['height'], a:hasbtn) - let bufnr = winid ? winbufnr(winid) : 0 - let bufnr = coc#float#create_buf(bufnr, lines) - let opt = { - \ 'relative': a:config['relative'], - \ 'width': width, - \ 'height': height, - \ 'row': row, - \ 'col': col, - \ 'focusable': v:false, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.0') && a:shadow && !a:hasbtn && a:border[2] - let opt['border'] = 'shadow' - endif - if winid - call nvim_win_set_config(winid, opt) - call setwinvar(winid, '&winhl', 'Normal:'.a:hlgroup.',NormalNC:'.a:hlgroup) - else - noa let winid = nvim_open_win(bufnr, 0, opt) - call setwinvar(winid, 'delta', -1) - let winhl = 'Normal:'.a:hlgroup.',NormalNC:'.a:hlgroup - call s:nvim_add_related(winid, a:winid, 'border', winhl, a:related) - endif -endfunction - -" neovim only -function! coc#float#nvim_close_btn(config, winid, border, hlgroup, related) abort - let winid = coc#float#get_related(a:winid, 'close') - let config = { - \ 'relative': a:config['relative'], - \ 'width': 1, - \ 'height': 1, - \ 'row': get(a:border, 0, 0) ? a:config['row'] - 1 : a:config['row'], - \ 'col': a:config['col'] + a:config['width'], - \ 'focusable': v:true, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.1') - let config['zindex'] = 300 - endif - if winid - call nvim_win_set_config(winid, coc#dict#pick(config, ['relative', 'row', 'col'])) - else - let bufnr = coc#float#create_buf(0, ['X']) - noa let winid = nvim_open_win(bufnr, 0, config) - let winhl = 'Normal:'.a:hlgroup.',NormalNC:'.a:hlgroup - call s:nvim_add_related(winid, a:winid, 'close', winhl, a:related) - endif -endfunction - -" Create padding window by config of current window & border config -function! coc#float#nvim_right_pad(config, winid, related) abort - let winid = coc#float#get_related(a:winid, 'pad') - let config = { - \ 'relative': a:config['relative'], - \ 'width': 1, - \ 'height': a:config['height'], - \ 'row': a:config['row'], - \ 'col': a:config['col'] + a:config['width'], - \ 'focusable': v:false, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.1') - let config['zindex'] = 300 - endif - if winid && nvim_win_is_valid(winid) - if has('nvim-0.5.0') - call nvim_win_set_config(winid, coc#dict#pick(config, ['relative', 'row', 'col'])) - call nvim_win_set_height(winid, config['height']) - return - endif - noa call nvim_win_close(winid, 1) - endif - let s:pad_bufnr = bufloaded(s:pad_bufnr) ? s:pad_bufnr : coc#float#create_buf(0, repeat([''], &lines), 'hide') - noa let winid = nvim_open_win(s:pad_bufnr, 0, config) - call s:nvim_add_related(winid, a:winid, 'pad', '', a:related) -endfunction - -" draw buttons window for window with config -function! coc#float#nvim_buttons(config, winid, buttons, getchar, borderbottom, pad, borderhighlight, shadow, related) abort - let winid = coc#float#get_related(a:winid, 'buttons') - let width = a:config['width'] + (a:pad ? 1 : 0) - let config = { - \ 'row': a:config['row'] + a:config['height'], - \ 'col': a:config['col'], - \ 'width': width, - \ 'height': 2 + (a:borderbottom ? 1 : 0), - \ 'relative': a:config['relative'], - \ 'focusable': 1, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.1') - let config['zindex'] = 300 - if a:shadow - let config['border'] = 'shadow' - endif - endif - if winid - let bufnr = winbufnr(winid) - call s:create_btns_buffer(bufnr, width, a:buttons, a:borderbottom) - call nvim_win_set_config(winid, config) - else - let bufnr = s:create_btns_buffer(0, width, a:buttons, a:borderbottom) - noa let winid = nvim_open_win(bufnr, 0, config) - if winid - call s:nvim_add_related(winid, a:winid, 'buttons', '', a:related) - call s:nvim_create_keymap(winid) - endif - endif - if bufnr - call nvim_buf_clear_namespace(bufnr, -1, 0, -1) - call nvim_buf_add_highlight(bufnr, 1, a:borderhighlight, 0, 0, -1) - if a:borderbottom - call nvim_buf_add_highlight(bufnr, 1, a:borderhighlight, 2, 0, -1) - endif - let vcols = getbufvar(bufnr, 'vcols', []) - " TODO need change vol to col - for col in vcols - call nvim_buf_add_highlight(bufnr, 1, a:borderhighlight, 1, col, col + 3) - endfor - if a:getchar - let keys = s:gen_filter_keys(getbufline(bufnr, 2)[0]) - call matchaddpos('MoreMsg', map(keys[0], "[2,v:val]"), 99, -1, {'window': winid}) - call timer_start(10, {-> coc#float#getchar(winid, keys[1])}) - endif - endif -endfunction - -function! coc#float#getchar(winid, keys) abort - let ch = coc#prompt#getc() - let target = getwinvar(a:winid, 'target_winid', 0) - if ch ==# "\" - call coc#float#close(target) - return - endif - if ch ==# "\" - if getwinvar(v:mouse_winid, 'kind', '') ==# 'close' - call coc#float#close(target) - return - endif - if v:mouse_winid == a:winid && v:mouse_lnum == 2 - let vcols = getbufvar(winbufnr(a:winid), 'vcols', []) - let col = v:mouse_col - 1 - if index(vcols, col) < 0 - let filtered = filter(vcols, 'v:val < col') - call coc#rpc#notify('FloatBtnClick', [winbufnr(target), len(filtered)]) - call coc#float#close(target) - return - endif - endif - else - let idx = index(a:keys, ch) - if idx >= 0 - call coc#rpc#notify('FloatBtnClick', [winbufnr(target), idx]) - call coc#float#close(target) - return - endif - endif - call coc#float#getchar(a:winid, a:keys) -endfunction - -" Create or refresh scrollbar for winid -" Need called on create, config, buffer change, scrolled -function! coc#float#nvim_scrollbar(winid) abort - if !has('nvim-0.4.0') - return - endif - let winids = nvim_tabpage_list_wins(nvim_get_current_tabpage()) - if index(winids, a:winid) == -1 - return - endif - let config = nvim_win_get_config(a:winid) - let [row, column] = nvim_win_get_position(a:winid) - let relative = 'editor' - if row == 0 && column == 0 - " fix bad value when ext_multigrid is enabled. https://github.com/neovim/neovim/issues/11935 - let [row, column] = [config.row, config.col] - let relative = config.relative - endif - let width = nvim_win_get_width(a:winid) - let height = nvim_win_get_height(a:winid) - let bufnr = winbufnr(a:winid) - let cw = getwinvar(a:winid, '&foldcolumn', 0) ? width - 1 : width - let ch = coc#float#content_height(bufnr, cw, getwinvar(a:winid, '&wrap')) - let closewin = coc#float#get_related(a:winid, 'close') - let border = getwinvar(a:winid, 'border', []) - let scrollinside = getwinvar(a:winid, 'scrollinside', 0) && get(border, 1, 0) - let winblend = getwinvar(a:winid, '&winblend', 0) - let move_down = closewin && !get(border, 0, 0) - let id = coc#float#get_related(a:winid, 'scrollbar') - if ch <= height || height <= 1 - " no scrollbar, remove exists - if id - call s:close_win(id) - endif - return - endif - if move_down - let height = height - 1 - endif - call coc#float#close_related(a:winid, 'pad') - let sbuf = id ? winbufnr(id) : 0 - let sbuf = coc#float#create_buf(sbuf, repeat([' '], height)) - let opts = { - \ 'row': move_down ? row + 1 : row, - \ 'col': column + width - scrollinside, - \ 'relative': relative, - \ 'width': 1, - \ 'height': height, - \ 'focusable': v:false, - \ 'style': 'minimal', - \ } - if has('nvim-0.5.1') - let opts['zindex'] = 300 - endif - if id - call nvim_win_set_config(id, opts) - else - noa let id = nvim_open_win(sbuf, 0 , opts) - if id == 0 - return - endif - if winblend - call setwinvar(id, '&winblend', winblend) - endif - call setwinvar(id, 'kind', 'scrollbar') - call setwinvar(id, 'target_winid', a:winid) - call coc#float#add_related(id, a:winid) - endif - if !scrollinside - call coc#float#nvim_scroll_adjust(a:winid) - endif - let thumb_height = max([1, float2nr(floor(height * (height + 0.0)/ch))]) - let wininfo = getwininfo(a:winid)[0] - let start = 0 - if wininfo['topline'] != 1 - " needed for correct getwininfo - let firstline = wininfo['topline'] - let lastline = s:nvim_get_botline(firstline, height, cw, bufnr) - let linecount = nvim_buf_line_count(winbufnr(a:winid)) - if lastline >= linecount - let start = height - thumb_height - else - let start = max([1, float2nr(round((height - thumb_height + 0.0)*(firstline - 1.0)/(ch - height)))]) - endif - endif - " add highlights - call nvim_buf_clear_namespace(sbuf, -1, 0, -1) - for idx in range(0, height - 1) - if idx >= start && idx < start + thumb_height - call nvim_buf_add_highlight(sbuf, -1, 'PmenuThumb', idx, 0, 1) - else - call nvim_buf_add_highlight(sbuf, -1, 'PmenuSbar', idx, 0, 1) - endif - endfor -endfunction - -function! coc#float#create_border_lines(border, borderchars, title, width, height, hasbtn) abort - let borderchars = a:borderchars - let list = [] - if a:border[0] - let top = (a:border[3] ? borderchars[4]: '') - \.repeat(borderchars[0], a:width) - \.(a:border[1] ? borderchars[5] : '') - if !empty(a:title) - let top = coc#string#compose(top, 1, a:title.' ') - endif - call add(list, top) - endif - let mid = (a:border[3] ? borderchars[3]: '') - \.repeat(' ', a:width) - \.(a:border[1] ? borderchars[1] : '') - call extend(list, repeat([mid], a:height + (a:hasbtn ? 2 : 0))) - if a:hasbtn - let list[len(list) - 2] = (a:border[3] ? s:borderjoinchars[3]: '') - \.repeat(' ', a:width) - \.(a:border[1] ? s:borderjoinchars[1] : '') - endif - if a:border[2] - let bot = (a:border[3] ? borderchars[7]: '') - \.repeat(borderchars[2], a:width) - \.(a:border[1] ? borderchars[6] : '') - call add(list, bot) - endif - return list -endfunction - -" Close float window by id -function! coc#float#close(winid) abort - call coc#float#close_related(a:winid) - call s:close_win(a:winid) - return 1 -endfunction - -" Get visible float windows -function! coc#float#get_float_win_list(...) abort - let res = [] - let list_all = get(a:, 1, 0) - if s:is_vim - if s:popup_list_api - return filter(popup_list(), 'popup_getpos(v:val)["visible"]'.(list_all ? '' : '&& getwinvar(v:val, "float", 0)')) - endif - return filter(s:popup_list, 's:popup_visible(v:val)') - else - let res = [] - for i in range(1, winnr('$')) - let id = win_getid(i) - let config = nvim_win_get_config(id) - if empty(config) || empty(config['relative']) - continue - endif - " ignore border & button window & others - if list_all == 0 && !getwinvar(id, 'float', 0) - continue - endif - call add(res, id) - endfor - return res - endif - return [] -endfunction - -function! coc#float#get_float_by_kind(kind) abort - if s:is_vim - if s:popup_list_api - return get(filter(popup_list(), 'popup_getpos(v:val)["visible"] && getwinvar(v:val, "kind", "") ==# "'.a:kind.'"'), 0, 0) - endif - return get(filter(s:popup_list, 's:popup_visible(v:val) && getwinvar(v:val, "kind", "") ==# "'.a:kind.'"'), 0, 0) - else - let res = [] - for i in range(1, winnr('$')) - let winid = win_getid(i) - let config = nvim_win_get_config(winid) - if !empty(config['relative']) && getwinvar(winid, 'kind', '') ==# a:kind - return winid - endif - endfor - endif - return 0 -endfunction - -" Check if a float window is scrollable -function! coc#float#scrollable(winid) abort - let bufnr = winbufnr(a:winid) - if bufnr == -1 - return 0 - endif - if s:is_vim - let pos = popup_getpos(a:winid) - if get(popup_getoptions(a:winid), 'scrollbar', 0) - return get(pos, 'scrollbar', 0) - endif - let ch = coc#float#content_height(bufnr, pos['core_width'], getwinvar(a:winid, '&wrap')) - return ch > pos['core_height'] - else - let height = nvim_win_get_height(a:winid) - let width = nvim_win_get_width(a:winid) - if width > 1 && getwinvar(a:winid, '&foldcolumn', 0) - " since we use foldcolumn for left padding - let width = width - 1 - endif - let ch = coc#float#content_height(bufnr, width, getwinvar(a:winid, '&wrap')) - return ch > height - endif -endfunction - -function! coc#float#has_scroll() abort - let win_ids = filter(coc#float#get_float_win_list(), 'coc#float#scrollable(v:val)') - return !empty(win_ids) -endfunction - -function! coc#float#scroll(forward, ...) - if !has('nvim-0.4.0') && !has('patch-8.2.0750') - throw 'coc#float#scroll() requires nvim >= 0.4.0 or vim >= 8.2.0750' - endif - let amount = get(a:, 1, 0) - let winids = filter(coc#float#get_float_win_list(), 'coc#float#scrollable(v:val) && getwinvar(v:val,"kind","") !=# "pum"') - if empty(winids) - return mode() =~ '^i' || mode() ==# 'v' ? "" : "\" - endif - for winid in winids - call s:scroll_win(winid, a:forward, amount) - endfor - return mode() =~ '^i' || mode() ==# 'v' ? "" : "\" -endfunction - -function! coc#float#scroll_win(winid, forward, amount) abort - let opts = s:get_options(a:winid) - let lines = getbufline(winbufnr(a:winid), 1, '$') - let maxfirst = s:max_firstline(lines, opts['height'], opts['width']) - let topline = opts['topline'] - let height = opts['height'] - let width = opts['width'] - let scrolloff = getwinvar(a:winid, '&scrolloff', 0) - if a:forward && topline >= maxfirst - return - endif - if !a:forward && topline == 1 - return - endif - if a:amount == 0 - let topline = s:get_topline(opts['topline'], lines, a:forward, height, width) - else - let topline = topline + (a:forward ? a:amount : - a:amount) - endif - let topline = a:forward ? min([maxfirst, topline]) : max([1, topline]) - let lnum = s:get_cursorline(topline, lines, scrolloff, width, height) - call s:win_setview(a:winid, topline, lnum) - let top = s:get_options(a:winid)['topline'] - " not changed - if top == opts['topline'] - if a:forward - call s:win_setview(a:winid, topline + 1, lnum + 1) - else - call s:win_setview(a:winid, topline - 1, lnum - 1) - endif - endif -endfunction - -function! coc#float#content_height(bufnr, width, wrap) abort - if !bufloaded(a:bufnr) - return 0 - endif - if !a:wrap - return has('nvim') ? nvim_buf_line_count(a:bufnr) : len(getbufline(a:bufnr, 1, '$')) - endif - let lines = has('nvim') ? nvim_buf_get_lines(a:bufnr, 0, -1, 0) : getbufline(a:bufnr, 1, '$') - let total = 0 - for line in lines - let dw = max([1, strdisplaywidth(line)]) - let total += float2nr(ceil(str2float(string(dw))/a:width)) - endfor - return total -endfunction - -function! coc#float#nvim_refresh_scrollbar(winid) abort - let id = coc#float#get_related(a:winid, 'scrollbar') - if id && nvim_win_is_valid(id) - call coc#float#nvim_scrollbar(a:winid) - endif -endfunction - -function! coc#float#on_close(winid) abort - let winids = coc#float#get_float_win_list() - for winid in winids - let target = getwinvar(winid, 'target_winid', -1) - if target == a:winid - call coc#float#close(winid) - endif - endfor -endfunction - -" Close related windows, or specific kind -function! coc#float#close_related(winid, ...) abort - if !coc#float#valid(a:winid) - return - endif - let timer = coc#window#get_var(a:winid, 'timer', 0) - if timer - call timer_stop(timer) - endif - let kind = get(a:, 1, '') - let winids = coc#window#get_var(a:winid, 'related', []) - for id in winids - let curr = coc#window#get_var(id, 'kind', '') - if empty(kind) || curr ==# kind - if curr == 'list' - call coc#float#close(id) - elseif s:is_vim - " vim doesn't throw - noa call popup_close(id) - else - silent! noa call nvim_win_close(id, 1) - endif - endif - endfor -endfunction - -" Close related windows if target window is not visible. -function! coc#float#check_related() abort - let invalids = [] - let ids = coc#float#get_float_win_list(1) - for id in ids - let target = getwinvar(id, 'target_winid', 0) - if (target && index(ids, target) == -1) || getwinvar(id, 'kind', '') == 'pumdetail' - call add(invalids, id) - endif - endfor - if !s:popup_list_api - let s:popup_list = filter(ids, "index(invalids, v:val) == -1") - endif - for id in invalids - call coc#float#close(id) - endfor -endfunction - -" Show float window/popup for user confirm. -" Create buttons popup on vim -function! coc#float#vim_buttons(winid, config) abort - if !has('patch-8.2.0750') - return - endif - let related = getwinvar(a:winid, 'related', []) - let winid = coc#float#get_related(a:winid, 'buttons') - let btns = get(a:config, 'buttons', []) - if empty(btns) - if winid - call s:close_win(winid) - " fix padding - let opts = popup_getoptions(a:winid) - let padding = get(opts, 'padding', v:null) - if !empty(padding) - let padding[2] = padding[2] - 2 - endif - call popup_setoptions(a:winid, {'padding': padding}) - endif - return - endif - let border = get(a:config, 'border', v:null) - if !winid - " adjusting popup padding - let opts = popup_getoptions(a:winid) - let padding = get(opts, 'padding', v:null) - if type(padding) == 7 - let padding = [0, 0, 2, 0] - elseif len(padding) == 0 - let padding = [1, 1, 3, 1] - else - let padding[2] = padding[2] + 2 - endif - call popup_setoptions(a:winid, {'padding': padding}) - endif - let borderhighlight = get(get(a:config, 'borderhighlight', []), 0, '') - let pos = popup_getpos(a:winid) - let bw = empty(border) ? 0 : get(border, 1, 0) + get(border, 3, 0) - let borderbottom = empty(border) ? 0 : get(border, 2, 0) - let borderleft = empty(border) ? 0 : get(border, 3, 0) - let width = pos['width'] - bw + get(pos, 'scrollbar', 0) - let bufnr = s:create_btns_buffer(winid ? winbufnr(winid): 0,width, btns, borderbottom) - let height = 2 + (borderbottom ? 1 : 0) - let keys = s:gen_filter_keys(getbufline(bufnr, 2)[0]) - let options = { - \ 'filter': {id, key -> coc#float#vim_filter(id, key, keys[1])}, - \ 'highlight': get(opts, 'highlight', 'CocFloating') - \ } - let config = { - \ 'line': pos['line'] + pos['height'] - height, - \ 'col': pos['col'] + borderleft, - \ 'minwidth': width, - \ 'minheight': height, - \ 'maxwidth': width, - \ 'maxheight': height, - \ } - if winid != 0 - call popup_move(winid, config) - call popup_setoptions(winid, options) - call win_execute(winid, 'call clearmatches()') - else - let options = extend({ - \ 'filtermode': 'nvi', - \ 'padding': [0, 0, 0, 0], - \ 'fixed': 1, - \ 'zindex': 99, - \ }, options) - call extend(options, config) - let winid = popup_create(bufnr, options) - if !s:popup_list_api - call add(s:popup_list, winid) - endif - endif - if winid != 0 - if !empty(borderhighlight) - call coc#highlight#add_highlight(bufnr, -1, borderhighlight, 0, 0, -1) - call coc#highlight#add_highlight(bufnr, -1, borderhighlight, 2, 0, -1) - call win_execute(winid, 'call matchadd("'.borderhighlight.'", "'.s:borderchars[1].'")') - endif - call setwinvar(winid, 'kind', 'buttons') - call setwinvar(winid, 'target_winid', a:winid) - call add(related, winid) - call setwinvar(a:winid, 'related', related) - call matchaddpos('MoreMsg', map(keys[0], "[2,v:val]"), 99, -1, {'window': winid}) - endif -endfunction - -function! coc#float#nvim_float_click() abort - let kind = getwinvar(win_getid(), 'kind', '') - if kind == 'buttons' - if line('.') != 2 - return - endif - let vw = strdisplaywidth(strpart(getline('.'), 0, col('.') - 1)) - let vcols = getbufvar(bufnr('%'), 'vcols', []) - if index(vcols, vw) >= 0 - return - endif - let idx = 0 - if !empty(vcols) - let filtered = filter(vcols, 'v:val < vw') - let idx = idx + len(filtered) - endif - let winid = win_getid() - let target = getwinvar(winid, 'target_winid', 0) - if target - call coc#rpc#notify('FloatBtnClick', [winbufnr(target), idx]) - call coc#float#close(target) - endif - elseif kind == 'close' - let target = getwinvar(win_getid(), 'target_winid', 0) - call coc#float#close(target) - endif -endfunction - -" Add mapping if necessary -function! coc#float#nvim_win_enter(winid) abort - let kind = getwinvar(a:winid, 'kind', '') - if kind == 'buttons' || kind == 'close' - if empty(maparg('', 'n')) - nnoremap :call coc#float#nvim_float_click() - endif - endif -endfunction - -function! coc#float#vim_filter(winid, key, keys) abort - let key = tolower(a:key) - let idx = index(a:keys, key) - let target = getwinvar(a:winid, 'target_winid', 0) - if target && idx >= 0 - call coc#rpc#notify('FloatBtnClick', [winbufnr(target), idx]) - call coc#float#close(target) - return 1 - endif - return 0 -endfunction - -function! coc#float#get_related(winid, kind, ...) abort - if coc#float#valid(a:winid) - for winid in coc#window#get_var(a:winid, 'related', []) - if coc#window#get_var(winid, 'kind', '') ==# a:kind - return winid - endif - endfor - endif - return get(a:, 1, 0) -endfunction - -function! coc#float#get_row(winid) abort - let winid = s:is_vim ? a:winid : coc#float#get_related(a:winid, 'border', a:winid) - if coc#float#valid(winid) - if s:is_vim - let pos = popup_getpos(winid) - return pos['line'] - 1 - endif - let pos = nvim_win_get_position(winid) - return pos[0] - endif -endfunction - -" Create temporarily buffer with optional lines and &bufhidden -function! coc#float#create_buf(bufnr, ...) abort - if a:bufnr > 0 && bufloaded(a:bufnr) - let bufnr = a:bufnr - else - if s:is_vim - noa let bufnr = bufadd('') - noa call bufload(bufnr) - call setbufvar(bufnr, '&buflisted', 0) - else - noa let bufnr = nvim_create_buf(v:false, v:true) - endif - let bufhidden = get(a:, 2, 'wipe') - call setbufvar(bufnr, '&buftype', 'nofile') - call setbufvar(bufnr, '&bufhidden', bufhidden) - call setbufvar(bufnr, '&swapfile', 0) - call setbufvar(bufnr, '&undolevels', -1) - " neovim's bug - call setbufvar(bufnr, '&modifiable', 1) - endif - let lines = get(a:, 1, v:null) - if type(lines) == v:t_list - if has('nvim') - call nvim_buf_set_lines(bufnr, 0, -1, v:false, lines) - else - silent noa call setbufline(bufnr, 1, lines) - silent noa call deletebufline(bufnr, len(lines) + 1, '$') - endif - endif - return bufnr -endfunction - -" Change border window & close window when scrollbar is shown. -function! coc#float#nvim_scroll_adjust(winid) abort - let winid = coc#float#get_related(a:winid, 'border') - if !winid - return - endif - let bufnr = winbufnr(winid) - let lines = nvim_buf_get_lines(bufnr, 0, -1, 0) - if len(lines) >= 2 - let cw = nvim_win_get_width(a:winid) - let width = nvim_win_get_width(winid) - if width - cw != 1 + (strcharpart(lines[1], 0, 1) ==# s:borderchars[3] ? 1 : 0) - return - endif - call nvim_win_set_width(winid, width + 1) - let lastline = len(lines) - 1 - for i in range(0, lastline) - let line = lines[i] - if i == 0 - let add = s:borderchars[0] - elseif i == lastline - let add = s:borderchars[2] - else - let add = ' ' - endif - let prev = strcharpart(line, 0, strchars(line) - 1) - let lines[i] = prev . add . coc#string#last_character(line) - endfor - call nvim_buf_set_lines(bufnr, 0, -1, 0, lines) - " Move right close button - if coc#window#get_var(a:winid, 'right', 0) == 0 - let id = coc#float#get_related(a:winid, 'close') - if id - let [row, col] = nvim_win_get_position(id) - call nvim_win_set_config(id, { - \ 'relative': 'editor', - \ 'row': row, - \ 'col': col + 1, - \ }) - endif - elseif has('nvim-0.6.0') - " Move winid and all related left by 1 - let winids = [a:winid] + coc#window#get_var(a:winid, 'related', []) - for winid in winids - if nvim_win_is_valid(winid) - if coc#window#get_var(winid, 'kind', '') != 'close' - let [row, column] = nvim_win_get_position(winid) - call nvim_win_set_config(winid, { - \ 'row': row, - \ 'col': column - 1, - \ 'relative': 'editor', - \ }) - endif - endif - endfor - endif - endif -endfunction - -function! coc#float#nvim_set_winblend(winid, winblend) abort - if a:winblend is v:null - return - endif - call coc#window#set_var(a:winid, '&winblend', a:winblend) - for winid in coc#window#get_var(a:winid, 'related', []) - call coc#window#set_var(winid, '&winblend', a:winblend) - endfor -endfunction - -function! s:popup_visible(id) abort - let pos = popup_getpos(a:id) - if !empty(pos) && get(pos, 'visible', 0) - return 1 - endif - return 0 -endfunction - -function! s:convert_config_nvim(config, create) abort - let valids = ['relative', 'win', 'anchor', 'width', 'height', 'bufpos', 'col', 'row', 'focusable'] - let result = coc#dict#pick(a:config, valids) - let border = get(a:config, 'border', []) - if !s:empty_border(border) - if result['relative'] ==# 'cursor' && result['row'] < 0 - " move top when has bottom border - if get(border, 2, 0) - let result['row'] = result['row'] - 1 - endif - else - " move down when has top border - if get(border, 0, 0) && !get(a:config, 'prompt', 0) - let result['row'] = result['row'] + 1 - endif - endif - " move right when has left border - if get(border, 3, 0) - let result['col'] = result['col'] + 1 - endif - let result['width'] = float2nr(result['width'] + 1 - get(border,3, 0)) - else - let result['width'] = float2nr(result['width'] + (get(a:config, 'nopad', 0) ? 0 : 1)) - endif - if has('nvim-0.5.1') && a:create - let result['noautocmd'] = v:true - endif - let result['height'] = float2nr(result['height']) - return result -endfunction - -function! s:create_btns_buffer(bufnr, width, buttons, borderbottom) abort - let n = len(a:buttons) - let spaces = a:width - n + 1 - let tw = 0 - for txt in a:buttons - let tw += strdisplaywidth(txt) - endfor - if spaces < tw - throw 'window is too small for buttons.' - endif - let ds = (spaces - tw)/n - let dl = ds/2 - let dr = ds%2 == 0 ? ds/2 : ds/2 + 1 - let btnline = '' - let idxes = [] - for idx in range(0, n - 1) - let txt = toupper(a:buttons[idx][0]).a:buttons[idx][1:] - let btnline .= repeat(' ', dl).txt.repeat(' ', dr) - if idx != n - 1 - call add(idxes, strdisplaywidth(btnline)) - let btnline .= s:borderchars[1] - endif - endfor - let lines = [repeat(s:borderchars[0], a:width), btnline] - if a:borderbottom - call add(lines, repeat(s:borderchars[0], a:width)) - endif - for idx in idxes - let lines[0] = strcharpart(lines[0], 0, idx).s:borderjoinchars[0].strcharpart(lines[0], idx + 1) - if a:borderbottom - let lines[2] = strcharpart(lines[0], 0, idx).s:borderjoinchars[2].strcharpart(lines[0], idx + 1) - endif - endfor - let bufnr = coc#float#create_buf(a:bufnr, lines) - call setbufvar(bufnr, 'vcols', idxes) - return bufnr -endfunction - -function! s:gen_filter_keys(line) abort - let cols = [] - let used = [] - let next = 1 - for idx in range(0, strchars(a:line) - 1) - let ch = strcharpart(a:line, idx, 1) - let nr = char2nr(ch) - if next - if (nr >= 65 && nr <= 90) || (nr >= 97 && nr <= 122) - let lc = tolower(ch) - if index(used, lc) < 0 && (!s:is_vim || empty(maparg(lc, 'n'))) - let col = len(strcharpart(a:line, 0, idx)) + 1 - call add(used, lc) - call add(cols, col) - let next = 0 - endif - endif - else - if ch == s:borderchars[1] - let next = 1 - endif - endif - endfor - return [cols, used] -endfunction - -function! s:close_win(winid) abort - if a:winid <= 0 - return - endif - " vim not throw for none exists winid - if s:is_vim - call popup_close(a:winid) - else - if nvim_win_is_valid(a:winid) - call nvim_win_close(a:winid, 1) - endif - endif -endfunction - -function! s:nvim_create_keymap(winid) abort - if exists('*nvim_buf_set_keymap') - let bufnr = winbufnr(a:winid) - call nvim_buf_set_keymap(bufnr, 'n', '', ':call coc#float#nvim_float_click()', { - \ 'silent': v:true, - \ 'nowait': v:true - \ }) - else - let curr = win_getid() - let m = mode() - if m == 'n' || m == 'i' || m == 'ic' - noa call win_gotoid(a:winid) - nnoremap :call coc#float#nvim_float_click() - noa call win_gotoid(curr) - endif - endif -endfunction - -" getwininfo is buggy on neovim, use topline, width & height should for content -function! s:nvim_get_botline(topline, height, width, bufnr) abort - let lines = getbufline(a:bufnr, a:topline, a:topline + a:height - 1) - let botline = a:topline - let count = 0 - for i in range(0, len(lines) - 1) - let w = max([1, strdisplaywidth(lines[i])]) - let lh = float2nr(ceil(str2float(string(w))/a:width)) - let count = count + lh - let botline = a:topline + i - if count >= a:height - break - endif - endfor - return botline -endfunction - -" get popup position for vim8 based on config of neovim float window -function! s:popup_position(config) abort - let relative = get(a:config, 'relative', 'editor') - let border = get(a:config, 'border', [0, 0, 0, 0]) - let delta = get(border, 0, 0) + get(border, 2, 0) - if relative ==# 'cursor' - if a:config['row'] < 0 - let delta = - delta - elseif a:config['row'] == 0 - let delta = - get(border, 0, 0) - else - let delta = 0 - endif - return [s:popup_cursor(a:config['row'] + delta), s:popup_cursor(a:config['col'])] - endif - return [a:config['row'] + 1, a:config['col'] + 1] -endfunction - -function! coc#float#add_related(winid, target) abort - let arr = coc#window#get_var(a:target, 'related', []) - if index(arr, a:winid) >= 0 - return - endif - call add(arr, a:winid) - call coc#window#set_var(a:target, 'related', arr) -endfunction - -function! s:popup_cursor(n) abort - if a:n == 0 - return 'cursor' - endif - if a:n < 0 - return 'cursor'.a:n - endif - return 'cursor+'.a:n -endfunction - -" max firstline of lines, height > 0, width > 0 -function! s:max_firstline(lines, height, width) abort - let max = len(a:lines) - let remain = a:height - for line in reverse(copy(a:lines)) - let w = max([1, strdisplaywidth(line)]) - let dh = float2nr(ceil(str2float(string(w))/a:width)) - if remain - dh < 0 - break - endif - let remain = remain - dh - let max = max - 1 - endfor - return min([len(a:lines), max + 1]) -endfunction - -" Get best lnum by topline -function! s:get_cursorline(topline, lines, scrolloff, width, height) abort - let lastline = len(a:lines) - if a:topline == lastline - return lastline - endif - let bottomline = a:topline - let used = 0 - for lnum in range(a:topline, lastline) - let w = max([1, strdisplaywidth(a:lines[lnum - 1])]) - let dh = float2nr(ceil(str2float(string(w))/a:width)) - if used + dh >= a:height || lnum == lastline - let bottomline = lnum - break - endif - let used += dh - endfor - let cursorline = a:topline + a:scrolloff - if cursorline + a:scrolloff > bottomline - " unable to satisfy scrolloff - let cursorline = (a:topline + bottomline)/2 - endif - return cursorline -endfunction - -" Get firstline for full scroll -function! s:get_topline(topline, lines, forward, height, width) abort - let used = 0 - let lnums = a:forward ? range(a:topline, len(a:lines)) : reverse(range(1, a:topline)) - let topline = a:forward ? len(a:lines) : 1 - for lnum in lnums - let w = max([1, strdisplaywidth(a:lines[lnum - 1])]) - let dh = float2nr(ceil(str2float(string(w))/a:width)) - if used + dh >= a:height - let topline = lnum - break - endif - let used += dh - endfor - if topline == a:topline - if a:forward - let topline = min([len(a:lines), topline + 1]) - else - let topline = max([1, topline - 1]) - endif - endif - return topline -endfunction - -" topline content_height content_width -function! s:get_options(winid) abort - if has('nvim') - let width = nvim_win_get_width(a:winid) - if coc#window#get_var(a:winid, '&foldcolumn', 0) - let width = width - 1 - endif - let info = getwininfo(a:winid)[0] - return { - \ 'topline': info['topline'], - \ 'height': nvim_win_get_height(a:winid), - \ 'width': width - \ } - else - let pos = popup_getpos(a:winid) - return { - \ 'topline': pos['firstline'], - \ 'width': pos['core_width'], - \ 'height': pos['core_height'] - \ } - endif -endfunction - -function! s:win_setview(winid, topline, lnum) abort - if has('nvim') - call coc#compat#execute(a:winid, 'call winrestview({"lnum":'.a:lnum.',"topline":'.a:topline.'})') - call timer_start(10, { -> coc#float#nvim_refresh_scrollbar(a:winid) }) - else - call coc#compat#execute(a:winid, 'exe '.a:lnum) - call popup_setoptions(a:winid, { - \ 'firstline': a:topline, - \ }) - endif -endfunction - -function! s:set_float_defaults(winid, config) abort - if has('nvim') - let hlgroup = get(a:config, 'highlight', 'CocFloating') - call setwinvar(a:winid, '&winhl', 'Normal:'.hlgroup.',NormalNC:'.hlgroup.',FoldColumn:'.hlgroup) - call setwinvar(a:winid, 'border', get(a:config, 'border', [])) - call setwinvar(a:winid, 'scrollinside', get(a:config, 'scrollinside', 0)) - if !get(a:config, 'nopad', 0) - call setwinvar(a:winid, '&foldcolumn', s:nvim_enable_foldcolumn(get(a:config, 'border', v:null))) - endif - endif - call setwinvar(a:winid, '&spell', 0) - call setwinvar(a:winid, '&linebreak', 1) - call setwinvar(a:winid, '&conceallevel', 0) - call setwinvar(a:winid, '&signcolumn', 'no') - call setwinvar(a:winid, '&list', 0) - call setwinvar(a:winid, '&number', 0) - call setwinvar(a:winid, '&relativenumber', 0) - call setwinvar(a:winid, '&cursorline', 0) - call setwinvar(a:winid, '&cursorcolumn', 0) - call setwinvar(a:winid, '&colorcolumn', 0) - call setwinvar(a:winid, '&wrap', !get(a:config, 'cursorline', 0)) - if s:is_vim || has('nvim-0.5.0') - call setwinvar(a:winid, '&scrolloff', 0) - endif - if has('nvim-0.6.0') || has("patch-8.1.2281") - call setwinvar(a:winid, '&showbreak', 'NONE') - endif - if exists('*win_execute') - call win_execute(a:winid, 'setl fillchars+=eob:\ ') - endif - if get(a:config, 'autohide', 0) - call setwinvar(a:winid, 'autohide', 1) - endif - call setwinvar(a:winid, 'float', 1) -endfunction - -function! s:nvim_add_related(winid, target, kind, winhl, related) abort - if a:winid <= 0 - return - endif - " minimal not work - if !has('nvim-0.4.3') - call setwinvar(a:winid, '&colorcolumn', 0) - call setwinvar(a:winid, '&number', 0) - call setwinvar(a:winid, '&relativenumber', 0) - call setwinvar(a:winid, '&foldcolumn', 0) - call setwinvar(a:winid, '&signcolumn', 0) - call setwinvar(a:winid, '&list', 0) - endif - let winhl = empty(a:winhl) ? coc#window#get_var(a:target, '&winhl', '') : a:winhl - call setwinvar(a:winid, '&winhl', winhl) - call setwinvar(a:winid, 'target_winid', a:target) - call setwinvar(a:winid, 'kind', a:kind) - call add(a:related, a:winid) -endfunction - -function! s:nvim_enable_foldcolumn(border) abort - if a:border is 1 - return 0 - endif - if type(a:border) == v:t_list && get(a:border, 3, 0) == 1 - return 0 - endif - return 1 -endfunction - -function! s:add_highlights(winid, config, create) abort - let codes = get(a:config, 'codes', []) - let highlights = get(a:config, 'highlights', []) - if empty(codes) && empty(highlights) && a:create - return - endif - let bgGroup = get(a:config, 'highlight', 'CocFloating') - for obj in codes - let hlGroup = get(obj, 'hlGroup', v:null) - if !empty(hlGroup) - let obj['hlGroup'] = coc#highlight#compose_hlgroup(hlGroup, bgGroup) - endif - endfor - call coc#highlight#add_highlights(a:winid, codes, highlights) -endfunction - -function! s:empty_border(border) abort - if empty(a:border) || empty(filter(copy(a:border), 'v:val != 0')) - return 1 - endif - return 0 -endfunction - -function! s:get_borderchars(config) abort - let borderchars = get(a:config, 'borderchars', []) - if !empty(borderchars) - return borderchars - endif - return get(a:config, 'rounded', 0) ? s:rounded_borderchars : s:borderchars -endfunction - -function! s:scroll_win(winid, forward, amount) abort - if s:is_vim - call coc#float#scroll_win(a:winid, a:forward, a:amount) - else - call timer_start(0, { -> coc#float#scroll_win(a:winid, a:forward, a:amount)}) - endif -endfunction - -function! s:get_borderhighlight(config) abort - let hlgroup = get(a:config, 'highlight', 'CocFloating') - let borderhighlight = get(a:config, 'borderhighlight', v:null) - if empty(borderhighlight) - return hlgroup - endif - let highlight = type(borderhighlight) == 3 ? borderhighlight[0] : borderhighlight - return coc#highlight#compose_hlgroup(highlight, hlgroup) -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/helper.vim b/pack/ant/start/coc.nvim/autoload/coc/helper.vim deleted file mode 100644 index 8bdc9b8..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/helper.vim +++ /dev/null @@ -1,148 +0,0 @@ -scriptencoding utf-8 -" Helper methods for viml - -function! coc#helper#get_charactor(line, col) abort - return strchars(strpart(a:line, 0, a:col - 1)) -endfunction - -function! coc#helper#last_character(line) abort - return strcharpart(a:line, strchars(a:line) - 1, 1) -endfunction - -function! coc#helper#obj_equal(one, two) abort - for key in keys(a:one) - if a:one[key] != a:two[key] - return 0 - endif - endfor - return 1 -endfunction - -" get change between two lines -function! coc#helper#str_diff(curr, previous, col) abort - let end = strpart(a:curr, a:col - 1) - let start = strpart(a:curr, 0, a:col -1) - let endOffset = 0 - let startOffset = 0 - let currLen = strchars(a:curr) - let prevLen = strchars(a:previous) - if len(end) - let endLen = strchars(end) - for i in range(min([prevLen, endLen])) - if strcharpart(end, endLen - 1 - i, 1) ==# strcharpart(a:previous, prevLen -1 -i, 1) - let endOffset = endOffset + 1 - else - break - endif - endfor - endif - let remain = endOffset == 0 ? a:previous : strcharpart(a:previous, 0, prevLen - endOffset) - if len(remain) - for i in range(min([strchars(remain), strchars(start)])) - if strcharpart(remain, i, 1) ==# strcharpart(start, i ,1) - let startOffset = startOffset + 1 - else - break - endif - endfor - endif - return { - \ 'start': startOffset, - \ 'end': prevLen - endOffset, - \ 'text': strcharpart(a:curr, startOffset, currLen - startOffset - endOffset) - \ } -endfunction - -function! coc#helper#str_apply(content, diff) abort - let totalLen = strchars(a:content) - let endLen = totalLen - a:diff['end'] - return strcharpart(a:content, 0, a:diff['start']).a:diff['text'].strcharpart(a:content, a:diff['end'], endLen) -endfunction - -" insert inserted to line at position, use ... when result is too long -" line should only contains character has strwidth equals 1 -function! coc#helper#str_compose(line, position, inserted) abort - let width = strwidth(a:line) - let text = a:inserted - let res = a:line - let need_truncate = a:position + strwidth(text) + 1 > width - if need_truncate - let remain = width - a:position - 3 - if remain < 2 - " use text for full line, use first & end of a:line, ignore position - let res = strcharpart(a:line, 0, 1) - let w = strwidth(res) - for i in range(strchars(text)) - let c = strcharpart(text, i, 1) - let a = strwidth(c) - if w + a <= width - 1 - let w = w + a - let res = res.c - endif - endfor - let res = res.strcharpart(a:line, w) - else - let res = strcharpart(a:line, 0, a:position) - let w = strwidth(res) - for i in range(strchars(text)) - let c = strcharpart(text, i, 1) - let a = strwidth(c) - if w + a <= width - 3 - let w = w + a - let res = res.c - endif - endfor - let res = res.'..' - let w = w + 2 - let res = res.strcharpart(a:line, w) - endif - else - let first = strcharpart(a:line, 0, a:position) - let res = first.text.strcharpart(a:line, a:position + strwidth(text)) - endif - return res -endfunction - -" Return new dict with keys removed -function! coc#helper#dict_omit(dict, keys) abort - let res = {} - for key in keys(a:dict) - if index(a:keys, key) == -1 - let res[key] = a:dict[key] - endif - endfor - return res -endfunction - -" Return new dict with keys only -function! coc#helper#dict_pick(dict, keys) abort - let res = {} - for key in keys(a:dict) - if index(a:keys, key) != -1 - let res[key] = a:dict[key] - endif - endfor - return res -endfunction - -" support for float values -function! coc#helper#min(first, ...) abort - let val = a:first - for i in range(0, len(a:000) - 1) - if a:000[i] < val - let val = a:000[i] - endif - endfor - return val -endfunction - -" support for float values -function! coc#helper#max(first, ...) abort - let val = a:first - for i in range(0, len(a:000) - 1) - if a:000[i] > val - let val = a:000[i] - endif - endfor - return val -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/highlight.vim b/pack/ant/start/coc.nvim/autoload/coc/highlight.vim deleted file mode 100644 index cb52692..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/highlight.vim +++ /dev/null @@ -1,734 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:clear_match_by_window = has('nvim-0.6.0') || has('patch-8.1.1084') -let s:set_extmark = has('nvim') && exists('*nvim_buf_set_extmark') -let s:prop_offset = get(g:, 'coc_text_prop_offset', 1000) -let s:namespace_map = {} -let s:ns_id = 1 -let s:diagnostic_hlgroups = ['CocErrorHighlight', 'CocWarningHighlight', 'CocInfoHighlight', 'CocHintHighlight', 'CocDeprecatedHighlight', 'CocUnusedHighlight'] -" Maximum count to highlight each time. -let g:coc_highlight_maximum_count = get(g:, 'coc_highlight_maximum_count', 100) - -if has('nvim-0.5.0') && s:clear_match_by_window == 0 - try - call getmatches(0) - let s:clear_match_by_window = 1 - catch /^Vim\%((\a\+)\)\=:E118/ - " ignored - endtry -endif - -" Update buffer region by region. -function! coc#highlight#buffer_update(bufnr, key, highlights, ...) abort - if !bufloaded(a:bufnr) - return - endif - if empty(a:highlights) - call coc#highlight#clear_highlight(a:bufnr, a:key, 0, -1) - return - endif - let priority = get(a:, 1, v:null) - let changedtick = getbufvar(a:bufnr, 'changedtick', 0) - if type(get(a:, 2, v:null)) == 0 && changedtick > a:2 - return - endif - let hls = map(copy(a:highlights), "{'hlGroup':v:val[0],'lnum':v:val[1],'colStart':v:val[2],'colEnd':v:val[3],'combine':get(v:val,4,1),'start_incl':get(v:val,5,0),'end_incl':get(v:val,6,0)}") - if len(hls) <= g:coc_highlight_maximum_count || get(g:, 'coc_node_env', '') ==# 'test' - call coc#highlight#update_highlights(a:bufnr, a:key, hls, 0, -1, priority) - return - endif - let linecount = coc#compat#buf_line_count(a:bufnr) - let groups = s:group_hls(hls, linecount) - call s:update_highlights_timer(a:bufnr, changedtick, a:key, priority, groups, 0) -endfunction - -" Update highlights by check exists highlights. -" 0 based, end exclusive start and end -function! coc#highlight#update_highlights(bufnr, key, highlights, ...) abort - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - if !bufloaded(bufnr) - return - endif - let start = get(a:, 1, 0) - let end = get(a:, 2, -1) - if end == 0 - return - endif - let linecount = coc#compat#buf_line_count(a:bufnr) - if end >= linecount - let end = -1 - endif - if empty(a:highlights) - call coc#highlight#clear_highlight(bufnr, a:key, start, end) - return - endif - let priority = get(a:, 3, v:null) - let total = len(a:highlights) - " index list that exists with current highlights - let exists = [] - let ns = coc#highlight#create_namespace(a:key) - if has('nvim-0.5.0') || exists('*prop_list') - let endLnum = end < 0 ? linecount - 1 : end - 1 - let firstLnum = a:highlights[0]['lnum'] - if firstLnum > start - call coc#highlight#clear_highlight(bufnr, a:key, start, firstLnum) - let start = firstLnum - endif - let lastLnum = a:highlights[total - 1]['lnum'] - if lastLnum < endLnum - call coc#highlight#clear_highlight(bufnr, a:key, lastLnum + 1, endLnum + 1) - let endLnum = lastLnum - endif - let current = coc#highlight#get_highlights(bufnr, a:key, start, endLnum) - let currIndex = 0 - if !empty(current) - for [lnum, items] in s:to_group(current) - let indexes = [] - let currIndexes = range(0, len(items) - 1) - let removeIndexes = [] - while currIndex != total - let hi = a:highlights[currIndex] - if hi['lnum'] == lnum - let findIndex = -1 - for idx in currIndexes - let item = items[idx] - if hi['hlGroup'] ==# item[0] && hi['colStart'] == item[2] && hi['colEnd'] == item[3] - call add(indexes, currIndex) - let findIndex = idx - break - elseif item[2] > hi['colStart'] - break - endif - endfor - if findIndex != -1 - call filter(currIndexes, 'v:val != '.findIndex) - endif - elseif hi['lnum'] > lnum - break - endif - let currIndex = currIndex + 1 - endwhile - for idx in currIndexes - if s:is_vim - call prop_remove({'bufnr': bufnr, 'id': items[idx][4]}) - else - call nvim_buf_del_extmark(bufnr, ns, items[idx][4]) - endif - endfor - call extend(exists, indexes) - endfor - endif - else - call coc#highlight#clear_highlight(bufnr, a:key, start, end) - endif - let indexes = range(0, total - 1) - if !empty(exists) - let indexes = filter(indexes, 'index(exists, v:val) == -1') - endif - for idx in indexes - let hi = a:highlights[idx] - let opts = { - \ 'combine': get(hi, 'combine', 0), - \ 'start_incl': get(hi, 'start_incl', 0), - \ 'end_incl': get(hi, 'end_incl', 0), - \ } - if type(priority) == 0 - let opts['priority'] = s:get_priority(a:key, hi['hlGroup'], priority) - endif - call coc#highlight#add_highlight(bufnr, ns, hi['hlGroup'], hi['lnum'], hi['colStart'], hi['colEnd'], opts) - endfor -endfunction - -" Get list of highlights by range or all buffer. -" 0 based line, start_col and end_col -" 0 based start & end line, end inclusive. -function! coc#highlight#get_highlights(bufnr, key, ...) abort - if !bufloaded(a:bufnr) - return v:null - endif - if !has_key(s:namespace_map, a:key) - return [] - endif - let start = get(a:, 1, 0) - let end = get(a:, 2, -1) - let res = [] - let ns = s:namespace_map[a:key] - if exists('*prop_list') - let types = coc#api#get_types(ns) - if empty(types) - return res - endif - " Could filter by end_lnum and types - if has('patch-8.2.3652') - let endLnum = end == -1 ? -1 : end + 1 - for prop in prop_list(start + 1, {'bufnr': a:bufnr, 'types': types, 'end_lnum': endLnum}) - if prop['start'] == 0 || prop['end'] == 0 - " multi line textprop are not supported, simply ignore it - continue - endif - let startCol = prop['col'] - 1 - let endCol = startCol + prop['length'] - call add(res, [s:prop_type_hlgroup(prop['type']), prop['lnum'] - 1, startCol, endCol, prop['id']]) - endfor - else - if end == -1 - let end = coc#compat#buf_line_count(a:bufnr) - else - let end = end + 1 - endif - for line in range(start + 1, end) - for prop in prop_list(line, {'bufnr': a:bufnr}) - if index(types, prop['type']) == -1 || prop['start'] == 0 || prop['end'] == 0 - " multi line textprop are not supported, simply ignore it - continue - endif - let startCol = prop['col'] - 1 - let endCol = startCol + prop['length'] - call add(res, [s:prop_type_hlgroup(prop['type']), line - 1, startCol, endCol, prop['id']]) - endfor - endfor - endif - elseif has('nvim-0.5.0') - let start = [start, 0] - let maximum = end == -1 ? nvim_buf_line_count(a:bufnr) : end + 1 - let end = end == -1 ? -1 : [end + 1, 0] - let markers = nvim_buf_get_extmarks(a:bufnr, ns, start, -1, {'details': v:true}) - for [marker_id, line, start_col, details] in markers - if line >= maximum - " Could be markers exceed end of line - continue - endif - let delta = details['end_row'] - line - if delta > 1 || (delta == 1 && details['end_col'] != 0) - " can't handle, single line only - continue - endif - let endCol = details['end_col'] - if endCol == start_col - call nvim_buf_del_extmark(a:bufnr, ns, marker_id) - continue - endif - if delta == 1 - let text = get(nvim_buf_get_lines(a:bufnr, line, line + 1, 0), 0, '') - let endCol = strlen(text) - endif - call add(res, [details['hl_group'], line, start_col, endCol, marker_id]) - endfor - else - throw 'Get highlights requires neovim 0.5.0 or vim support prop_list' - endif - return res -endfunction - -" Add multiple highlights to buffer. -" type HighlightItem = [hlGroup, lnum, colStart, colEnd, combine?, start_incl?, end_incl?] -function! coc#highlight#set(bufnr, key, highlights, priority) abort - if !bufloaded(a:bufnr) - return - endif - let ns = coc#highlight#create_namespace(a:key) - if len(a:highlights) > g:coc_highlight_maximum_count - call s:add_highlights_timer(a:bufnr, ns, a:highlights, a:priority) - else - call s:add_highlights(a:bufnr, ns, a:highlights, a:priority) - endif -endfunction - -" Clear highlights by 0 based line numbers. -function! coc#highlight#clear(bufnr, key, lnums) abort - if !bufloaded(a:bufnr) || empty(a:lnums) - return - endif - let ns = coc#highlight#create_namespace(a:key) - for lnum in a:lnums - if has('nvim') - call nvim_buf_clear_namespace(a:bufnr, ns, lnum, lnum + 1) - else - call coc#api#exec('buf_clear_namespace', [a:bufnr, ns, lnum, lnum + 1]) - endif - endfor - " clear highlights in invalid line. - if has('nvim') - let linecount = nvim_buf_line_count(a:bufnr) - call nvim_buf_clear_namespace(a:bufnr, ns, linecount, -1) - endif -endfunction - -function! coc#highlight#del_markers(bufnr, key, ids) abort - if !bufloaded(a:bufnr) - return - endif - let ns = coc#highlight#create_namespace(a:key) - for id in a:ids - if s:is_vim - call prop_remove({'bufnr': a:bufnr, 'id': id}) - else - call nvim_buf_del_extmark(a:bufnr, ns, id) - endif - endfor -endfunction - -" highlight LSP range, -function! coc#highlight#ranges(bufnr, key, hlGroup, ranges, ...) abort - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - if !bufloaded(bufnr) || !exists('*getbufline') - return - endif - let opts = get(a:, 1, {}) - let synmaxcol = getbufvar(a:bufnr, '&synmaxcol', 1000) - if synmaxcol == 0 - let synmaxcol = 1000 - endif - let synmaxcol = min([synmaxcol, 1000]) - let srcId = coc#highlight#create_namespace(a:key) - for range in a:ranges - let start = range['start'] - let end = range['end'] - for lnum in range(start['line'] + 1, end['line'] + 1) - let arr = getbufline(bufnr, lnum) - let line = empty(arr) ? '' : arr[0] - if empty(line) - continue - endif - if start['character'] > synmaxcol || end['character'] > synmaxcol - continue - endif - " TODO don't know how to count UTF16 code point, should work most cases. - let colStart = lnum == start['line'] + 1 ? strlen(strcharpart(line, 0, start['character'])) : 0 - let colEnd = lnum == end['line'] + 1 ? strlen(strcharpart(line, 0, end['character'])) : strlen(line) - if colStart == colEnd - continue - endif - call coc#highlight#add_highlight(bufnr, srcId, a:hlGroup, lnum - 1, colStart, colEnd, opts) - endfor - endfor -endfunction - -function! coc#highlight#add_highlight(bufnr, src_id, hl_group, line, col_start, col_end, ...) abort - let opts = get(a:, 1, {}) - let priority = get(opts, 'priority', v:null) - if !s:is_vim - if s:set_extmark && a:src_id != -1 - " get(opts, 'start_incl', 0) ? v:true : v:false, - try - call nvim_buf_set_extmark(a:bufnr, a:src_id, a:line, a:col_start, { - \ 'end_col': a:col_end, - \ 'hl_group': a:hl_group, - \ 'hl_mode': get(opts, 'combine', 1) ? 'combine' : 'replace', - \ 'right_gravity': v:true, - \ 'end_right_gravity': v:false, - \ 'priority': type(priority) == 0 ? min([priority, 4096]) : 4096, - \ }) - catch /^Vim\%((\a\+)\)\=:E5555/ - " the end_col could be invalid, ignore this error - endtry - else - call nvim_buf_add_highlight(a:bufnr, a:src_id, a:hl_group, a:line, a:col_start, a:col_end) - endif - else - call coc#api#exec('buf_add_highlight', [a:bufnr, a:src_id, a:hl_group, a:line, a:col_start, a:col_end, opts]) - endif -endfunction - -function! coc#highlight#clear_highlight(bufnr, key, start_line, end_line) abort - let bufnr = a:bufnr == 0 ? bufnr('%') : a:bufnr - if !bufloaded(bufnr) - return - endif - let src_id = coc#highlight#create_namespace(a:key) - if has('nvim') - call nvim_buf_clear_namespace(a:bufnr, src_id, a:start_line, a:end_line) - else - call coc#api#exec('buf_clear_namespace', [a:bufnr, src_id, a:start_line, a:end_line]) - endif -endfunction - -" highlight buffer in winid with CodeBlock &HighlightItems -" export interface HighlightItem { -" lnum: number // 0 based -" hlGroup: string -" colStart: number // 0 based -" colEnd: number -" } -" export interface CodeBlock { -" filetype?: string -" hlGroup?: string -" startLine: number // 0 based -" endLine: number -" } -function! coc#highlight#add_highlights(winid, codes, highlights) abort - if get(g:, 'coc_node_env', '') ==# 'test' - call setwinvar(a:winid, 'highlights', a:highlights) - endif - " clear highlights - call coc#compat#execute(a:winid, 'syntax clear') - let bufnr = winbufnr(a:winid) - call coc#highlight#clear_highlight(bufnr, -1, 0, -1) - if !empty(a:codes) - call coc#highlight#highlight_lines(a:winid, a:codes) - endif - if !empty(a:highlights) - for item in a:highlights - let hlGroup = item['hlGroup'] - let opts = hlGroup =~# 'Search$' ? {'priority': 999, 'combine': 1} : {} - call coc#highlight#add_highlight(bufnr, -1, hlGroup, item['lnum'], item['colStart'], item['colEnd']) - endfor - endif -endfunction - - -" Add highlights to line groups of winid, support hlGroup and filetype -" config should have startLine, endLine (0 based, end excluded) and filetype or hlGroup -" endLine should > startLine and endLine is excluded -" -" export interface CodeBlock { -" filetype?: string -" hlGroup?: string -" startLine: number // 0 based -" endLine: number -" } -function! coc#highlight#highlight_lines(winid, blocks) abort - let region_id = 1 - let defined = [] - let cmds = [] - for config in a:blocks - let start = config['startLine'] + 1 - let end = config['endLine'] == -1 ? len(getbufline(winbufnr(a:winid), 1, '$')) + 1 : config['endLine'] + 1 - let filetype = get(config, 'filetype', '') - let hlGroup = get(config, 'hlGroup', '') - if !empty(hlGroup) - call add(cmds, 'syntax region '.hlGroup.' start=/\%'.start.'l/ end=/\%'.end.'l/') - else - let filetype = matchstr(filetype, '\v^\w+') - if empty(filetype) || filetype == 'txt' || index(get(g:, 'coc_markdown_disabled_languages', []), filetype) != -1 - continue - endif - if index(defined, filetype) == -1 - call add(cmds, 'syntax include @'.toupper(filetype).' syntax/'.filetype.'.vim') - call add(cmds, 'unlet! b:current_syntax') - call add(defined, filetype) - endif - call add(cmds, 'syntax region CodeBlock'.region_id.' start=/\%'.start.'l/ end=/\%'.end.'l/ contains=@'.toupper(filetype).' keepend') - let region_id = region_id + 1 - endif - endfor - if !empty(cmds) - call coc#compat#execute(a:winid, cmds, 'silent!') - endif -endfunction - -" Compose hlGroups with foreground and background colors. -function! coc#highlight#compose_hlgroup(fgGroup, bgGroup) abort - let hlGroup = 'Fg'.a:fgGroup.'Bg'.a:bgGroup - if a:fgGroup ==# a:bgGroup - return a:fgGroup - endif - if hlexists(hlGroup) && match(execute('hi '.hlGroup, 'silent!'), 'cleared') == -1 - return hlGroup - endif - let fgId = synIDtrans(hlID(a:fgGroup)) - let bgId = synIDtrans(hlID(a:bgGroup)) - let isGuiReversed = synIDattr(fgId, 'reverse', 'gui') !=# '1' || synIDattr(bgId, 'reverse', 'gui') !=# '1' - let guifg = isGuiReversed ? synIDattr(fgId, 'fg', 'gui') : synIDattr(fgId, 'bg', 'gui') - let guibg = isGuiReversed ? synIDattr(bgId, 'bg', 'gui') : synIDattr(bgId, 'fg', 'gui') - let isCtermReversed = synIDattr(fgId, 'reverse', 'cterm') !=# '1' || synIDattr(bgId, 'reverse', 'cterm') !=# '1' - let ctermfg = isCtermReversed ? synIDattr(fgId, 'fg', 'cterm') : synIDattr(fgId, 'bg', 'cterm') - let ctermbg = isCtermReversed ? synIDattr(bgId, 'bg', 'cterm') : synIDattr(bgId, 'fg', 'cterm') - let bold = synIDattr(fgId, 'bold') ==# '1' - let italic = synIDattr(fgId, 'italic') ==# '1' - let underline = synIDattr(fgId, 'underline') ==# '1' - let cmd = 'silent hi ' . hlGroup - if !empty(guifg) - let cmd .= ' guifg=' . guifg - endif - if !empty(ctermfg) - let cmd .= ' ctermfg=' . ctermfg - elseif guifg =~# '^#' - let cmd .= ' ctermfg=' . coc#color#rgb2term(strpart(guifg, 1)) - endif - if !empty(guibg) - let cmd .= ' guibg=' . guibg - endif - if !empty(ctermbg) - let cmd .= ' ctermbg=' . ctermbg - elseif guibg =~# '^#' - let cmd .= ' ctermbg=' . coc#color#rgb2term(strpart(guibg, 1)) - endif - if bold - let cmd .= ' cterm=bold gui=bold' - elseif italic - let cmd .= ' cterm=italic gui=italic' - elseif underline - let cmd .= ' cterm=underline gui=underline' - endif - if cmd ==# 'silent hi ' . hlGroup - return 'Normal' - endif - execute cmd - return hlGroup -endfunction - -" add matches for winid, use 0 for current window. -function! coc#highlight#match_ranges(winid, bufnr, ranges, hlGroup, priority) abort - let winid = a:winid == 0 ? win_getid() : a:winid - let bufnr = a:bufnr == 0 ? winbufnr(winid) : a:bufnr - if empty(getwininfo(winid)) || (a:bufnr != 0 && winbufnr(a:winid) != a:bufnr) - " not valid - return [] - endif - if !s:clear_match_by_window - let curr = win_getid() - if has('nvim') - noa call nvim_set_current_win(winid) - else - noa call win_gotoid(winid) - endif - endif - let ids = [] - for range in a:ranges - let pos = [] - let start = range['start'] - let end = range['end'] - for lnum in range(start['line'] + 1, end['line'] + 1) - let arr = getbufline(bufnr, lnum) - let line = empty(arr) ? '' : arr[0] - if empty(line) - continue - endif - let colStart = lnum == start['line'] + 1 ? strlen(strcharpart(line, 0, start['character'])) + 1 : 1 - let colEnd = lnum == end['line'] + 1 ? strlen(strcharpart(line, 0, end['character'])) + 1 : strlen(line) + 1 - if colStart == colEnd - continue - endif - call add(pos, [lnum, colStart, colEnd - colStart]) - endfor - if !empty(pos) - let opts = s:clear_match_by_window ? {'window': a:winid} : {} - let i = 1 - let l = [] - for p in pos - call add(l, p) - if i % 8 == 0 - let id = matchaddpos(a:hlGroup, l, a:priority, -1, opts) - call add(ids, id) - let l = [] - endif - let i += 1 - endfor - if !empty(l) - let id = matchaddpos(a:hlGroup, l, a:priority, -1, opts) - call add(ids, id) - endif - endif - endfor - if !s:clear_match_by_window - if has('nvim') - noa call nvim_set_current_win(curr) - else - noa call win_gotoid(curr) - endif - endif - return ids -endfunction - -" Clear matches by hlGroup regexp. -function! coc#highlight#clear_match_group(winid, match) abort - let winid = a:winid == 0 ? win_getid() : a:winid - if empty(getwininfo(winid)) - " not valid - return - endif - if s:clear_match_by_window - let arr = filter(getmatches(winid), 'v:val["group"] =~# "'.a:match.'"') - for item in arr - call matchdelete(item['id'], winid) - endfor - else - let curr = win_getid() - let switch = exists('*nvim_set_current_win') && curr != winid - if switch - noa call nvim_set_current_win(a:winid) - endif - if win_getid() == winid - let arr = filter(getmatches(), 'v:val["group"] =~# "'.a:match.'"') - for item in arr - call matchdelete(item['id']) - endfor - endif - if switch - noa call nvim_set_current_win(curr) - endif - endif -endfunction - -" Clear matches by match ids, use 0 for current win. -function! coc#highlight#clear_matches(winid, ids) - let winid = a:winid == 0 ? win_getid() : a:winid - if empty(getwininfo(winid)) - " not valid - return - endif - if s:clear_match_by_window - for id in a:ids - try - call matchdelete(id, winid) - catch /^Vim\%((\a\+)\)\=:E803/ - " ignore - endtry - endfor - else - let curr = win_getid() - let switch = exists('*nvim_set_current_win') && curr != winid - if switch - noa call nvim_set_current_win(a:winid) - endif - if win_getid() == winid - for id in a:ids - try - call matchdelete(id) - catch /^Vim\%((\a\+)\)\=:E803/ - " ignore - endtry - endfor - endif - if switch - noa call nvim_set_current_win(curr) - endif - endif -endfunction - -function! coc#highlight#clear_all() abort - for src_id in values(s:namespace_map) - for bufnr in map(getbufinfo({'bufloaded': 1}), 'v:val["bufnr"]') - if has('nvim') - call nvim_buf_clear_namespace(bufnr, src_id, 0, -1) - else - call coc#api#exec('buf_clear_namespace', [bufnr, src_id, 0, -1]) - endif - endfor - endfor -endfunction - -function! coc#highlight#create_namespace(key) abort - if type(a:key) == 0 - return a:key - endif - if has_key(s:namespace_map, a:key) - return s:namespace_map[a:key] - endif - if has('nvim') - let s:namespace_map[a:key] = nvim_create_namespace('coc-'.a:key) - else - let s:namespace_map[a:key] = s:ns_id - let s:ns_id = s:ns_id + 1 - endif - return s:namespace_map[a:key] -endfunction - -function! coc#highlight#get_syntax_name(lnum, col) - return synIDattr(synIDtrans(synID(a:lnum,a:col,1)),"name") -endfunction - -function! s:prop_type_hlgroup(type) abort - return substitute(a:type, '_\d\+$', '', '') -endfunction - -function! s:update_highlights_timer(bufnr, changedtick, key, priority, groups, idx) abort - if getbufvar(a:bufnr, 'changedtick', 0) != a:changedtick - return - endif - let group = get(a:groups, a:idx, v:null) - if empty(group) - return - endif - if empty(group['highlights']) - call coc#highlight#clear_highlight(a:bufnr, a:key, group['start'], group['end']) - else - call coc#highlight#update_highlights(a:bufnr, a:key, group['highlights'], group['start'], group['end'], a:priority) - endif - if a:idx < len(a:groups) - 1 - call timer_start(50, { -> s:update_highlights_timer(a:bufnr, a:changedtick, a:key, a:priority, a:groups, a:idx + 1)}) - endif -endfunction - -function! s:add_highlights_timer(bufnr, ns, highlights, priority) abort - let hls = [] - let next = [] - for i in range(0, len(a:highlights) - 1) - if i < g:coc_highlight_maximum_count - call add(hls, a:highlights[i]) - else - call add(next, a:highlights[i]) - endif - endfor - call s:add_highlights(a:bufnr, a:ns, hls, a:priority) - if len(next) - call timer_start(30, {->s:add_highlights_timer(a:bufnr, a:ns, next, a:priority)}) - endif -endfunction - -function! s:add_highlights(bufnr, ns, highlights, priority) abort - for item in a:highlights - let opts = { - \ 'priority': a:priority, - \ 'combine': get(item, 4, 1) ? 1 : 0, - \ 'start_incl': get(item, 5, 0) ? 1 : 0, - \ 'end_incl': get(item, 6, 0) ? 1 : 0, - \ } - call coc#highlight#add_highlight(a:bufnr, a:ns, item[0], item[1], item[2], item[3], opts) - endfor -endfunction - -function! s:to_group(items) abort - let res = [] - let before = v:null - for item in a:items - if empty(before) || before[0] != item[1] - let before = [item[1], [item]] - call add(res, before) - else - call add(before[1], item) - endif - endfor - return res -endfunction - -function! s:get_priority(key, hlGroup, priority) abort - if a:hlGroup ==# 'CocSearch' - return 999 - endif - if strpart(a:key, 0, 10) !=# 'diagnostic' - return a:priority - endif - return a:priority - index(s:diagnostic_hlgroups, a:hlGroup) -endfunction - -function! s:group_hls(hls, linecount) abort - " start, end, highlights - let groups = [] - if empty(a:hls) - call add(groups, {'start': 0, 'end': a:linecount, 'highlights': []}) - return groups - endif - let start = 0 - let highlights = [] - let lastLnum = -1 - for item in a:hls - let lnum = item['lnum'] - if lnum >= a:linecount - break - endif - if len(highlights) < g:coc_highlight_maximum_count || lnum == lastLnum - call add(highlights, item) - let lastLnum = lnum - else - call add(groups, {'start': start, 'end': lastLnum + 1, 'highlights': highlights}) - let highlights = [] - let start = lastLnum + 1 - call add(highlights, item) - let lastLnum = lnum - endif - endfor - call add(groups, {'start': start, 'end': a:linecount, 'highlights': highlights}) - return groups -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/list.vim b/pack/ant/start/coc.nvim/autoload/coc/list.vim deleted file mode 100644 index ec01d1b..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/list.vim +++ /dev/null @@ -1,303 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:prefix = '[List Preview]' -let s:sign_group = 'CocList' -" filetype detect could be slow. -let s:filetype_map = { - \ 'c': 'c', - \ 'py': 'python', - \ 'vim': 'vim', - \ 'ts': 'typescript', - \ 'js': 'javascript', - \ 'html': 'html', - \ 'css': 'css' - \ } - -function! coc#list#getchar() abort - return coc#prompt#getchar() -endfunction - -function! coc#list#setlines(bufnr, lines, append) - if a:append - silent call appendbufline(a:bufnr, '$', a:lines) - else - if exists('*deletebufline') - silent call deletebufline(a:bufnr, len(a:lines) + 1, '$') - else - let n = len(a:lines) + 1 - let saved_reg = @" - silent execute n.',$d' - let @" = saved_reg - endif - silent call setbufline(a:bufnr, 1, a:lines) - endif -endfunction - -function! coc#list#options(...) - let list = ['--top', '--tab', '--normal', '--no-sort', '--input', '--strict', - \ '--regex', '--interactive', '--number-select', '--auto-preview', - \ '--ignore-case', '--no-quit', '--first', '--reverse'] - if get(g:, 'coc_enabled', 0) - let names = coc#rpc#request('listNames', []) - call extend(list, names) - endif - return join(list, "\n") -endfunction - -function! coc#list#names(...) abort - let names = coc#rpc#request('listNames', []) - return join(names, "\n") -endfunction - -function! coc#list#status(name) - if !exists('b:list_status') | return '' | endif - return get(b:list_status, a:name, '') -endfunction - -function! coc#list#create(position, height, name, numberSelect) - if a:position ==# 'tab' - execute 'silent tabe list:///'.a:name - else - execute 'silent keepalt '.(a:position ==# 'top' ? '' : 'botright').a:height.'sp list:///'.a:name - execute 'resize '.a:height - endif - if a:numberSelect - setl norelativenumber - setl number - else - setl nonumber - setl norelativenumber - endif - return [bufnr('%'), win_getid(), tabpagenr()] -endfunction - -" close list windows -function! coc#list#clean_up() abort - for i in range(1, winnr('$')) - let bufname = bufname(winbufnr(i)) - if bufname =~# 'list://' - execute i.'close!' - endif - endfor -endfunction - -function! coc#list#setup(source) - let b:list_status = {} - setl buftype=nofile nobuflisted nofen nowrap - setl norelativenumber bufhidden=wipe nocursorline winfixheight - setl tabstop=1 nolist nocursorcolumn undolevels=-1 - setl signcolumn=auto - if has('nvim-0.5.0') || has('patch-8.1.0864') - setl scrolloff=0 - endif - setl filetype=list - syntax case ignore - let source = a:source[8:] - let name = toupper(source[0]).source[1:] - execute 'syntax match Coc'.name.'Line /\v^.*$/' - if !s:is_vim - " Repeat press and would invoke on vim - nnoremap c - endif -endfunction - -function! coc#list#select(bufnr, line) abort - call sign_unplace(s:sign_group, { 'buffer': a:bufnr }) - if a:line > 0 - call sign_place(6, s:sign_group, 'CocListCurrent', a:bufnr, {'lnum': a:line}) - endif -endfunction - -" Check if previewwindow exists on current tab. -function! coc#list#has_preview() - for i in range(1, winnr('$')) - let preview = getwinvar(i, 'previewwindow', getwinvar(i, '&previewwindow', 0)) - if preview - return i - endif - endfor - return 0 -endfunction - -" Get previewwindow from tabnr, use 0 for current tab -function! coc#list#get_preview(...) abort - let tabnr = get(a:, 1, 0) == 0 ? tabpagenr() : a:1 - let info = gettabinfo(tabnr) - if !empty(info) - for win in info[0]['windows'] - if gettabwinvar(tabnr, win, 'previewwindow', 0) - return win - endif - endfor - endif - return -1 -endfunction - -function! coc#list#scroll_preview(dir) abort - let winnr = coc#list#has_preview() - if !winnr - return - endif - let winid = win_getid(winnr) - if exists('*win_execute') - call win_execute(winid, "normal! ".(a:dir ==# 'up' ? "\" : "\")) - else - let id = win_getid() - noa call win_gotoid(winid) - execute "normal! ".(a:dir ==# 'up' ? "\" : "\") - noa call win_gotoid(id) - endif -endfunction - -function! coc#list#close_preview(tabnr) abort - let winid = coc#list#get_preview(a:tabnr) - if winid != -1 - call coc#window#close(winid) - endif -endfunction - -" Improve preview performance by reused window & buffer. -" lines - list of lines -" config.position - could be 'below' 'top' 'tab'. -" config.winid - id of original window. -" config.name - (optional )name of preview buffer. -" config.splitRight - (optional) split to right when 1. -" config.lnum - (optional) current line number -" config.filetype - (optional) filetype of lines. -" config.hlGroup - (optional) highlight group. -" config.maxHeight - (optional) max height of window, valid for 'below' & 'top' position. -function! coc#list#preview(lines, config) abort - let name = fnamemodify(get(a:config, 'name', ''), ':.') - let lines = a:lines - if empty(lines) - if get(a:config, 'scheme', 'file') != 'file' - let bufnr = s:load_buffer(name) - let lines = bufnr == 0 ? [''] : getbufline(bufnr, 1, '$') - else - " Show empty lines so not close window. - let lines = [''] - endif - endif - let winid = coc#list#get_preview(0) - let bufnr = winid == -1 ? 0 : winbufnr(winid) - " Try reuse buffer & window - let bufnr = coc#float#create_buf(bufnr, lines) - if bufnr == 0 - return - endif - call setbufvar(bufnr, '&synmaxcol', 500) - let filetype = get(a:config, 'filetype', '') - let extname = matchstr(name, '\.\zs[^.]\+$') - if empty(filetype) && !empty(extname) - let filetype = get(s:filetype_map, extname, '') - endif - let range = get(a:config, 'range', v:null) - let hlGroup = get(a:config, 'hlGroup', 'Search') - let lnum = get(a:config, 'lnum', 1) - let position = get(a:config, 'position', 'below') - let original = get(a:config, 'winid', -1) - if winid == -1 - let change = position != 'tab' && get(a:config, 'splitRight', 0) - let curr = win_getid() - if change - if original && win_id2win(original) - noa call win_gotoid(original) - else - noa wincmd t - endif - execute 'noa belowright vert sb '.bufnr - let winid = win_getid() - elseif position == 'tab' || get(a:config, 'splitRight', 0) - execute 'noa belowright vert sb '.bufnr - let winid = win_getid() - else - let mod = position == 'top' ? 'below' : 'above' - let height = s:get_height(lines, a:config) - execute 'noa '.mod.' sb +resize\ '.height.' '.bufnr - let winid = win_getid() - endif - noa call winrestview({"lnum": lnum ,"topline":s:get_topline(a:config, lnum, winid)}) - call s:set_preview_options(winid) - noa call win_gotoid(curr) - else - let height = s:get_height(lines, a:config) - if height > 0 - if s:is_vim - let curr = win_getid() - noa call win_gotoid(winid) - execute 'silent! noa resize '.height - noa call win_gotoid(curr) - else - call nvim_win_set_height(winid, height) - endif - endif - call coc#compat#execute(winid, ['syntax clear', 'noa call winrestview({"lnum":'.lnum.',"topline":'.s:get_topline(a:config, lnum, winid).'})']) - endif - call setwinvar(winid, '&foldenable', 0) - if s:prefix.' '.name != bufname(bufnr) - if s:is_vim - call win_execute(winid, 'noa file '.fnameescape(s:prefix.' '.name), 'silent!') - else - silent! noa call nvim_buf_set_name(bufnr, s:prefix.' '.name) - endif - endif - " highlights - if !empty(filetype) - let start = max([0, lnum - 300]) - let end = min([len(lines), lnum + 300]) - call coc#highlight#highlight_lines(winid, [{'filetype': filetype, 'startLine': start, 'endLine': end}]) - call coc#compat#execute(winid, 'syn sync fromstart') - else - call coc#compat#execute(winid, 'filetype detect') - let ft = getbufvar(bufnr, '&filetype', '') - if !empty(extname) && !empty(ft) - let s:filetype_map[extname] = ft - endif - endif - call sign_unplace('CocCursorLine', {'buffer': bufnr}) - call coc#compat#execute(winid, 'call clearmatches()') - if !s:is_vim - " vim send to buffer on FocusLost, and other cases - call coc#compat#execute(winid, 'nnoremap :call CocActionAsync("listCancel")') - endif - if !empty(range) - call sign_place(1, 'CocCursorLine', 'CocCurrentLine', bufnr, {'lnum': lnum}) - call coc#highlight#match_ranges(winid, bufnr, [range], hlGroup, 10) - endif -endfunction - -function! s:get_height(lines, config) abort - if get(a:config, 'splitRight', 0) || get(a:config, 'position', 'below') == 'tab' - return 0 - endif - let height = min([get(a:config, 'maxHeight', 10), len(a:lines), &lines - &cmdheight - 2]) - return height -endfunction - -function! s:load_buffer(name) abort - if exists('*bufadd') && exists('*bufload') - let bufnr = bufadd(a:name) - call bufload(bufnr) - return bufnr - endif - return 0 -endfunction - -function! s:get_topline(config, lnum, winid) abort - let toplineStyle = get(a:config, 'toplineStyle', 'offset') - if toplineStyle == 'middle' - return max([1, a:lnum - winheight(a:winid)/2]) - endif - - let toplineOffset = get(a:config, 'toplineOffset', 3) - return max([1, a:lnum - toplineOffset]) -endfunction - -function! s:set_preview_options(winid) abort - call setwinvar(a:winid, '&foldmethod', 'manual') - call setwinvar(a:winid, '&signcolumn', 'no') - call setwinvar(a:winid, '&number', 1) - call setwinvar(a:winid, '&cursorline', 0) - call setwinvar(a:winid, '&relativenumber', 0) - call setwinvar(a:winid, 'previewwindow', 1) -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/math.vim b/pack/ant/start/coc.nvim/autoload/coc/math.vim deleted file mode 100644 index 27757b9..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/math.vim +++ /dev/null @@ -1,11 +0,0 @@ - -" support for float values -function! coc#math#min(first, ...) abort - let val = a:first - for i in range(0, len(a:000) - 1) - if a:000[i] < val - let val = a:000[i] - endif - endfor - return val -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/notify.vim b/pack/ant/start/coc.nvim/autoload/coc/notify.vim deleted file mode 100644 index 5d71a8d..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/notify.vim +++ /dev/null @@ -1,532 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:utf = &encoding =~# '^utf' -let s:error_icon = get(g:, 'coc_notify_error_icon', s:utf ? '' : 'E') -let s:warning_icon = get(g:, 'coc_notify_warning_icon', s:utf ? '⚠' : 'W') -let s:info_icon = get(g:, 'coc_notify_info_icon', s:utf ? '' : 'I') -let s:interval = get(g:, 'coc_notify_interval', s:is_vim ? 50 : 20) -let s:phl = 'CocNotificationProgress' -let s:progress_char = '─' -let s:duration = 300.0 -let s:winids = [] - -" Valid notify winids on current tab -function! coc#notify#win_list() abort - call filter(s:winids, 'coc#float#valid(v:val)') - return filter(copy(s:winids), '!empty(getwinvar(v:val,"float"))') -endfunction - -function! coc#notify#close_all() abort - for winid in coc#notify#win_list() - call coc#notify#close(winid) - endfor -endfunction - -" Do action for winid or first notify window with actions. -function! coc#notify#do_action(...) abort - let winids = a:0 > 0 ? a:000 : coc#notify#win_list() - for winid in winids - if coc#float#valid(winid) && getwinvar(winid, 'closing', 0) != 1 - let actions = getwinvar(winid, 'actions', []) - if !empty(actions) - let items = map(copy(actions), '(v:key + 1).". ".v:val') - let msg = join(getbufline(winbufnr(winid), 1, '$'), ' ') - call coc#ui#quickpick(msg, items, {err, res -> s:on_action(err, res, winid) }) - break - endif - endif - endfor -endfunction - -" Copy notification contents -function! coc#notify#copy() abort - let lines = [] - for winid in coc#notify#win_list() - let key = getwinvar(winid, 'key', v:null) - if type(key) == v:t_string - call extend(lines, json_decode(key)['lines']) - endif - endfor - if empty(lines) - echohl WarningMsg | echon 'No content to copy' | echohl None - return - endif - call setreg('*', join(lines, "\n")) -endfunction - -" Show source name in window -function! coc#notify#show_sources() abort - if !exists('*getbufline') || !exists('*appendbufline') - throw "getbufline and appendbufline functions required, please upgrade your vim." - endif - let winids = filter(coc#notify#win_list(), 'coc#window#get_var(v:val,"closing") != 1') - for winid in winids - let key = getwinvar(winid, 'key', v:null) - if type(key) == v:t_string - let bufnr = winbufnr(winid) - let obj = json_decode(key) - let sourcename = get(obj, 'source', '') - let lnum = get(obj, 'kind', '') ==# 'progress' ? 1 : 0 - let content = get(getbufline(bufnr, lnum + 1), 0, '') - if empty(sourcename) || content ==# sourcename - continue - endif - call appendbufline(bufnr, lnum, sourcename) - call coc#highlight#add_highlight(bufnr, -1, 'Title', lnum, 0, -1) - call coc#float#scroll_win(winid, 0, 1) - endif - endfor - redra -endfunction - -function! coc#notify#close_by_source(source) abort - let winids = filter(coc#notify#win_list(), 'coc#window#get_var(v:val,"closing") != 1') - for winid in winids - let key = getwinvar(winid, 'key', v:null) - if type(key) == v:t_string - let obj = json_decode(key) - if get(obj, 'source', '') ==# a:source - call coc#notify#close(winid) - endif - endif - endfor -endfunction - -" Cancel auto hide -function! coc#notify#keep() abort - for winid in coc#notify#win_list() - call s:cancel(winid, 'close_timer') - endfor -endfunction - -" borderhighlight - border highlight [string] -" maxWidth - max content width, default 60 [number] -" minWidth - minimal width [number] -" maxHeight - max content height, default 10 [number] -" highlight - default highlight [string] -" winblend - winblend [number] -" timeout - auto close timeout, default 5000 [number] -" title - title text -" marginRight - margin right, default 10 [number] -" focusable - focusable [number] -" source - source name [string] -" kind - kind for create icon [string] -" actions - action names [string[]] -function! coc#notify#create(lines, config) abort - let actions = get(a:config, 'actions', []) - let key = json_encode(extend({'lines': a:lines}, a:config)) - let winid = s:find_win(key) - let kind = get(a:config, 'kind', '') - let row = 0 - if winid != -1 - let row = getwinvar(winid, 'top', 0) - call filter(s:winids, 'v:val != '.winid) - call coc#float#close(winid) - let winid = v:null - endif - let opts = coc#dict#pick(a:config, ['highlight', 'borderhighlight', 'focusable', 'shadow']) - let border = has_key(opts, 'borderhighlight') ? [1, 1, 1, 1] : [] - let icon = s:get_icon(kind, get(a:config, 'highlight', 'CocFloating')) - let margin = get(a:config, 'marginRight', 10) - let maxWidth = min([&columns - margin - 2, get(a:config, 'maxWidth', 80)]) - if maxWidth <= 0 - throw 'No enough spaces for notification' - endif - let lines = map(copy(a:lines), 'tr(v:val, "\t", " ")') - if has_key(a:config, 'title') - if !empty(border) - let opts['title'] = a:config['title'] - else - let lines = [a:config['title']] + lines - endif - endif - let width = max(map(copy(lines), 'strwidth(v:val)')) + (empty(icon) ? 1 : 3) - if width > maxWidth - let lines = coc#string#reflow(lines, maxWidth) - let width = max(map(copy(lines), 'strwidth(v:val)')) + (empty(icon) ? 1 : 3) - endif - let highlights = [] - if !empty(icon) - let ic = icon['text'] - if empty(lines) - call add(lines, ic) - else - let lines[0] = ic.' '.lines[0] - endif - call add(highlights, {'lnum': 0, 'hlGroup': icon['hl'], 'colStart': 0, 'colEnd': strlen(ic)}) - endif - let actionText = join(actions, ' ') - call map(lines, 'v:key == 0 ? v:val : repeat(" ", '.(empty(icon) ? 0 : 2).').v:val') - let minWidth = get(a:config, 'minWidth', kind ==# 'progress' ? 30 : 10) - let width = max(extend(map(lines + [get(opts, 'title', '').' '], 'strwidth(v:val)'), [minWidth, strwidth(actionText) + 1])) - let width = min([maxWidth, width]) - let height = min([get(a:config, 'maxHeight', 3), len(lines)]) - if kind ==# 'progress' - let lines = [repeat(s:progress_char, width)] + lines - let height = height + 1 - endif - if !empty(actions) - let before = max([width - strwidth(actionText), 0]) - let lines = lines + [repeat(' ', before).actionText] - let height = height + 1 - call s:add_action_highlights(before, height - 1, highlights, actions) - endif - if row == 0 - let wintop = coc#notify#get_top() - let row = wintop - height - (empty(border) ? 0 : 2) - 1 - if !s:is_vim && !empty(border) - let row = row + 1 - endif - endif - let col = &columns - margin - width - if s:is_vim && !empty(border) - let col = col - 2 - endif - let winblend = 60 - " Avoid animate for transparent background. - if get(a:config, 'winblend', 30) == 0 && empty(synIDattr(synIDtrans(hlID(get(opts, 'highlight', 'CocFloating'))), 'bg', 'gui')) - let winblend = 0 - endif - call extend(opts, { - \ 'relative': 'editor', - \ 'width': width, - \ 'height': height, - \ 'col': col, - \ 'row': row + 1, - \ 'lines': lines, - \ 'rounded': 1, - \ 'highlights': highlights, - \ 'winblend': winblend, - \ 'border': border, - \ }) - let result = coc#float#create_float_win(0, 0, opts) - if empty(result) - throw 'Unable to create notify window' - endif - let winid = result[0] - let bufnr = result[1] - call setwinvar(winid, 'right', 1) - call setwinvar(winid, 'kind', 'notification') - call setwinvar(winid, 'top', row) - call setwinvar(winid, 'key', key) - call setwinvar(winid, 'actions', actions) - call setwinvar(winid, 'source', get(a:config, 'source', '')) - call setwinvar(winid, 'border', !empty(border)) - call coc#float#nvim_scrollbar(winid) - call add(s:winids, winid) - let from = {'row': opts['row'], 'winblend': opts['winblend']} - let to = {'row': row, 'winblend': get(a:config, 'winblend', 30)} - call timer_start(s:interval, { -> s:animate(winid, from, to, 0)}) - if kind ==# 'progress' - call timer_start(s:interval, { -> s:progress(winid, width, 0, -1)}) - endif - if !s:is_vim - call coc#compat#buf_add_keymap(bufnr, 'n', '', ':call coc#notify#nvim_click('.winid.')', { - \ 'silent': v:true, - \ 'nowait': v:true - \ }) - endif - " Enable auto close - if empty(actions) && kind !=# 'progress' - let timer = timer_start(get(a:config, 'timeout', 10000), { -> coc#notify#close(winid)}) - call setwinvar(winid, 'close_timer', timer) - endif - return [winid, bufnr] -endfunction - -function! coc#notify#nvim_click(winid) abort - if getwinvar(a:winid, 'closing', 0) - return - endif - call s:cancel(a:winid, 'close_timer') - let actions = getwinvar(a:winid, 'actions', []) - if !empty(actions) - let character = strpart(getline('.'), col('.') - 1, 1) - if character =~# '^\k' - let word = expand('') - let idx = index(actions, word) - if idx != -1 - call coc#rpc#notify('FloatBtnClick', [winbufnr(a:winid), idx]) - call coc#notify#close(a:winid) - endif - endif - endif -endfunction - -function! coc#notify#on_close(winid) abort - if index(s:winids, a:winid) >= 0 - call filter(s:winids, 'v:val != '.a:winid) - call coc#notify#reflow() - endif -endfunction - -function! coc#notify#get_top() abort - let mintop = min(map(coc#notify#win_list(), 'coc#notify#get_win_top(v:val)')) - if mintop != 0 - return mintop - endif - return &lines - &cmdheight - (&laststatus == 0 ? 0 : 1 ) -endfunction - -function! coc#notify#get_win_top(winid) abort - let row = getwinvar(a:winid, 'top', 0) - if row == 0 - return row - endif - return row - (s:is_vim ? 0 : getwinvar(a:winid, 'border', 0)) -endfunction - -" Close with timer -function! coc#notify#close(winid) abort - if !coc#float#valid(a:winid) || coc#window#get_var(a:winid, 'closing', 0) == 1 - return - endif - if !coc#window#visible(a:winid) - call coc#float#close(a:winid) - return - endif - let row = coc#window#get_var(a:winid, 'top') - if type(row) != v:t_number - call coc#float#close(a:winid) - return - endif - call coc#window#set_var(a:winid, 'closing', 1) - call s:cancel(a:winid) - let winblend = coc#window#get_var(a:winid, 'winblend', 0) - let curr = s:is_vim ? {'row': row} : {'winblend': winblend} - let dest = s:is_vim ? {'row': row + 1} : {'winblend': winblend == 0 ? 0 : 60} - call s:animate(a:winid, curr, dest, 0, 1) -endfunction - -function! s:add_action_highlights(before, lnum, highlights, actions) abort - let colStart = a:before - for text in a:actions - let w = strwidth(text) - call add(a:highlights, { - \ 'lnum': a:lnum, - \ 'hlGroup': 'CocNotificationButton', - \ 'colStart': colStart, - \ 'colEnd': colStart + w - \ }) - let colStart = colStart + w + 1 - endfor -endfunction - -function! s:on_action(err, idx, winid) abort - if !empty(a:err) - throw a:err - endif - if a:idx > 0 - call coc#rpc#notify('FloatBtnClick', [winbufnr(a:winid), a:idx - 1]) - call coc#notify#close(a:winid) - endif -endfunction - -function! s:cancel(winid, ...) abort - let name = get(a:, 1, 'timer') - let timer = coc#window#get_var(a:winid, name) - if !empty(timer) - call timer_stop(timer) - call coc#window#set_var(a:winid, name, v:null) - endif -endfunction - -function! s:progress(winid, total, curr, index) abort - if !coc#float#valid(a:winid) - return - endif - if coc#window#visible(a:winid) - let total = a:total - let idx = float2nr(a:curr/5.0)%total - if idx != a:index - " update percent - let bufnr = winbufnr(a:winid) - let percent = coc#window#get_var(a:winid, 'percent') - if !empty(percent) - let width = strchars(getbufline(bufnr, 1)[0]) - let line = repeat(s:progress_char, width - 4).printf('%4s', percent) - let total = width - 4 - call setbufline(bufnr, 1, line) - endif - let message = coc#window#get_var(a:winid, 'message') - if !empty(message) - let linecount = coc#compat#buf_line_count(bufnr) - let hasAction = !empty(coc#window#get_var(a:winid, 'actions', [])) - if getbufvar(bufnr, 'message', 0) == 0 - call appendbufline(bufnr, linecount - hasAction, message) - call setbufvar(bufnr, 'message', 1) - call coc#float#change_height(a:winid, 1) - let tabnr = coc#window#tabnr(a:winid) - call coc#notify#reflow(tabnr) - else - call setbufline(bufnr, linecount - hasAction, message) - endif - endif - let bytes = strlen(s:progress_char) - call coc#highlight#clear_highlight(bufnr, -1, 0, 1) - let colStart = bytes * idx - if idx + 4 <= total - let colEnd = bytes * (idx + 4) - call coc#highlight#add_highlight(bufnr, -1, s:phl, 0, colStart, colEnd) - else - let colEnd = bytes * total - call coc#highlight#add_highlight(bufnr, -1, s:phl, 0, colStart, colEnd) - call coc#highlight#add_highlight(bufnr, -1, s:phl, 0, 0, bytes * (idx + 4 - total)) - endif - endif - call timer_start(s:interval, { -> s:progress(a:winid, total, a:curr + 1, idx)}) - else - " Not block CursorHold event - call timer_start(&updatetime + 100, { -> s:progress(a:winid, a:total, a:curr, a:index)}) - endif -endfunction - -" Optional row & winblend -function! s:config_win(winid, props) abort - let change_row = has_key(a:props, 'row') - if s:is_vim - if change_row - call popup_move(a:winid, {'line': a:props['row'] + 1}) - endif - else - if change_row - let [row, column] = nvim_win_get_position(a:winid) - call nvim_win_set_config(a:winid, { - \ 'row': a:props['row'], - \ 'col': column, - \ 'relative': 'editor', - \ }) - call s:nvim_move_related(a:winid, a:props['row']) - endif - call coc#float#nvim_set_winblend(a:winid, get(a:props, 'winblend', v:null)) - call coc#float#nvim_refresh_scrollbar(a:winid) - endif -endfunction - -function! s:nvim_move_related(winid, row) abort - let winids = coc#window#get_var(a:winid, 'related') - if empty(winids) - return - endif - for winid in winids - if nvim_win_is_valid(winid) - let [row, column] = nvim_win_get_position(winid) - let delta = coc#window#get_var(winid, 'delta', 0) - call nvim_win_set_config(winid, { - \ 'row': a:row + delta, - \ 'col': column, - \ 'relative': 'editor', - \ }) - endif - endfor -endfunction - -function! s:animate(winid, from, to, prev, ...) abort - if !coc#float#valid(a:winid) - return - endif - let curr = a:prev + s:interval - let percent = coc#math#min(curr / s:duration, 1) - let props = s:get_props(a:from, a:to, percent) - call s:config_win(a:winid, props) - let close = get(a:, 1, 0) - if percent < 1 - call timer_start(s:interval, { -> s:animate(a:winid, a:from, a:to, curr, close)}) - elseif close - call filter(s:winids, 'v:val != '.a:winid) - let tabnr = coc#window#tabnr(a:winid) - if tabnr != -1 - call coc#float#close(a:winid) - call coc#notify#reflow(tabnr) - endif - endif -endfunction - -function! coc#notify#reflow(...) abort - let tabnr = get(a:, 1, tabpagenr()) - let winids = filter(copy(s:winids), 'coc#window#tabnr(v:val) == '.tabnr.' && coc#window#get_var(v:val,"closing") != 1') - if empty(winids) - return - endif - let animate = tabnr == tabpagenr() - let wins = map(copy(winids), {_, val -> { - \ 'winid': val, - \ 'row': coc#window#get_var(val,'top',0), - \ 'top': coc#window#get_var(val,'top',0) - (s:is_vim ? 0 : coc#window#get_var(val, 'border', 0)), - \ 'height': coc#float#get_height(val), - \ }}) - call sort(wins, {a, b -> b['top'] - a['top']}) - let bottom = &lines - &cmdheight - (&laststatus == 0 ? 0 : 1 ) - let moved = 0 - for item in wins - let winid = item['winid'] - let delta = bottom - (item['top'] + item['height'] + 1) - if delta != 0 - call s:cancel(winid) - let dest = item['row'] + delta - call coc#window#set_var(winid, 'top', dest) - if animate - call s:move_win_timer(winid, {'row': item['row']}, {'row': dest}, 0) - else - call s:config_win(winid, {'row': dest}) - endif - let moved = moved + delta - endif - let bottom = item['top'] + delta - endfor -endfunction - -function! s:move_win_timer(winid, from, to, curr) abort - if !coc#float#valid(a:winid) - return - endif - if coc#window#get_var(a:winid, 'closing', 0) == 1 - return - endif - let percent = coc#math#min(a:curr / s:duration, 1) - let next = a:curr + s:interval - if a:curr > 0 - call s:config_win(a:winid, s:get_props(a:from, a:to, percent)) - endif - if percent < 1 - let timer = timer_start(s:interval, { -> s:move_win_timer(a:winid, a:from, a:to, next)}) - call coc#window#set_var(a:winid, 'timer', timer) - endif -endfunction - -function! s:find_win(key) abort - for winid in coc#notify#win_list() - if getwinvar(winid, 'key', '') ==# a:key - return winid - endif - endfor - return -1 -endfunction - -function! s:get_icon(kind, bg) abort - if a:kind ==# 'info' - return {'text': s:info_icon, 'hl': coc#highlight#compose_hlgroup('CocInfoSign', a:bg)} - endif - if a:kind ==# 'warning' - return {'text': s:warning_icon, 'hl': coc#highlight#compose_hlgroup('CocWarningSign', a:bg)} - endif - if a:kind ==# 'error' - return {'text': s:error_icon, 'hl': coc#highlight#compose_hlgroup('CocErrorSign', a:bg)} - endif - return v:null -endfunction - -" percent should be float -function! s:get_props(from, to, percent) abort - let obj = {} - for key in keys(a:from) - let changed = a:to[key] - a:from[key] - if !s:is_vim && key ==# 'row' - " Could be float - let obj[key] = a:from[key] + changed * a:percent - else - let obj[key] = a:from[key] + float2nr(round(changed * a:percent)) - endif - endfor - return obj -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/prompt.vim b/pack/ant/start/coc.nvim/autoload/coc/prompt.vim deleted file mode 100644 index 5fb11ac..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/prompt.vim +++ /dev/null @@ -1,214 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:activated = 0 -let s:session_names = [] -let s:saved_ve = &t_ve -let s:saved_cursor = &guicursor -let s:gui = has('gui_running') || has('nvim') - -let s:char_map = { - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\":'' , - \ "\":'' , - \ "\":'', - \ "\":'', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\<2-LeftMouse>": '<2-LeftMouse>', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ "\": '', - \ } - -function! coc#prompt#getc() abort - let c = getchar() - return type(c) is 0 ? nr2char(c) : c -endfunction - -function! coc#prompt#getchar() abort - let input = coc#prompt#getc() - if 1 != &iminsert - return input - endif - "a language keymap is activated, so input must be resolved to the mapped values. - let partial_keymap = mapcheck(input, 'l') - while partial_keymap !=# '' - let dict = maparg(input, 'l', 0, 1) - if empty(dict) || get(dict, 'expr', 0) - return input - endif - let full_keymap = get(dict, 'rhs', '') - if full_keymap ==# "" && len(input) >= 3 "HACK: assume there are no keymaps longer than 3. - return input - elseif full_keymap ==# partial_keymap - return full_keymap - endif - let c = coc#prompt#getc() - if c ==# "\" || c ==# "\" - "if the short sequence has a valid mapping, return that. - if !empty(full_keymap) - return full_keymap - endif - return input - endif - let input .= c - let partial_keymap = mapcheck(input, 'l') - endwhile - return input -endfunction - -function! coc#prompt#start_prompt(session) abort - let s:session_names = s:filter(s:session_names, a:session) - call add(s:session_names, a:session) - if s:activated | return | endif - if s:is_vim - call s:start_prompt_vim() - else - call s:start_prompt() - endif -endfunction - -function! s:start_prompt_vim() abort - call timer_start(10, {-> s:start_prompt()}) -endfunction - -function! s:start_prompt() - if s:activated | return | endif - if !get(g:, 'coc_disable_transparent_cursor', 0) - if s:gui - if has('nvim-0.5.0') && !empty(s:saved_cursor) - set guicursor+=a:ver1-CocCursorTransparent/lCursor - endif - elseif s:is_vim - set t_ve= - endif - endif - let s:activated = 1 - try - while s:activated - let ch = coc#prompt#getchar() - if ch ==# "\" || ch ==# "\" || ch ==# "\" - continue - else - let curr = s:current_session() - let mapped = get(s:char_map, ch, ch) - if !empty(curr) - call coc#rpc#notify('InputChar', [curr, mapped, getcharmod()]) - endif - if mapped == '' - let s:session_names = [] - call s:reset() - break - endif - endif - endwhile - catch /^Vim:Interrupt$/ - let s:activated = 0 - call coc#rpc#notify('InputChar', [s:current_session(), '']) - return - endtry - let s:activated = 0 -endfunction - -function! coc#prompt#stop_prompt(session) - let s:session_names = s:filter(s:session_names, a:session) - if len(s:session_names) - return - endif - if s:activated - let s:activated = 0 - call s:reset() - call feedkeys("\", 'int') - endif -endfunction - -function! coc#prompt#activated() abort - return s:activated -endfunction - -function! s:reset() abort - if !get(g:, 'coc_disable_transparent_cursor',0) - " neovim has bug with revert empty &guicursor - if s:gui && !empty(s:saved_cursor) - if has('nvim-0.5.0') - set guicursor+=a:ver1-Cursor/lCursor - let &guicursor = s:saved_cursor - endif - elseif s:is_vim - let &t_ve = s:saved_ve - endif - endif - echo "" -endfunction - -function! s:current_session() abort - if empty(s:session_names) - return v:null - endif - return s:session_names[len(s:session_names) - 1] -endfunction - -function! s:filter(list, id) abort - return filter(copy(a:list), 'v:val !=# a:id') -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/pum.vim b/pack/ant/start/coc.nvim/autoload/coc/pum.vim deleted file mode 100644 index b0f8d57..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/pum.vim +++ /dev/null @@ -1,490 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:float = has('nvim-0.4.0') || has('patch-8.1.1719') -let s:pum_bufnr = 0 -let s:pum_winid = 0 -let s:pum_index = -1 -let s:inserted = 0 -let s:virtual_text = 0 -let s:virtual_text_ns = 0 -let s:ignore = s:is_vim || has('nvim-0.5.0') ? "\" : "\\" -let s:hide_pum = has('nvim-0.6.1') || has('patch-8.2.3389') - -function! coc#pum#visible() abort - if !s:float || !s:pum_winid - return 0 - endif - return getwinvar(s:pum_winid, 'float', 0) == 1 -endfunction - -function! coc#pum#winid() abort - return s:pum_winid -endfunction - -function! coc#pum#close_detail() abort - let winid = coc#float#get_float_by_kind('pumdetail') - if winid - call coc#float#close(winid) - if s:is_vim - call timer_start(0, { -> execute('redraw')}) - endif - endif -endfunction - -function! coc#pum#close(...) abort - if coc#float#valid(s:pum_winid) - if get(a:, 1, '') ==# 'cancel' - let input = getwinvar(s:pum_winid, 'input', '') - let s:pum_index = -1 - call s:insert_word(input) - call s:on_pum_change(0) - doautocmd TextChangedI - elseif get(a:, 1, '') ==# 'confirm' - let words = getwinvar(s:pum_winid, 'words', []) - if s:pum_index >= 0 - let word = get(words, s:pum_index, '') - call s:insert_word(word) - endif - doautocmd TextChangedI - endif - call s:close_pum() - if !get(a:, 2, 0) - let pretext = strpart(getline('.'), 0, col('.') - 1) - call coc#rpc#notify('CompleteStop', [get(a:, 1, ''), pretext]) - endif - endif -endfunction - -function! coc#pum#select_confirm() abort - if s:pum_index < 0 - let s:pum_index = 0 - call s:on_pum_change(0) - endif - call coc#pum#close('confirm') -endfunction - -function! coc#pum#insert() abort - call timer_start(10, { -> s:insert_current()}) - return s:ignore -endfunction - -function! coc#pum#_close() abort - if coc#float#valid(s:pum_winid) - call s:close_pum() - if s:is_vim - call timer_start(0, { -> execute('redraw')}) - endif - endif -endfunction - -function! s:insert_current() abort - if coc#float#valid(s:pum_winid) - if s:pum_index >= 0 - let words = getwinvar(s:pum_winid, 'words', []) - let word = get(words, s:pum_index, '') - call s:insert_word(word) - endif - doautocmd TextChangedI - call s:close_pum() - let pretext = strpart(getline('.'), 0, col('.') - 1) - call coc#rpc#notify('CompleteStop', ['', pretext]) - endif -endfunction - -function! s:close_pum() abort - call s:clear_virtual_text() - call coc#float#close(s:pum_winid) - let s:pum_winid = 0 - let winid = coc#float#get_float_by_kind('pumdetail') - if winid - call coc#float#close(winid) - endif -endfunction - -function! coc#pum#next(insert) abort - call timer_start(10, { -> s:navigate(1, a:insert)}) - return s:ignore -endfunction - -function! coc#pum#prev(insert) abort - call timer_start(10, { -> s:navigate(0, a:insert)}) - return s:ignore -endfunction - -function! coc#pum#stop() abort - call timer_start(10, { -> coc#pum#close()}) - return s:ignore -endfunction - -function! coc#pum#cancel() abort - call timer_start(10, { -> coc#pum#close('cancel')}) - return s:ignore -endfunction - -function! coc#pum#confirm() abort - call timer_start(10, { -> coc#pum#close('confirm')}) - return s:ignore -endfunction - -function! coc#pum#select(index, insert, confirm) abort - if !coc#float#valid(s:pum_winid) - return '' - endif - if a:index == -1 - call coc#pum#close('cancel') - return '' - endif - let total = coc#compat#buf_line_count(s:pum_bufnr) - if a:index < 0 || a:index >= total - throw 'index out of range ' . a:index - endif - call s:select_by_index(a:index, a:insert) - if a:confirm - call coc#pum#close('confirm') - endif - return '' -endfunction - -function! coc#pum#info() abort - let bufnr = winbufnr(s:pum_winid) - let size = coc#compat#buf_line_count(bufnr) - let words = getwinvar(s:pum_winid, 'words', []) - let word = s:pum_index < 0 ? '' : get(words, s:pum_index, '') - if s:is_vim - let pos = popup_getpos(s:pum_winid) - let add = pos['scrollbar'] && has_key(popup_getoptions(s:pum_winid), 'border') ? 1 : 0 - return { - \ 'word': word, - \ 'index': s:pum_index, - \ 'scrollbar': pos['scrollbar'], - \ 'row': pos['line'] - 1, - \ 'col': pos['col'] - 1, - \ 'width': pos['width'] + add, - \ 'height': pos['height'], - \ 'size': size, - \ 'inserted': s:inserted ? v:true : v:false, - \ } - else - let scrollbar = coc#float#get_related(s:pum_winid, 'scrollbar') - let winid = coc#float#get_related(s:pum_winid, 'border', s:pum_winid) - let pos = nvim_win_get_position(winid) - return { - \ 'word': word, - \ 'index': s:pum_index, - \ 'scrollbar': scrollbar && nvim_win_is_valid(scrollbar) ? 1 : 0, - \ 'row': pos[0], - \ 'col': pos[1], - \ 'width': nvim_win_get_width(winid), - \ 'height': nvim_win_get_height(winid), - \ 'size': size, - \ 'inserted': s:inserted ? v:true : v:false, - \ } - endif -endfunction - -function! coc#pum#scroll(forward) abort - if coc#pum#visible() - let size = coc#compat#buf_line_count(s:pum_bufnr) - let height = s:get_height(s:pum_winid) - if size > height - call timer_start(10, { -> s:scroll_pum(a:forward, height, size)}) - endif - endif - return s:ignore -endfunction - -function! s:get_height(winid) abort - if has('nvim') - return nvim_win_get_height(a:winid) - endif - return get(popup_getpos(a:winid), 'core_height', 0) -endfunction - -function! s:scroll_pum(forward, height, size) abort - let topline = s:get_topline(s:pum_winid) - if !a:forward && topline == 1 - if s:pum_index >= 0 - call s:select_line(s:pum_winid, 1) - call s:on_pum_change(1) - endif - return - endif - if a:forward && topline + a:height - 1 >= a:size - if s:pum_index >= 0 - call s:select_line(s:pum_winid, a:size) - call s:on_pum_change(1) - endif - return - endif - call coc#float#scroll_win(s:pum_winid, a:forward, a:height) - if s:pum_index >= 0 - let lnum = s:pum_index + 1 - let topline = s:get_topline(s:pum_winid) - if lnum >= topline && lnum <= topline + a:height - 1 - return - endif - call s:select_line(s:pum_winid, topline) - call s:on_pum_change(1) - endif -endfunction - -function! s:get_topline(winid) abort - if has('nvim') - let info = getwininfo(a:winid)[0] - return info['topline'] - else - let pos = popup_getpos(a:winid) - return pos['firstline'] - endif -endfunction - -function! s:navigate(next, insert) abort - if !coc#float#valid(s:pum_winid) - return - endif - let index = s:get_index(a:next) - call s:select_by_index(index, a:insert) -endfunction - -function! s:select_by_index(index, insert) abort - call s:set_cursor(s:pum_winid, a:index + 1) - if !s:is_vim - call coc#float#nvim_scrollbar(s:pum_winid) - endif - if a:insert - let s:inserted = 1 - if a:index < 0 - let input = getwinvar(s:pum_winid, 'input', '') - call s:insert_word(input) - call coc#pum#close_detail() - else - let words = getwinvar(s:pum_winid, 'words', []) - let word = get(words, a:index, '') - call s:insert_word(word) - endif - doautocmd TextChangedP - endif - call s:on_pum_change(1) -endfunction - -function! s:get_index(next) abort - let size = coc#compat#buf_line_count(s:pum_bufnr) - if a:next - let index = s:pum_index + 1 == size ? -1 : s:pum_index + 1 - else - let index = s:pum_index == -1 ? size - 1 : s:pum_index - 1 - endif - return index -endfunction - -function! s:insert_word(word) abort - let parts = getwinvar(s:pum_winid, 'parts', []) - if !empty(parts) && mode() ==# 'i' - let curr = getline('.') - if curr ==# parts[0].a:word.parts[1] - return - endif - let saved_completeopt = &completeopt - if saved_completeopt =~ 'menuone' - noa set completeopt=menu - endif - noa call complete(strlen(parts[0]) + 1, [a:word]) - if s:hide_pum - " exit complete state - call feedkeys("\\", 'in') - else - let g:coc_disable_space_report = 1 - call feedkeys("\\", 'in') - endif - execute 'noa set completeopt='.saved_completeopt - endif -endfunction - -" create or update pum with lines, CompleteOption and config. -" return winid & dimension -function! coc#pum#create(lines, opt, config) abort - if mode() !=# 'i' || a:opt['line'] != line('.') - return - endif - let len = col('.') - a:opt['col'] - 1 - if len < 0 - return - endif - let input = len == 0 ? '' : strpart(getline('.'), a:opt['col'], len) - if input !=# a:opt['input'] - return - endif - let config = s:get_pum_dimension(a:lines, a:opt['col'], a:config) - if empty(config) - return - endif - let s:virtual_text = has('nvim-0.5.0') && a:opt['virtualText'] - if s:virtual_text && !s:virtual_text_ns - let s:virtual_text_ns = coc#highlight#create_namespace('pum-virtual') - endif - let selected = a:opt['index'] + 1 - call extend(config, { - \ 'lines': a:lines, - \ 'relative': 'cursor', - \ 'nopad': 1, - \ 'cursorline': 1, - \ 'index': a:opt['index'], - \ 'focusable': v:false - \ }) - call extend(config, coc#dict#pick(a:config, ['highlight', 'rounded', 'highlights', 'winblend', 'shadow', 'border', 'borderhighlight'])) - let result = coc#float#create_float_win(s:pum_winid, s:pum_bufnr, config) - if empty(result) - return - endif - let s:inserted = 0 - let s:pum_winid = result[0] - let s:pum_bufnr = result[1] - call setwinvar(s:pum_winid, 'above', config['row'] < 0) - let lnum = max([1, a:opt['index'] + 1]) - if s:is_vim - call popup_setoptions(s:pum_winid, { - \ 'firstline': s:get_firstline(lnum, len(a:lines), config['height']) - \ }) - else - let firstline = s:get_firstline(lnum, len(a:lines), config['height']) - call coc#compat#execute(s:pum_winid, 'call winrestview({"lnum":'.lnum.',"topline":'.firstline.'})') - endif - let s:pum_index = get(config, 'index', -1) - call coc#dialog#place_sign(s:pum_bufnr, s:pum_index + 1) - call setwinvar(s:pum_winid, 'kind', 'pum') - " content before col and content after cursor - let linetext = getline('.') - let parts = [strpart(linetext, 0, a:opt['col']), strpart(linetext, col('.') - 1)] - call setwinvar(s:pum_winid, 'input', input) - call setwinvar(s:pum_winid, 'parts', parts) - call setwinvar(s:pum_winid, 'words', a:opt['words']) - if !s:is_vim - if len(a:lines) > config['height'] - redraw - call coc#float#nvim_scrollbar(s:pum_winid) - else - call coc#float#close_related(s:pum_winid, 'scrollbar') - endif - endif - call timer_start(10, { -> s:on_pum_change(0)}) -endfunction - -function! s:get_firstline(lnum, total, height) abort - if a:lnum <= a:height - return 1 - endif - return min([a:total - a:height + 1, a:lnum - (a:height*2/3)]) -endfunction - -function! s:on_pum_change(move) abort - if coc#float#valid(s:pum_winid) - if s:virtual_text_ns - call s:insert_virtual_text() - endif - let ev = extend(coc#pum#info(), {'move': a:move ? v:true : v:false}) - call coc#rpc#notify('CocAutocmd', ['MenuPopupChanged', ev, win_screenpos(winnr())[0] + winline() - 2]) - endif -endfunction - -function! s:get_pum_dimension(lines, col, config) abort - let linecount = len(a:lines) - let [lineIdx, colIdx] = coc#cursor#screen_pos() - let bh = empty(get(a:config, 'border', [])) ? 0 : 2 - let width = min([&columns, max([exists('&pumwidth') ? &pumwidth : 15, a:config['width']])]) - let vh = &lines - &cmdheight - 1 - !empty(&tabline) - if vh <= 0 - return v:null - endif - let pumheight = empty(&pumheight) ? vh : &pumheight - let showTop = getwinvar(s:pum_winid, 'above', v:null) - if type(showTop) != v:t_number - if vh - lineIdx - bh - 1 < min([pumheight, linecount]) && lineIdx > vh - lineIdx - let showTop = 1 - else - let showTop = 0 - endif - endif - let height = showTop ? min([lineIdx - bh - !empty(&tabline), linecount, pumheight]) : min([vh - lineIdx - bh - 1, linecount, pumheight]) - if height <= 0 - return v:null - endif - let col = - (col('.') - a:col - 1) - 1 - let row = showTop ? - height : 1 - let delta = colIdx + col - if delta < 0 - let col = col - delta - elseif delta + width > &columns - let col = max([-colIdx, col - (delta + width - &columns)]) - endif - return { - \ 'row': row, - \ 'col': col, - \ 'width': width, - \ 'height': height - \ } -endfunction - -" can't use coc#dialog#set_cursor on vim8, don't know why -function! s:set_cursor(winid, line) abort - if s:is_vim - let pos = popup_getpos(a:winid) - let lastline = pos['firstline'] + pos['core_height'] - 1 - if a:line > lastline - call popup_setoptions(a:winid, { - \ 'firstline': pos['firstline'] + a:line - lastline, - \ }) - elseif a:line < pos['firstline'] - call popup_setoptions(a:winid, { - \ 'firstline': max([1, a:line]), - \ }) - endif - endif - call s:select_line(a:winid, a:line) -endfunction - -function! s:select_line(winid, line) abort - let s:pum_index = a:line - 1 - let lnum = max([1, a:line]) - if s:is_vim - call coc#compat#execute(a:winid, 'exe '.lnum) - else - call nvim_win_set_cursor(a:winid, [lnum, 0]) - endif - call coc#dialog#place_sign(winbufnr(a:winid), a:line) -endfunction - -function! s:insert_virtual_text() abort - if !s:virtual_text_ns - return - endif - let bufnr = bufnr('%') - if !s:virtual_text || !coc#pum#visible() || s:pum_index < 0 - call nvim_buf_clear_namespace(bufnr, s:virtual_text_ns, 0, -1) - else - " Check if could create - let insert = '' - let words = getwinvar(s:pum_winid, 'words', []) - let word = get(words, s:pum_index, '') - let parts = getwinvar(s:pum_winid, 'parts', []) - let input = strpart(getline('.'), strlen(parts[0]), col('.') - 1) - if strchars(word) > strchars(input) && strcharpart(word, 0, strchars(input)) ==# input - let insert = strcharpart(word, strchars(input)) - endif - call nvim_buf_clear_namespace(bufnr, s:virtual_text_ns, 0, -1) - if !empty(insert) - let opts = { - \ 'hl_mode': 'combine', - \ 'virt_text': [[insert, 'CocPumVirtualText']], - \ 'virt_text_pos': 'overlay', - \ 'virt_text_win_col': virtcol('.') - 1, - \ } - call nvim_buf_set_extmark(bufnr, s:virtual_text_ns, line('.') - 1, col('.') - 1, opts) - endif - endif -endfunction - -function! s:clear_virtual_text() abort - if s:virtual_text_ns - call nvim_buf_clear_namespace(bufnr('%'), s:virtual_text_ns, 0, -1) - endif -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/rpc.vim b/pack/ant/start/coc.nvim/autoload/coc/rpc.vim deleted file mode 100644 index 7a69b73..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/rpc.vim +++ /dev/null @@ -1,130 +0,0 @@ -scriptencoding utf-8 -let s:is_win = has("win32") || has("win64") -let s:client = v:null -let s:name = 'coc' -let s:is_vim = !has('nvim') - -function! coc#rpc#start_server() - if get(g:, 'coc_node_env', '') ==# 'test' - " server already started - let s:client = coc#client#create(s:name, []) - let chan_id = get(g:, 'coc_node_channel_id', 0) - let s:client['running'] = chan_id != 0 - let s:client['chan_id'] = chan_id - return - endif - if empty(s:client) - let cmd = coc#util#job_command() - if empty(cmd) | return | endif - let $COC_VIMCONFIG = coc#util#get_config_home() - let $COC_DATA_HOME = coc#util#get_data_home() - let s:client = coc#client#create(s:name, cmd) - endif - if !coc#client#is_running('coc') - call s:client['start']() - endif -endfunction - -function! coc#rpc#started() abort - return !empty(s:client) -endfunction - -function! coc#rpc#ready() - if empty(s:client) || s:client['running'] == 0 - return 0 - endif - return 1 -endfunction - -function! coc#rpc#set_channel(chan_id) abort - let g:coc_node_channel_id = a:chan_id - if a:chan_id != 0 - let s:client['running'] = 1 - let s:client['chan_id'] = a:chan_id - endif -endfunction - -function! coc#rpc#kill() - let pid = get(g:, 'coc_process_pid', 0) - if !pid | return | endif - if s:is_win - call system('taskkill /PID '.pid) - else - call system('kill -9 '.pid) - endif -endfunction - -function! coc#rpc#get_errors() - return split(execute('messages'), "\n") -endfunction - -function! coc#rpc#stop() - if empty(s:client) - return - endif - try - if s:is_vim - call job_stop(ch_getjob(s:client['channel']), 'term') - else - call jobstop(s:client['chan_id']) - endif - catch /.*/ - " ignore - endtry -endfunction - -function! coc#rpc#restart() - if empty(s:client) - call coc#rpc#start_server() - else - call coc#highlight#clear_all() - call coc#ui#sign_unplace() - call coc#float#close_all() - call coc#rpc#request('detach', []) - sleep 100m - let s:client['command'] = coc#util#job_command() - call coc#client#restart(s:name) - echohl MoreMsg | echom 'starting coc.nvim service' | echohl None - endif -endfunction - -function! coc#rpc#request(method, args) abort - if !coc#rpc#ready() - return '' - endif - return s:client['request'](a:method, a:args) -endfunction - -function! coc#rpc#notify(method, args) abort - if !coc#rpc#ready() - return '' - endif - call s:client['notify'](a:method, a:args) - return '' -endfunction - -function! coc#rpc#request_async(method, args, cb) abort - if !coc#rpc#ready() - return cb('coc.nvim service not started.') - endif - call s:client['request_async'](a:method, a:args, a:cb) -endfunction - -" receive async response -function! coc#rpc#async_response(id, resp, isErr) abort - if empty(s:client) - return - endif - call coc#client#on_response(s:name, a:id, a:resp, a:isErr) -endfunction - -" send async response to server -function! coc#rpc#async_request(id, method, args) - let l:Cb = {err, ... -> coc#rpc#notify('nvim_async_response_event', [a:id, err, get(a:000, 0, v:null)])} - let args = a:args + [l:Cb] - try - call call(a:method, args) - catch /.*/ - call coc#rpc#notify('nvim_async_response_event', [a:id, v:exception, v:null]) - endtry -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/snippet.vim b/pack/ant/start/coc.nvim/autoload/coc/snippet.vim deleted file mode 100644 index 049c88d..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/snippet.vim +++ /dev/null @@ -1,155 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:map_next = 1 -let s:map_prev = 1 -let s:cmd_mapping = has('nvim') || has('patch-8.2.1978') - -function! coc#snippet#_select_mappings() - if !get(g:, 'coc_selectmode_mapping', 1) - return - endif - - redir => mappings - silent! smap - redir END - - for map in map(filter(split(mappings, '\n'), - \ "v:val !~# '^s' && v:val !~# '^\\a*\\s*<\\S\\+>'"), - \ "matchstr(v:val, '^\\a*\\s*\\zs\\S\\+')") - silent! execute 'sunmap' map - silent! execute 'sunmap ' map - endfor - - " same behaviour of ultisnips - snoremap c - snoremap c - snoremap c - snoremap "_c -endfunction - -function! coc#snippet#show_choices(lnum, col, len, values) abort - let m = mode() - call cursor(a:lnum, a:col + a:len) - if m !=# 'i' - call feedkeys("\i", 'in') - endif - let changedtick = b:changedtick - call timer_start(20, { -> coc#_do_complete(a:col - 1, a:values, 0, changedtick)}) - redraw -endfunction - -function! coc#snippet#enable(...) - if get(b:, 'coc_snippet_active', 0) == 1 - return - endif - let complete = get(a:, 1, 0) - let b:coc_snippet_active = 1 - call coc#snippet#_select_mappings() - let nextkey = get(g:, 'coc_snippet_next', '') - let prevkey = get(g:, 'coc_snippet_prev', '') - if maparg(nextkey, 'i') =~# 'snippet' - let s:map_next = 0 - endif - if maparg(prevkey, 'i') =~# 'snippet' - let s:map_prev = 0 - endif - if !empty(nextkey) - if s:map_next - execute 'inoremap '.nextkey." =coc#snippet#jump(1, ".complete.")" - endif - execute 'snoremap '.nextkey." :call coc#snippet#jump(1, ".complete.")" - endif - if !empty(prevkey) - if s:map_prev - execute 'inoremap '.prevkey." =coc#snippet#jump(0, ".complete.")" - endif - execute 'snoremap '.prevkey." :call coc#snippet#jump(0, ".complete.")" - endif -endfunction - -function! coc#snippet#prev() abort - call coc#rpc#request('snippetPrev', []) - return '' -endfunction - -function! coc#snippet#next() abort - call coc#rpc#request('snippetNext', []) - return '' -endfunction - -function! coc#snippet#jump(direction, complete) abort - if a:direction == 1 && a:complete && pumvisible() - let pre = exists('*complete_info') && complete_info()['selected'] == -1 ? "\" : '' - call feedkeys(pre."\", 'in') - return '' - endif - call coc#rpc#request(a:direction == 1 ? 'snippetNext' : 'snippetPrev', []) - return '' -endfunction - -function! coc#snippet#disable() - if get(b:, 'coc_snippet_active', 0) == 0 - return - endif - let b:coc_snippet_active = 0 - let nextkey = get(g:, 'coc_snippet_next', '') - let prevkey = get(g:, 'coc_snippet_prev', '') - if s:map_next - silent! execute 'iunmap '.nextkey - endif - if s:map_prev - silent! execute 'iunmap '.prevkey - endif - silent! execute 'sunmap '.prevkey - silent! execute 'sunmap '.nextkey -endfunction - -function! coc#snippet#select(start, end, text) abort - if coc#pum#visible() - call coc#pum#close() - endif - if mode() == 's' - call feedkeys("\", 'in') - endif - if &selection ==# 'exclusive' - let cursor = coc#snippet#to_cursor(a:start) - call cursor([cursor[0], cursor[1]]) - let cmd = '' - let cmd .= mode()[0] ==# 'i' ? "\".(col('.') == 1 ? '' : 'l') : '' - let cmd .= printf('v%s', strchars(a:text) . 'l') - let cmd .= "\" - else - let cursor = coc#snippet#to_cursor(a:end) - call cursor([cursor[0], cursor[1] - 1]) - let len = strchars(a:text) - 1 - let cmd = '' - let cmd .= mode()[0] ==# 'i' ? "\l" : '' - let cmd .= printf('v%s', len > 0 ? len . 'h' : '') - let cmd .= "o\" - endif - call feedkeys(cmd, 'n') -endfunction - -function! coc#snippet#move(position) abort - let m = mode() - if m == 's' - call feedkeys("\", 'in') - elseif coc#pum#visible() - call coc#pum#close() - endif - let pos = coc#snippet#to_cursor(a:position) - call cursor(pos) - if pos[1] > strlen(getline(pos[0])) - startinsert! - else - startinsert - endif -endfunction - -function! coc#snippet#to_cursor(position) abort - let line = getline(a:position.line + 1) - if line is v:null - return [a:position.line + 1, a:position.character + 1] - endif - return [a:position.line + 1, byteidx(line, a:position.character) + 1] -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/string.vim b/pack/ant/start/coc.nvim/autoload/coc/string.vim deleted file mode 100644 index 70f52f8..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/string.vim +++ /dev/null @@ -1,154 +0,0 @@ -scriptencoding utf-8 - -function! coc#string#get_character(line, col) abort - return strchars(strpart(a:line, 0, a:col - 1)) -endfunction - -function! coc#string#last_character(line) abort - return strcharpart(a:line, strchars(a:line) - 1, 1) -endfunction - -function! coc#string#reflow(lines, width) abort - let lines = [] - let currlen = 0 - let parts = [] - for line in a:lines - for part in split(line, '\s\+') - let w = strwidth(part) - if currlen + w + 1 >= a:width - if len(parts) > 0 - call add(lines, join(parts, ' ')) - endif - if w >= a:width - call add(lines, part) - let currlen = 0 - let parts = [] - else - let currlen = w - let parts = [part] - endif - continue - endif - call add(parts, part) - let currlen = currlen + w + 1 - endfor - endfor - if len(parts) > 0 - call add(lines, join(parts, ' ')) - endif - return empty(lines) ? [''] : lines -endfunction - -function! coc#string#content_height(lines, width) abort - let len = 0 - for line in a:lines - if strwidth(line) <= a:width - let len = len + 1 - else - let currlen = 0 - for part in split(line, '\<\|\>\|\ze\s') - let w = strwidth(part) - if currlen + w >= a:width - if currlen + w == a:width - let len = len + 1 - let currlen = 0 - else - let len = len + (a:width + w)/a:width - let currlen = w%a:width - endif - else - let currlen = currlen + w - endif - endfor - if currlen > 0 - let len = len + 1 - endif - endif - endfor - return len == 0 ? 1 : len -endfunction - -" get change between two lines -function! coc#string#diff(curr, previous, col) abort - let end = strpart(a:curr, a:col - 1) - let start = strpart(a:curr, 0, a:col -1) - let endOffset = 0 - let startOffset = 0 - let currLen = strchars(a:curr) - let prevLen = strchars(a:previous) - if len(end) - let endLen = strchars(end) - for i in range(min([prevLen, endLen])) - if strcharpart(end, endLen - 1 - i, 1) ==# strcharpart(a:previous, prevLen -1 -i, 1) - let endOffset = endOffset + 1 - else - break - endif - endfor - endif - let remain = endOffset == 0 ? a:previous : strcharpart(a:previous, 0, prevLen - endOffset) - if len(remain) - for i in range(min([strchars(remain), strchars(start)])) - if strcharpart(remain, i, 1) ==# strcharpart(start, i ,1) - let startOffset = startOffset + 1 - else - break - endif - endfor - endif - return { - \ 'start': startOffset, - \ 'end': prevLen - endOffset, - \ 'text': strcharpart(a:curr, startOffset, currLen - startOffset - endOffset) - \ } -endfunction - -function! coc#string#apply(content, diff) abort - let totalLen = strchars(a:content) - let endLen = totalLen - a:diff['end'] - return strcharpart(a:content, 0, a:diff['start']).a:diff['text'].strcharpart(a:content, a:diff['end'], endLen) -endfunction - -" insert inserted to line at position, use ... when result is too long -" line should only contains character has strwidth equals 1 -function! coc#string#compose(line, position, inserted) abort - let width = strwidth(a:line) - let text = a:inserted - let res = a:line - let need_truncate = a:position + strwidth(text) + 1 > width - if need_truncate - let remain = width - a:position - 3 - if remain < 2 - " use text for full line, use first & end of a:line, ignore position - let res = strcharpart(a:line, 0, 1) - let w = strwidth(res) - for i in range(strchars(text)) - let c = strcharpart(text, i, 1) - let a = strwidth(c) - if w + a <= width - 1 - let w = w + a - let res = res . c - endif - endfor - let res = res.strcharpart(a:line, w) - else - let res = strcharpart(a:line, 0, a:position) - let w = strwidth(res) - for i in range(strchars(text)) - let c = strcharpart(text, i, 1) - let a = strwidth(c) - if w + a <= width - 3 - let w = w + a - let res = res . c - endif - endfor - let res = res.'..' - let w = w + 2 - let res = res . strcharpart(a:line, w) - endif - else - let first = strcharpart(a:line, 0, a:position) - let res = first . text . strcharpart(a:line, a:position + strwidth(text)) - endif - return res -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/task.vim b/pack/ant/start/coc.nvim/autoload/coc/task.vim deleted file mode 100644 index 80ff02f..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/task.vim +++ /dev/null @@ -1,179 +0,0 @@ -" ============================================================================ -" Description: Manage long running tasks. -" Author: Qiming Zhao -" Licence: Anti 966 licence -" Version: 0.1 -" Last Modified: Dec 12, 2020 -" ============================================================================ -scriptencoding utf-8 - -let s:is_vim = !has('nvim') -let s:running_task = {} -" neovim emit strings that part of lines. -let s:out_remain_text = {} -let s:err_remain_text = {} - -function! coc#task#start(id, opts) - if coc#task#running(a:id) - call coc#task#stop(a:id) - endif - let cmd = [a:opts['cmd']] + get(a:opts, 'args', []) - let cwd = get(a:opts, 'cwd', getcwd()) - let env = get(a:opts, 'env', {}) - " cmd args cwd pty - if s:is_vim - let options = { - \ 'cwd': cwd, - \ 'err_mode': 'nl', - \ 'out_mode': 'nl', - \ 'err_cb': {channel, message -> s:on_stderr(a:id, [message])}, - \ 'out_cb': {channel, message -> s:on_stdout(a:id, [message])}, - \ 'exit_cb': {channel, code -> s:on_exit(a:id, code)}, - \ 'env': env, - \} - if has("patch-8.1.350") - let options['noblock'] = 1 - endif - if get(a:opts, 'pty', 0) - let options['pty'] = 1 - endif - let job = job_start(cmd, options) - let status = job_status(job) - if status !=# 'run' - echohl Error | echom 'Failed to start '.a:id.' task' | echohl None - return v:false - endif - let s:running_task[a:id] = job - else - let options = { - \ 'cwd': cwd, - \ 'on_stderr': {channel, msgs -> s:on_stderr(a:id, msgs)}, - \ 'on_stdout': {channel, msgs -> s:on_stdout(a:id, msgs)}, - \ 'on_exit': {channel, code -> s:on_exit(a:id, code)}, - \ 'detach': get(a:opts, 'detach', 0), - \} - let original = {} - if !empty(env) - if has('nvim-0.5.0') - let options['env'] = env - elseif exists('*setenv') && exists('*getenv') - for key in keys(env) - let original[key] = getenv(key) - call setenv(key, env[key]) - endfor - endif - endif - if get(a:opts, 'pty', 0) - let options['pty'] = 1 - endif - let chan_id = jobstart(cmd, options) - if !empty(original) - for key in keys(original) - call setenv(key, original[key]) - endfor - endif - if chan_id <= 0 - echohl Error | echom 'Failed to start '.a:id.' task' | echohl None - return v:false - endif - let s:running_task[a:id] = chan_id - endif - return v:true -endfunction - -function! coc#task#stop(id) - let job = get(s:running_task, a:id, v:null) - if !job | return | endif - if s:is_vim - call job_stop(job, 'term') - else - call jobstop(job) - endif - sleep 50m - let running = coc#task#running(a:id) - if running - echohl Error | echom 'job '.a:id. ' stop failed.' | echohl None - endif -endfunction - -function! s:on_exit(id, code) abort - if get(g:, 'coc_vim_leaving', 0) | return | endif - if has('nvim') - let s:out_remain_text[a:id] = '' - let s:err_remain_text[a:id] = '' - endif - if has_key(s:running_task, a:id) - call remove(s:running_task, a:id) - endif - call coc#rpc#notify('TaskExit', [a:id, a:code]) -endfunction - -function! s:on_stderr(id, msgs) - if get(g:, 'coc_vim_leaving', 0) | return | endif - if empty(a:msgs) - return - endif - if s:is_vim - call coc#rpc#notify('TaskStderr', [a:id, a:msgs]) - else - let remain = get(s:err_remain_text, a:id, '') - let eof = (a:msgs == ['']) - let msgs = copy(a:msgs) - if len(remain) > 0 - if msgs[0] == '' - let msgs[0] = remain - else - let msgs[0] = remain . msgs[0] - endif - endif - let last = msgs[len(msgs) - 1] - let s:err_remain_text[a:id] = len(last) > 0 ? last : '' - " all lines from 0 to n - 2 - if len(msgs) > 1 - call coc#rpc#notify('TaskStderr', [a:id, msgs[:len(msgs)-2]]) - elseif eof && len(msgs[0]) > 0 - call coc#rpc#notify('TaskStderr', [a:id, msgs]) - endif - endif -endfunction - -function! s:on_stdout(id, msgs) - if empty(a:msgs) - return - endif - if s:is_vim - call coc#rpc#notify('TaskStdout', [a:id, a:msgs]) - else - let remain = get(s:out_remain_text, a:id, '') - let eof = (a:msgs == ['']) - let msgs = copy(a:msgs) - if len(remain) > 0 - if msgs[0] == '' - let msgs[0] = remain - else - let msgs[0] = remain . msgs[0] - endif - endif - let last = msgs[len(msgs) - 1] - let s:out_remain_text[a:id] = len(last) > 0 ? last : '' - " all lines from 0 to n - 2 - if len(msgs) > 1 - call coc#rpc#notify('TaskStdout', [a:id, msgs[:len(msgs)-2]]) - elseif eof && len(msgs[0]) > 0 - call coc#rpc#notify('TaskStdout', [a:id, msgs]) - endif - endif -endfunction - -function! coc#task#running(id) - if !has_key(s:running_task, a:id) == 1 - return v:false - endif - let job = s:running_task[a:id] - if s:is_vim - let status = job_status(job) - return status ==# 'run' - endif - let [code] = jobwait([job], 10) - return code == -1 -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/terminal.vim b/pack/ant/start/coc.nvim/autoload/coc/terminal.vim deleted file mode 100644 index b0dbe6d..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/terminal.vim +++ /dev/null @@ -1,115 +0,0 @@ -scriptencoding utf-8 -let s:is_vim = !has('nvim') -let s:channel_map = {} -let s:is_win = has('win32') || has('win64') - -" start terminal, return [bufnr, pid] -function! coc#terminal#start(cmd, cwd, env, strict) abort - if s:is_vim && !has('terminal') - throw 'terminal feature not supported by current vim.' - endif - let cwd = empty(a:cwd) ? getcwd() : a:cwd - execute 'belowright '.get(g:, 'coc_terminal_height', 8).'new +setl\ buftype=nofile' - setl winfixheight - setl norelativenumber - setl nonumber - setl bufhidden=hide - if exists('#User#CocTerminalOpen') - exe 'doautocmd User CocTerminalOpen' - endif - let bufnr = bufnr('%') - let env = {} - let original = {} - if !empty(a:env) - " use env option when possible - if s:is_vim - let env = copy(a:env) - elseif exists('*setenv') - for key in keys(a:env) - let original[key] = getenv(key) - call setenv(key, a:env[key]) - endfor - endif - endif - - function! s:OnExit(status) closure - call coc#rpc#notify('CocAutocmd', ['TermExit', bufnr, a:status]) - if a:status == 0 - execute 'silent! bd! '.bufnr - endif - endfunction - - if has('nvim') - let job_id = termopen(a:cmd, { - \ 'cwd': cwd, - \ 'pty': v:true, - \ 'on_exit': {job, status -> s:OnExit(status)}, - \ 'env': env, - \ 'clear_env': a:strict ? v:true : v:false - \ }) - if !empty(original) && exists('*setenv') - for key in keys(original) - call setenv(key, original[key]) - endfor - endif - if job_id == 0 - throw 'create terminal job failed' - endif - wincmd p - let s:channel_map[bufnr] = job_id - return [bufnr, jobpid(job_id)] - else - let cmd = s:is_win ? join(a:cmd, ' ') : a:cmd - let res = term_start(cmd, { - \ 'cwd': cwd, - \ 'term_kill': s:is_win ? 'kill' : 'term', - \ 'term_finish': 'close', - \ 'exit_cb': {job, status -> s:OnExit(status)}, - \ 'curwin': 1, - \ 'env': env, - \}) - if res == 0 - throw 'create terminal job failed' - endif - let job = term_getjob(bufnr) - let s:channel_map[bufnr] = job_getchannel(job) - wincmd p - return [bufnr, job_info(job).process] - endif -endfunction - -function! coc#terminal#send(bufnr, text, add_new_line) abort - let chan = get(s:channel_map, a:bufnr, v:null) - if empty(chan) | return| endif - if has('nvim') - let lines = split(a:text, '\v\r?\n') - if a:add_new_line && !empty(lines[len(lines) - 1]) - if s:is_win - call add(lines, "\r\n") - else - call add(lines, '') - endif - endif - call chansend(chan, lines) - let winid = bufwinid(a:bufnr) - if winid != -1 - call coc#compat#execute(winid, 'noa normal! G') - endif - else - if !a:add_new_line - call ch_sendraw(chan, a:text) - else - call ch_sendraw(chan, a:text.(s:is_win ? "\r\n" : "\n")) - endif - endif -endfunction - -function! coc#terminal#close(bufnr) abort - if has('nvim') - let job_id = get(s:channel_map, a:bufnr, 0) - if !empty(job_id) - silent! call chanclose(job_id) - endif - endif - exe 'silent! bd! '.a:bufnr -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/ui.vim b/pack/ant/start/coc.nvim/autoload/coc/ui.vim deleted file mode 100644 index cda4045..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/ui.vim +++ /dev/null @@ -1,446 +0,0 @@ -let s:is_vim = !has('nvim') -let s:is_win = has('win32') || has('win64') -let s:is_mac = has('mac') -let s:sign_api = exists('*sign_getplaced') && exists('*sign_place') -let s:sign_groups = [] - -" Check and -function! coc#ui#check_pum_keymappings() abort - let keys = [] - for key in ['', ''] - if maparg(key, 'i') =~# 'pumvisible()' - call add(keys, key) - endif - endfor - if len(keys) - let lines = [ - \ 'coc.nvim switched to custom popup menu from 0.0.82', - \ 'you have to change key-mappings for '.join(keys, ', ').' to make them work.', - \ 'see :h coc-completion-example'] - call coc#notify#create(lines, { - \ 'borderhighlight': 'CocInfoSign', - \ 'timeout': 30000, - \ 'kind': 'warning', - \ }) - endif -endfunction - -function! coc#ui#quickpick(title, items, cb) abort - if exists('*popup_menu') - function! s:QuickpickHandler(id, result) closure - call a:cb(v:null, a:result) - endfunction - function! s:QuickpickFilter(id, key) closure - for i in range(1, len(a:items)) - if a:key == string(i) - call popup_close(a:id, i) - return 1 - endif - endfor - " No shortcut, pass to generic filter - return popup_filter_menu(a:id, a:key) - endfunction - try - call popup_menu(a:items, { - \ 'title': a:title, - \ 'filter': function('s:QuickpickFilter'), - \ 'callback': function('s:QuickpickHandler'), - \ }) - redraw - catch /.*/ - call a:cb(v:exception) - endtry - else - let res = inputlist([a:title] + a:items) - call a:cb(v:null, res) - endif -endfunction - -" cmd, cwd -function! coc#ui#open_terminal(opts) abort - if s:is_vim && !exists('*term_start') - echohl WarningMsg | echon "Your vim doesn't have terminal support!" | echohl None - return - endif - if get(a:opts, 'position', 'bottom') ==# 'bottom' - let p = '5new' - else - let p = 'vnew' - endif - execute 'belowright '.p.' +setl\ buftype=nofile ' - setl buftype=nofile - setl winfixheight - setl norelativenumber - setl nonumber - setl bufhidden=wipe - if exists('#User#CocTerminalOpen') - exe 'doautocmd User CocTerminalOpen' - endif - let cmd = get(a:opts, 'cmd', '') - let autoclose = get(a:opts, 'autoclose', 1) - if empty(cmd) - throw 'command required!' - endif - let cwd = get(a:opts, 'cwd', getcwd()) - let keepfocus = get(a:opts, 'keepfocus', 0) - let bufnr = bufnr('%') - let Callback = get(a:opts, 'Callback', v:null) - - function! s:OnExit(status) closure - let content = join(getbufline(bufnr, 1, '$'), "\n") - if a:status == 0 && autoclose == 1 - execute 'silent! bd! '.bufnr - endif - if !empty(Callback) - call call(Callback, [a:status, bufnr, content]) - endif - endfunction - - if has('nvim') - call termopen(cmd, { - \ 'cwd': cwd, - \ 'on_exit': {job, status -> s:OnExit(status)}, - \}) - else - if s:is_win - let cmd = 'cmd.exe /C "'.cmd.'"' - endif - call term_start(cmd, { - \ 'cwd': cwd, - \ 'exit_cb': {job, status -> s:OnExit(status)}, - \ 'curwin': 1, - \}) - endif - if keepfocus - wincmd p - endif - return bufnr -endfunction - -" run command in terminal -function! coc#ui#run_terminal(opts, cb) - let cmd = get(a:opts, 'cmd', '') - if empty(cmd) - return a:cb('command required for terminal') - endif - let opts = { - \ 'cmd': cmd, - \ 'cwd': get(a:opts, 'cwd', getcwd()), - \ 'keepfocus': get(a:opts, 'keepfocus', 0), - \ 'Callback': {status, bufnr, content -> a:cb(v:null, {'success': status == 0 ? v:true : v:false, 'bufnr': bufnr, 'content': content})} - \} - call coc#ui#open_terminal(opts) -endfunction - -function! coc#ui#echo_hover(msg) - echohl MoreMsg - echo a:msg - echohl None - let g:coc_last_hover_message = a:msg -endfunction - -function! coc#ui#echo_messages(hl, msgs) - if a:hl !~# 'Error' && (mode() !~# '\v^(i|n)$') - return - endif - let msgs = filter(copy(a:msgs), '!empty(v:val)') - if empty(msgs) - return - endif - execute 'echohl '.a:hl - echom a:msgs[0] - redraw - echo join(msgs, "\n") - echohl None -endfunction - -function! coc#ui#preview_info(lines, filetype, ...) abort - pclose - keepalt new +setlocal\ previewwindow|setlocal\ buftype=nofile|setlocal\ noswapfile|setlocal\ wrap [Document] - setl bufhidden=wipe - setl nobuflisted - setl nospell - exe 'setl filetype='.a:filetype - setl conceallevel=0 - setl nofoldenable - for command in a:000 - execute command - endfor - call append(0, a:lines) - exe "normal! z" . len(a:lines) . "\" - exe "normal! gg" - wincmd p -endfunction - -function! coc#ui#open_files(files) - let bufnrs = [] - " added on latest vim8 - if exists('*bufadd') && exists('*bufload') - for file in a:files - let file = fnamemodify(file, ':.') - if bufloaded(file) - call add(bufnrs, bufnr(file)) - else - let bufnr = bufadd(file) - call bufload(file) - call add(bufnrs, bufnr) - call setbufvar(bufnr, '&buflisted', 1) - endif - endfor - else - noa keepalt 1new +setl\ bufhidden=wipe - for file in a:files - let file = fnamemodify(file, ':.') - execute 'noa edit +setl\ bufhidden=hide '.fnameescape(file) - if &filetype ==# '' - filetype detect - endif - call add(bufnrs, bufnr('%')) - endfor - noa close - endif - doautocmd BufEnter - return bufnrs -endfunction - -function! coc#ui#echo_lines(lines) - echo join(a:lines, "\n") -endfunction - -function! coc#ui#echo_signatures(signatures) abort - if pumvisible() | return | endif - echo "" - for i in range(len(a:signatures)) - call s:echo_signature(a:signatures[i]) - if i != len(a:signatures) - 1 - echon "\n" - endif - endfor -endfunction - -function! s:echo_signature(parts) - for part in a:parts - let hl = get(part, 'type', 'Normal') - let text = get(part, 'text', '') - if !empty(text) - execute 'echohl '.hl - execute "echon '".substitute(text, "'", "''", 'g')."'" - echohl None - endif - endfor -endfunction - -function! coc#ui#iterm_open(dir) - return s:osascript( - \ 'if application "iTerm2" is not running', - \ 'error', - \ 'end if') && s:osascript( - \ 'tell application "iTerm2"', - \ 'tell current window', - \ 'create tab with default profile', - \ 'tell current session', - \ 'write text "cd ' . a:dir . '"', - \ 'write text "clear"', - \ 'activate', - \ 'end tell', - \ 'end tell', - \ 'end tell') -endfunction - -function! s:osascript(...) abort - let args = join(map(copy(a:000), '" -e ".shellescape(v:val)'), '') - call s:system('osascript'. args) - return !v:shell_error -endfunction - -function! s:system(cmd) - let output = system(a:cmd) - if v:shell_error && output !=# "" - echohl Error | echom output | echohl None - return - endif - return output -endfunction - -function! coc#ui#set_lines(bufnr, changedtick, original, replacement, start, end, changes, cursor, col) abort - if !bufloaded(a:bufnr) - return - endif - let delta = 0 - if !empty(a:col) - let delta = col('.') - a:col - endif - if getbufvar(a:bufnr, 'changedtick') > a:changedtick && bufnr('%') == a:bufnr - " try apply current line change - let lnum = line('.') - " change for current line - if a:end - a:start == 1 && a:end == lnum && len(a:replacement) == 1 - let idx = a:start - lnum + 1 - let previous = get(a:original, idx, 0) - if type(previous) == 1 - let content = getline('.') - if previous !=# content - let diff = coc#string#diff(content, previous, col('.')) - let changed = get(a:replacement, idx, 0) - if type(changed) == 1 && strcharpart(previous, 0, diff['end']) ==# strcharpart(changed, 0, diff['end']) - let applied = coc#string#apply(changed, diff) - let replacement = copy(a:replacement) - let replacement[idx] = applied - call coc#compat#buf_set_lines(a:bufnr, a:start, a:end, replacement) - return - endif - endif - endif - endif - endif - if exists('*nvim_buf_set_text') && !empty(a:changes) - for item in reverse(copy(a:changes)) - call nvim_buf_set_text(a:bufnr, item[1], item[2], item[3], item[4], item[0]) - endfor - else - call coc#compat#buf_set_lines(a:bufnr, a:start, a:end, a:replacement) - endif - if !empty(a:cursor) - call cursor(a:cursor[0], a:cursor[1] + delta) - endif -endfunction - -function! coc#ui#change_lines(bufnr, list) abort - if !bufloaded(a:bufnr) | return v:null | endif - undojoin - if exists('*setbufline') - for [lnum, line] in a:list - call setbufline(a:bufnr, lnum + 1, line) - endfor - elseif a:bufnr == bufnr('%') - for [lnum, line] in a:list - call setline(lnum + 1, line) - endfor - else - let bufnr = bufnr('%') - exe 'noa buffer '.a:bufnr - for [lnum, line] in a:list - call setline(lnum + 1, line) - endfor - exe 'noa buffer '.bufnr - endif -endfunction - -function! coc#ui#open_url(url) - if has('mac') && executable('open') - call system('open '.a:url) - return - endif - if executable('xdg-open') - call system('xdg-open '.a:url) - return - endif - call system('cmd /c start "" /b '. substitute(a:url, '&', '^&', 'g')) - if v:shell_error - echohl Error | echom 'Failed to open '.a:url | echohl None - return - endif -endfunction - -function! coc#ui#rename_file(oldPath, newPath, write) abort - let bufnr = bufnr(a:oldPath) - if bufnr == -1 - throw 'Unable to get bufnr of '.a:oldPath - endif - if a:oldPath =~? a:newPath && (s:is_mac || s:is_win) - return coc#ui#safe_rename(bufnr, a:oldPath, a:newPath, a:write) - endif - if bufloaded(a:newPath) - execute 'silent bdelete! '.bufnr(a:newPath) - endif - let current = bufnr == bufnr('%') - let bufname = fnamemodify(a:newPath, ":~:.") - let filepath = fnamemodify(bufname(bufnr), '%:p') - let winid = coc#compat#buf_win_id(bufnr) - let curr = -1 - if winid == -1 - let curr = win_getid() - let file = fnamemodify(bufname(bufnr), ':.') - execute 'keepalt tab drop '.fnameescape(bufname(bufnr)) - let winid = win_getid() - endif - call coc#compat#execute(winid, 'keepalt file '.fnameescape(bufname), 'silent') - call coc#compat#execute(winid, 'doautocmd BufEnter') - if a:write - call coc#compat#execute(winid, 'noa write!', 'silent') - call delete(filepath, '') - endif - if curr != -1 - call win_gotoid(curr) - endif - return bufnr -endfunction - -" System is case in sensitive and newPath have different case. -function! coc#ui#safe_rename(bufnr, oldPath, newPath, write) abort - let winid = win_getid() - let lines = getbufline(a:bufnr, 1, '$') - execute 'keepalt tab drop '.fnameescape(fnamemodify(a:oldPath, ':.')) - let view = winsaveview() - execute 'keepalt bwipeout! '.a:bufnr - if a:write - call delete(a:oldPath, '') - endif - execute 'keepalt edit '.fnameescape(fnamemodify(a:newPath, ':~:.')) - let bufnr = bufnr('%') - call coc#compat#buf_set_lines(bufnr, 0, -1, lines) - if a:write - execute 'noa write' - endif - call winrestview(view) - call win_gotoid(winid) - return bufnr -endfunction - -function! coc#ui#sign_unplace() abort - if exists('*sign_unplace') - for group in s:sign_groups - call sign_unplace(group) - endfor - endif -endfunction - -function! coc#ui#update_signs(bufnr, group, signs) abort - if !s:sign_api || !bufloaded(a:bufnr) - return - endif - if len(a:signs) - call add(s:sign_groups, a:group) - endif - let current = get(get(sign_getplaced(a:bufnr, {'group': a:group}), 0, {}), 'signs', []) - let exists = [] - let unplaceList = [] - for item in current - let index = 0 - let placed = 0 - for def in a:signs - if def['name'] ==# item['name'] && def['lnum'] == item['lnum'] - let placed = 1 - call add(exists, index) - break - endif - let index = index + 1 - endfor - if !placed - call add(unplaceList, item['id']) - endif - endfor - for idx in range(0, len(a:signs) - 1) - if index(exists, idx) == -1 - let def = a:signs[idx] - let opts = {'lnum': def['lnum']} - if has_key(def, 'priority') - let opts['priority'] = def['priority'] - endif - call sign_place(0, a:group, def['name'], a:bufnr, opts) - endif - endfor - for id in unplaceList - call sign_unplace(a:group, {'buffer': a:bufnr, 'id': id}) - endfor -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/util.vim b/pack/ant/start/coc.nvim/autoload/coc/util.vim deleted file mode 100644 index 99f8ec4..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/util.vim +++ /dev/null @@ -1,625 +0,0 @@ -scriptencoding utf-8 -let s:root = expand(':h:h:h') -let s:is_win = has('win32') || has('win64') -let s:is_vim = !has('nvim') -let s:vim_api_version = 31 - -function! coc#util#remote_fns(name) - let fns = ['init', 'complete', 'should_complete', 'refresh', 'get_startcol', 'on_complete', 'on_enter'] - let res = [] - for fn in fns - if exists('*coc#source#'.a:name.'#'.fn) - call add(res, fn) - endif - endfor - return res -endfunction - -function! coc#util#do_complete(name, opt, cb) abort - let handler = 'coc#source#'.a:name.'#complete' - let l:Cb = {res -> a:cb(v:null, res)} - let args = [a:opt, l:Cb] - call call(handler, args) -endfunction - -function! coc#util#suggest_variables(bufnr) abort - return { - \ 'disable': getbufvar(a:bufnr, 'coc_suggest_disable', 0), - \ 'disabled_sources': getbufvar(a:bufnr, 'coc_disabled_sources', []), - \ 'blacklist': getbufvar(a:bufnr, 'coc_suggest_blacklist', []), - \ } -endfunction - -function! coc#util#api_version() abort - return s:vim_api_version -endfunction - -function! coc#util#semantic_hlgroups() abort - let res = split(execute('hi'), "\n") - let filtered = filter(res, "v:val =~# '^CocSem'") - return map(filtered, "matchstr(v:val,'\\v^CocSem\\w+')") -endfunction - -" get cursor position -function! coc#util#cursor() - return [line('.') - 1, strchars(strpart(getline('.'), 0, col('.') - 1))] -endfunction - -function! coc#util#change_info() abort - return {'lnum': line('.'), 'col': col('.'), 'line': getline('.'), 'changedtick': b:changedtick} -endfunction - -function! coc#util#jumpTo(line, character) abort - echohl WarningMsg | echon 'coc#util#jumpTo is deprecated, use coc#cursor#move_to instead.' | echohl None - call coc#cursor#move_to(a:line, a:character) -endfunction - -function! coc#util#root_patterns() abort - return coc#rpc#request('rootPatterns', [bufnr('%')]) -endfunction - -function! coc#util#get_config(key) abort - return coc#rpc#request('getConfig', [a:key]) -endfunction - -function! coc#util#open_terminal(opts) abort - return coc#ui#open_terminal(a:opts) -endfunction - -function! coc#util#synname() abort - return synIDattr(synID(line('.'), col('.') - 1, 1), 'name') -endfunction - -function! coc#util#setline(lnum, line) - keepjumps call setline(a:lnum, a:line) -endfunction - -function! coc#util#path_replace_patterns() abort - if has('win32unix') && exists('g:coc_cygqwin_path_prefixes') - echohl WarningMsg - echon 'g:coc_cygqwin_path_prefixes is deprecated, use g:coc_uri_prefix_replace_patterns instead' - echohl None - return g:coc_cygqwin_path_prefixes - endif - if exists('g:coc_uri_prefix_replace_patterns') - return g:coc_uri_prefix_replace_patterns - endif - return v:null -endfunction - -function! coc#util#version() - if s:is_vim - return string(v:versionlong) - endif - let c = execute('silent version') - let lines = split(matchstr(c, 'NVIM v\zs[^\n-]*')) - return lines[0] -endfunction - -function! coc#util#check_refresh(bufnr) - if !bufloaded(a:bufnr) - return 0 - endif - if getbufvar(a:bufnr, 'coc_diagnostic_disable', 0) - return 0 - endif - if get(g: , 'EasyMotion_loaded', 0) - return EasyMotion#is_active() != 1 - endif - return 1 -endfunction - -function! coc#util#diagnostic_info(bufnr, checkInsert) abort - let checked = coc#util#check_refresh(a:bufnr) - if !checked - return v:null - endif - if a:checkInsert && mode() =~# '^i' - return v:null - endif - let locationlist = '' - let winid = -1 - for info in getwininfo() - if info['bufnr'] == a:bufnr - let winid = info['winid'] - let locationlist = get(getloclist(winid, {'title': 1}), 'title', '') - break - endif - endfor - return { - \ 'bufnr': bufnr('%'), - \ 'winid': winid, - \ 'lnum': line('.'), - \ 'locationlist': locationlist - \ } -endfunction - -function! coc#util#open_file(cmd, file) - execute a:cmd .' '.fnameescape(fnamemodify(a:file, ':~:.')) - return bufnr('%') -endfunction - -function! coc#util#job_command() - if (has_key(g:, 'coc_node_path')) - let node = expand(g:coc_node_path) - else - let node = $COC_NODE_PATH == '' ? 'node' : $COC_NODE_PATH - endif - if !executable(node) - echohl Error | echom '[coc.nvim] "'.node.'" is not executable, checkout https://nodejs.org/en/download/' | echohl None - return - endif - if !filereadable(s:root.'/build/index.js') - if isdirectory(s:root.'/src') - echohl Error | echom '[coc.nvim] build/index.js not found, please install dependencies and compile coc.nvim by: yarn install' | echohl None - else - echohl Error | echon '[coc.nvim] your coc.nvim is broken.' | echohl None - endif - return - endif - return [node] + get(g:, 'coc_node_args', ['--no-warnings']) + [s:root.'/build/index.js'] -endfunction - -function! coc#util#jump(cmd, filepath, ...) abort - if a:cmd != 'pedit' - silent! normal! m' - endif - let path = a:filepath - if (has('win32unix')) - let path = substitute(a:filepath, '\v\\', '/', 'g') - endif - let file = fnamemodify(path, ":~:.") - if a:cmd == 'pedit' - let extra = empty(get(a:, 1, [])) ? '' : '+'.(a:1[0] + 1) - exe 'pedit '.extra.' '.fnameescape(file) - return - elseif a:cmd == 'drop' && exists('*bufadd') - let dstbuf = bufadd(path) - let binfo = getbufinfo(dstbuf) - if len(binfo) == 1 && empty(binfo[0].windows) - exec 'buffer '.dstbuf - let &buflisted = 1 - else - exec 'drop '.fnameescape(file) - endif - elseif a:cmd == 'edit' && bufloaded(file) - exe 'b '.bufnr(file) - else - call s:safer_open(a:cmd, file) - endif - if !empty(get(a:, 1, [])) - let line = getline(a:1[0] + 1) - " TODO need to use utf16 here - let col = byteidx(line, a:1[1]) + 1 - if col == 0 - let col = 999 - endif - call cursor(a:1[0] + 1, col) - endif - if &filetype ==# '' - filetype detect - endif - if s:is_vim - redraw - endif -endfunction - -function! s:safer_open(cmd, file) abort - " How to support :pedit and :drop? - let is_supported_cmd = index(["edit", "split", "vsplit", "tabe"], a:cmd) >= 0 - - " Use special handling only for URI. - let looks_like_uri = match(a:file, "^.*://") >= 0 - - if looks_like_uri && is_supported_cmd && has('win32') && exists('*bufadd') - " Workaround a bug for Win32 paths. - " - " reference: - " - https://github.com/vim/vim/issues/541 - " - https://github.com/neoclide/coc-java/issues/82 - " - https://github.com/vim-jp/issues/issues/6 - let buf = bufadd(a:file) - if a:cmd != 'edit' - " Open split, tab, etc. by a:cmd. - exe a:cmd - endif - " Set current buffer to the file - exe 'keepjumps buffer ' . buf - else - exe a:cmd.' '.fnameescape(a:file) - endif -endfunction - -function! coc#util#variables(bufnr) abort - let info = getbufinfo(a:bufnr) - let variables = empty(info) ? {} : copy(info[0]['variables']) - for key in keys(variables) - if key !~# '\v^coc' - unlet variables[key] - endif - endfor - return variables -endfunction - -function! coc#util#with_callback(method, args, cb) - function! s:Cb() closure - try - let res = call(a:method, a:args) - call a:cb(v:null, res) - catch /.*/ - call a:cb(v:exception) - endtry - endfunction - let timeout = s:is_vim ? 10 : 0 - call timer_start(timeout, {-> s:Cb() }) -endfunction - -function! coc#util#timer(method, args) - call timer_start(0, { -> s:Call(a:method, a:args)}) -endfunction - -function! s:Call(method, args) - try - call call(a:method, a:args) - redraw - catch /.*/ - return 0 - endtry -endfunction - -function! coc#util#vim_info() - return { - \ 'apiversion': s:vim_api_version, - \ 'mode': mode(), - \ 'config': get(g:, 'coc_user_config', {}), - \ 'floating': has('nvim') && exists('*nvim_open_win') ? v:true : v:false, - \ 'extensionRoot': coc#util#extension_root(), - \ 'globalExtensions': get(g:, 'coc_global_extensions', []), - \ 'lines': &lines, - \ 'columns': &columns, - \ 'cmdheight': &cmdheight, - \ 'pid': coc#util#getpid(), - \ 'filetypeMap': get(g:, 'coc_filetype_map', {}), - \ 'version': coc#util#version(), - \ 'completeOpt': &completeopt, - \ 'pumevent': 1, - \ 'isVim': has('nvim') ? v:false : v:true, - \ 'isCygwin': has('win32unix') ? v:true : v:false, - \ 'isMacvim': has('gui_macvim') ? v:true : v:false, - \ 'isiTerm': $TERM_PROGRAM ==# "iTerm.app", - \ 'colorscheme': get(g:, 'colors_name', ''), - \ 'workspaceFolders': get(g:, 'WorkspaceFolders', v:null), - \ 'background': &background, - \ 'runtimepath': join(globpath(&runtimepath, '', 0, 1), ','), - \ 'locationlist': get(g:,'coc_enable_locationlist', 1), - \ 'progpath': v:progpath, - \ 'guicursor': &guicursor, - \ 'pumwidth': exists('&pumwidth') ? &pumwidth : 15, - \ 'tabCount': tabpagenr('$'), - \ 'updateHighlight': has('nvim-0.5.0') || has('patch-8.1.1719') ? v:true : v:false, - \ 'vimCommands': get(g:, 'coc_vim_commands', []), - \ 'sign': exists('*sign_place') && exists('*sign_unplace'), - \ 'ambiguousIsNarrow': &ambiwidth ==# 'single' ? v:true : v:false, - \ 'textprop': has('textprop') && has('patch-8.1.1719') && !has('nvim') ? v:true : v:false, - \ 'dialog': has('nvim-0.4.0') || has('patch-8.2.0750') ? v:true : v:false, - \ 'semanticHighlights': coc#util#semantic_hlgroups() - \} -endfunction - -function! coc#util#all_state() - return { - \ 'bufnr': bufnr('%'), - \ 'winid': win_getid(), - \ 'bufnrs': map(getbufinfo({'bufloaded': 1}),'v:val["bufnr"]'), - \ 'winids': map(getwininfo(),'v:val["winid"]'), - \ } -endfunction - -function! coc#util#install() abort - let yarncmd = get(g:, 'coc_install_yarn_cmd', executable('yarnpkg') ? 'yarnpkg' : 'yarn') - call coc#ui#open_terminal({ - \ 'cwd': s:root, - \ 'cmd': yarncmd.' install --frozen-lockfile --ignore-engines', - \ 'autoclose': 0, - \ }) -endfunction - -function! coc#util#extension_root() abort - if get(g:, 'coc_node_env', '') ==# 'test' - return s:root.'/src/__tests__/extensions' - endif - if !empty(get(g:, 'coc_extension_root', '')) - echohl Error | echon 'g:coc_extension_root not used any more, use g:coc_data_home instead' | echohl None - endif - return coc#util#get_data_home().'/extensions' -endfunction - -function! coc#util#update_extensions(...) abort - let async = get(a:, 1, 0) - if async - call coc#rpc#notify('updateExtensions', []) - else - call coc#rpc#request('updateExtensions', [v:true]) - endif -endfunction - -function! coc#util#install_extension(args) abort - let names = filter(copy(a:args), 'v:val !~# "^-"') - let isRequest = index(a:args, '-sync') != -1 - if isRequest - call coc#rpc#request('installExtensions', names) - else - call coc#rpc#notify('installExtensions', names) - endif -endfunction - -function! coc#util#do_autocmd(name) abort - if exists('#User#'.a:name) - exe 'doautocmd User '.a:name - endif -endfunction - -function! coc#util#rebuild() - let dir = coc#util#extension_root() - if !isdirectory(dir) | return | endif - call coc#ui#open_terminal({ - \ 'cwd': dir, - \ 'cmd': 'npm rebuild', - \ 'keepfocus': 1, - \}) -endfunction - -function! coc#util#unmap(bufnr, keys) abort - if bufnr('%') == a:bufnr - for key in a:keys - exe 'silent! nunmap '.key - endfor - endif -endfunction - -function! coc#util#refactor_foldlevel(lnum) abort - if a:lnum <= 2 | return 0 | endif - let line = getline(a:lnum) - if line =~# '^\%u3000\s*$' | return 0 | endif - return 1 -endfunction - -function! coc#util#refactor_fold_text(lnum) abort - let range = '' - let info = get(b:line_infos, a:lnum, []) - if !empty(info) - let range = info[0].':'.info[1] - endif - return trim(getline(a:lnum)[3:]).' '.range -endfunction - -" get tabsize & expandtab option -function! coc#util#get_format_opts(bufnr) abort - let bufnr = a:bufnr && bufloaded(a:bufnr) ? a:bufnr : bufnr('%') - let tabsize = getbufvar(bufnr, '&shiftwidth') - if tabsize == 0 - let tabsize = getbufvar(bufnr, '&tabstop') - endif - return { - \ 'tabsize': tabsize, - \ 'expandtab': getbufvar(bufnr, '&expandtab'), - \ 'insertFinalNewline': getbufvar(bufnr, '&eol'), - \ 'trimTrailingWhitespace': getbufvar(bufnr, 'coc_trim_trailing_whitespace', 0), - \ 'trimFinalNewlines': getbufvar(bufnr, 'coc_trim_final_newlines', 0) - \ } -endfunction - -function! coc#util#get_editoroption(winid) abort - if !coc#compat#win_is_valid(a:winid) - return v:null - endif - if has('nvim') && exists('*nvim_win_get_config') - " avoid float window - let config = nvim_win_get_config(a:winid) - if !empty(get(config, 'relative', '')) - return v:null - endif - endif - let info = getwininfo(a:winid)[0] - let bufnr = info['bufnr'] - let buftype = getbufvar(bufnr, '&buftype') - " avoid window for other purpose. - if buftype !=# '' && buftype !=# 'acwrite' - return v:null - endif - let tabSize = getbufvar(bufnr, '&shiftwidth') - if tabSize == 0 - let tabSize = getbufvar(bufnr, '&tabstop') - endif - return { - \ 'bufnr': bufnr, - \ 'winid': a:winid, - \ 'winids': map(getwininfo(), 'v:val["winid"]'), - \ 'tabpagenr': info['tabnr'], - \ 'winnr': winnr(), - \ 'visibleRanges': s:visible_ranges(a:winid), - \ 'tabSize': tabSize, - \ 'insertSpaces': getbufvar(bufnr, '&expandtab') ? v:true : v:false - \ } -endfunction - -function! coc#util#getpid() - if !has('win32unix') - return getpid() - endif - let cmd = 'cat /proc/' . getpid() . '/winpid' - return substitute(system(cmd), '\v\n', '', 'gi') -endfunction - -" Get indentkeys for indent on TextChangedP, consider = for word indent only. -function! coc#util#get_indentkeys() abort - if empty(&indentexpr) - return '' - endif - if &indentkeys !~# '=' - return '' - endif - return &indentkeys -endfunction - -function! coc#util#get_bufoptions(bufnr) abort - if !bufloaded(a:bufnr) | return v:null | endif - let bufname = bufname(a:bufnr) - let buftype = getbufvar(a:bufnr, '&buftype') - let winid = bufwinid(a:bufnr) - let size = -1 - if bufnr('%') == a:bufnr - let size = line2byte(line("$") + 1) - elseif !empty(bufname) - let size = getfsize(bufname) - endif - let lines = v:null - if getbufvar(a:bufnr, 'coc_enabled', 1) && (buftype == '' || buftype == 'acwrite') && size < get(g:, 'coc_max_filesize', 2097152) - let lines = getbufline(a:bufnr, 1, '$') - endif - return { - \ 'bufnr': a:bufnr, - \ 'size': size, - \ 'lines': lines, - \ 'winid': winid, - \ 'bufname': bufname, - \ 'buftype': buftype, - \ 'previewwindow': v:false, - \ 'eol': getbufvar(a:bufnr, '&eol'), - \ 'indentkeys': coc#util#get_indentkeys(), - \ 'variables': coc#util#variables(a:bufnr), - \ 'filetype': getbufvar(a:bufnr, '&filetype'), - \ 'iskeyword': getbufvar(a:bufnr, '&iskeyword'), - \ 'changedtick': getbufvar(a:bufnr, 'changedtick'), - \ 'fullpath': empty(bufname) ? '' : fnamemodify(bufname, ':p'), - \} -endfunction - -function! coc#util#get_config_home() - if !empty(get(g:, 'coc_config_home', '')) - return resolve(expand(g:coc_config_home)) - endif - if exists('$VIMCONFIG') - return resolve($VIMCONFIG) - endif - if has('nvim') - if exists('$XDG_CONFIG_HOME') - return resolve($XDG_CONFIG_HOME."/nvim") - endif - if s:is_win - return resolve($HOME.'/AppData/Local/nvim') - endif - return resolve($HOME.'/.config/nvim') - else - if s:is_win - return resolve($HOME."/vimfiles") - endif - return resolve($HOME.'/.vim') - endif -endfunction - -function! coc#util#get_data_home() - if !empty(get(g:, 'coc_data_home', '')) - let dir = resolve(expand(g:coc_data_home)) - else - if exists('$XDG_CONFIG_HOME') - let dir = resolve($XDG_CONFIG_HOME."/coc") - else - if s:is_win - let dir = resolve(expand('~/AppData/Local/coc')) - else - let dir = resolve(expand('~/.config/coc')) - endif - endif - endif - if !isdirectory(dir) - call coc#notify#create(['creating data directory: '.dir], { - \ 'borderhighlight': 'CocInfoSign', - \ 'timeout': 5000, - \ 'kind': 'info', - \ }) - call mkdir(dir, "p", 0755) - endif - return dir -endfunction - -function! coc#util#get_complete_option() - if get(b:,"coc_suggest_disable",0) - return v:null - endif - let pos = getcurpos() - let line = getline(pos[1]) - let input = matchstr(strpart(line, 0, pos[2] - 1), '\k*$') - let col = pos[2] - strlen(input) - return { - \ 'word': matchstr(strpart(line, col - 1), '^\k\+'), - \ 'input': empty(input) ? '' : input, - \ 'line': line, - \ 'filetype': &filetype, - \ 'filepath': expand('%:p'), - \ 'bufnr': bufnr('%'), - \ 'linenr': pos[1], - \ 'colnr' : pos[2], - \ 'col': col - 1, - \ 'changedtick': b:changedtick, - \ 'blacklist': get(b:, 'coc_suggest_blacklist', []), - \ 'disabled': get(b:, 'coc_disabled_sources', []), - \ 'indentkeys': coc#util#get_indentkeys() - \} -endfunction - -" used by vim -function! coc#util#get_buf_lines(bufnr, changedtick) - if !bufloaded(a:bufnr) - return v:null - endif - let changedtick = getbufvar(a:bufnr, 'changedtick') - if changedtick == a:changedtick - return v:null - endif - return { - \ 'lines': getbufline(a:bufnr, 1, '$'), - \ 'changedtick': getbufvar(a:bufnr, 'changedtick') - \ } -endfunction - -" used for TextChangedI with InsertCharPre -function! coc#util#get_changeinfo() - return { - \ 'bufnr': bufnr('%'), - \ 'lnum': line('.'), - \ 'line': getline('.'), - \ 'changedtick': b:changedtick, - \} -endfunction - -function! s:visible_ranges(winid) abort - let info = getwininfo(a:winid)[0] - let res = [] - if !has_key(info, 'topline') || !has_key(info, 'botline') - return res - endif - let begin = 0 - let curr = info['topline'] - let max = info['botline'] - if win_getid() != a:winid - return [[curr, max]] - endif - while curr <= max - let closedend = foldclosedend(curr) - if closedend == -1 - let begin = begin == 0 ? curr : begin - if curr == max - call add(res, [begin, curr]) - endif - let curr = curr + 1 - else - if begin != 0 - call add(res, [begin, curr - 1]) - let begin = closedend + 1 - endif - let curr = closedend + 1 - endif - endwhile - return res -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/coc/window.vim b/pack/ant/start/coc.nvim/autoload/coc/window.vim deleted file mode 100644 index 5c99fc8..0000000 --- a/pack/ant/start/coc.nvim/autoload/coc/window.vim +++ /dev/null @@ -1,205 +0,0 @@ -let g:coc_max_treeview_width = get(g:, 'coc_max_treeview_width', 40) -let s:is_vim = !has('nvim') - -" Get tabpagenr of winid, return -1 if window doesn't exist -function! coc#window#tabnr(winid) abort - if exists('*nvim_win_get_tabpage') - try - return nvim_win_get_tabpage(a:winid) - catch /Invalid window id/ - return -1 - endtry - endif - if exists('*win_execute') - let ref = {} - call win_execute(a:winid, 'let ref["out"] = tabpagenr()') - return get(ref, 'out', -1) - elseif !s:is_vim - let info = getwininfo(a:winid) - return empty(info) ? -1 : info[0]['tabnr'] - else - throw 'win_execute() does not exist, please upgrade your vim.' - endif -endfunction - -function! coc#window#get_cursor(winid) abort - if exists('*nvim_win_get_cursor') - return nvim_win_get_cursor(a:winid) - endif - return coc#api#exec('win_get_cursor', [a:winid]) -endfunction - -" Check if winid visible on current tabpage -function! coc#window#visible(winid) abort - if s:is_vim - if coc#window#tabnr(a:winid) != tabpagenr() - return 0 - endif - " Check possible hidden popup - try - return get(popup_getpos(a:winid), 'visible', 0) == 1 - catch /^Vim\%((\a\+)\)\=:E993/ - return 1 - endtry - endif - if !nvim_win_is_valid(a:winid) - return 0 - endif - return coc#window#tabnr(a:winid) == tabpagenr() -endfunction - -" Return v:null when name or window doesn't exist, -" 'getwinvar' only works on window of current tab -function! coc#window#get_var(winid, name, ...) abort - if !s:is_vim - try - if a:name =~# '^&' - return nvim_win_get_option(a:winid, a:name[1:]) - else - return nvim_win_get_var(a:winid, a:name) - endif - catch /E5555/ - return get(a:, 1, v:null) - endtry - else - try - return coc#api#exec('win_get_var', [a:winid, a:name, get(a:, 1, v:null)]) - catch /.*/ - return get(a:, 1, v:null) - endtry - endif -endfunction - -" Not throw like setwinvar -function! coc#window#set_var(winid, name, value) abort - try - if !s:is_vim - if a:name =~# '^&' - call nvim_win_set_option(a:winid, a:name[1:], a:value) - else - call nvim_win_set_var(a:winid, a:name, a:value) - endif - else - call coc#api#exec('win_set_var', [a:winid, a:name, a:value]) - endif - catch /Invalid window id/ - " ignore - endtry -endfunction - -function! coc#window#is_float(winid) abort - if s:is_vim - if exists('*popup_list') - return index(popup_list(), a:winid) != -1 - else - try - return !empty(popup_getpos(a:winid)) - catch /^Vim\%((\a\+)\)\=:E993/ - return 0 - endtry - endif - return 0 - elseif exists('*nvim_win_get_config') - let config = nvim_win_get_config(a:winid) - return !empty(config) && !empty(get(config, 'relative', '')) - endif -endfunction - -function! coc#window#set_height(winid, height) abort - if empty(getwininfo(a:winid)) - return - endif - if exists('*nvim_win_set_height') - call nvim_win_set_height(a:winid, a:height) - else - call coc#compat#execute(a:winid, 'noa resize '.a:height, 'silent') - endif -endfunction - -function! coc#window#adjust_width(winid) abort - let bufnr = winbufnr(a:winid) - if bufloaded(bufnr) - let maxwidth = 0 - let lines = getbufline(bufnr, 1, '$') - if len(lines) > 2 - call coc#compat#execute(a:winid, 'setl nowrap') - for line in lines - let w = strwidth(line) - if w > maxwidth - let maxwidth = w - endif - endfor - endif - if maxwidth > winwidth(a:winid) - call coc#compat#execute(a:winid, 'vertical resize '.min([maxwidth, g:coc_max_treeview_width])) - endif - endif -endfunction - -" Get single window by window variable, current tab only -function! coc#window#find(key, val) abort - for i in range(1, winnr('$')) - let res = getwinvar(i, a:key) - if res == a:val - return win_getid(i) - endif - endfor - return -1 -endfunction - -" Visible buffer numbers -function! coc#window#bufnrs() abort - let winids = [] - if exists('*nvim_list_wins') - let winids = nvim_list_wins() - else - let winids = map(getwininfo(), 'v:val["winid"]') - endif - return uniq(map(winids, 'winbufnr(v:val)')) -endfunction - -" Avoid errors -function! coc#window#close(winid) abort - if empty(a:winid) || a:winid == -1 - return - endif - if exists('*nvim_win_is_valid') && exists('*nvim_win_close') - if nvim_win_is_valid(a:winid) - call nvim_win_close(a:winid, 1) - endif - elseif exists('*win_execute') - call coc#compat#execute(a:winid, 'noa close!', 'silent!') - else - let curr = win_getid() - if curr == a:winid - silent! close! - else - let res = win_gotoid(a:winid) - if res - silent! close! - call win_gotoid(curr) - endif - endif - endif -endfunction - -function! coc#window#visible_range(bufnr) abort - let winid = bufwinid(a:bufnr) - if winid == -1 - return v:null - endif - let info = getwininfo(winid)[0] - return [info['topline'], info['botline']] -endfunction - -function! coc#window#visible_ranges(bufnr) abort - let wins = gettabinfo(tabpagenr())[0]['windows'] - let res = [] - for id in wins - let info = getwininfo(id)[0] - if info['bufnr'] == a:bufnr - call add(res, [info['topline'], info['botline']]) - endif - endfor - return res -endfunction diff --git a/pack/ant/start/coc.nvim/autoload/health/coc.vim b/pack/ant/start/coc.nvim/autoload/health/coc.vim deleted file mode 100644 index 06c7a68..0000000 --- a/pack/ant/start/coc.nvim/autoload/health/coc.vim +++ /dev/null @@ -1,100 +0,0 @@ -scriptencoding utf-8 -let s:root = expand(':h:h:h') - -function! s:checkVim(test, name, patchlevel) abort - if a:test - if !has(a:patchlevel) - call health#report_error(a:name . ' version not satisfied, ' . a:patchlevel . ' and above required') - return 0 - else - call health#report_ok(a:name . ' version satisfied') - return 1 - endif - endif - return 0 -endfunction - -function! s:checkEnvironment() abort - let valid - \ = s:checkVim(has('nvim'), 'nvim', 'nvim-0.4.0') - \ + s:checkVim(!has('nvim'), 'vim', 'patch-8.1.1719') - let node = get(g:, 'coc_node_path', $COC_NODE_PATH == '' ? 'node' : $COC_NODE_PATH) - if !executable(node) - let valid = 0 - call health#report_error('Executable node.js not found, install node.js from http://nodejs.org/') - endif - let output = system(node . ' --version') - if v:shell_error && output !=# "" - let valid = 0 - call health#report_error(output) - endif - let ms = matchlist(output, 'v\(\d\+\).\(\d\+\).\(\d\+\)') - if empty(ms) - let valid = 0 - call health#report_error('Unable to detect version of node, make sure your node executable is http://nodejs.org/') - elseif str2nr(ms[1]) < 12 || (str2nr(ms[1]) == 12 && str2nr(ms[2]) < 12) - let valid = 0 - call health#report_warn('Node.js version '.trim(output).' < 12.12.0, please upgrade node.js') - endif - if valid - call health#report_ok('Environment check passed') - endif - if has('pythonx') - try - silent pyx print("") - catch /.*/ - call health#report_warn('pyx command not work, some extensions may fail to work, checkout ":h pythonx"') - if has('nvim') - call health#report_warn('Install pynvim by command: pip install pynvim --upgrade') - endif - endtry - endif - return valid -endfunction - -function! s:checkCommand() - let file = s:root.'/build/index.js' - if filereadable(file) - call health#report_ok('Javascript bundle build/index.js found') - else - call health#report_error('Javascript entry not found, please compile coc.nvim by esbuild.') - endif -endfunction - -function! s:checkAutocmd() - let cmds = ['CursorHold', 'CursorHoldI', 'CursorMovedI', 'InsertCharPre', 'TextChangedI'] - for cmd in cmds - let lines = split(execute('verbose autocmd '.cmd), '\n') - let n = 0 - for line in lines - if line =~# 'CocAction(' && n < len(lines) - 1 - let next = lines[n + 1] - let ms = matchlist(next, 'Last set from \(.*\)') - if !empty(ms) - call health#report_warn('Use CocActionAsync to replace CocAction for better performance on '.cmd) - call health#report_warn('Checkout the file '.ms[1]) - endif - endif - let n = n + 1 - endfor - endfor -endfunction - -function! s:checkInitialize() abort - if coc#client#is_running('coc') - call health#report_ok('Service started') - return 1 - endif - call health#report_error('service could not be initialized', [ - \ 'Use command ":messages" to get error messages.', - \ 'Open a issue at https://github.com/neoclide/coc.nvim/issues for feedback.' - \]) - return 0 -endfunction - -function! health#coc#check() abort - call s:checkEnvironment() - call s:checkCommand() - call s:checkInitialize() - call s:checkAutocmd() -endfunction diff --git a/pack/ant/start/coc.nvim/bin/prompt.js b/pack/ant/start/coc.nvim/bin/prompt.js deleted file mode 100644 index 285832a..0000000 --- a/pack/ant/start/coc.nvim/bin/prompt.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Used for prompt popup on vim - */ -const readline = require("readline") -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - escapeCodeTimeout: 0, - prompt: '' -}) -rl.setPrompt('') -let value = process.argv[2] -if (value) { - rl.write(value) -} -rl.on('line', input => { - send(['confirm', input]) - process.exit() -}) - -let original_ttyWrite = rl._ttyWrite -rl._ttyWrite = function (code, key) { - if (key.name === 'enter') { - send(['send', '']) - return '' - } - original_ttyWrite.apply(rl, arguments) - send(['change', rl.line]) -} - -function createSequences(str) { - return '\033]51;' + str + '\x07' -} - -function send(args) { - process.stdout.write(createSequences(JSON.stringify(['call', 'CocPopupCallback', args]))) -} - -process.stdin.on('keypress', (e, key) => { - if (key) { - let k = getKey(key) - if (k == '') { - return - } - if (k == '') { - send(['exit', '']) - process.exit() - return - } - if (k) { - send(['send', k]) - return - } - } -}) - -function getKey(key) { - if (key.ctrl === true) { - if (key.name == 'n') { - return '' - } - if (key.name == 'p') { - return '' - } - if (key.name == 'j') { - return '' - } - if (key.name == 'k') { - return '' - } - if (key.name == 'f') { - return '' - } - if (key.name == 'b') { - return '' - } - if (key.sequence == '\x00') { - return '' - } - } - if (key.sequence == '\u001b') { - return '' - } - if (key.sequence == '\r') { - return '' - } - if (key.sequence == '\t') { - return key.shift ? '' : '' - } - if (key.name == 'up') { - return '' - } - if (key.name == 'down') { - return '' - } - return '' -} diff --git a/pack/ant/start/coc.nvim/bin/terminateProcess.sh b/pack/ant/start/coc.nvim/bin/terminateProcess.sh deleted file mode 100755 index 513068d..0000000 --- a/pack/ant/start/coc.nvim/bin/terminateProcess.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -terminateTree() { - for cpid in $(pgrep -P $1); do - terminateTree $cpid - done - kill -9 $1 > /dev/null 2>&1 -} - -for pid in $*; do - terminateTree $pid -done - diff --git a/pack/ant/start/coc.nvim/build/index.js b/pack/ant/start/coc.nvim/build/index.js deleted file mode 100644 index a5cb676..0000000 --- a/pack/ant/start/coc.nvim/build/index.js +++ /dev/null @@ -1,338 +0,0 @@ -"use strict";(function () { - var v = process.version - var parts = v.slice(1).split('.') - var major = parseInt(parts[0], 10) - var minor = parseInt(parts[1], 10) - if (major < 12 || (major == 12 && minor < 12)) { - throw new Error('coc.nvim requires node >= v12.12.0, current version: ' + v) - } -})(); -var rie=Object.create;var Yh=Object.defineProperty,oie=Object.defineProperties,sie=Object.getOwnPropertyDescriptor,aie=Object.getOwnPropertyDescriptors,lie=Object.getOwnPropertyNames,yR=Object.getOwnPropertySymbols,uie=Object.getPrototypeOf,wR=Object.prototype.hasOwnProperty,cie=Object.prototype.propertyIsEnumerable;var vR=(n,e,t)=>e in n?Yh(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,de=(n,e)=>{for(var t in e||(e={}))wR.call(e,t)&&vR(n,t,e[t]);if(yR)for(var t of yR(e))cie.call(e,t)&&vR(n,t,e[t]);return n},Ba=(n,e)=>oie(n,aie(e)),DR=n=>Yh(n,"__esModule",{value:!0});var _=(n,e)=>()=>(n&&(e=n(n=0)),e);var b=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ds=(n,e)=>{for(var t in e)Yh(n,t,{get:e[t],enumerable:!0})},CR=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of lie(e))!wR.call(n,r)&&(t||r!=="default")&&Yh(n,r,{get:()=>e[r],enumerable:!(i=sie(e,r))||i.enumerable});return n},x=(n,e)=>CR(DR(Yh(n!=null?rie(uie(n)):{},"default",!e&&n&&n.__esModule?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n),Ha=(n=>(e,t)=>n&&n.get(e)||(t=CR(DR({}),e,1),n&&n.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var SR=b((ike,xR)=>{var fu=1e3,pu=fu*60,mu=pu*60,qa=mu*24,hie=qa*7,die=qa*365.25;xR.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return gie(n);if(t==="number"&&isFinite(n))return e.long?pie(n):fie(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function gie(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!!e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*die;case"weeks":case"week":case"w":return t*hie;case"days":case"day":case"d":return t*qa;case"hours":case"hour":case"hrs":case"hr":case"h":return t*mu;case"minutes":case"minute":case"mins":case"min":case"m":return t*pu;case"seconds":case"second":case"secs":case"sec":case"s":return t*fu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function fie(n){var e=Math.abs(n);return e>=qa?Math.round(n/qa)+"d":e>=mu?Math.round(n/mu)+"h":e>=pu?Math.round(n/pu)+"m":e>=fu?Math.round(n/fu)+"s":n+"ms"}function pie(n){var e=Math.abs(n);return e>=qa?mp(n,e,qa,"day"):e>=mu?mp(n,e,mu,"hour"):e>=pu?mp(n,e,pu,"minute"):e>=fu?mp(n,e,fu,"second"):n+" ms"}function mp(n,e,t,i){var r=e>=t*1.5;return Math.round(n/t)+" "+i+(r?"s":"")}});var PC=b((nke,TR)=>{function mie(n){t.debug=t,t.default=t,t.coerce=l,t.disable=o,t.enable=r,t.enabled=s,t.humanize=SR(),t.destroy=u,Object.keys(n).forEach(c=>{t[c]=n[c]}),t.names=[],t.skips=[],t.formatters={};function e(c){let h=0;for(let d=0;d{if(j==="%%")return"%";S++;let W=t.formatters[I];if(typeof W=="function"){let A=m[S];j=W.call(v,A),m.splice(S,1),S--}return j}),t.formatArgs.call(v,m),(v.log||t.log).apply(v,m)}return p.namespace=c,p.useColors=t.useColors(),p.color=t.selectColor(c),p.extend=i,p.destroy=t.destroy,Object.defineProperty(p,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==t.namespaces&&(g=t.namespaces,f=t.enabled(c)),f),set:m=>{d=m}}),typeof t.init=="function"&&t.init(p),p}function i(c,h){let d=t(this.namespace+(typeof h>"u"?":":h)+c);return d.log=this.log,d}function r(c){t.save(c),t.namespaces=c,t.names=[],t.skips=[];let h,d=(typeof c=="string"?c:"").split(/[\s,]+/),g=d.length;for(h=0;h"-"+h)].join(",");return t.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let h,d;for(h=0,d=t.skips.length;h{En.formatArgs=yie;En.save=vie;En.load=wie;En.useColors=bie;En.storage=Die();En.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();En.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function bie(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function yie(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+bp.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,i=0;n[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(t++,r==="%c"&&(i=t))}),n.splice(i,0,e)}En.log=console.debug||console.log||(()=>{});function vie(n){try{n?En.storage.setItem("debug",n):En.storage.removeItem("debug")}catch{}}function wie(){let n;try{n=En.storage.getItem("debug")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}function Die(){try{return localStorage}catch{}}bp.exports=PC()(En);var{formatters:Cie}=bp.exports;Cie.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var PR=b((rke,ER)=>{"use strict";ER.exports=(n,e=process.argv)=>{let t=n.startsWith("-")?"":n.length===1?"-":"--",i=e.indexOf(t+n),r=e.indexOf("--");return i!==-1&&(r===-1||i{"use strict";var xie=require("os"),_R=require("tty"),qn=PR(),{env:oi}=process,Cs;qn("no-color")||qn("no-colors")||qn("color=false")||qn("color=never")?Cs=0:(qn("color")||qn("colors")||qn("color=true")||qn("color=always"))&&(Cs=1);"FORCE_COLOR"in oi&&(oi.FORCE_COLOR==="true"?Cs=1:oi.FORCE_COLOR==="false"?Cs=0:Cs=oi.FORCE_COLOR.length===0?1:Math.min(parseInt(oi.FORCE_COLOR,10),3));function _C(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}function RC(n,e){if(Cs===0)return 0;if(qn("color=16m")||qn("color=full")||qn("color=truecolor"))return 3;if(qn("color=256"))return 2;if(n&&!e&&Cs===void 0)return 0;let t=Cs||0;if(oi.TERM==="dumb")return t;if(process.platform==="win32"){let i=xie.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in oi)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in oi)||oi.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in oi)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oi.TEAMCITY_VERSION)?1:0;if(oi.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in oi){let i=parseInt((oi.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oi.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(oi.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oi.TERM)||"COLORTERM"in oi?1:t}function Sie(n){let e=RC(n,n&&n.isTTY);return _C(e)}RR.exports={supportsColor:Sie,stdout:_C(RC(!0,_R.isatty(1))),stderr:_C(RC(!0,_R.isatty(2)))}});var IR=b((fi,vp)=>{var Tie=require("tty"),yp=require("util");fi.init=Fie;fi.log=_ie;fi.formatArgs=Eie;fi.save=Rie;fi.load=Lie;fi.useColors=kie;fi.destroy=yp.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");fi.colors=[6,2,3,4,5,1];try{let n=LR();n&&(n.stderr||n).level>=2&&(fi.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}fi.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(r,o)=>o.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[t]=i,n},{});function kie(){return"colors"in fi.inspectOpts?Boolean(fi.inspectOpts.colors):Tie.isatty(process.stderr.fd)}function Eie(n){let{namespace:e,useColors:t}=this;if(t){let i=this.color,r="\x1B[3"+(i<8?i:"8;5;"+i),o=` ${r};1m${e} \x1B[0m`;n[0]=o+n[0].split(` -`).join(` -`+o),n.push(r+"m+"+vp.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=Pie()+e+" "+n[0]}function Pie(){return fi.inspectOpts.hideDate?"":new Date().toISOString()+" "}function _ie(...n){return process.stderr.write(yp.format(...n)+` -`)}function Rie(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function Lie(){return process.env.DEBUG}function Fie(n){n.inspectOpts={};let e=Object.keys(fi.inspectOpts);for(let t=0;te.trim()).join(" ")};FR.O=function(n){return this.inspectOpts.colors=this.useColors,yp.inspect(n,this.inspectOpts)}});var Mt=b((ske,LC)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?LC.exports=kR():LC.exports=IR()});var AR=b((ake,jR)=>{"use strict";jR.exports=Iie;function bu(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function Iie(n){if(n=n||{},n.circles)return jie(n);return n.proto?i:t;function e(r,o){for(var s=Object.keys(r),a=new Array(s.length),l=0;l{var Aie=require("util"),Ya=Mt()("log4js:configuration"),wp=[],Dp=[],OR=n=>!n,MR=n=>n&&typeof n=="object"&&!Array.isArray(n),Oie=n=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(n),Mie=n=>n&&typeof n=="number"&&Number.isInteger(n),Nie=n=>{Dp.push(n),Ya(`Added listener, now ${Dp.length} listeners`)},Bie=n=>{wp.push(n),Ya(`Added pre-processing listener, now ${wp.length} listeners`)},NR=(n,e,t)=>{(Array.isArray(e)?e:[e]).forEach(r=>{if(r)throw new Error(`Problem with log4js configuration: (${Aie.inspect(n,{depth:5})}) - ${t}`)})},Hie=n=>{Ya("New configuration to be validated: ",n),NR(n,OR(MR(n)),"must be an object."),Ya(`Calling pre-processing listeners (${wp.length})`),wp.forEach(e=>e(n)),Ya("Configuration pre-processing finished."),Ya(`Calling configuration listeners (${Dp.length})`),Dp.forEach(e=>e(n)),Ya("Configuration finished.")};BR.exports={configure:Hie,addListener:Nie,addPreProcessingListener:Bie,throwExceptionIf:NR,anObject:MR,anInteger:Mie,validIdentifier:Oie,not:OR}});var Cp=b((uke,Yn)=>{"use strict";function HR(n,e){for(var t=n.toString();t.length-1?r:o,a=Za(e.getHours()),l=Za(e.getMinutes()),u=Za(e.getSeconds()),c=HR(e.getMilliseconds(),3),h=qie(e.getTimezoneOffset()),d=n.replace(/dd/g,t).replace(/MM/g,i).replace(/y{1,4}/g,s).replace(/hh/g,a).replace(/mm/g,l).replace(/ss/g,u).replace(/SSS/g,c).replace(/O/g,h);return d}function Ja(n,e,t,i){n["set"+(i?"":"UTC")+e](t)}function Yie(n,e,t){var i=n.indexOf("O")<0,r=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(c,h){Ja(c,"FullYear",h,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Month",h-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Date",h,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(c,h){Ja(c,"Hours",h,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(c,h){Ja(c,"Minutes",h,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(c,h){Ja(c,"Seconds",h,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(c,h){Ja(c,"Milliseconds",h,i)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(c,h){h==="Z"?h=0:h=h.replace(":","");var d=Math.abs(h),g=(h>0?-1:1)*(d%100+Math.floor(d/100)*60);c.setUTCMinutes(c.getUTCMinutes()+g)}}],o=r.reduce(function(c,h){return h.pattern.test(c.regexp)?(h.index=c.regexp.match(h.pattern).index,c.regexp=c.regexp.replace(h.pattern,"("+h.regexp+")")):h.index=-1,c},{regexp:n,index:[]}),s=r.filter(function(c){return c.index>-1});s.sort(function(c,h){return c.index-h.index});var a=new RegExp(o.regexp),l=a.exec(e);if(l){var u=t||Yn.exports.now();return s.forEach(function(c,h){c.fn(u,l[h+1])}),u}throw new Error("String '"+e+"' could not be parsed as '"+n+"'")}function Wie(n,e,t){if(!n)throw new Error("pattern must be supplied");return Yie(n,e,t)}function Zie(){return new Date}Yn.exports=qR;Yn.exports.asString=qR;Yn.exports.parse=Wie;Yn.exports.now=Zie;Yn.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";Yn.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";Yn.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";Yn.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"});var IC=b((cke,zR)=>{var xs=Cp(),YR=require("os"),Wh=require("util"),WR=require("path"),ZR={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function JR(n){return n?`\x1B[${ZR[n][0]}m`:""}function $R(n){return n?`\x1B[${ZR[n][1]}m`:""}function Jie(n,e){return JR(e)+n+$R(e)}function XR(n,e){return Jie(Wh.format("[%s] [%s] %s - ",xs.asString(n.startTime),n.level.toString(),n.categoryName),e)}function UR(n){return XR(n)+Wh.format(...n.data)}function xp(n){return XR(n,n.level.colour)+Wh.format(...n.data)}function GR(n){return Wh.format(...n.data)}function QR(n){return n.data[0]}function KR(n,e){let t="%r %p %c - %m%n",i=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos%])(\{([^}]+)\})?|([^%]+)/;n=n||t;function r(F,N){let Z=F.categoryName;if(N){let z=parseInt(N,10),ae=Z.split(".");zz&&(Z=ae.slice(-z).join(WR.sep))}return Z}function D(F){return F.lineNumber?`${F.lineNumber}`:""}function S(F){return F.columnNumber?`${F.columnNumber}`:""}function L(F){return F.callStack||""}let j={c:r,d:o,h:s,m:a,n:l,p:u,r:c,"[":h,"]":d,y:p,z:f,"%":g,x:m,X:v,f:w,l:D,o:S,s:L};function I(F,N,Z){return j[F](N,Z)}function W(F,N){let Z;return F?(Z=parseInt(F.substr(1),10),Z>0?N.slice(0,Z):N.slice(Z)):N}function A(F,N){let Z;if(F)if(F.charAt(0)==="-")for(Z=parseInt(F.substr(1),10);N.length{var Wt=Wa(),VR=["white","grey","black","blue","cyan","green","magenta","red","yellow"],Kt=class{constructor(e,t,i){this.level=e,this.levelStr=t,this.colour=i}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof Kt?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),Kt[e.toString().toUpperCase()]||t):t}static addLevels(e){e&&(Object.keys(e).forEach(i=>{let r=i.toUpperCase();Kt[r]=new Kt(e[i].value,r,e[i].colour);let o=Kt.levels.findIndex(s=>s.levelStr===r);o>-1?Kt.levels[o]=Kt[r]:Kt.levels.push(Kt[r])}),Kt.levels.sort((i,r)=>i.level-r.level))}isLessThanOrEqualTo(e){return typeof e=="string"&&(e=Kt.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return typeof e=="string"&&(e=Kt.getLevel(e)),this.level>=e.level}isEqualTo(e){return typeof e=="string"&&(e=Kt.getLevel(e)),this.level===e.level}};Kt.levels=[];Kt.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Wt.addListener(n=>{let e=n.levels;e&&(Wt.throwExceptionIf(n,Wt.not(Wt.anObject(e)),"levels must be an object"),Object.keys(e).forEach(i=>{Wt.throwExceptionIf(n,Wt.not(Wt.validIdentifier(i)),`level name "${i}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Wt.throwExceptionIf(n,Wt.not(Wt.anObject(e[i])),`level "${i}" must be an object`),Wt.throwExceptionIf(n,Wt.not(e[i].value),`level "${i}" must have a 'value' property`),Wt.throwExceptionIf(n,Wt.not(Wt.anInteger(e[i].value)),`level "${i}".value must have an integer value`),Wt.throwExceptionIf(n,Wt.not(e[i].colour),`level "${i}" must have a 'colour' property`),Wt.throwExceptionIf(n,Wt.not(VR.indexOf(e[i].colour)>-1),`level "${i}".colour must be one of ${VR.join(", ")}`)}))});Wt.addListener(n=>{Kt.addLevels(n.levels)});eL.exports=Kt});var cL=b(Jh=>{"use strict";var{parse:nL,stringify:rL}=JSON,{keys:$ie}=Object,Zh=String,oL="string",tL={},Sp="object",sL=(n,e)=>e,Xie=n=>n instanceof Zh?Zh(n):n,Uie=(n,e)=>typeof e===oL?new Zh(e):e,aL=(n,e,t,i)=>{let r=[];for(let o=$ie(t),{length:s}=o,a=0;a{let i=Zh(e.push(t)-1);return n.set(t,i),i},lL=(n,e)=>{let t=nL(n,Uie).map(Xie),i=t[0],r=e||sL,o=typeof i===Sp&&i?aL(t,new Set,i,r):i;return r.call({"":o},"",o)};Jh.parse=lL;var uL=(n,e,t)=>{let i=e&&typeof e===Sp?(c,h)=>c===""||-1nL(uL(n));Jh.toJSON=Gie;var Qie=n=>lL(rL(n));Jh.fromJSON=Qie});var jC=b((gke,gL)=>{var hL=cL(),dL=$a(),$h=class{constructor(e,t,i,r,o){this.startTime=new Date,this.categoryName=e,this.data=i,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,o&&(this.functionName=o.functionName,this.fileName=o.fileName,this.lineNumber=o.lineNumber,this.columnNumber=o.columnNumber,this.callStack=o.callStack)}serialise(){let e=this.data.map(t=>(t&&t.message&&t.stack&&(t=Object.assign({message:t.message,stack:t.stack},t)),t));return this.data=e,hL.stringify(this)}static deserialise(e){let t;try{let i=hL.parse(e);i.data=i.data.map(r=>{if(r&&r.message&&r.stack){let o=new Error(r);Object.keys(r).forEach(s=>{o[s]=r[s]}),r=o}return r}),t=new $h(i.categoryName,dL.getLevel(i.level.levelStr),i.data,i.context),t.startTime=new Date(i.startTime),t.pid=i.pid,t.cluster=i.cluster}catch(i){t=new $h("log4js",dL.ERROR,["Unable to parse log:",e,"because: ",i])}return t}};gL.exports=$h});var kp=b((fke,mL)=>{var Wn=Mt()("log4js:clustering"),Kie=jC(),zie=Wa(),yu=!1,Xr=null;try{Xr=require("cluster")}catch{Wn("cluster module not present"),yu=!0}var OC=[],Uh=!1,Xh="NODE_APP_INSTANCE",fL=()=>Uh&&process.env[Xh]==="0",AC=()=>yu||Xr.isMaster||fL(),pL=n=>{OC.forEach(e=>e(n))},Tp=(n,e)=>{if(Wn("cluster message received from worker ",n,": ",e),n.topic&&n.data&&(e=n,n=void 0),e&&e.topic&&e.topic==="log4js:message"){Wn("received message: ",e.data);let t=Kie.deserialise(e.data);pL(t)}};yu||zie.addListener(n=>{OC.length=0,{pm2:Uh,disableClustering:yu,pm2InstanceVar:Xh="NODE_APP_INSTANCE"}=n,Wn(`clustering disabled ? ${yu}`),Wn(`cluster.isMaster ? ${Xr&&Xr.isMaster}`),Wn(`pm2 enabled ? ${Uh}`),Wn(`pm2InstanceVar = ${Xh}`),Wn(`process.env[${Xh}] = ${process.env[Xh]}`),Uh&&process.removeListener("message",Tp),Xr&&Xr.removeListener&&Xr.removeListener("message",Tp),yu||n.disableClustering?Wn("Not listening for cluster messages, because clustering disabled."):fL()?(Wn("listening for PM2 broadcast messages"),process.on("message",Tp)):Xr.isMaster?(Wn("listening for cluster messages"),Xr.on("message",Tp)):Wn("not listening for messages, because we are not a master process")});mL.exports={onlyOnMaster:(n,e)=>AC()?n():e,isMaster:AC,send:n=>{AC()?pL(n):(Uh||(n.cluster={workerId:Xr.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:n.serialise()}))},onMessage:n=>{OC.push(n)}}});var wL=b((pke,vL)=>{function Vie(n){if(typeof n=="number"&&Number.isInteger(n))return n;let e={K:1024,M:1024*1024,G:1024*1024*1024},t=Object.keys(e),i=n.substr(n.length-1).toLocaleUpperCase(),r=n.substring(0,n.length-1).trim();if(t.indexOf(i)<0||!Number.isInteger(Number(r)))throw Error(`maxLogSize: "${n}" is invalid`);return r*e[i]}function ene(n,e){let t=Object.assign({},e);return Object.keys(n).forEach(i=>{t[i]&&(t[i]=n[i](e[i]))}),t}function bL(n){return ene({maxLogSize:Vie},n)}var yL={file:bL,fileSync:bL};vL.exports.modifyConfig=n=>yL[n.type]?yL[n.type](n):n});var CL=b((mke,DL)=>{var tne=console.log.bind(console);function ine(n,e){return t=>{tne(n(t,e))}}function nne(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),ine(t,n.timezoneOffset)}DL.exports.configure=nne});var SL=b(xL=>{function rne(n,e){return t=>{process.stdout.write(`${n(t,e)} -`)}}function one(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),rne(t,n.timezoneOffset)}xL.configure=one});var kL=b((yke,TL)=>{function sne(n,e){return t=>{process.stderr.write(`${n(t,e)} -`)}}function ane(n,e){let t=e.colouredLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),sne(t,n.timezoneOffset)}TL.exports.configure=ane});var PL=b((vke,EL)=>{function lne(n,e,t,i){let r=i.getLevel(n),o=i.getLevel(e,i.FATAL);return s=>{let a=s.level;a.isGreaterThanOrEqualTo(r)&&a.isLessThanOrEqualTo(o)&&t(s)}}function une(n,e,t,i){let r=t(n.appender);return lne(n.level,n.maxLevel,r,i)}EL.exports.configure=une});var LL=b((wke,RL)=>{var _L=Mt()("log4js:categoryFilter");function cne(n,e){return typeof n=="string"&&(n=[n]),t=>{_L(`Checking ${t.categoryName} against ${n}`),n.indexOf(t.categoryName)===-1&&(_L("Not excluded, sending to appender"),e(t))}}function hne(n,e,t){let i=t(n.appender);return cne(n.exclude,i)}RL.exports.configure=hne});var jL=b((Dke,IL)=>{var FL=Mt()("log4js:noLogFilter");function dne(n){return n.filter(t=>t!=null&&t!=="")}function gne(n,e){return t=>{FL(`Checking data: ${t.data} against filters: ${n}`),typeof n=="string"&&(n=[n]),n=dne(n);let i=new RegExp(n.join("|"),"i");(n.length===0||t.data.findIndex(r=>i.test(r))<0)&&(FL("Not excluded, sending to appender"),e(t))}}function fne(n,e,t){let i=t(n.appender);return gne(n.exclude,i)}IL.exports.configure=fne});var pt=b(MC=>{"use strict";MC.fromCallback=function(n){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")n.apply(this,e);else return new Promise((t,i)=>{n.call(this,...e,(r,o)=>r!=null?i(r):t(o))})},"name",{value:n.name})};MC.fromPromise=function(n){return Object.defineProperty(function(...e){let t=e[e.length-1];if(typeof t!="function")return n.apply(this,e);n.apply(this,e.slice(0,-1)).then(i=>t(null,i),t)},"name",{value:n.name})}});var OL=b((xke,AL)=>{var Ss=require("constants"),pne=process.cwd,Ep=null,mne=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Ep||(Ep=pne.call(process)),Ep};try{process.cwd()}catch{}typeof process.chdir=="function"&&(NC=process.chdir,process.chdir=function(n){Ep=null,NC.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,NC));var NC;AL.exports=bne;function bne(n){Ss.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(n),n.lutimes||t(n),n.chown=o(n.chown),n.fchown=o(n.fchown),n.lchown=o(n.lchown),n.chmod=i(n.chmod),n.fchmod=i(n.fchmod),n.lchmod=i(n.lchmod),n.chownSync=s(n.chownSync),n.fchownSync=s(n.fchownSync),n.lchownSync=s(n.lchownSync),n.chmodSync=r(n.chmodSync),n.fchmodSync=r(n.fchmodSync),n.lchmodSync=r(n.lchmodSync),n.stat=a(n.stat),n.fstat=a(n.fstat),n.lstat=a(n.lstat),n.statSync=l(n.statSync),n.fstatSync=l(n.fstatSync),n.lstatSync=l(n.lstatSync),n.lchmod||(n.lchmod=function(c,h,d){d&&process.nextTick(d)},n.lchmodSync=function(){}),n.lchown||(n.lchown=function(c,h,d,g){g&&process.nextTick(g)},n.lchownSync=function(){}),mne==="win32"&&(n.rename=function(c){return function(h,d,g){var f=Date.now(),p=0;c(h,d,function m(v){if(v&&(v.code==="EACCES"||v.code==="EPERM")&&Date.now()-f<6e4){setTimeout(function(){n.stat(d,function(w,D){w&&w.code==="ENOENT"?c(h,d,m):g(v)})},p),p<100&&(p+=10);return}g&&g(v)})}}(n.rename)),n.read=function(c){function h(d,g,f,p,m,v){var w;if(v&&typeof v=="function"){var D=0;w=function(S,L,j){if(S&&S.code==="EAGAIN"&&D<10)return D++,c.call(n,d,g,f,p,m,w);v.apply(this,arguments)}}return c.call(n,d,g,f,p,m,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,c),h}(n.read),n.readSync=function(c){return function(h,d,g,f,p){for(var m=0;;)try{return c.call(n,h,d,g,f,p)}catch(v){if(v.code==="EAGAIN"&&m<10){m++;continue}throw v}}}(n.readSync);function e(c){c.lchmod=function(h,d,g){c.open(h,Ss.O_WRONLY|Ss.O_SYMLINK,d,function(f,p){if(f){g&&g(f);return}c.fchmod(p,d,function(m){c.close(p,function(v){g&&g(m||v)})})})},c.lchmodSync=function(h,d){var g=c.openSync(h,Ss.O_WRONLY|Ss.O_SYMLINK,d),f=!0,p;try{p=c.fchmodSync(g,d),f=!1}finally{if(f)try{c.closeSync(g)}catch{}else c.closeSync(g)}return p}}function t(c){Ss.hasOwnProperty("O_SYMLINK")?(c.lutimes=function(h,d,g,f){c.open(h,Ss.O_SYMLINK,function(p,m){if(p){f&&f(p);return}c.futimes(m,d,g,function(v){c.close(m,function(w){f&&f(v||w)})})})},c.lutimesSync=function(h,d,g){var f=c.openSync(h,Ss.O_SYMLINK),p,m=!0;try{p=c.futimesSync(f,d,g),m=!1}finally{if(m)try{c.closeSync(f)}catch{}else c.closeSync(f)}return p}):(c.lutimes=function(h,d,g,f){f&&process.nextTick(f)},c.lutimesSync=function(){})}function i(c){return c&&function(h,d,g){return c.call(n,h,d,function(f){u(f)&&(f=null),g&&g.apply(this,arguments)})}}function r(c){return c&&function(h,d){try{return c.call(n,h,d)}catch(g){if(!u(g))throw g}}}function o(c){return c&&function(h,d,g,f){return c.call(n,h,d,g,function(p){u(p)&&(p=null),f&&f.apply(this,arguments)})}}function s(c){return c&&function(h,d,g){try{return c.call(n,h,d,g)}catch(f){if(!u(f))throw f}}}function a(c){return c&&function(h,d,g){typeof d=="function"&&(g=d,d=null);function f(p,m){m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),g&&g.apply(this,arguments)}return d?c.call(n,h,d,f):c.call(n,h,f)}}function l(c){return c&&function(h,d){var g=d?c.call(n,h,d):c.call(n,h);return g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296),g}}function u(c){if(!c||c.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var BL=b((Ske,NL)=>{var ML=require("stream").Stream;NL.exports=yne;function yne(n){return{ReadStream:e,WriteStream:t};function e(i,r){if(!(this instanceof e))return new e(i,r);ML.call(this);var o=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var s=Object.keys(r),a=0,l=s.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}n.open(this.path,this.flags,this.mode,function(c,h){if(c){o.emit("error",c),o.readable=!1;return}o.fd=h,o.emit("open",h),o._read()})}function t(i,r){if(!(this instanceof t))return new t(i,r);ML.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var o=Object.keys(r),s=0,a=o.length;s= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var qL=b((Tke,HL)=>{"use strict";HL.exports=wne;var vne=Object.getPrototypeOf||function(n){return n.__proto__};function wne(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var e={__proto__:vne(n)};else var e=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}});var Ke=b((kke,HC)=>{var pi=require("fs"),Dne=OL(),Cne=BL(),xne=qL(),Pp=require("util"),mr,_p;typeof Symbol=="function"&&typeof Symbol.for=="function"?(mr=Symbol.for("graceful-fs.queue"),_p=Symbol.for("graceful-fs.previous")):(mr="___graceful-fs.queue",_p="___graceful-fs.previous");function Sne(){}function WL(n,e){Object.defineProperty(n,mr,{get:function(){return e}})}var Gh=Sne;Pp.debuglog?Gh=Pp.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Gh=function(){var n=Pp.format.apply(Pp,arguments);n="GFS4: "+n.split(/\n/).join(` -GFS4: `),console.error(n)});pi[mr]||(YL=global[mr]||[],WL(pi,YL),pi.close=function(n){function e(t,i){return n.call(pi,t,function(r){r||Ts(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,_p,{value:n}),e}(pi.close),pi.closeSync=function(n){function e(t){n.apply(pi,arguments),Ts()}return Object.defineProperty(e,_p,{value:n}),e}(pi.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Gh(pi[mr]),require("assert").equal(pi[mr].length,0)}));var YL;global[mr]||WL(global,pi[mr]);HC.exports=BC(xne(pi));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!pi.__patched&&(HC.exports=BC(pi),pi.__patched=!0);function BC(n){Dne(n),n.gracefulify=BC,n.createReadStream=L,n.createWriteStream=j;var e=n.readFile;n.readFile=t;function t(A,M,F){return typeof M=="function"&&(F=M,M=null),N(A,M,F);function N(Z,z,ae){return e(Z,z,function(je){je&&(je.code==="EMFILE"||je.code==="ENFILE")?vu([N,[Z,z,ae]]):(typeof ae=="function"&&ae.apply(this,arguments),Ts())})}}var i=n.writeFile;n.writeFile=r;function r(A,M,F,N){return typeof F=="function"&&(N=F,F=null),Z(A,M,F,N);function Z(z,ae,je,Re){return i(z,ae,je,function(et){et&&(et.code==="EMFILE"||et.code==="ENFILE")?vu([Z,[z,ae,je,Re]]):(typeof Re=="function"&&Re.apply(this,arguments),Ts())})}}var o=n.appendFile;o&&(n.appendFile=s);function s(A,M,F,N){return typeof F=="function"&&(N=F,F=null),Z(A,M,F,N);function Z(z,ae,je,Re){return o(z,ae,je,function(et){et&&(et.code==="EMFILE"||et.code==="ENFILE")?vu([Z,[z,ae,je,Re]]):(typeof Re=="function"&&Re.apply(this,arguments),Ts())})}}var a=n.copyFile;a&&(n.copyFile=l);function l(A,M,F,N){return typeof F=="function"&&(N=F,F=0),a(A,M,F,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?vu([a,[A,M,F,N]]):(typeof N=="function"&&N.apply(this,arguments),Ts())})}var u=n.readdir;n.readdir=c;function c(A,M,F){var N=[A];return typeof M!="function"?N.push(M):F=M,N.push(Z),h(N);function Z(z,ae){ae&&ae.sort&&ae.sort(),z&&(z.code==="EMFILE"||z.code==="ENFILE")?vu([h,[N]]):(typeof F=="function"&&F.apply(this,arguments),Ts())}}function h(A){return u.apply(n,A)}if(process.version.substr(0,4)==="v0.8"){var d=Cne(n);v=d.ReadStream,D=d.WriteStream}var g=n.ReadStream;g&&(v.prototype=Object.create(g.prototype),v.prototype.open=w);var f=n.WriteStream;f&&(D.prototype=Object.create(f.prototype),D.prototype.open=S),Object.defineProperty(n,"ReadStream",{get:function(){return v},set:function(A){v=A},enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:function(){return D},set:function(A){D=A},enumerable:!0,configurable:!0});var p=v;Object.defineProperty(n,"FileReadStream",{get:function(){return p},set:function(A){p=A},enumerable:!0,configurable:!0});var m=D;Object.defineProperty(n,"FileWriteStream",{get:function(){return m},set:function(A){m=A},enumerable:!0,configurable:!0});function v(A,M){return this instanceof v?(g.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function w(){var A=this;W(A.path,A.flags,A.mode,function(M,F){M?(A.autoClose&&A.destroy(),A.emit("error",M)):(A.fd=F,A.emit("open",F),A.read())})}function D(A,M){return this instanceof D?(f.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}function S(){var A=this;W(A.path,A.flags,A.mode,function(M,F){M?(A.destroy(),A.emit("error",M)):(A.fd=F,A.emit("open",F))})}function L(A,M){return new n.ReadStream(A,M)}function j(A,M){return new n.WriteStream(A,M)}var I=n.open;n.open=W;function W(A,M,F,N){return typeof F=="function"&&(N=F,F=null),Z(A,M,F,N);function Z(z,ae,je,Re){return I(z,ae,je,function(et,_t){et&&(et.code==="EMFILE"||et.code==="ENFILE")?vu([Z,[z,ae,je,Re]]):(typeof Re=="function"&&Re.apply(this,arguments),Ts())})}}return n}function vu(n){Gh("ENQUEUE",n[0].name,n[1]),pi[mr].push(n)}function Ts(){var n=pi[mr].shift();n&&(Gh("RETRY",n[0].name,n[1]),n[0].apply(null,n[1]))}});var Xa=b(ks=>{"use strict";var ZL=pt().fromCallback,Pn=Ke(),Tne=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof Pn[n]=="function");Object.assign(ks,Pn);Tne.forEach(n=>{ks[n]=ZL(Pn[n])});ks.realpath.native=ZL(Pn.realpath.native);ks.exists=function(n,e){return typeof e=="function"?Pn.exists(n,e):new Promise(t=>Pn.exists(n,t))};ks.read=function(n,e,t,i,r,o){return typeof o=="function"?Pn.read(n,e,t,i,r,o):new Promise((s,a)=>{Pn.read(n,e,t,i,r,(l,u,c)=>{if(l)return a(l);s({bytesRead:u,buffer:c})})})};ks.write=function(n,e,...t){return typeof t[t.length-1]=="function"?Pn.write(n,e,...t):new Promise((i,r)=>{Pn.write(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffer:a})})})};typeof Pn.writev=="function"&&(ks.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?Pn.writev(n,e,...t):new Promise((i,r)=>{Pn.writev(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffers:a})})})})});var $L=b((Pke,JL)=>{"use strict";var kne=require("path");JL.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(kne.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var QL=b((_ke,qC)=>{"use strict";var XL=Xa(),{checkPath:UL}=$L(),GL=n=>{let e={mode:511};return typeof n=="number"?n:de(de({},e),n).mode};qC.exports.makeDir=async(n,e)=>(UL(n),XL.mkdir(n,{mode:GL(e),recursive:!0}));qC.exports.makeDirSync=(n,e)=>(UL(n),XL.mkdirSync(n,{mode:GL(e),recursive:!0}))});var br=b((Rke,KL)=>{"use strict";var Ene=pt().fromPromise,{makeDir:Pne,makeDirSync:YC}=QL(),WC=Ene(Pne);KL.exports={mkdirs:WC,mkdirsSync:YC,mkdirp:WC,mkdirpSync:YC,ensureDir:WC,ensureDirSync:YC}});var ZC=b((Lke,zL)=>{"use strict";var wu=Ke();function _ne(n,e,t,i){wu.open(n,"r+",(r,o)=>{if(r)return i(r);wu.futimes(o,e,t,s=>{wu.close(o,a=>{i&&i(s||a)})})})}function Rne(n,e,t){let i=wu.openSync(n,"r+");return wu.futimesSync(i,e,t),wu.closeSync(i)}zL.exports={utimesMillis:_ne,utimesMillisSync:Rne}});var Ua=b((Fke,tF)=>{"use strict";var Du=Xa(),si=require("path"),Lne=require("util");function Fne(n,e,t){let i=t.dereference?r=>Du.stat(r,{bigint:!0}):r=>Du.lstat(r,{bigint:!0});return Promise.all([i(n),i(e).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,o])=>({srcStat:r,destStat:o}))}function Ine(n,e,t){let i,r=t.dereference?s=>Du.statSync(s,{bigint:!0}):s=>Du.lstatSync(s,{bigint:!0}),o=r(n);try{i=r(e)}catch(s){if(s.code==="ENOENT")return{srcStat:o,destStat:null};throw s}return{srcStat:o,destStat:i}}function jne(n,e,t,i,r){Lne.callbackify(Fne)(n,e,i,(o,s)=>{if(o)return r(o);let{srcStat:a,destStat:l}=s;if(l){if(Qh(a,l)){let u=si.basename(n),c=si.basename(e);return t==="move"&&u!==c&&u.toLowerCase()===c.toLowerCase()?r(null,{srcStat:a,destStat:l,isChangingCase:!0}):r(new Error("Source and destination must not be the same."))}if(a.isDirectory()&&!l.isDirectory())return r(new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`));if(!a.isDirectory()&&l.isDirectory())return r(new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`))}return a.isDirectory()&&JC(n,e)?r(new Error(Rp(n,e,t))):r(null,{srcStat:a,destStat:l})})}function Ane(n,e,t,i){let{srcStat:r,destStat:o}=Ine(n,e,i);if(o){if(Qh(r,o)){let s=si.basename(n),a=si.basename(e);if(t==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:r,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(r.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!r.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(r.isDirectory()&&JC(n,e))throw new Error(Rp(n,e,t));return{srcStat:r,destStat:o}}function VL(n,e,t,i,r){let o=si.resolve(si.dirname(n)),s=si.resolve(si.dirname(t));if(s===o||s===si.parse(s).root)return r();Du.stat(s,{bigint:!0},(a,l)=>a?a.code==="ENOENT"?r():r(a):Qh(e,l)?r(new Error(Rp(n,t,i))):VL(n,e,s,i,r))}function eF(n,e,t,i){let r=si.resolve(si.dirname(n)),o=si.resolve(si.dirname(t));if(o===r||o===si.parse(o).root)return;let s;try{s=Du.statSync(o,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Qh(e,s))throw new Error(Rp(n,t,i));return eF(n,e,o,i)}function Qh(n,e){return e.ino&&e.dev&&e.ino===n.ino&&e.dev===n.dev}function JC(n,e){let t=si.resolve(n).split(si.sep).filter(r=>r),i=si.resolve(e).split(si.sep).filter(r=>r);return t.reduce((r,o,s)=>r&&i[s]===o,!0)}function Rp(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}tF.exports={checkPaths:jne,checkPathsSync:Ane,checkParentPaths:VL,checkParentPathsSync:eF,isSrcSubdir:JC,areIdentical:Qh}});var sF=b((Ike,oF)=>{"use strict";var xi=Ke(),Kh=require("path"),One=br().mkdirsSync,Mne=ZC().utimesMillisSync,zh=Ua();function Nne(n,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - - see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:i,destStat:r}=zh.checkPathsSync(n,e,"copy",t);return zh.checkParentPathsSync(n,i,e,"copy"),Bne(r,n,e,t)}function Bne(n,e,t,i){if(i.filter&&!i.filter(e,t))return;let r=Kh.dirname(t);return xi.existsSync(r)||One(r),iF(n,e,t,i)}function Hne(n,e,t,i){if(!(i.filter&&!i.filter(e,t)))return iF(n,e,t,i)}function iF(n,e,t,i){let o=(i.dereference?xi.statSync:xi.lstatSync)(e);if(o.isDirectory())return Xne(o,n,e,t,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return qne(o,n,e,t,i);if(o.isSymbolicLink())return Qne(n,e,t,i);throw o.isSocket()?new Error(`Cannot copy a socket file: ${e}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}function qne(n,e,t,i,r){return e?Yne(n,t,i,r):nF(n,t,i,r)}function Yne(n,e,t,i){if(i.overwrite)return xi.unlinkSync(t),nF(n,e,t,i);if(i.errorOnExist)throw new Error(`'${t}' already exists`)}function nF(n,e,t,i){return xi.copyFileSync(e,t),i.preserveTimestamps&&Wne(n.mode,e,t),$C(t,n.mode)}function Wne(n,e,t){return Zne(n)&&Jne(t,n),$ne(e,t)}function Zne(n){return(n&128)===0}function Jne(n,e){return $C(n,e|128)}function $C(n,e){return xi.chmodSync(n,e)}function $ne(n,e){let t=xi.statSync(n);return Mne(e,t.atime,t.mtime)}function Xne(n,e,t,i,r){return e?rF(t,i,r):Une(n.mode,t,i,r)}function Une(n,e,t,i){return xi.mkdirSync(t),rF(e,t,i),$C(t,n)}function rF(n,e,t){xi.readdirSync(n).forEach(i=>Gne(i,n,e,t))}function Gne(n,e,t,i){let r=Kh.join(e,n),o=Kh.join(t,n),{destStat:s}=zh.checkPathsSync(r,o,"copy",i);return Hne(s,r,o,i)}function Qne(n,e,t,i){let r=xi.readlinkSync(e);if(i.dereference&&(r=Kh.resolve(process.cwd(),r)),n){let o;try{o=xi.readlinkSync(t)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return xi.symlinkSync(r,t);throw s}if(i.dereference&&(o=Kh.resolve(process.cwd(),o)),zh.isSrcSubdir(r,o))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);if(xi.statSync(t).isDirectory()&&zh.isSrcSubdir(o,r))throw new Error(`Cannot overwrite '${o}' with '${r}'.`);return Kne(r,t)}else return xi.symlinkSync(r,t)}function Kne(n,e){return xi.unlinkSync(e),xi.symlinkSync(n,e)}oF.exports=Nne});var XC=b((jke,aF)=>{"use strict";aF.exports={copySync:sF()}});var Es=b((Ake,uF)=>{"use strict";var zne=pt().fromPromise,lF=Xa();function Vne(n){return lF.access(n).then(()=>!0).catch(()=>!1)}uF.exports={pathExists:zne(Vne),pathExistsSync:lF.existsSync}});var bF=b((Oke,mF)=>{"use strict";var rn=Ke(),Vh=require("path"),ere=br().mkdirs,tre=Es().pathExists,ire=ZC().utimesMillis,ed=Ua();function nre(n,e,t,i){typeof t=="function"&&!i?(i=t,t={}):typeof t=="function"&&(t={filter:t}),i=i||function(){},t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - - see https://github.com/jprichardson/node-fs-extra/issues/269`),ed.checkPaths(n,e,"copy",t,(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;ed.checkParentPaths(n,s,e,"copy",l=>l?i(l):t.filter?dF(cF,a,n,e,t,i):cF(a,n,e,t,i))})}function cF(n,e,t,i,r){let o=Vh.dirname(t);tre(o,(s,a)=>{if(s)return r(s);if(a)return Lp(n,e,t,i,r);ere(o,l=>l?r(l):Lp(n,e,t,i,r))})}function dF(n,e,t,i,r,o){Promise.resolve(r.filter(t,i)).then(s=>s?n(e,t,i,r,o):o(),s=>o(s))}function rre(n,e,t,i,r){return i.filter?dF(Lp,n,e,t,i,r):Lp(n,e,t,i,r)}function Lp(n,e,t,i,r){(i.dereference?rn.stat:rn.lstat)(e,(s,a)=>s?r(s):a.isDirectory()?hre(a,n,e,t,i,r):a.isFile()||a.isCharacterDevice()||a.isBlockDevice()?ore(a,n,e,t,i,r):a.isSymbolicLink()?fre(n,e,t,i,r):a.isSocket()?r(new Error(`Cannot copy a socket file: ${e}`)):a.isFIFO()?r(new Error(`Cannot copy a FIFO pipe: ${e}`)):r(new Error(`Unknown file: ${e}`)))}function ore(n,e,t,i,r,o){return e?sre(n,t,i,r,o):gF(n,t,i,r,o)}function sre(n,e,t,i,r){if(i.overwrite)rn.unlink(t,o=>o?r(o):gF(n,e,t,i,r));else return i.errorOnExist?r(new Error(`'${t}' already exists`)):r()}function gF(n,e,t,i,r){rn.copyFile(e,t,o=>o?r(o):i.preserveTimestamps?are(n.mode,e,t,r):Fp(t,n.mode,r))}function are(n,e,t,i){return lre(n)?ure(t,n,r=>r?i(r):hF(n,e,t,i)):hF(n,e,t,i)}function lre(n){return(n&128)===0}function ure(n,e,t){return Fp(n,e|128,t)}function hF(n,e,t,i){cre(e,t,r=>r?i(r):Fp(t,n,i))}function Fp(n,e,t){return rn.chmod(n,e,t)}function cre(n,e,t){rn.stat(n,(i,r)=>i?t(i):ire(e,r.atime,r.mtime,t))}function hre(n,e,t,i,r,o){return e?fF(t,i,r,o):dre(n.mode,t,i,r,o)}function dre(n,e,t,i,r){rn.mkdir(t,o=>{if(o)return r(o);fF(e,t,i,s=>s?r(s):Fp(t,n,r))})}function fF(n,e,t,i){rn.readdir(n,(r,o)=>r?i(r):pF(o,n,e,t,i))}function pF(n,e,t,i,r){let o=n.pop();return o?gre(n,o,e,t,i,r):r()}function gre(n,e,t,i,r,o){let s=Vh.join(t,e),a=Vh.join(i,e);ed.checkPaths(s,a,"copy",r,(l,u)=>{if(l)return o(l);let{destStat:c}=u;rre(c,s,a,r,h=>h?o(h):pF(n,t,i,r,o))})}function fre(n,e,t,i,r){rn.readlink(e,(o,s)=>{if(o)return r(o);if(i.dereference&&(s=Vh.resolve(process.cwd(),s)),n)rn.readlink(t,(a,l)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?rn.symlink(s,t,r):r(a):(i.dereference&&(l=Vh.resolve(process.cwd(),l)),ed.isSrcSubdir(s,l)?r(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${l}'.`)):n.isDirectory()&&ed.isSrcSubdir(l,s)?r(new Error(`Cannot overwrite '${l}' with '${s}'.`)):pre(s,t,r)));else return rn.symlink(s,t,r)})}function pre(n,e,t){rn.unlink(e,i=>i?t(i):rn.symlink(n,e,t))}mF.exports=nre});var UC=b((Mke,yF)=>{"use strict";var mre=pt().fromCallback;yF.exports={copy:mre(bF())}});var EF=b((Nke,kF)=>{"use strict";var vF=Ke(),xF=require("path"),at=require("assert"),td=process.platform==="win32";function SF(n){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{n[t]=n[t]||vF[t],t=t+"Sync",n[t]=n[t]||vF[t]}),n.maxBusyTries=n.maxBusyTries||3}function GC(n,e,t){let i=0;typeof e=="function"&&(t=e,e={}),at(n,"rimraf: missing path"),at.strictEqual(typeof n,"string","rimraf: path should be a string"),at.strictEqual(typeof t,"function","rimraf: callback function required"),at(e,"rimraf: invalid options argument provided"),at.strictEqual(typeof e,"object","rimraf: options should be object"),SF(e),wF(n,e,function r(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&iwF(n,e,r),s)}o.code==="ENOENT"&&(o=null)}t(o)})}function wF(n,e,t){at(n),at(e),at(typeof t=="function"),e.lstat(n,(i,r)=>{if(i&&i.code==="ENOENT")return t(null);if(i&&i.code==="EPERM"&&td)return DF(n,e,i,t);if(r&&r.isDirectory())return Ip(n,e,i,t);e.unlink(n,o=>{if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return td?DF(n,e,o,t):Ip(n,e,o,t);if(o.code==="EISDIR")return Ip(n,e,o,t)}return t(o)})})}function DF(n,e,t,i){at(n),at(e),at(typeof i=="function"),e.chmod(n,438,r=>{r?i(r.code==="ENOENT"?null:t):e.stat(n,(o,s)=>{o?i(o.code==="ENOENT"?null:t):s.isDirectory()?Ip(n,e,t,i):e.unlink(n,i)})})}function CF(n,e,t){let i;at(n),at(e);try{e.chmodSync(n,438)}catch(r){if(r.code==="ENOENT")return;throw t}try{i=e.statSync(n)}catch(r){if(r.code==="ENOENT")return;throw t}i.isDirectory()?jp(n,e,t):e.unlinkSync(n)}function Ip(n,e,t,i){at(n),at(e),at(typeof i=="function"),e.rmdir(n,r=>{r&&(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")?bre(n,e,i):r&&r.code==="ENOTDIR"?i(t):i(r)})}function bre(n,e,t){at(n),at(e),at(typeof t=="function"),e.readdir(n,(i,r)=>{if(i)return t(i);let o=r.length,s;if(o===0)return e.rmdir(n,t);r.forEach(a=>{GC(xF.join(n,a),e,l=>{if(!s){if(l)return t(s=l);--o===0&&e.rmdir(n,t)}})})})}function TF(n,e){let t;e=e||{},SF(e),at(n,"rimraf: missing path"),at.strictEqual(typeof n,"string","rimraf: path should be a string"),at(e,"rimraf: missing options"),at.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(n)}catch(i){if(i.code==="ENOENT")return;i.code==="EPERM"&&td&&CF(n,e,i)}try{t&&t.isDirectory()?jp(n,e,null):e.unlinkSync(n)}catch(i){if(i.code==="ENOENT")return;if(i.code==="EPERM")return td?CF(n,e,i):jp(n,e,i);if(i.code!=="EISDIR")throw i;jp(n,e,i)}}function jp(n,e,t){at(n),at(e);try{e.rmdirSync(n)}catch(i){if(i.code==="ENOTDIR")throw t;if(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")yre(n,e);else if(i.code!=="ENOENT")throw i}}function yre(n,e){if(at(n),at(e),e.readdirSync(n).forEach(t=>TF(xF.join(n,t),e)),td){let t=Date.now();do try{return e.rmdirSync(n,e)}catch{}while(Date.now()-t<500)}else return e.rmdirSync(n,e)}kF.exports=GC;GC.sync=TF});var id=b((Bke,_F)=>{"use strict";var Ap=Ke(),vre=pt().fromCallback,PF=EF();function wre(n,e){if(Ap.rm)return Ap.rm(n,{recursive:!0,force:!0},e);PF(n,e)}function Dre(n){if(Ap.rmSync)return Ap.rmSync(n,{recursive:!0,force:!0});PF.sync(n)}_F.exports={remove:vre(wre),removeSync:Dre}});var MF=b((Hke,OF)=>{"use strict";var Cre=pt().fromPromise,FF=Xa(),IF=require("path"),jF=br(),AF=id(),RF=Cre(async function(e){let t;try{t=await FF.readdir(e)}catch{return jF.mkdirs(e)}return Promise.all(t.map(i=>AF.remove(IF.join(e,i))))});function LF(n){let e;try{e=FF.readdirSync(n)}catch{return jF.mkdirsSync(n)}e.forEach(t=>{t=IF.join(n,t),AF.removeSync(t)})}OF.exports={emptyDirSync:LF,emptydirSync:LF,emptyDir:RF,emptydir:RF}});var qF=b((qke,HF)=>{"use strict";var xre=pt().fromCallback,NF=require("path"),Ps=Ke(),BF=br();function Sre(n,e){function t(){Ps.writeFile(n,"",i=>{if(i)return e(i);e()})}Ps.stat(n,(i,r)=>{if(!i&&r.isFile())return e();let o=NF.dirname(n);Ps.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?BF.mkdirs(o,l=>{if(l)return e(l);t()}):e(s);a.isDirectory()?t():Ps.readdir(o,l=>{if(l)return e(l)})})})}function Tre(n){let e;try{e=Ps.statSync(n)}catch{}if(e&&e.isFile())return;let t=NF.dirname(n);try{Ps.statSync(t).isDirectory()||Ps.readdirSync(t)}catch(i){if(i&&i.code==="ENOENT")BF.mkdirsSync(t);else throw i}Ps.writeFileSync(n,"")}HF.exports={createFile:xre(Sre),createFileSync:Tre}});var $F=b((Yke,JF)=>{"use strict";var kre=pt().fromCallback,YF=require("path"),_s=Ke(),WF=br(),Ere=Es().pathExists,{areIdentical:ZF}=Ua();function Pre(n,e,t){function i(r,o){_s.link(r,o,s=>{if(s)return t(s);t(null)})}_s.lstat(e,(r,o)=>{_s.lstat(n,(s,a)=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),t(s);if(o&&ZF(a,o))return t(null);let l=YF.dirname(e);Ere(l,(u,c)=>{if(u)return t(u);if(c)return i(n,e);WF.mkdirs(l,h=>{if(h)return t(h);i(n,e)})})})})}function _re(n,e){let t;try{t=_s.lstatSync(e)}catch{}try{let o=_s.lstatSync(n);if(t&&ZF(o,t))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=YF.dirname(e);return _s.existsSync(i)||WF.mkdirsSync(i),_s.linkSync(n,e)}JF.exports={createLink:kre(Pre),createLinkSync:_re}});var UF=b((Wke,XF)=>{"use strict";var Rs=require("path"),nd=Ke(),Rre=Es().pathExists;function Lre(n,e,t){if(Rs.isAbsolute(n))return nd.lstat(n,i=>i?(i.message=i.message.replace("lstat","ensureSymlink"),t(i)):t(null,{toCwd:n,toDst:n}));{let i=Rs.dirname(e),r=Rs.join(i,n);return Rre(r,(o,s)=>o?t(o):s?t(null,{toCwd:r,toDst:n}):nd.lstat(n,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),t(a)):t(null,{toCwd:n,toDst:Rs.relative(i,n)})))}}function Fre(n,e){let t;if(Rs.isAbsolute(n)){if(t=nd.existsSync(n),!t)throw new Error("absolute srcpath does not exist");return{toCwd:n,toDst:n}}else{let i=Rs.dirname(e),r=Rs.join(i,n);if(t=nd.existsSync(r),t)return{toCwd:r,toDst:n};if(t=nd.existsSync(n),!t)throw new Error("relative srcpath does not exist");return{toCwd:n,toDst:Rs.relative(i,n)}}}XF.exports={symlinkPaths:Lre,symlinkPathsSync:Fre}});var KF=b((Zke,QF)=>{"use strict";var GF=Ke();function Ire(n,e,t){if(t=typeof e=="function"?e:t,e=typeof e=="function"?!1:e,e)return t(null,e);GF.lstat(n,(i,r)=>{if(i)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)})}function jre(n,e){let t;if(e)return e;try{t=GF.lstatSync(n)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}QF.exports={symlinkType:Ire,symlinkTypeSync:jre}});var oI=b((Jke,rI)=>{"use strict";var Are=pt().fromCallback,VF=require("path"),yr=Xa(),eI=br(),Ore=eI.mkdirs,Mre=eI.mkdirsSync,tI=UF(),Nre=tI.symlinkPaths,Bre=tI.symlinkPathsSync,iI=KF(),Hre=iI.symlinkType,qre=iI.symlinkTypeSync,Yre=Es().pathExists,{areIdentical:nI}=Ua();function Wre(n,e,t,i){i=typeof t=="function"?t:i,t=typeof t=="function"?!1:t,yr.lstat(e,(r,o)=>{!r&&o.isSymbolicLink()?Promise.all([yr.stat(n),yr.stat(e)]).then(([s,a])=>{if(nI(s,a))return i(null);zF(n,e,t,i)}):zF(n,e,t,i)})}function zF(n,e,t,i){Nre(n,e,(r,o)=>{if(r)return i(r);n=o.toDst,Hre(o.toCwd,t,(s,a)=>{if(s)return i(s);let l=VF.dirname(e);Yre(l,(u,c)=>{if(u)return i(u);if(c)return yr.symlink(n,e,a,i);Ore(l,h=>{if(h)return i(h);yr.symlink(n,e,a,i)})})})})}function Zre(n,e,t){let i;try{i=yr.lstatSync(e)}catch{}if(i&&i.isSymbolicLink()){let a=yr.statSync(n),l=yr.statSync(e);if(nI(a,l))return}let r=Bre(n,e);n=r.toDst,t=qre(r.toCwd,t);let o=VF.dirname(e);return yr.existsSync(o)||Mre(o),yr.symlinkSync(n,e,t)}rI.exports={createSymlink:Are(Wre),createSymlinkSync:Zre}});var aI=b(($ke,sI)=>{"use strict";var Op=qF(),Mp=$F(),Np=oI();sI.exports={createFile:Op.createFile,createFileSync:Op.createFileSync,ensureFile:Op.createFile,ensureFileSync:Op.createFileSync,createLink:Mp.createLink,createLinkSync:Mp.createLinkSync,ensureLink:Mp.createLink,ensureLinkSync:Mp.createLinkSync,createSymlink:Np.createSymlink,createSymlinkSync:Np.createSymlinkSync,ensureSymlink:Np.createSymlink,ensureSymlinkSync:Np.createSymlinkSync}});var Cu=b((Xke,lI)=>{function Jre(n,{EOL:e=` -`,finalEOL:t=!0,replacer:i=null,spaces:r}={}){let o=t?e:"";return JSON.stringify(n,i,r).replace(/\n/g,e)+o}function $re(n){return Buffer.isBuffer(n)&&(n=n.toString("utf8")),n.replace(/^\uFEFF/,"")}lI.exports={stringify:Jre,stripBom:$re}});var QC=b((Uke,hI)=>{var xu;try{xu=Ke()}catch{xu=require("fs")}var Bp=pt(),{stringify:uI,stripBom:cI}=Cu();async function Xre(n,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||xu,i="throws"in e?e.throws:!0,r=await Bp.fromCallback(t.readFile)(n,e);r=cI(r);let o;try{o=JSON.parse(r,e?e.reviver:null)}catch(s){if(i)throw s.message=`${n}: ${s.message}`,s;return null}return o}var Ure=Bp.fromPromise(Xre);function Gre(n,e={}){typeof e=="string"&&(e={encoding:e});let t=e.fs||xu,i="throws"in e?e.throws:!0;try{let r=t.readFileSync(n,e);return r=cI(r),JSON.parse(r,e.reviver)}catch(r){if(i)throw r.message=`${n}: ${r.message}`,r;return null}}async function Qre(n,e,t={}){let i=t.fs||xu,r=uI(e,t);await Bp.fromCallback(i.writeFile)(n,r,t)}var Kre=Bp.fromPromise(Qre);function zre(n,e,t={}){let i=t.fs||xu,r=uI(e,t);return i.writeFileSync(n,r,t)}var Vre={readFile:Ure,readFileSync:Gre,writeFile:Kre,writeFileSync:zre};hI.exports=Vre});var gI=b((Gke,dI)=>{"use strict";var Hp=QC();dI.exports={readJson:Hp.readFile,readJsonSync:Hp.readFileSync,writeJson:Hp.writeFile,writeJsonSync:Hp.writeFileSync}});var qp=b((Qke,mI)=>{"use strict";var eoe=pt().fromCallback,rd=Ke(),fI=require("path"),pI=br(),toe=Es().pathExists;function ioe(n,e,t,i){typeof t=="function"&&(i=t,t="utf8");let r=fI.dirname(n);toe(r,(o,s)=>{if(o)return i(o);if(s)return rd.writeFile(n,e,t,i);pI.mkdirs(r,a=>{if(a)return i(a);rd.writeFile(n,e,t,i)})})}function noe(n,...e){let t=fI.dirname(n);if(rd.existsSync(t))return rd.writeFileSync(n,...e);pI.mkdirsSync(t),rd.writeFileSync(n,...e)}mI.exports={outputFile:eoe(ioe),outputFileSync:noe}});var yI=b((Kke,bI)=>{"use strict";var{stringify:roe}=Cu(),{outputFile:ooe}=qp();async function soe(n,e,t={}){let i=roe(e,t);await ooe(n,i,t)}bI.exports=soe});var wI=b((zke,vI)=>{"use strict";var{stringify:aoe}=Cu(),{outputFileSync:loe}=qp();function uoe(n,e,t){let i=aoe(e,t);loe(n,i,t)}vI.exports=uoe});var CI=b((Vke,DI)=>{"use strict";var coe=pt().fromPromise,qi=gI();qi.outputJson=coe(yI());qi.outputJsonSync=wI();qi.outputJSON=qi.outputJson;qi.outputJSONSync=qi.outputJsonSync;qi.writeJSON=qi.writeJson;qi.writeJSONSync=qi.writeJsonSync;qi.readJSON=qi.readJson;qi.readJSONSync=qi.readJsonSync;DI.exports=qi});var EI=b((eEe,kI)=>{"use strict";var SI=Ke(),zC=require("path"),hoe=XC().copySync,TI=id().removeSync,doe=br().mkdirpSync,xI=Ua();function goe(n,e,t){t=t||{};let i=t.overwrite||t.clobber||!1,{srcStat:r,isChangingCase:o=!1}=xI.checkPathsSync(n,e,"move",t);return xI.checkParentPathsSync(n,r,e,"move"),foe(e)||doe(zC.dirname(e)),poe(n,e,i,o)}function foe(n){let e=zC.dirname(n);return zC.parse(e).root===e}function poe(n,e,t,i){if(i)return KC(n,e,t);if(t)return TI(e),KC(n,e,t);if(SI.existsSync(e))throw new Error("dest already exists.");return KC(n,e,t)}function KC(n,e,t){try{SI.renameSync(n,e)}catch(i){if(i.code!=="EXDEV")throw i;return moe(n,e,t)}}function moe(n,e,t){return hoe(n,e,{overwrite:t,errorOnExist:!0}),TI(n)}kI.exports=goe});var _I=b((tEe,PI)=>{"use strict";PI.exports={moveSync:EI()}});var jI=b((iEe,II)=>{"use strict";var boe=Ke(),ex=require("path"),yoe=UC().copy,FI=id().remove,voe=br().mkdirp,woe=Es().pathExists,RI=Ua();function Doe(n,e,t,i){typeof t=="function"&&(i=t,t={});let r=t.overwrite||t.clobber||!1;RI.checkPaths(n,e,"move",t,(o,s)=>{if(o)return i(o);let{srcStat:a,isChangingCase:l=!1}=s;RI.checkParentPaths(n,a,e,"move",u=>{if(u)return i(u);if(Coe(e))return LI(n,e,r,l,i);voe(ex.dirname(e),c=>c?i(c):LI(n,e,r,l,i))})})}function Coe(n){let e=ex.dirname(n);return ex.parse(e).root===e}function LI(n,e,t,i,r){if(i)return VC(n,e,t,r);if(t)return FI(e,o=>o?r(o):VC(n,e,t,r));woe(e,(o,s)=>o?r(o):s?r(new Error("dest already exists.")):VC(n,e,t,r))}function VC(n,e,t,i){boe.rename(n,e,r=>r?r.code!=="EXDEV"?i(r):xoe(n,e,t,i):i())}function xoe(n,e,t,i){yoe(n,e,{overwrite:t,errorOnExist:!0},o=>o?i(o):FI(n,i))}II.exports=Doe});var OI=b((nEe,AI)=>{"use strict";var Soe=pt().fromCallback;AI.exports={move:Soe(jI())}});var tx=b((rEe,MI)=>{"use strict";MI.exports=de(de(de(de(de(de(de(de(de(de(de(de({},Xa()),XC()),UC()),MF()),aI()),CI()),br()),_I()),OI()),qp()),Es()),id())});var BI=b((oEe,NI)=>{NI.exports=()=>new Date});var qI=b((sEe,HI)=>{var Toe=Mt()("streamroller:fileNameFormatter"),koe=require("path"),Eoe=".gz",Poe=".";HI.exports=({file:n,keepFileExt:e,needsIndex:t,alwaysIncludeDate:i,compress:r,fileNameSep:o})=>{let s=o||Poe,a=koe.join(n.dir,n.name),l=g=>g+n.ext,u=(g,f,p)=>(t||!p)&&f?g+s+f:g,c=(g,f,p)=>(f>0||i)&&p?g+s+p:g,h=(g,f)=>f&&r?g+Eoe:g,d=e?[c,u,l,h]:[l,c,u,h];return({date:g,index:f})=>(Toe(`_formatFileName: date=${g}, index=${f}`),d.reduce((p,m)=>m(p,f,g),a))}});var JI=b((aEe,ZI)=>{var Ga=Mt()("streamroller:fileNameParser"),YI=".gz",WI=Cp(),_oe=".";ZI.exports=({file:n,keepFileExt:e,pattern:t,fileNameSep:i})=>{let r=i||_oe,o=(d,g)=>d.endsWith(YI)?(Ga("it is gzipped"),g.isCompressed=!0,d.slice(0,-1*YI.length)):d,s="__NOT_MATCHING__",h=[o,e?d=>d.startsWith(n.name)&&d.endsWith(n.ext)?(Ga("it starts and ends with the right things"),d.slice(n.name.length+1,-1*n.ext.length)):s:d=>d.startsWith(n.base)?(Ga("it starts with the right things"),d.slice(n.base.length+1)):s,t?(d,g)=>{let f=d.split(r),p=f[f.length-1];Ga("items: ",f,", indexStr: ",p);let m=d;p!==void 0&&p.match(/^\d+$/)?(m=d.slice(0,-1*(p.length+1)),Ga(`dateStr is ${m}`),t&&!m&&(m=p,p="0")):p="0";try{let v=WI.parse(t,m,new Date(0,0));return WI.asString(t,v)!==m?d:(g.index=parseInt(p,10),g.date=m,g.timestamp=v.getTime(),"")}catch(v){return Ga(`Problem parsing ${m} as ${t}, error was: `,v),d}}:(d,g)=>d.match(/^\d+$/)?(Ga("it has an index"),g.index=parseInt(d,10),""):d];return d=>{let g={filename:d,index:0,isCompressed:!1};return h.reduce((p,m)=>m(p,g),d)?null:g}}});var XI=b((lEe,$I)=>{var Fs=Mt()("streamroller:moveAndMaybeCompressFile"),Ls=tx(),Roe=require("zlib"),Loe=function(n){let e={mode:parseInt("0600",8),compress:!1},t=Object.assign({},e,n);return Fs(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(t)}`),t},Foe=async(n,e,t)=>{if(t=Loe(t),n===e){Fs("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ls.pathExists(n))if(Fs(`moveAndMaybeCompressFile: moving file from ${n} to ${e} ${t.compress?"with":"without"} compress`),t.compress)await new Promise((i,r)=>{Ls.createReadStream(n).pipe(Roe.createGzip()).pipe(Ls.createWriteStream(e,{mode:t.mode})).on("finish",()=>{Fs(`moveAndMaybeCompressFile: finished compressing ${e}, deleting ${n}`),Ls.unlink(n).then(i).catch(()=>{Fs(`Deleting ${n} failed, truncating instead`),Ls.truncate(n).then(i).catch(r)})})});else{Fs(`moveAndMaybeCompressFile: deleting file=${e}, renaming ${n} to ${e}`);try{await Ls.move(n,e,{overwrite:!0})}catch(i){Fs(`moveAndMaybeCompressFile: error moving ${n} to ${e}`,i),Fs("Trying copy+truncate instead"),await Ls.copy(n,e,{overwrite:!0}),await Ls.truncate(n)}}};$I.exports=Foe});var Jp=b((uEe,GI)=>{var _n=Mt()("streamroller:RollingFileWriteStream"),od=tx(),Yp=require("path"),Wp=BI(),Zp=Cp(),{Writable:Ioe}=require("stream"),joe=qI(),Aoe=JI(),Ooe=XI(),UI=class extends Ioe{constructor(e,t){_n(`constructor: creating RollingFileWriteStream. path=${e}`);super(t);this.options=this._parseOption(t),this.fileObject=Yp.parse(e),this.fileObject.dir===""&&(this.fileObject=Yp.parse(Yp.join(process.cwd(),e))),this.fileFormatter=joe({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(i.numBackups||i.numBackups===0){if(i.numBackups<0)throw new Error(`options.numBackups (${i.numBackups}) should be >= 0`);if(i.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${i.numBackups}) should be < Number.MAX_SAFE_INTEGER`);i.numToKeep=i.numBackups+1}else if(i.numToKeep<=0)throw new Error(`options.numToKeep (${i.numToKeep}) should be > 0`);return _n(`_parseOption: creating stream with option=${JSON.stringify(i)}`),i}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,i){this._shouldRoll().then(()=>{_n(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,r=>{this.state.currentSize+=e.length,i(r)})})}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(_n(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==Zp(this.options.pattern,Wp())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return _n("_roll: closing the current stream"),new Promise((e,t)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(e).catch(t)})})}async _moveOldFiles(){let e=await this._getExistingFiles(),t=this.state.currentDate?e.filter(i=>i.date===this.state.currentDate):e;for(let i=t.length;i>=0;i--){_n(`_moveOldFiles: i = ${i}`);let r=this.fileFormatter({date:this.state.currentDate,index:i}),o=this.fileFormatter({date:this.state.currentDate,index:i+1}),s={compress:this.options.compress&&i===0,mode:this.options.mode};await Ooe(r,o,s)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?Zp(this.options.pattern,Wp()):null,_n(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((i,r)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(i).catch(r)})})}async _getExistingFiles(){let e=await od.readdir(this.fileObject.dir).catch(()=>[]);_n(`_getExistingFiles: files=${e}`);let t=e.map(r=>this.fileNameParser(r)).filter(r=>r),i=r=>(r.timestamp?r.timestamp:Wp().getTime())-r.index;return t.sort((r,o)=>i(r)-i(o)),t}_renewWriteStream(){od.ensureDirSync(this.fileObject.dir);let e=this.fileFormatter({date:this.state.currentDate,index:0}),t={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};this.currentFileStream=od.createWriteStream(e,t),this.currentFileStream.on("error",i=>{this.emit("error",i)})}async _clean(){let e=await this._getExistingFiles();if(_n(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),_n("_clean: existing files are: ",e),this._tooManyFiles(e.length)){let t=e.slice(0,e.length-this.options.numToKeep).map(i=>Yp.format({dir:this.fileObject.dir,base:i.filename}));await Moe(t)}}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}},Moe=n=>(_n(`deleteFiles: files to delete: ${n}`),Promise.all(n.map(e=>od.unlink(e).catch(t=>{_n(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))));GI.exports=UI});var zI=b((cEe,KI)=>{var Noe=Jp(),QI=class extends Noe{constructor(e,t,i,r){r||(r={}),t&&(r.maxSize=t),!r.numBackups&&r.numBackups!==0&&(!i&&i!==0&&(i=1),r.numBackups=i);super(e,r);this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};KI.exports=QI});var tj=b((hEe,ej)=>{var Boe=Jp(),VI=class extends Boe{constructor(e,t,i){t&&typeof t=="object"&&(i=t,t=null),i||(i={}),t||(t="yyyy-MM-dd"),i.pattern=t,!i.numBackups&&i.numBackups!==0?(!i.daysToKeep&&i.daysToKeep!==0?i.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","StreamRoller0001"),i.numBackups=i.daysToKeep):i.daysToKeep=i.numBackups;super(e,i);this.mode=this.options.mode}get theStream(){return this.currentFileStream}};ej.exports=VI});var ix=b((dEe,ij)=>{ij.exports={RollingFileWriteStream:Jp(),RollingFileStream:zI(),DateRollingFileStream:tj()}});var aj=b((gEe,sj)=>{var nj=Mt()("log4js:file"),Hoe=require("path"),qoe=ix(),Yoe=require("os"),Woe=Yoe.EOL,$p=!1,Xp=new Set;function rj(){Xp.forEach(n=>{n.sighupHandler()})}function oj(n,e,t,i){let r=new qoe.RollingFileStream(n,e,t,i);return r.on("error",o=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",n,o)}),r.on("drain",()=>{process.emit("log4js:pause",!1)}),r}function Zoe(n,e,t,i,r,o){n=Hoe.normalize(n),i=!i&&i!==0?5:i,nj("Creating file appender (",n,", ",t,", ",i,", ",r,", ",o,")");let s=oj(n,t,i,r),a=function(l){if(!!s.writable){if(r.removeColor===!0){let u=/\x1b[[0-9;]*m/g;l.data=l.data.map(c=>typeof c=="string"?c.replace(u,""):c)}s.write(e(l,o)+Woe,"utf8")||process.emit("log4js:pause",!0)}};return a.reopen=function(){s.end(()=>{s=oj(n,t,i,r)})},a.sighupHandler=function(){nj("SIGHUP handler called."),a.reopen()},a.shutdown=function(l){Xp.delete(a),Xp.size===0&&$p&&(process.removeListener("SIGHUP",rj),$p=!1),s.end("","utf-8",l)},Xp.add(a),$p||(process.on("SIGHUP",rj),$p=!0),a}function Joe(n,e){let t=e.basicLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),n.mode=n.mode||384,Zoe(n.filename,t,n.maxLogSize,n.backups,n,n.timezoneOffset)}sj.exports.configure=Joe});var uj=b((fEe,lj)=>{var $oe=ix(),Xoe=require("os"),Uoe=Xoe.EOL;function Goe(n,e,t){let i=new $oe.DateRollingFileStream(n,e,t);return i.on("error",r=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",n,r)}),i.on("drain",()=>{process.emit("log4js:pause",!1)}),i}function Qoe(n,e,t,i,r){i.maxSize=i.maxLogSize;let o=Goe(n,e,i),s=function(a){!o.writable||o.write(t(a,r)+Uoe,"utf8")||process.emit("log4js:pause",!0)};return s.shutdown=function(a){o.end("","utf-8",a)},s}function Koe(n,e){let t=e.basicLayout;return n.layout&&(t=e.layout(n.layout.type,n.layout)),n.alwaysIncludePattern||(n.alwaysIncludePattern=!1),n.mode=n.mode||384,Qoe(n.filename,n.pattern,t,n,n.timezoneOffset)}lj.exports.configure=Koe});var gj=b((pEe,dj)=>{var Lo=Mt()("log4js:fileSync"),Su=require("path"),Ur=require("fs"),zoe=require("os"),Voe=zoe.EOL||` -`;function cj(n,e){if(Ur.existsSync(n))return;let t=Ur.openSync(n,e.flags,e.mode);Ur.closeSync(t)}var hj=class{constructor(e,t,i,r){Lo("In RollingFileStream");function o(){if(!e||!t||t<=0)throw new Error("You must specify a filename and file size")}o(),this.filename=e,this.size=t,this.backups=i,this.options=r,this.currentSize=0;function s(a){let l=0;try{l=Ur.statSync(a).size}catch{cj(a,r)}return l}this.currentSize=s(this.filename)}shouldRoll(){return Lo("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){let t=this,i=new RegExp(`^${Su.basename(e)}`);function r(u){return i.test(u)}function o(u){return parseInt(u.substring(`${Su.basename(e)}.`.length),10)||0}function s(u,c){return o(u)>o(c)?1:o(u) ${e}.${c+1}`),Ur.renameSync(Su.join(Su.dirname(e),u),`${e}.${c+1}`)}}function l(){Lo("Renaming the old files"),Ur.readdirSync(Su.dirname(e)).filter(r).sort(s).reverse().forEach(a)}Lo("Rolling, rolling, rolling"),l()}write(e,t){let i=this;function r(){Lo("writing the chunk to the file"),i.currentSize+=e.length,Ur.appendFileSync(i.filename,e)}Lo("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),r()}};function ese(n,e,t,i,r,o){Lo("fileSync appender created"),n=Su.normalize(n),i=!i&&i!==0?5:i;function s(l,u,c){let h;return u?h=new hj(l,u,c,o):h=(d=>(cj(d,o),{write(g){Ur.appendFileSync(d,g)}}))(l),h}let a=s(n,t,i);return l=>{a.write(e(l,r)+Voe)}}function tse(n,e){let t=e.basicLayout;n.layout&&(t=e.layout(n.layout.type,n.layout));let i={flags:n.flags||"a",encoding:n.encoding||"utf8",mode:n.mode||384};return ese(n.filename,t,n.maxLogSize,n.backups,n.timezoneOffset,i)}dj.exports.configure=tse});var pj=b((mEe,fj)=>{var Gr=Mt()("log4js:tcp"),ise=require("net");function nse(n,e){let t=!1,i=[],r,o=3,s="__LOG4JS__";function a(h){Gr("Writing log event to socket"),t=r.write(`${e(h)}${s}`,"utf8")}function l(){let h;for(Gr("emptying buffer");h=i.shift();)a(h)}function u(){Gr(`appender creating socket to ${n.host||"localhost"}:${n.port||5e3}`),s=`${n.endMsg||"__LOG4JS__"}`,r=ise.createConnection(n.port||5e3,n.host||"localhost"),r.on("connect",()=>{Gr("socket connected"),l(),t=!0}),r.on("drain",()=>{Gr("drain event received, emptying buffer"),t=!0,l()}),r.on("timeout",r.end.bind(r)),r.on("error",h=>{Gr("connection error",h),t=!1,l()}),r.on("close",u)}u();function c(h){t?a(h):(Gr("buffering log event because it cannot write at the moment"),i.push(h))}return c.shutdown=function(h){Gr("shutdown called"),i.length&&o?(Gr("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{c.shutdown(h)},100)):(r.removeAllListeners("close"),r.end(h))},c}function rse(n,e){Gr(`configure with config = ${n}`);let t=function(i){return i.serialise()};return n.layout&&(t=e.layout(n.layout.type,n.layout)),nse(n,t)}fj.exports.configure=rse});var ox=b((bEe,rx)=>{var ose=require("path"),Qa=Mt()("log4js:appenders"),Zn=Wa(),mj=kp(),sse=$a(),ase=IC(),lse=wL(),vr=new Map;vr.set("console",CL());vr.set("stdout",SL());vr.set("stderr",kL());vr.set("logLevelFilter",PL());vr.set("categoryFilter",LL());vr.set("noLogFilter",jL());vr.set("file",aj());vr.set("dateFile",uj());vr.set("fileSync",gj());vr.set("tcp",pj());var sd=new Map,nx=(n,e)=>{Qa("Loading module from ",n);try{return require(n)}catch(t){Zn.throwExceptionIf(e,t.code!=="MODULE_NOT_FOUND",`appender "${n}" could not be loaded (error was: ${t})`);return}},use=(n,e)=>vr.get(n)||nx(`./${n}`,e)||nx(n,e)||""||nx(ose.join(process.cwd(),n),e),Up=new Set,bj=(n,e)=>{if(sd.has(n))return sd.get(n);if(!e.appenders[n])return!1;if(Up.has(n))throw new Error(`Dependency loop detected for appender ${n}.`);Up.add(n),Qa(`Creating appender ${n}`);let t=cse(n,e);return Up.delete(n),sd.set(n,t),t},cse=(n,e)=>{let t=e.appenders[n],i=t.type.configure?t.type:use(t.type,e);return Zn.throwExceptionIf(e,Zn.not(i),`appender "${n}" is not valid (type "${t.type}" could not be found)`),i.appender&&Qa(`DEPRECATION: Appender ${t.type} exports an appender function.`),i.shutdown&&Qa(`DEPRECATION: Appender ${t.type} exports a shutdown function.`),Qa(`${n}: clustering.isMaster ? ${mj.isMaster()}`),Qa(`${n}: appenderModule is ${require("util").inspect(i)}`),mj.onlyOnMaster(()=>(Qa(`calling appenderModule.configure for ${n} / ${t.type}`),i.configure(lse.modifyConfig(t),ase,r=>bj(r,e),sse)),()=>{})},yj=n=>{sd.clear(),Up.clear();let e=[];Object.values(n.categories).forEach(t=>{e.push(...t.appenders)}),Object.keys(n.appenders).forEach(t=>{(e.includes(t)||n.appenders[t].type==="tcp-server")&&bj(t,n)})},vj=()=>{yj({appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"trace"}}})};vj();Zn.addListener(n=>{Zn.throwExceptionIf(n,Zn.not(Zn.anObject(n.appenders)),'must have a property "appenders" of type object.');let e=Object.keys(n.appenders);Zn.throwExceptionIf(n,Zn.not(e.length),"must define at least one appender."),e.forEach(t=>{Zn.throwExceptionIf(n,Zn.not(n.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)})});Zn.addListener(yj);rx.exports=sd;rx.exports.init=vj});var ax=b((yEe,Gp)=>{var Ka=Mt()("log4js:categories"),Nt=Wa(),sx=$a(),wj=ox(),za=new Map;function Dj(n,e,t){if(e.inherit===!1)return;let i=t.lastIndexOf(".");if(i<0)return;let r=t.substring(0,i),o=n.categories[r];o||(o={inherit:!0,appenders:[]}),Dj(n,o,r),!n.categories[r]&&o.appenders&&o.appenders.length&&o.level&&(n.categories[r]=o),e.appenders=e.appenders||[],e.level=e.level||o.level,o.appenders.forEach(s=>{e.appenders.includes(s)||e.appenders.push(s)}),e.parent=o}function hse(n){if(!n.categories)return;Object.keys(n.categories).forEach(t=>{let i=n.categories[t];Dj(n,i,t)})}Nt.addPreProcessingListener(n=>hse(n));Nt.addListener(n=>{Nt.throwExceptionIf(n,Nt.not(Nt.anObject(n.categories)),'must have a property "categories" of type object.');let e=Object.keys(n.categories);Nt.throwExceptionIf(n,Nt.not(e.length),"must define at least one category."),e.forEach(t=>{let i=n.categories[t];Nt.throwExceptionIf(n,[Nt.not(i.appenders),Nt.not(i.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),Nt.throwExceptionIf(n,Nt.not(Array.isArray(i.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),Nt.throwExceptionIf(n,Nt.not(i.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(i,"enableCallStack")&&Nt.throwExceptionIf(n,typeof i.enableCallStack!="boolean",`category "${t}" is not valid (enableCallStack must be boolean type)`),i.appenders.forEach(r=>{Nt.throwExceptionIf(n,Nt.not(wj.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)}),Nt.throwExceptionIf(n,Nt.not(sx.getLevel(i.level)),`category "${t}" is not valid (level "${i.level}" not recognised; valid levels are ${sx.levels.join(", ")})`)}),Nt.throwExceptionIf(n,Nt.not(n.categories.default),'must define a "default" category.')});var Cj=n=>{za.clear(),Object.keys(n.categories).forEach(t=>{let i=n.categories[t],r=[];i.appenders.forEach(o=>{r.push(wj.get(o)),Ka(`Creating category ${t}`),za.set(t,{appenders:r,level:sx.getLevel(i.level),enableCallStack:i.enableCallStack||!1})})})},xj=()=>{Cj({categories:{default:{appenders:["out"],level:"OFF"}}})};xj();Nt.addListener(Cj);var Va=n=>(Ka(`configForCategory: searching for config for ${n}`),za.has(n)?(Ka(`configForCategory: ${n} exists in config, returning it`),za.get(n)):n.indexOf(".")>0?(Ka(`configForCategory: ${n} has hierarchy, searching for parents`),Va(n.substring(0,n.lastIndexOf(".")))):(Ka("configForCategory: returning config for default category"),Va("default"))),dse=n=>Va(n).appenders,gse=n=>Va(n).level,fse=(n,e)=>{let t=za.get(n);if(Ka(`setLevelForCategory: found ${t} for ${n}`),!t){let i=Va(n);Ka(`setLevelForCategory: no config found for category, found ${i} for parents of ${n}`),t={appenders:i.appenders}}t.level=e,za.set(n,t)},pse=n=>Va(n).enableCallStack===!0,mse=(n,e)=>{Va(n).enableCallStack=e};Gp.exports=za;Gp.exports=Object.assign(Gp.exports,{appendersForCategory:dse,getLevelForCategory:gse,setLevelForCategory:fse,getEnableCallStackForCategory:pse,setEnableCallStackForCategory:mse,init:xj})});var Ej=b((vEe,kj)=>{var Sj=Mt()("log4js:logger"),bse=jC(),Fo=$a(),yse=kp(),Qp=ax(),vse=Wa(),wse=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function Dse(n,e=4){let t=n.stack.split(` -`).slice(e),i=wse.exec(t[0]);return i&&i.length===6?{functionName:i[1],fileName:i[2],lineNumber:parseInt(i[3],10),columnNumber:parseInt(i[4],10),callStack:t.join(` -`)}:null}var Kp=class{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.parseCallStack=Dse,Sj(`Logger created (${this.category}, ${this.level})`)}get level(){return Fo.getLevel(Qp.getLevelForCategory(this.category),Fo.TRACE)}set level(e){Qp.setLevelForCategory(this.category,Fo.getLevel(e,this.level))}get useCallStack(){return Qp.getEnableCallStackForCategory(this.category)}set useCallStack(e){Qp.setEnableCallStackForCategory(this.category,e===!0)}log(e,...t){let i=Fo.getLevel(e);i||(this._log(Fo.WARN,"log4js:logger.log: invalid value for log-level as first parameter given: ",e),i=Fo.INFO),this.isLevelEnabled(i)&&this._log(i,t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){Sj(`sending log data (${e}) to appenders`);let i=new bse(this.category,e,t,this.context,this.useCallStack&&this.parseCallStack(new Error));yse.send(i)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){this.parseCallStack=e}};function Tj(n){let e=Fo.getLevel(n),i=e.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),r=i[0].toUpperCase()+i.slice(1);Kp.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(e)},Kp.prototype[i]=function(...o){this.log(e,...o)}}Fo.levels.forEach(Tj);vse.addListener(()=>{Fo.levels.forEach(Tj)});kj.exports=Kp});var Rj=b((wEe,_j)=>{var Tu=$a(),Cse=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function xse(n){return n.originalUrl||n.url}function Sse(n,e,t){let i=o=>{let s=o.concat();for(let a=0;ai.source?i.source:i);e=new RegExp(t.join("|"))}return e}function kse(n,e,t){let i=e;if(t){let r=t.find(o=>{let s=!1;return o.from&&o.to?s=n>=o.from&&n<=o.to:s=o.codes.indexOf(n)!==-1,s});r&&(i=Tu.getLevel(r.level,i))}return i}_j.exports=function(e,t){typeof t=="string"||typeof t=="function"?t={format:t}:t=t||{};let i=e,r=Tu.getLevel(t.level,Tu.INFO),o=t.format||Cse,s=Tse(t.nolog);return(a,l,u)=>{if(a._logging||s&&s.test(a.originalUrl))return u();if(i.isLevelEnabled(r)||t.level==="auto"){let c=new Date,{writeHead:h}=l;a._logging=!0,l.writeHead=(d,g)=>{l.writeHead=h,l.writeHead(d,g),l.__statusCode=d,l.__headers=g||{}},l.on("finish",()=>{l.responseTime=new Date-c,l.statusCode&&t.level==="auto"&&(r=Tu.INFO,l.statusCode>=300&&(r=Tu.WARN),l.statusCode>=400&&(r=Tu.ERROR)),r=kse(l.statusCode,r,t.statusRules);let d=Sse(a,l,t.tokens||[]);if(t.context&&i.addContext("res",l),typeof o=="function"){let g=o(a,l,f=>Pj(f,d));g&&i.log(r,g)}else i.log(r,Pj(o,d));t.context&&i.removeContext("res")})}return u()}}});var Aj=b((DEe,jj)=>{var Lj=Mt()("log4js:recording"),zp=[];function Ese(){return function(n){Lj(`received logEvent, number of events now ${zp.length+1}`),Lj("log event was ",n),zp.push(n)}}function Fj(){return zp.slice()}function Ij(){zp.length=0}jj.exports={configure:Ese,replay:Fj,playback:Fj,reset:Ij,erase:Ij}});var lx=b((CEe,qj)=>{var Is=Mt()("log4js:main"),Pse=require("fs"),_se=AR()({proto:!0}),Rse=Wa(),Lse=IC(),Fse=$a(),Oj=ox(),Mj=ax(),Ise=Ej(),jse=kp(),Ase=Rj(),Ose=Aj(),ad=!1;function Mse(n){if(!ad)return;Is("Received log event ",n),Mj.appendersForCategory(n.categoryName).forEach(t=>{t(n)})}function Nse(n){Is(`Loading configuration from ${n}`);try{return JSON.parse(Pse.readFileSync(n,"utf8"))}catch(e){throw new Error(`Problem reading config from file "${n}". Error was ${e.message}`,e)}}function Nj(n){ad&&Bj();let e=n;return typeof e=="string"&&(e=Nse(n)),Is(`Configuration is ${e}`),Rse.configure(_se(e)),jse.onMessage(Mse),ad=!0,Hj}function Bse(){return Ose}function Bj(n){Is("Shutdown called. Disabling all log writing."),ad=!1;let e=Array.from(Oj.values());Oj.init(),Mj.init();let t=e.reduceRight((s,a)=>a.shutdown?s+1:s,0);if(t===0)return Is("No appenders with shutdown functions found."),n!==void 0&&n();let i=0,r;Is(`Found ${t} appenders with shutdown functions.`);function o(s){r=r||s,i+=1,Is(`Appender shutdowns complete: ${i} / ${t}`),i>=t&&(Is("All shutdown functions completed."),n&&n(r))}return e.filter(s=>s.shutdown).forEach(s=>s.shutdown(o)),null}function Hse(n){return ad||Nj(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Ise(n||"default")}var Hj={getLogger:Hse,configure:Nj,shutdown:Bj,connectLogger:Ase,levels:Fse,addLayout:Lse.addLayout,recording:Bse};qj.exports=Hj});var ld=b(js=>{"use strict";var Yj=pt().fromCallback,Yi=Ke(),qse=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof Yi[n]=="function");Object.keys(Yi).forEach(n=>{n!=="promises"&&(js[n]=Yi[n])});qse.forEach(n=>{js[n]=Yj(Yi[n])});js.exists=function(n,e){return typeof e=="function"?Yi.exists(n,e):new Promise(t=>Yi.exists(n,t))};js.read=function(n,e,t,i,r,o){return typeof o=="function"?Yi.read(n,e,t,i,r,o):new Promise((s,a)=>{Yi.read(n,e,t,i,r,(l,u,c)=>{if(l)return a(l);s({bytesRead:u,buffer:c})})})};js.write=function(n,e,...t){return typeof t[t.length-1]=="function"?Yi.write(n,e,...t):new Promise((i,r)=>{Yi.write(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffer:a})})})};typeof Yi.writev=="function"&&(js.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?Yi.writev(n,e,...t):new Promise((i,r)=>{Yi.writev(n,e,...t,(o,s,a)=>{if(o)return r(o);i({bytesWritten:s,buffers:a})})})});typeof Yi.realpath.native=="function"&&(js.realpath.native=Yj(Yi.realpath.native))});var ux=b((SEe,Wj)=>{Wj.exports=n=>{let e=process.versions.node.split(".").map(t=>parseInt(t,10));return n=n.split(".").map(t=>parseInt(t,10)),e[0]>n[0]||e[0]===n[0]&&(e[1]>n[1]||e[1]===n[1]&&e[2]>=n[2])}});var Uj=b((TEe,cx)=>{"use strict";var ku=ld(),Io=require("path"),Yse=ux(),Zj=Yse("10.12.0"),Jj=n=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(n.replace(Io.parse(n).root,""))){let t=new Error(`Path contains invalid characters: ${n}`);throw t.code="EINVAL",t}},$j=n=>{let e={mode:511};return typeof n=="number"&&(n={mode:n}),de(de({},e),n)},Xj=n=>{let e=new Error(`operation not permitted, mkdir '${n}'`);return e.code="EPERM",e.errno=-4048,e.path=n,e.syscall="mkdir",e};cx.exports.makeDir=async(n,e)=>{if(Jj(n),e=$j(e),Zj){let i=Io.resolve(n);return ku.mkdir(i,{mode:e.mode,recursive:!0})}let t=async i=>{try{await ku.mkdir(i,e.mode)}catch(r){if(r.code==="EPERM")throw r;if(r.code==="ENOENT"){if(Io.dirname(i)===i)throw Xj(i);if(r.message.includes("null bytes"))throw r;return await t(Io.dirname(i)),t(i)}try{if(!(await ku.stat(i)).isDirectory())throw new Error("The path is not a directory")}catch{throw r}}};return t(Io.resolve(n))};cx.exports.makeDirSync=(n,e)=>{if(Jj(n),e=$j(e),Zj){let i=Io.resolve(n);return ku.mkdirSync(i,{mode:e.mode,recursive:!0})}let t=i=>{try{ku.mkdirSync(i,e.mode)}catch(r){if(r.code==="EPERM")throw r;if(r.code==="ENOENT"){if(Io.dirname(i)===i)throw Xj(i);if(r.message.includes("null bytes"))throw r;return t(Io.dirname(i)),t(i)}try{if(!ku.statSync(i).isDirectory())throw new Error("The path is not a directory")}catch{throw r}}};return t(Io.resolve(n))}});var wr=b((kEe,Gj)=>{"use strict";var Wse=pt().fromPromise,{makeDir:Zse,makeDirSync:hx}=Uj(),dx=Wse(Zse);Gj.exports={mkdirs:dx,mkdirsSync:hx,mkdirp:dx,mkdirpSync:hx,ensureDir:dx,ensureDirSync:hx}});var gx=b((EEe,Qj)=>{"use strict";var Eu=Ke();function Jse(n,e,t,i){Eu.open(n,"r+",(r,o)=>{if(r)return i(r);Eu.futimes(o,e,t,s=>{Eu.close(o,a=>{i&&i(s||a)})})})}function $se(n,e,t){let i=Eu.openSync(n,"r+");return Eu.futimesSync(i,e,t),Eu.closeSync(i)}Qj.exports={utimesMillis:Jse,utimesMillisSync:$se}});var ud=b((PEe,e1)=>{"use strict";var Pu=ld(),on=require("path"),Xse=require("util"),Use=ux(),Vp=Use("10.5.0"),Kj=n=>Vp?Pu.stat(n,{bigint:!0}):Pu.stat(n),fx=n=>Vp?Pu.statSync(n,{bigint:!0}):Pu.statSync(n);function Gse(n,e){return Promise.all([Kj(n),Kj(e).catch(t=>{if(t.code==="ENOENT")return null;throw t})]).then(([t,i])=>({srcStat:t,destStat:i}))}function Qse(n,e){let t,i=fx(n);try{t=fx(e)}catch(r){if(r.code==="ENOENT")return{srcStat:i,destStat:null};throw r}return{srcStat:i,destStat:t}}function Kse(n,e,t,i){Xse.callbackify(Gse)(n,e,(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;return a&&em(s,a)?i(new Error("Source and destination must not be the same.")):s.isDirectory()&&px(n,e)?i(new Error(tm(n,e,t))):i(null,{srcStat:s,destStat:a})})}function zse(n,e,t){let{srcStat:i,destStat:r}=Qse(n,e);if(r&&em(i,r))throw new Error("Source and destination must not be the same.");if(i.isDirectory()&&px(n,e))throw new Error(tm(n,e,t));return{srcStat:i,destStat:r}}function zj(n,e,t,i,r){let o=on.resolve(on.dirname(n)),s=on.resolve(on.dirname(t));if(s===o||s===on.parse(s).root)return r();let a=(l,u)=>l?l.code==="ENOENT"?r():r(l):em(e,u)?r(new Error(tm(n,t,i))):zj(n,e,s,i,r);Vp?Pu.stat(s,{bigint:!0},a):Pu.stat(s,a)}function Vj(n,e,t,i){let r=on.resolve(on.dirname(n)),o=on.resolve(on.dirname(t));if(o===r||o===on.parse(o).root)return;let s;try{s=fx(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(em(e,s))throw new Error(tm(n,t,i));return Vj(n,e,o,i)}function em(n,e){return!!(e.ino&&e.dev&&e.ino===n.ino&&e.dev===n.dev&&(Vp||e.inor),i=on.resolve(e).split(on.sep).filter(r=>r);return t.reduce((r,o,s)=>r&&i[s]===o,!0)}function tm(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}e1.exports={checkPaths:Kse,checkPathsSync:zse,checkParentPaths:zj,checkParentPathsSync:Vj,isSrcSubdir:px}});var o1=b((_Ee,r1)=>{"use strict";var Si=Ke(),cd=require("path"),Vse=wr().mkdirsSync,eae=gx().utimesMillisSync,hd=ud();function tae(n,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - - see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:i,destStat:r}=hd.checkPathsSync(n,e,"copy");return hd.checkParentPathsSync(n,i,e,"copy"),iae(r,n,e,t)}function iae(n,e,t,i){if(i.filter&&!i.filter(e,t))return;let r=cd.dirname(t);return Si.existsSync(r)||Vse(r),t1(n,e,t,i)}function t1(n,e,t,i){if(!(i.filter&&!i.filter(e,t)))return nae(n,e,t,i)}function nae(n,e,t,i){let o=(i.dereference?Si.statSync:Si.lstatSync)(e);if(o.isDirectory())return cae(o,n,e,t,i);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return rae(o,n,e,t,i);if(o.isSymbolicLink())return gae(n,e,t,i)}function rae(n,e,t,i,r){return e?oae(n,t,i,r):i1(n,t,i,r)}function oae(n,e,t,i){if(i.overwrite)return Si.unlinkSync(t),i1(n,e,t,i);if(i.errorOnExist)throw new Error(`'${t}' already exists`)}function i1(n,e,t,i){return Si.copyFileSync(e,t),i.preserveTimestamps&&sae(n.mode,e,t),mx(t,n.mode)}function sae(n,e,t){return aae(n)&&lae(t,n),uae(e,t)}function aae(n){return(n&128)===0}function lae(n,e){return mx(n,e|128)}function mx(n,e){return Si.chmodSync(n,e)}function uae(n,e){let t=Si.statSync(n);return eae(e,t.atime,t.mtime)}function cae(n,e,t,i,r){if(!e)return hae(n.mode,t,i,r);if(e&&!e.isDirectory())throw new Error(`Cannot overwrite non-directory '${i}' with directory '${t}'.`);return n1(t,i,r)}function hae(n,e,t,i){return Si.mkdirSync(t),n1(e,t,i),mx(t,n)}function n1(n,e,t){Si.readdirSync(n).forEach(i=>dae(i,n,e,t))}function dae(n,e,t,i){let r=cd.join(e,n),o=cd.join(t,n),{destStat:s}=hd.checkPathsSync(r,o,"copy");return t1(s,r,o,i)}function gae(n,e,t,i){let r=Si.readlinkSync(e);if(i.dereference&&(r=cd.resolve(process.cwd(),r)),n){let o;try{o=Si.readlinkSync(t)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return Si.symlinkSync(r,t);throw s}if(i.dereference&&(o=cd.resolve(process.cwd(),o)),hd.isSrcSubdir(r,o))throw new Error(`Cannot copy '${r}' to a subdirectory of itself, '${o}'.`);if(Si.statSync(t).isDirectory()&&hd.isSrcSubdir(o,r))throw new Error(`Cannot overwrite '${o}' with '${r}'.`);return fae(r,t)}else return Si.symlinkSync(r,t)}function fae(n,e){return Si.unlinkSync(e),Si.symlinkSync(n,e)}r1.exports=tae});var bx=b((REe,s1)=>{"use strict";s1.exports={copySync:o1()}});var As=b((LEe,l1)=>{"use strict";var pae=pt().fromPromise,a1=ld();function mae(n){return a1.access(n).then(()=>!0).catch(()=>!1)}l1.exports={pathExists:pae(mae),pathExistsSync:a1.existsSync}});var b1=b((FEe,m1)=>{"use strict";var sn=Ke(),dd=require("path"),bae=wr().mkdirs,yae=As().pathExists,vae=gx().utimesMillis,gd=ud();function wae(n,e,t,i){typeof t=="function"&&!i?(i=t,t={}):typeof t=="function"&&(t={filter:t}),i=i||function(){},t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - - see https://github.com/jprichardson/node-fs-extra/issues/269`),gd.checkPaths(n,e,"copy",(r,o)=>{if(r)return i(r);let{srcStat:s,destStat:a}=o;gd.checkParentPaths(n,s,e,"copy",l=>l?i(l):t.filter?d1(u1,a,n,e,t,i):u1(a,n,e,t,i))})}function u1(n,e,t,i,r){let o=dd.dirname(t);yae(o,(s,a)=>{if(s)return r(s);if(a)return yx(n,e,t,i,r);bae(o,l=>l?r(l):yx(n,e,t,i,r))})}function d1(n,e,t,i,r,o){Promise.resolve(r.filter(t,i)).then(s=>s?n(e,t,i,r,o):o(),s=>o(s))}function yx(n,e,t,i,r){return i.filter?d1(c1,n,e,t,i,r):c1(n,e,t,i,r)}function c1(n,e,t,i,r){(i.dereference?sn.stat:sn.lstat)(e,(s,a)=>{if(s)return r(s);if(a.isDirectory())return Eae(a,n,e,t,i,r);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Dae(a,n,e,t,i,r);if(a.isSymbolicLink())return Rae(n,e,t,i,r)})}function Dae(n,e,t,i,r,o){return e?Cae(n,t,i,r,o):g1(n,t,i,r,o)}function Cae(n,e,t,i,r){if(i.overwrite)sn.unlink(t,o=>o?r(o):g1(n,e,t,i,r));else return i.errorOnExist?r(new Error(`'${t}' already exists`)):r()}function g1(n,e,t,i,r){sn.copyFile(e,t,o=>o?r(o):i.preserveTimestamps?xae(n.mode,e,t,r):im(t,n.mode,r))}function xae(n,e,t,i){return Sae(n)?Tae(t,n,r=>r?i(r):h1(n,e,t,i)):h1(n,e,t,i)}function Sae(n){return(n&128)===0}function Tae(n,e,t){return im(n,e|128,t)}function h1(n,e,t,i){kae(e,t,r=>r?i(r):im(t,n,i))}function im(n,e,t){return sn.chmod(n,e,t)}function kae(n,e,t){sn.stat(n,(i,r)=>i?t(i):vae(e,r.atime,r.mtime,t))}function Eae(n,e,t,i,r,o){return e?e&&!e.isDirectory()?o(new Error(`Cannot overwrite non-directory '${i}' with directory '${t}'.`)):f1(t,i,r,o):Pae(n.mode,t,i,r,o)}function Pae(n,e,t,i,r){sn.mkdir(t,o=>{if(o)return r(o);f1(e,t,i,s=>s?r(s):im(t,n,r))})}function f1(n,e,t,i){sn.readdir(n,(r,o)=>r?i(r):p1(o,n,e,t,i))}function p1(n,e,t,i,r){let o=n.pop();return o?_ae(n,o,e,t,i,r):r()}function _ae(n,e,t,i,r,o){let s=dd.join(t,e),a=dd.join(i,e);gd.checkPaths(s,a,"copy",(l,u)=>{if(l)return o(l);let{destStat:c}=u;yx(c,s,a,r,h=>h?o(h):p1(n,t,i,r,o))})}function Rae(n,e,t,i,r){sn.readlink(e,(o,s)=>{if(o)return r(o);if(i.dereference&&(s=dd.resolve(process.cwd(),s)),n)sn.readlink(t,(a,l)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?sn.symlink(s,t,r):r(a):(i.dereference&&(l=dd.resolve(process.cwd(),l)),gd.isSrcSubdir(s,l)?r(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${l}'.`)):n.isDirectory()&&gd.isSrcSubdir(l,s)?r(new Error(`Cannot overwrite '${l}' with '${s}'.`)):Lae(s,t,r)));else return sn.symlink(s,t,r)})}function Lae(n,e,t){sn.unlink(e,i=>i?t(i):sn.symlink(n,e,t))}m1.exports=wae});var vx=b((IEe,y1)=>{"use strict";var Fae=pt().fromCallback;y1.exports={copy:Fae(b1())}});var E1=b((jEe,k1)=>{"use strict";var v1=Ke(),x1=require("path"),lt=require("assert"),fd=process.platform==="win32";function S1(n){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{n[t]=n[t]||v1[t],t=t+"Sync",n[t]=n[t]||v1[t]}),n.maxBusyTries=n.maxBusyTries||3}function wx(n,e,t){let i=0;typeof e=="function"&&(t=e,e={}),lt(n,"rimraf: missing path"),lt.strictEqual(typeof n,"string","rimraf: path should be a string"),lt.strictEqual(typeof t,"function","rimraf: callback function required"),lt(e,"rimraf: invalid options argument provided"),lt.strictEqual(typeof e,"object","rimraf: options should be object"),S1(e),w1(n,e,function r(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&iw1(n,e,r),s)}o.code==="ENOENT"&&(o=null)}t(o)})}function w1(n,e,t){lt(n),lt(e),lt(typeof t=="function"),e.lstat(n,(i,r)=>{if(i&&i.code==="ENOENT")return t(null);if(i&&i.code==="EPERM"&&fd)return D1(n,e,i,t);if(r&&r.isDirectory())return nm(n,e,i,t);e.unlink(n,o=>{if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return fd?D1(n,e,o,t):nm(n,e,o,t);if(o.code==="EISDIR")return nm(n,e,o,t)}return t(o)})})}function D1(n,e,t,i){lt(n),lt(e),lt(typeof i=="function"),e.chmod(n,438,r=>{r?i(r.code==="ENOENT"?null:t):e.stat(n,(o,s)=>{o?i(o.code==="ENOENT"?null:t):s.isDirectory()?nm(n,e,t,i):e.unlink(n,i)})})}function C1(n,e,t){let i;lt(n),lt(e);try{e.chmodSync(n,438)}catch(r){if(r.code==="ENOENT")return;throw t}try{i=e.statSync(n)}catch(r){if(r.code==="ENOENT")return;throw t}i.isDirectory()?rm(n,e,t):e.unlinkSync(n)}function nm(n,e,t,i){lt(n),lt(e),lt(typeof i=="function"),e.rmdir(n,r=>{r&&(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")?Iae(n,e,i):r&&r.code==="ENOTDIR"?i(t):i(r)})}function Iae(n,e,t){lt(n),lt(e),lt(typeof t=="function"),e.readdir(n,(i,r)=>{if(i)return t(i);let o=r.length,s;if(o===0)return e.rmdir(n,t);r.forEach(a=>{wx(x1.join(n,a),e,l=>{if(!s){if(l)return t(s=l);--o===0&&e.rmdir(n,t)}})})})}function T1(n,e){let t;e=e||{},S1(e),lt(n,"rimraf: missing path"),lt.strictEqual(typeof n,"string","rimraf: path should be a string"),lt(e,"rimraf: missing options"),lt.strictEqual(typeof e,"object","rimraf: options should be object");try{t=e.lstatSync(n)}catch(i){if(i.code==="ENOENT")return;i.code==="EPERM"&&fd&&C1(n,e,i)}try{t&&t.isDirectory()?rm(n,e,null):e.unlinkSync(n)}catch(i){if(i.code==="ENOENT")return;if(i.code==="EPERM")return fd?C1(n,e,i):rm(n,e,i);if(i.code!=="EISDIR")throw i;rm(n,e,i)}}function rm(n,e,t){lt(n),lt(e);try{e.rmdirSync(n)}catch(i){if(i.code==="ENOTDIR")throw t;if(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")jae(n,e);else if(i.code!=="ENOENT")throw i}}function jae(n,e){if(lt(n),lt(e),e.readdirSync(n).forEach(t=>T1(x1.join(n,t),e)),fd){let t=Date.now();do try{return e.rmdirSync(n,e)}catch{}while(Date.now()-t<500)}else return e.rmdirSync(n,e)}k1.exports=wx;wx.sync=T1});var pd=b((AEe,_1)=>{"use strict";var Aae=pt().fromCallback,P1=E1();_1.exports={remove:Aae(P1),removeSync:P1.sync}});var M1=b((OEe,O1)=>{"use strict";var Oae=pt().fromCallback,F1=Ke(),I1=require("path"),j1=wr(),A1=pd(),R1=Oae(function(e,t){t=t||function(){},F1.readdir(e,(i,r)=>{if(i)return j1.mkdirs(e,t);r=r.map(s=>I1.join(e,s)),o();function o(){let s=r.pop();if(!s)return t();A1.remove(s,a=>{if(a)return t(a);o()})}})});function L1(n){let e;try{e=F1.readdirSync(n)}catch{return j1.mkdirsSync(n)}e.forEach(t=>{t=I1.join(n,t),A1.removeSync(t)})}O1.exports={emptyDirSync:L1,emptydirSync:L1,emptyDir:R1,emptydir:R1}});var q1=b((MEe,H1)=>{"use strict";var Mae=pt().fromCallback,N1=require("path"),Os=Ke(),B1=wr();function Nae(n,e){function t(){Os.writeFile(n,"",i=>{if(i)return e(i);e()})}Os.stat(n,(i,r)=>{if(!i&&r.isFile())return e();let o=N1.dirname(n);Os.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?B1.mkdirs(o,l=>{if(l)return e(l);t()}):e(s);a.isDirectory()?t():Os.readdir(o,l=>{if(l)return e(l)})})})}function Bae(n){let e;try{e=Os.statSync(n)}catch{}if(e&&e.isFile())return;let t=N1.dirname(n);try{Os.statSync(t).isDirectory()||Os.readdirSync(t)}catch(i){if(i&&i.code==="ENOENT")B1.mkdirsSync(t);else throw i}Os.writeFileSync(n,"")}H1.exports={createFile:Mae(Nae),createFileSync:Bae}});var $1=b((NEe,J1)=>{"use strict";var Hae=pt().fromCallback,W1=require("path"),el=Ke(),Z1=wr(),Y1=As().pathExists;function qae(n,e,t){function i(r,o){el.link(r,o,s=>{if(s)return t(s);t(null)})}Y1(e,(r,o)=>{if(r)return t(r);if(o)return t(null);el.lstat(n,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),t(s);let a=W1.dirname(e);Y1(a,(l,u)=>{if(l)return t(l);if(u)return i(n,e);Z1.mkdirs(a,c=>{if(c)return t(c);i(n,e)})})})})}function Yae(n,e){if(el.existsSync(e))return;try{el.lstatSync(n)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let i=W1.dirname(e);return el.existsSync(i)||Z1.mkdirsSync(i),el.linkSync(n,e)}J1.exports={createLink:Hae(qae),createLinkSync:Yae}});var U1=b((BEe,X1)=>{"use strict";var Ms=require("path"),md=Ke(),Wae=As().pathExists;function Zae(n,e,t){if(Ms.isAbsolute(n))return md.lstat(n,i=>i?(i.message=i.message.replace("lstat","ensureSymlink"),t(i)):t(null,{toCwd:n,toDst:n}));{let i=Ms.dirname(e),r=Ms.join(i,n);return Wae(r,(o,s)=>o?t(o):s?t(null,{toCwd:r,toDst:n}):md.lstat(n,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),t(a)):t(null,{toCwd:n,toDst:Ms.relative(i,n)})))}}function Jae(n,e){let t;if(Ms.isAbsolute(n)){if(t=md.existsSync(n),!t)throw new Error("absolute srcpath does not exist");return{toCwd:n,toDst:n}}else{let i=Ms.dirname(e),r=Ms.join(i,n);if(t=md.existsSync(r),t)return{toCwd:r,toDst:n};if(t=md.existsSync(n),!t)throw new Error("relative srcpath does not exist");return{toCwd:n,toDst:Ms.relative(i,n)}}}X1.exports={symlinkPaths:Zae,symlinkPathsSync:Jae}});var K1=b((HEe,Q1)=>{"use strict";var G1=Ke();function $ae(n,e,t){if(t=typeof e=="function"?e:t,e=typeof e=="function"?!1:e,e)return t(null,e);G1.lstat(n,(i,r)=>{if(i)return t(null,"file");e=r&&r.isDirectory()?"dir":"file",t(null,e)})}function Xae(n,e){let t;if(e)return e;try{t=G1.lstatSync(n)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}Q1.exports={symlinkType:$ae,symlinkTypeSync:Xae}});var rA=b((qEe,nA)=>{"use strict";var Uae=pt().fromCallback,V1=require("path"),_u=Ke(),eA=wr(),Gae=eA.mkdirs,Qae=eA.mkdirsSync,tA=U1(),Kae=tA.symlinkPaths,zae=tA.symlinkPathsSync,iA=K1(),Vae=iA.symlinkType,ele=iA.symlinkTypeSync,z1=As().pathExists;function tle(n,e,t,i){i=typeof t=="function"?t:i,t=typeof t=="function"?!1:t,z1(e,(r,o)=>{if(r)return i(r);if(o)return i(null);Kae(n,e,(s,a)=>{if(s)return i(s);n=a.toDst,Vae(a.toCwd,t,(l,u)=>{if(l)return i(l);let c=V1.dirname(e);z1(c,(h,d)=>{if(h)return i(h);if(d)return _u.symlink(n,e,u,i);Gae(c,g=>{if(g)return i(g);_u.symlink(n,e,u,i)})})})})})}function ile(n,e,t){if(_u.existsSync(e))return;let r=zae(n,e);n=r.toDst,t=ele(r.toCwd,t);let o=V1.dirname(e);return _u.existsSync(o)||Qae(o),_u.symlinkSync(n,e,t)}nA.exports={createSymlink:Uae(tle),createSymlinkSync:ile}});var sA=b((YEe,oA)=>{"use strict";var om=q1(),sm=$1(),am=rA();oA.exports={createFile:om.createFile,createFileSync:om.createFileSync,ensureFile:om.createFile,ensureFileSync:om.createFileSync,createLink:sm.createLink,createLinkSync:sm.createLinkSync,ensureLink:sm.createLink,ensureLinkSync:sm.createLinkSync,createSymlink:am.createSymlink,createSymlinkSync:am.createSymlinkSync,ensureSymlink:am.createSymlink,ensureSymlinkSync:am.createSymlinkSync}});var lA=b((WEe,aA)=>{"use strict";var lm=QC();aA.exports={readJson:lm.readFile,readJsonSync:lm.readFileSync,writeJson:lm.writeFile,writeJsonSync:lm.writeFileSync}});var um=b((ZEe,hA)=>{"use strict";var nle=pt().fromCallback,bd=Ke(),uA=require("path"),cA=wr(),rle=As().pathExists;function ole(n,e,t,i){typeof t=="function"&&(i=t,t="utf8");let r=uA.dirname(n);rle(r,(o,s)=>{if(o)return i(o);if(s)return bd.writeFile(n,e,t,i);cA.mkdirs(r,a=>{if(a)return i(a);bd.writeFile(n,e,t,i)})})}function sle(n,...e){let t=uA.dirname(n);if(bd.existsSync(t))return bd.writeFileSync(n,...e);cA.mkdirsSync(t),bd.writeFileSync(n,...e)}hA.exports={outputFile:nle(ole),outputFileSync:sle}});var gA=b((JEe,dA)=>{"use strict";var{stringify:ale}=Cu(),{outputFile:lle}=um();async function ule(n,e,t={}){let i=ale(e,t);await lle(n,i,t)}dA.exports=ule});var pA=b(($Ee,fA)=>{"use strict";var{stringify:cle}=Cu(),{outputFileSync:hle}=um();function dle(n,e,t){let i=cle(e,t);hle(n,i,t)}fA.exports=dle});var bA=b((XEe,mA)=>{"use strict";var gle=pt().fromPromise,Wi=lA();Wi.outputJson=gle(gA());Wi.outputJsonSync=pA();Wi.outputJSON=Wi.outputJson;Wi.outputJSONSync=Wi.outputJsonSync;Wi.writeJSON=Wi.writeJson;Wi.writeJSONSync=Wi.writeJsonSync;Wi.readJSON=Wi.readJson;Wi.readJSONSync=Wi.readJsonSync;mA.exports=Wi});var xA=b((UEe,CA)=>{"use strict";var wA=Ke(),fle=require("path"),ple=bx().copySync,DA=pd().removeSync,mle=wr().mkdirpSync,yA=ud();function ble(n,e,t){t=t||{};let i=t.overwrite||t.clobber||!1,{srcStat:r}=yA.checkPathsSync(n,e,"move");return yA.checkParentPathsSync(n,r,e,"move"),mle(fle.dirname(e)),yle(n,e,i)}function yle(n,e,t){if(t)return DA(e),vA(n,e,t);if(wA.existsSync(e))throw new Error("dest already exists.");return vA(n,e,t)}function vA(n,e,t){try{wA.renameSync(n,e)}catch(i){if(i.code!=="EXDEV")throw i;return vle(n,e,t)}}function vle(n,e,t){return ple(n,e,{overwrite:t,errorOnExist:!0}),DA(n)}CA.exports=ble});var TA=b((GEe,SA)=>{"use strict";SA.exports={moveSync:xA()}});var RA=b((QEe,_A)=>{"use strict";var wle=Ke(),Dle=require("path"),Cle=vx().copy,PA=pd().remove,xle=wr().mkdirp,Sle=As().pathExists,kA=ud();function Tle(n,e,t,i){typeof t=="function"&&(i=t,t={});let r=t.overwrite||t.clobber||!1;kA.checkPaths(n,e,"move",(o,s)=>{if(o)return i(o);let{srcStat:a}=s;kA.checkParentPaths(n,a,e,"move",l=>{if(l)return i(l);xle(Dle.dirname(e),u=>u?i(u):kle(n,e,r,i))})})}function kle(n,e,t,i){if(t)return PA(e,r=>r?i(r):EA(n,e,t,i));Sle(e,(r,o)=>r?i(r):o?i(new Error("dest already exists.")):EA(n,e,t,i))}function EA(n,e,t,i){wle.rename(n,e,r=>r?r.code!=="EXDEV"?i(r):Ele(n,e,t,i):i())}function Ele(n,e,t,i){Cle(n,e,{overwrite:t,errorOnExist:!0},o=>o?i(o):PA(n,i))}_A.exports=Tle});var FA=b((KEe,LA)=>{"use strict";var Ple=pt().fromCallback;LA.exports={move:Ple(RA())}});var Rn=b((zEe,Dx)=>{"use strict";Dx.exports=de(de(de(de(de(de(de(de(de(de(de(de({},ld()),bx()),vx()),M1()),sA()),bA()),wr()),TA()),FA()),um()),As()),pd());var IA=require("fs");Object.getOwnPropertyDescriptor(IA,"promises")&&Object.defineProperty(Dx.exports,"promises",{get(){return IA.promises}})});var H=b((OA,MA)=>{"use strict";var tl=x(require("fs")),Cx=x(lx()),cm=x(require("path")),jA=x(require("os")),AA=x(Rn());function xx(){let n=process.env.NVIM_COC_LOG_FILE;if(n)return n;let e=process.env.XDG_RUNTIME_DIR;if(e)try{return tl.default.accessSync(e,tl.default.constants.R_OK|tl.default.constants.W_OK),cm.default.join(e,`coc-nvim-${process.pid}.log`)}catch{}let t=jA.default.tmpdir();return e=cm.default.join(t,`coc.nvim-${process.pid}`),tl.default.existsSync(e)||(0,AA.mkdirpSync)(e),cm.default.join(e,"coc-nvim.log")}var _le=1024*1024,Rle=10,hm=xx(),Lle=process.env.NVIM_COC_LOG_LEVEL||"info";if(tl.default.existsSync(hm))try{tl.default.writeFileSync(hm,"",{encoding:"utf8",mode:438})}catch{}OA.getLogFile=xx;Cx.default.configure({disableClustering:!0,appenders:{out:{type:"file",mode:438,filename:hm,maxLogSize:_le,backups:Rle,layout:{type:"pattern",pattern:`%d{ISO8601} %p (pid:${process.pid}) [%c] - %m`}}},categories:{default:{appenders:["out"],level:Lle}}});MA.exports=(n="coc-nvim")=>{let e=Cx.default.getLogger(n);return Object.assign(e,{getLogFile:xx,logfile:hm})}});var Sx=_(()=>{"use strict";Promise.prototype.logError=function(){this.catch(n=>{H()("util-extensions").error(n)})}});var BA=b((kx,NA)=>{NA.exports=Tx(typeof Buffer<"u"&&Buffer)||Tx(kx.Buffer)||Tx(typeof window<"u"&&window.Buffer)||kx.Buffer;function Tx(n){return n&&n.isBuffer&&n}});var dm=b((VEe,HA)=>{var Fle={}.toString;HA.exports=Array.isArray||function(n){return Fle.call(n)=="[object Array]"}});var WA=b((Lu,YA)=>{var Ru=Ln(),Lu=YA.exports=qA(0);Lu.alloc=qA;Lu.concat=Ru.concat;Lu.from=Ile;function qA(n){return new Array(n)}function Ile(n){if(!Ru.isBuffer(n)&&Ru.isView(n))n=Ru.Uint8Array.from(n);else if(Ru.isArrayBuffer(n))n=new Uint8Array(n);else{if(typeof n=="string")return Ru.from.call(Lu,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return Array.prototype.slice.call(n)}});var $A=b((Iu,JA)=>{var jo=Ln(),Fu=jo.global,Iu=JA.exports=jo.hasBuffer?ZA(0):[];Iu.alloc=jo.hasBuffer&&Fu.alloc||ZA;Iu.concat=jo.concat;Iu.from=jle;function ZA(n){return new Fu(n)}function jle(n){if(!jo.isBuffer(n)&&jo.isView(n))n=jo.Uint8Array.from(n);else if(jo.isArrayBuffer(n))n=new Uint8Array(n);else{if(typeof n=="string")return jo.from.call(Iu,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return Fu.from&&Fu.from.length!==1?Fu.from(n):new Fu(n)}});var GA=b((ju,UA)=>{var gm=Ln(),ju=UA.exports=gm.hasArrayBuffer?XA(0):[];ju.alloc=XA;ju.concat=gm.concat;ju.from=Ale;function XA(n){return new Uint8Array(n)}function Ale(n){if(gm.isView(n)){var e=n.byteOffset,t=n.byteLength;n=n.buffer,n.byteLength!==t&&(n.slice?n=n.slice(e,e+t):(n=new Uint8Array(n),n.byteLength!==t&&(n=Array.prototype.slice.call(n,e,e+t))))}else{if(typeof n=="string")return gm.from.call(ju,n);if(typeof n=="number")throw new TypeError('"value" argument must not be a number')}return new Uint8Array(n)}});var QA=b(fm=>{fm.copy=Nle;fm.toString=Mle;fm.write=Ole;function Ole(n,e){for(var t=this,i=e||(e|=0),r=n.length,o=0,s=0;s>>6,t[i++]=128|o&63):o<55296||o>57343?(t[i++]=224|o>>>12,t[i++]=128|o>>>6&63,t[i++]=128|o&63):(o=(o-55296<<10|n.charCodeAt(s++)-56320)+65536,t[i++]=240|o>>>18,t[i++]=128|o>>>12&63,t[i++]=128|o>>>6&63,t[i++]=128|o&63);return i-e}function Mle(n,e,t){var i=this,r=e|0;t||(t=i.length);for(var o="",s=0;r=65536?(s-=65536,o+=String.fromCharCode((s>>>10)+55296,(s&1023)+56320)):o+=String.fromCharCode(s)}return o}function Nle(n,e,t,i){var r;t||(t=0),!i&&i!==0&&(i=this.length),e||(e=0);var o=i-t;if(n===this&&t=0;r--)n[r+e]=this[r+t];else for(r=0;r{var Ex=QA();yd.copy=eO;yd.slice=tO;yd.toString=Ble;yd.write=Hle("write");var Ns=Ln(),KA=Ns.global,zA=Ns.hasBuffer&&"TYPED_ARRAY_SUPPORT"in KA,VA=zA&&!KA.TYPED_ARRAY_SUPPORT;function eO(n,e,t,i){var r=Ns.isBuffer(this),o=Ns.isBuffer(n);if(r&&o)return this.copy(n,e,t,i);if(!VA&&!r&&!o&&Ns.isView(this)&&Ns.isView(n)){var s=t||i!=null?tO.call(this,t,i):this;return n.set(s,e),s.length}else return Ex.copy.call(this,n,e,t,i)}function tO(n,e){var t=this.slice||!VA&&this.subarray;if(t)return t.call(this,n,e);var i=Ns.alloc.call(this,e-n);return eO.call(this,i,0,n,e),i}function Ble(n,e,t){var i=!zA&&Ns.isBuffer(this)?this.toString:Ex.toString;return i.apply(this,arguments)}function Hle(n){return e;function e(){var t=this[n]||Ex[n];return t.apply(this,arguments)}}});var Ln=b(Ti=>{var Px=Ti.global=BA(),oO=Ti.hasBuffer=Px&&!!Px.isBuffer,Rx=Ti.hasArrayBuffer=typeof ArrayBuffer<"u",qle=Ti.isArray=dm();Ti.isArrayBuffer=Rx?Xle:Fx;var Yle=Ti.isBuffer=oO?Px.isBuffer:Fx,Wle=Ti.isView=Rx?ArrayBuffer.isView||aO("ArrayBuffer","buffer"):Fx;Ti.alloc=Lx;Ti.concat=Jle;Ti.from=Zle;var iO=Ti.Array=WA(),nO=Ti.Buffer=$A(),rO=Ti.Uint8Array=GA(),_x=Ti.prototype=pm();function Zle(n){return typeof n=="string"?Ule.call(this,n):sO(this).from(n)}function Lx(n){return sO(this).alloc(n)}function Jle(n,e){e||(e=0,Array.prototype.forEach.call(n,o));var t=this!==Ti&&this||n[0],i=Lx.call(t,e),r=0;return Array.prototype.forEach.call(n,s),i;function o(a){e+=a.length}function s(a){r+=_x.copy.call(a,i,r)}}var $le=aO("ArrayBuffer");function Xle(n){return n instanceof ArrayBuffer||$le(n)}function Ule(n){var e=n.length*3,t=Lx.call(this,e),i=_x.write.call(t,n);return e!==i&&(t=_x.slice.call(t,0,i)),t}function sO(n){return Yle(n)?nO:Wle(n)?rO:qle(n)?iO:oO?nO:Rx?rO:iO}function Fx(){return!1}function aO(n,e){return n="[object "+n+"]",function(t){return t!=null&&{}.toString.call(e?t[e]:t)===n}}});var mm=b(lO=>{lO.ExtBuffer=Ix;var Gle=Ln();function Ix(n,e){if(!(this instanceof Ix))return new Ix(n,e);this.buffer=Gle.from(n),this.type=e}});var cO=b(uO=>{uO.setExtPackers=zle;var bm=Ln(),Qle=bm.global,Dr=bm.Uint8Array.from,jx,Kle={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function zle(n){n.addExtPacker(14,Error,[il,Jn]),n.addExtPacker(1,EvalError,[il,Jn]),n.addExtPacker(2,RangeError,[il,Jn]),n.addExtPacker(3,ReferenceError,[il,Jn]),n.addExtPacker(4,SyntaxError,[il,Jn]),n.addExtPacker(5,TypeError,[il,Jn]),n.addExtPacker(6,URIError,[il,Jn]),n.addExtPacker(10,RegExp,[Vle,Jn]),n.addExtPacker(11,Boolean,[Ax,Jn]),n.addExtPacker(12,String,[Ax,Jn]),n.addExtPacker(13,Date,[Number,Jn]),n.addExtPacker(15,Number,[Ax,Jn]),typeof Uint8Array<"u"&&(n.addExtPacker(17,Int8Array,Dr),n.addExtPacker(18,Uint8Array,Dr),n.addExtPacker(19,Int16Array,Dr),n.addExtPacker(20,Uint16Array,Dr),n.addExtPacker(21,Int32Array,Dr),n.addExtPacker(22,Uint32Array,Dr),n.addExtPacker(23,Float32Array,Dr),typeof Float64Array<"u"&&n.addExtPacker(24,Float64Array,Dr),typeof Uint8ClampedArray<"u"&&n.addExtPacker(25,Uint8ClampedArray,Dr),n.addExtPacker(26,ArrayBuffer,Dr),n.addExtPacker(29,DataView,Dr)),bm.hasBuffer&&n.addExtPacker(27,Qle,bm.from)}function Jn(n){return jx||(jx=Ox().encode),jx(n)}function Ax(n){return n.valueOf()}function Vle(n){n=RegExp.prototype.toString.call(n).split("/"),n.shift();var e=[n.pop()];return e.unshift(n.join("/")),e}function il(n){var e={};for(var t in Kle)e[t]=n[t];return e}});var ym=b(vd=>{var eue,tue,iue,nue;(function(n){var e="undefined",t=e!==typeof Buffer&&Buffer,i=e!==typeof Uint8Array&&Uint8Array,r=e!==typeof ArrayBuffer&&ArrayBuffer,o=[0,0,0,0,0,0,0,0],s=Array.isArray||L,a=4294967296,l=16777216,u;eue=c("Uint64BE",!0,!0),tue=c("Int64BE",!0,!1),iue=c("Uint64LE",!1,!0),nue=c("Int64LE",!1,!1);function c(j,I,W){var A=I?0:4,M=I?4:0,F=I?0:3,N=I?1:2,Z=I?2:1,z=I?3:0,ae=I?v:D,je=I?w:S,Re=Ci.prototype,et="is"+j,_t="_"+et;return Re.buffer=void 0,Re.offset=0,Re[_t]=!0,Re.toNumber=pp,Re.toString=kC,Re.toJSON=pp,Re.toArray=h,t&&(Re.toBuffer=d),i&&(Re.toArrayBuffer=g),Ci[et]=bs,n[j]=Ci,Ci;function Ci(Le,Te,ke,Fe){return this instanceof Ci?Ro(this,Le,Te,ke,Fe):new Ci(Le,Te,ke,Fe)}function bs(Le){return!!(Le&&Le[_t])}function Ro(Le,Te,ke,Fe,jt){if(i&&r&&(Te instanceof r&&(Te=new i(Te)),Fe instanceof r&&(Fe=new i(Fe))),!Te&&!ke&&!Fe&&!u){Le.buffer=m(o,0);return}if(!f(Te,ke)){var fr=u||Array;jt=ke,Fe=Te,ke=0,Te=new fr(8)}Le.buffer=Te,Le.offset=ke|=0,e!==typeof Fe&&(typeof Fe=="string"?fp(Te,ke,Fe,jt||10):f(Fe,jt)?p(Te,ke,Fe,jt):typeof jt=="number"?(hu(Te,ke+A,Fe),hu(Te,ke+M,jt)):Fe>0?ae(Te,ke,Fe):Fe<0?je(Te,ke,Fe):p(Te,ke,o,0))}function fp(Le,Te,ke,Fe){var jt=0,fr=ke.length,pr=0,kn=0;ke[0]==="-"&&jt++;for(var ys=jt;jt=0))break;kn=kn*Fe+vs,pr=pr*Fe+Math.floor(kn/a),kn%=a}ys&&(pr=~pr,kn?kn=a-kn:pr++),hu(Le,Te+A,pr),hu(Le,Te+M,kn)}function pp(){var Le=this.buffer,Te=this.offset,ke=du(Le,Te+A),Fe=du(Le,Te+M);return W||(ke|=0),ke?ke*a+Fe:Fe}function kC(Le){var Te=this.buffer,ke=this.offset,Fe=du(Te,ke+A),jt=du(Te,ke+M),fr="",pr=!W&&Fe&2147483648;for(pr&&(Fe=~Fe,jt=a-jt),Le=Le||10;;){var kn=Fe%Le*a+jt;if(Fe=Math.floor(Fe/Le),jt=Math.floor(kn/Le),fr=(kn%Le).toString(Le)+fr,!Fe&&!jt)break}return pr&&(fr="-"+fr),fr}function hu(Le,Te,ke){Le[Te+z]=ke&255,ke=ke>>8,Le[Te+Z]=ke&255,ke=ke>>8,Le[Te+N]=ke&255,ke=ke>>8,Le[Te+F]=ke&255}function du(Le,Te){return Le[Te+F]*l+(Le[Te+N]<<16)+(Le[Te+Z]<<8)+Le[Te+z]}}function h(j){var I=this.buffer,W=this.offset;return u=null,j!==!1&&W===0&&I.length===8&&s(I)?I:m(I,W)}function d(j){var I=this.buffer,W=this.offset;if(u=t,j!==!1&&W===0&&I.length===8&&Buffer.isBuffer(I))return I;var A=new t(8);return p(A,0,I,W),A}function g(j){var I=this.buffer,W=this.offset,A=I.buffer;if(u=i,j!==!1&&W===0&&A instanceof r&&A.byteLength===8)return A;var M=new i(8);return p(M,0,I,W),M.buffer}function f(j,I){var W=j&&j.length;return I|=0,W&&I+8<=W&&typeof j[I]!="string"}function p(j,I,W,A){I|=0,A|=0;for(var M=0;M<8;M++)j[I++]=W[A++]&255}function m(j,I){return Array.prototype.slice.call(j,I,I+8)}function v(j,I,W){for(var A=I+8;A>I;)j[--A]=W&255,W/=256}function w(j,I,W){var A=I+8;for(W++;A>I;)j[--A]=-W&255^255,W/=256}function D(j,I,W){for(var A=I+8;I{Mx.read=function(n,e,t,i,r){var o,s,a=r*8-i-1,l=(1<>1,c=-7,h=t?r-1:0,d=t?-1:1,g=n[e+h];for(h+=d,o=g&(1<<-c)-1,g>>=-c,c+=a;c>0;o=o*256+n[e+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=i;c>0;s=s*256+n[e+h],h+=d,c-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-u}return(g?-1:1)*s*Math.pow(2,o-i)};Mx.write=function(n,e,t,i,r,o){var s,a,l,u=o*8-r-1,c=(1<>1,d=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:o-1,f=i?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?e+=d/l:e+=d*Math.pow(2,1-h),e*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*l-1)*Math.pow(2,r),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),s=0));r>=8;n[t+g]=a&255,g+=f,a/=256,r-=8);for(s=s<0;n[t+g]=s&255,g+=f,s/=256,u-=8);n[t+g-f]|=p*128}});var Bx=b(hO=>{var rue=hO.uint8=new Array(256);for(wd=0;wd<=255;wd++)rue[wd]=oue(wd);var wd;function oue(n){return function(e){var t=e.reserve(1);e.buffer[t]=n}}});var CO=b(DO=>{var gO=Nx(),fO=ym(),sue=fO.Uint64BE,aue=fO.Int64BE,pO=Bx().uint8,vm=Ln(),xt=vm.global,lue=vm.hasBuffer&&"TYPED_ARRAY_SUPPORT"in xt,uue=lue&&!xt.TYPED_ARRAY_SUPPORT,dO=vm.hasBuffer&&xt.prototype||{};DO.getWriteToken=cue;function cue(n){return n&&n.uint8array?hue():uue||vm.hasBuffer&&n&&n.safe?due():mO()}function hue(){var n=mO();return n[202]=ze(202,4,vO),n[203]=ze(203,8,wO),n}function mO(){var n=pO.slice();return n[196]=Dd(196),n[197]=nl(197),n[198]=rl(198),n[199]=Dd(199),n[200]=nl(200),n[201]=rl(201),n[202]=ze(202,4,dO.writeFloatBE||vO,!0),n[203]=ze(203,8,dO.writeDoubleBE||wO,!0),n[204]=Dd(204),n[205]=nl(205),n[206]=rl(206),n[207]=ze(207,8,bO),n[208]=Dd(208),n[209]=nl(209),n[210]=rl(210),n[211]=ze(211,8,yO),n[217]=Dd(217),n[218]=nl(218),n[219]=rl(219),n[220]=nl(220),n[221]=rl(221),n[222]=nl(222),n[223]=rl(223),n}function due(){var n=pO.slice();return n[196]=ze(196,1,xt.prototype.writeUInt8),n[197]=ze(197,2,xt.prototype.writeUInt16BE),n[198]=ze(198,4,xt.prototype.writeUInt32BE),n[199]=ze(199,1,xt.prototype.writeUInt8),n[200]=ze(200,2,xt.prototype.writeUInt16BE),n[201]=ze(201,4,xt.prototype.writeUInt32BE),n[202]=ze(202,4,xt.prototype.writeFloatBE),n[203]=ze(203,8,xt.prototype.writeDoubleBE),n[204]=ze(204,1,xt.prototype.writeUInt8),n[205]=ze(205,2,xt.prototype.writeUInt16BE),n[206]=ze(206,4,xt.prototype.writeUInt32BE),n[207]=ze(207,8,bO),n[208]=ze(208,1,xt.prototype.writeInt8),n[209]=ze(209,2,xt.prototype.writeInt16BE),n[210]=ze(210,4,xt.prototype.writeInt32BE),n[211]=ze(211,8,yO),n[217]=ze(217,1,xt.prototype.writeUInt8),n[218]=ze(218,2,xt.prototype.writeUInt16BE),n[219]=ze(219,4,xt.prototype.writeUInt32BE),n[220]=ze(220,2,xt.prototype.writeUInt16BE),n[221]=ze(221,4,xt.prototype.writeUInt32BE),n[222]=ze(222,2,xt.prototype.writeUInt16BE),n[223]=ze(223,4,xt.prototype.writeUInt32BE),n}function Dd(n){return function(e,t){var i=e.reserve(2),r=e.buffer;r[i++]=n,r[i]=t}}function nl(n){return function(e,t){var i=e.reserve(3),r=e.buffer;r[i++]=n,r[i++]=t>>>8,r[i]=t}}function rl(n){return function(e,t){var i=e.reserve(5),r=e.buffer;r[i++]=n,r[i++]=t>>>24,r[i++]=t>>>16,r[i++]=t>>>8,r[i]=t}}function ze(n,e,t,i){return function(r,o){var s=r.reserve(e+1);r.buffer[s++]=n,t.call(r.buffer,o,s,i)}}function bO(n,e){new sue(this,e,n)}function yO(n,e){new aue(this,e,n)}function vO(n,e){gO.write(this,n,e,!1,23,4)}function wO(n,e){gO.write(this,n,e,!1,52,8)}});var EO=b(kO=>{var gue=dm(),TO=ym(),fue=TO.Uint64BE,pue=TO.Int64BE,xO=Ln(),SO=pm(),mue=CO(),bue=Bx().uint8,yue=mm().ExtBuffer,vue=typeof Uint8Array<"u",wue=typeof Map<"u",Au=[];Au[1]=212;Au[2]=213;Au[4]=214;Au[8]=215;Au[16]=216;kO.getWriteType=Due;function Due(n){var e=mue.getWriteToken(n),t=n&&n.useraw,i=vue&&n&&n.binarraybuffer,r=i?xO.isArrayBuffer:xO.isBuffer,o=i?L:S,s=wue&&n&&n.usemap,a=s?W:I,l={boolean:u,function:w,number:c,object:t?v:m,string:p(t?f:g),symbol:w,undefined:w};return l;function u(M,F){var N=F?195:194;e[N](M,F)}function c(M,F){var N=F|0,Z;if(F!==N){Z=203,e[Z](M,F);return}else-32<=N&&N<=127?Z=N&255:0<=N?Z=N<=255?204:N<=65535?205:206:Z=-128<=N?208:-32768<=N?209:210;e[Z](M,N)}function h(M,F){var N=207;e[N](M,F.toArray())}function d(M,F){var N=211;e[N](M,F.toArray())}function g(M){return M<32?1:M<=255?2:M<=65535?3:5}function f(M){return M<32?1:M<=65535?3:5}function p(M){return F;function F(N,Z){var z=Z.length,ae=5+z*3;N.offset=N.reserve(ae);var je=N.buffer,Re=M(z),et=N.offset+Re;z=SO.write.call(je,Z,et);var _t=M(z);if(Re!==_t){var Ci=et+_t-Re,bs=et+z;SO.copy.call(je,je,Ci,et,bs)}var Ro=_t===1?160+z:_t<=3?215+_t:219;e[Ro](N,z),N.offset+=z}}function m(M,F){if(F===null)return w(M,F);if(r(F))return o(M,F);if(gue(F))return D(M,F);if(fue.isUint64BE(F))return h(M,F);if(pue.isInt64BE(F))return d(M,F);var N=M.codec.getExtPacker(F);if(N&&(F=N(F)),F instanceof yue)return j(M,F);a(M,F)}function v(M,F){if(r(F))return A(M,F);m(M,F)}function w(M,F){var N=192;e[N](M,F)}function D(M,F){var N=F.length,Z=N<16?144+N:N<=65535?220:221;e[Z](M,N);for(var z=M.codec.encode,ae=0;ae{var Cue=dm();Cd.createCodec=PO;Cd.install=Sue;Cd.filter=Eue;var xue=Ln();function Ou(n){if(!(this instanceof Ou))return new Ou(n);this.options=n,this.init()}Ou.prototype.init=function(){var n=this.options;return n&&n.uint8array&&(this.bufferish=xue.Uint8Array),this};function Sue(n){for(var e in n)Ou.prototype[e]=Tue(Ou.prototype[e],n[e])}function Tue(n,e){return n&&e?t:n||e;function t(){return n.apply(this,arguments),e.apply(this,arguments)}}function kue(n){return n=n.slice(),function(t){return n.reduce(e,t)};function e(t,i){return i(t)}}function Eue(n){return Cue(n)?kue(n):n}function PO(n){return new Ou(n)}Cd.preset=PO({preset:!0})});var wm=b(RO=>{var Pue=mm().ExtBuffer,_ue=cO(),Rue=EO(),Hx=xd();Hx.install({addExtPacker:Fue,getExtPacker:Iue,init:_O});RO.preset=_O.call(Hx.preset);function Lue(n){var e=Rue.getWriteType(n);return t;function t(i,r){var o=e[typeof r];if(!o)throw new Error('Unsupported type "'+typeof r+'": '+r);o(i,r)}}function _O(){var n=this.options;return this.encode=Lue(n),n&&n.preset&&_ue.setExtPackers(this),this}function Fue(n,e,t){t=Hx.filter(t);var i=e.name;if(i&&i!=="Object"){var r=this.extPackers||(this.extPackers={});r[i]=s}else{var o=this.extEncoderList||(this.extEncoderList=[]);o.unshift([e,s])}function s(a){return t&&(a=t(a)),new Pue(a,n)}}function Iue(n){var e=this.extPackers||(this.extPackers={}),t=n.constructor,i=t&&t.name&&e[t.name];if(i)return i;for(var r=this.extEncoderList||(this.extEncoderList=[]),o=r.length,s=0;s{qx.FlexDecoder=Mu;qx.FlexEncoder=Nu;var Sd=Ln(),jue=2048,Aue=65536,LO="BUFFER_SHORTAGE";function Mu(){if(!(this instanceof Mu))return new Mu}function Nu(){if(!(this instanceof Nu))return new Nu}Mu.mixin=jO(Oue());Mu.mixin(Mu.prototype);Nu.mixin=jO(Mue());Nu.mixin(Nu.prototype);function Oue(){return{bufferish:Sd,write:n,fetch:Bue,flush:e,push:IO,pull:Hue,read:FO,reserve:t,offset:0};function n(i){var r=this.offset?Sd.prototype.slice.call(this.buffer,this.offset):this.buffer;this.buffer=r?i?this.bufferish.concat([r,i]):r:i,this.offset=0}function e(){for(;this.offsetthis.buffer.length)throw new Error(LO);return this.offset=o,r}}function Mue(){return{bufferish:Sd,write:Nue,fetch:n,flush:e,push:IO,pull:t,read:FO,reserve:i,send:r,maxBufferSize:Aue,minBufferSize:jue,offset:0,start:0};function n(){var o=this.start;if(o1?this.bufferish.concat(o):o[0];return o.length=0,s}function i(o){var s=o|0;if(this.buffer){var a=this.buffer.length,l=this.offset|0,u=l+s;if(uthis.minBufferSize)this.flush(),this.push(o);else{var a=this.reserve(s);Sd.prototype.copy.call(o,this.buffer,a)}}}function Nue(){throw new Error("method not implemented: write()")}function Bue(){throw new Error("method not implemented: fetch()")}function FO(){var n=this.buffers&&this.buffers.length;return n?(this.flush(),this.pull()):this.fetch()}function IO(n){var e=this.buffers||(this.buffers=[]);e.push(n)}function Hue(){var n=this.buffers||(this.buffers=[]);return n.shift()}function jO(n){return e;function e(t){for(var i in n)t[i]=n[i];return t}}});var Dm=b(AO=>{AO.EncodeBuffer=Bu;var que=wm().preset,Yue=Yx().FlexEncoder;Yue.mixin(Bu.prototype);function Bu(n){if(!(this instanceof Bu))return new Bu(n);if(n&&(this.options=n,n.codec)){var e=this.codec=n.codec;e.bufferish&&(this.bufferish=e.bufferish)}}Bu.prototype.codec=que;Bu.prototype.write=function(n){this.codec.encode(this,n)}});var Ox=b(OO=>{OO.encode=Zue;var Wue=Dm().EncodeBuffer;function Zue(n,e){var t=new Wue(e);return t.write(n),t.read()}});var BO=b(NO=>{NO.setExtUnpackers=Xue;var MO=Ln(),Jue=MO.global,Wx,$ue={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function Xue(n){n.addExtUnpacker(14,[$n,ol(Error)]),n.addExtUnpacker(1,[$n,ol(EvalError)]),n.addExtUnpacker(2,[$n,ol(RangeError)]),n.addExtUnpacker(3,[$n,ol(ReferenceError)]),n.addExtUnpacker(4,[$n,ol(SyntaxError)]),n.addExtUnpacker(5,[$n,ol(TypeError)]),n.addExtUnpacker(6,[$n,ol(URIError)]),n.addExtUnpacker(10,[$n,Uue]),n.addExtUnpacker(11,[$n,Zi(Boolean)]),n.addExtUnpacker(12,[$n,Zi(String)]),n.addExtUnpacker(13,[$n,Zi(Date)]),n.addExtUnpacker(15,[$n,Zi(Number)]),typeof Uint8Array<"u"&&(n.addExtUnpacker(17,Zi(Int8Array)),n.addExtUnpacker(18,Zi(Uint8Array)),n.addExtUnpacker(19,[Bs,Zi(Int16Array)]),n.addExtUnpacker(20,[Bs,Zi(Uint16Array)]),n.addExtUnpacker(21,[Bs,Zi(Int32Array)]),n.addExtUnpacker(22,[Bs,Zi(Uint32Array)]),n.addExtUnpacker(23,[Bs,Zi(Float32Array)]),typeof Float64Array<"u"&&n.addExtUnpacker(24,[Bs,Zi(Float64Array)]),typeof Uint8ClampedArray<"u"&&n.addExtUnpacker(25,Zi(Uint8ClampedArray)),n.addExtUnpacker(26,Bs),n.addExtUnpacker(29,[Bs,Zi(DataView)])),MO.hasBuffer&&n.addExtUnpacker(27,Zi(Jue))}function $n(n){return Wx||(Wx=Zx().decode),Wx(n)}function Uue(n){return RegExp.apply(null,n)}function ol(n){return function(e){var t=new n;for(var i in $ue)t[i]=e[i];return t}}function Zi(n){return function(e){return new n(e)}}function Bs(n){return new Uint8Array(n).buffer}});var Xx=b($x=>{var HO=Nx(),qO=ym(),YO=qO.Uint64BE,WO=qO.Int64BE;$x.getReadFormat=Kue;$x.readUint8=ZO;var Jx=Ln(),xm=pm(),Gue=typeof Map<"u",Que=!0;function Kue(n){var e=Jx.hasArrayBuffer&&n&&n.binarraybuffer,t=n&&n.int64,i=Gue&&n&&n.usemap,r={map:i?Vue:zue,array:ece,str:tce,bin:e?nce:ice,ext:rce,uint8:ZO,uint16:sce,uint32:lce,uint64:Cm(8,t?dce:cce),int8:oce,int16:ace,int32:uce,int64:Cm(8,t?gce:hce),float32:Cm(4,fce),float64:Cm(8,pce)};return r}function zue(n,e){var t={},i,r=new Array(e),o=new Array(e),s=n.codec.decode;for(i=0;i{var mce=Xx();$O.getReadToken=bce;function bce(n){var e=mce.getReadFormat(n);return n&&n.useraw?yce(e):JO(e)}function JO(n){var e,t=new Array(256);for(e=0;e<=127;e++)t[e]=Td(e);for(e=128;e<=143;e++)t[e]=Ao(e-128,n.map);for(e=144;e<=159;e++)t[e]=Ao(e-144,n.array);for(e=160;e<=191;e++)t[e]=Ao(e-160,n.str);for(t[192]=Td(null),t[193]=null,t[194]=Td(!1),t[195]=Td(!0),t[196]=Fn(n.uint8,n.bin),t[197]=Fn(n.uint16,n.bin),t[198]=Fn(n.uint32,n.bin),t[199]=Fn(n.uint8,n.ext),t[200]=Fn(n.uint16,n.ext),t[201]=Fn(n.uint32,n.ext),t[202]=n.float32,t[203]=n.float64,t[204]=n.uint8,t[205]=n.uint16,t[206]=n.uint32,t[207]=n.uint64,t[208]=n.int8,t[209]=n.int16,t[210]=n.int32,t[211]=n.int64,t[212]=Ao(1,n.ext),t[213]=Ao(2,n.ext),t[214]=Ao(4,n.ext),t[215]=Ao(8,n.ext),t[216]=Ao(16,n.ext),t[217]=Fn(n.uint8,n.str),t[218]=Fn(n.uint16,n.str),t[219]=Fn(n.uint32,n.str),t[220]=Fn(n.uint16,n.array),t[221]=Fn(n.uint32,n.array),t[222]=Fn(n.uint16,n.map),t[223]=Fn(n.uint32,n.map),e=224;e<=255;e++)t[e]=Td(e-256);return t}function yce(n){var e,t=JO(n).slice();for(t[217]=t[196],t[218]=t[197],t[219]=t[198],e=160;e<=191;e++)t[e]=Ao(e-160,n.bin);return t}function Td(n){return function(){return n}}function Fn(n,e){return function(t){var i=n(t);return e(t,i)}}function Ao(n,e){return function(t){return e(t,n)}}});var Sm=b(GO=>{var vce=mm().ExtBuffer,wce=BO(),Dce=Xx().readUint8,Cce=XO(),Ux=xd();Ux.install({addExtUnpacker:Sce,getExtUnpacker:Tce,init:UO});GO.preset=UO.call(Ux.preset);function xce(n){var e=Cce.getReadToken(n);return t;function t(i){var r=Dce(i),o=e[r];if(!o)throw new Error("Invalid type: "+(r&&"0x"+r.toString(16)));return o(i)}}function UO(){var n=this.options;return this.decode=xce(n),n&&n.preset&&wce.setExtUnpackers(this),this}function Sce(n,e){var t=this.extUnpackers||(this.extUnpackers=[]);t[n]=Ux.filter(e)}function Tce(n){var e=this.extUnpackers||(this.extUnpackers=[]);return e[n]||t;function t(i){return new vce(i,n)}}});var Tm=b(QO=>{QO.DecodeBuffer=Hu;var kce=Sm().preset,Ece=Yx().FlexDecoder;Ece.mixin(Hu.prototype);function Hu(n){if(!(this instanceof Hu))return new Hu(n);if(n&&(this.options=n,n.codec)){var e=this.codec=n.codec;e.bufferish&&(this.bufferish=e.bufferish)}}Hu.prototype.codec=kce;Hu.prototype.fetch=function(){return this.codec.decode(this)}});var Zx=b(KO=>{KO.decode=_ce;var Pce=Tm().DecodeBuffer;function _ce(n,e){var t=new Pce(e);return t.write(n),t.read()}});var Kx=b((DPe,Qx)=>{function Gx(){if(!(this instanceof Gx))return new Gx}(function(n){typeof Qx<"u"&&(Qx.exports=n);var e="listeners",t={on:r,once:o,off:s,emit:a};i(n.prototype),n.mixin=i;function i(u){for(var c in t)u[c]=t[c];return u}function r(u,c){return l(this,u).push(c),this}function o(u,c){var h=this;return d.originalListener=c,l(h,u).push(d),h;function d(){s.call(h,u,d),c.apply(this,arguments)}}function s(u,c){var h=this,d;if(!arguments.length)delete h[e];else if(c){if(d=l(h,u,!0),d){if(d=d.filter(g),!d.length)return s.call(h,u);h[e][u]=d}}else if(d=h[e],d&&(delete d[u],!Object.keys(d).length))return s.call(h);return h;function g(f){return f!==c&&f.originalListener!==c}}function a(u,c){var h=this,d=l(h,u,!0);if(!d)return!1;var g=arguments.length;if(g===1)d.forEach(p);else if(g===2)d.forEach(m);else{var f=Array.prototype.slice.call(arguments,1);d.forEach(v)}return!!d.length;function p(w){w.call(h)}function m(w){w.call(h,c)}function v(w){w.apply(h,f)}}function l(u,c,h){if(!(h&&!u[e])){var d=u[e]||(u[e]={});return d[c]||(d[c]=[])}}})(Gx)});var eM=b(VO=>{VO.Encoder=sl;var Rce=Kx(),zO=Dm().EncodeBuffer;function sl(n){if(!(this instanceof sl))return new sl(n);zO.call(this,n)}sl.prototype=new zO;Rce.mixin(sl.prototype);sl.prototype.encode=function(n){this.write(n),this.emit("data",this.read())};sl.prototype.end=function(n){arguments.length&&this.encode(n),this.flush(),this.emit("end")}});var nM=b(iM=>{iM.Decoder=Hs;var Lce=Kx(),tM=Tm().DecodeBuffer;function Hs(n){if(!(this instanceof Hs))return new Hs(n);tM.call(this,n)}Hs.prototype=new tM;Lce.mixin(Hs.prototype);Hs.prototype.decode=function(n){arguments.length&&this.write(n),this.flush()};Hs.prototype.push=function(n){this.emit("data",n)};Hs.prototype.end=function(n){this.decode(n),this.emit("end")}});var sM=b(oM=>{oM.createEncodeStream=qu;var Fce=require("util"),rM=require("stream").Transform,Ice=Dm().EncodeBuffer;Fce.inherits(qu,rM);var jce={objectMode:!0};function qu(n){if(!(this instanceof qu))return new qu(n);n?n.objectMode=!0:n=jce,rM.call(this,n);var e=this,t=this.encoder=new Ice(n);t.push=function(i){e.push(i)}}qu.prototype._transform=function(n,e,t){this.encoder.write(n),t&&t()};qu.prototype._flush=function(n){this.encoder.flush(),n&&n()}});var uM=b(lM=>{lM.createDecodeStream=kd;var Ace=require("util"),aM=require("stream").Transform,Oce=Tm().DecodeBuffer;Ace.inherits(kd,aM);var Mce={objectMode:!0};function kd(n){if(!(this instanceof kd))return new kd(n);n?n.objectMode=!0:n=Mce,aM.call(this,n);var e=this,t=this.decoder=new Oce(n);t.push=function(i){e.push(i)}}kd.prototype._transform=function(n,e,t){this.decoder.write(n),this.decoder.flush(),t&&t()}});var hM=b(cM=>{Sm();wm();cM.createCodec=xd().createCodec});var gM=b(dM=>{Sm();wm();dM.codec={preset:xd().preset}});var fM=b(Oo=>{Oo.encode=Ox().encode;Oo.decode=Zx().decode;Oo.Encoder=eM().Encoder;Oo.Decoder=nM().Decoder;Oo.createEncodeStream=sM().createEncodeStream;Oo.createDecodeStream=uM().createDecodeStream;Oo.createCodec=hM().createCodec;Oo.codec=gM().codec});var mM=b(zx=>{"use strict";Object.defineProperty(zx,"__esModule",{value:!0});var Nce=require("stream"),pM=class extends Nce.Transform{constructor(){super({readableHighWaterMark:10*1024*1024,writableHighWaterMark:10*1024*1024});this.chunks=null,this.timer=null}sendData(){let{chunks:e}=this;if(e){this.chunks=null;let t=Buffer.concat(e);this.push(t)}}_transform(e,t,i){let{chunks:r,timer:o}=this,s=Buffer.poolSize;if(o&&clearTimeout(o),e.length{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.BaseApi=void 0;var Bce=require("events"),Hce=process.env.VIM_NODE_RPC=="1",bM=class extends Bce.EventEmitter{constructor({transport:e,data:t,client:i}){super();this.setTransport(e),this.data=t,this.client=i}setTransport(e){this.transport=e}equals(e){try{return String(this.data)===String(e.data)}catch{return!1}}async request(e,t=[]){let i=Error().stack;return new Promise((r,o)=>{this.transport.request(e,this.getArgsByPrefix(t),(s,a)=>{if(s){let l=new Error(`${s[1].split(/\r?\n/)[0]}`);l.stack=`Error: request error on ${e} - ${s[1]} -`+i.split(/\r?\n/).slice(3).join(` -`),e.endsWith("get_var")||this.client.logError(`request error on "${e}"`,t,s[1],i),o(l)}else r(a)})})}getArgsByPrefix(e){return this.prefix!=="nvim_"&&e[0]!=this?[Hce?this.data:this,...e]:e}getVar(e){return this.request(`${this.prefix}get_var`,[e]).then(t=>t,t=>null)}setVar(e,t,i=!1){if(i){this.notify(`${this.prefix}set_var`,[e,t]);return}return this.request(`${this.prefix}set_var`,[e,t])}deleteVar(e){this.notify(`${this.prefix}del_var`,[e])}getOption(e){return this.request(`${this.prefix}get_option`,[e])}setOption(e,t,i){if(i){this.notify(`${this.prefix}set_option`,[e,t]);return}return this.request(`${this.prefix}set_option`,[e,t])}notify(e,t=[]){this.transport.notify(e,this.getArgsByPrefix(t))}};km.BaseApi=bM});var Pd=b(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.Buffer=void 0;var qce=Ed(),yM=class extends qce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_buf_"}async attach(e=!1,t={}){return await this.request(`${this.prefix}attach`,[e,t])}async detach(){return await this.request(`${this.prefix}detach`,[])}get id(){return this.data}get length(){return this.request(`${this.prefix}line_count`,[])}get lines(){return this.getLines()}get changedtick(){return this.request(`${this.prefix}get_changedtick`,[])}get commands(){return this.getCommands()}getCommands(e={}){return this.request(`${this.prefix}get_commands`,[e])}getLines({start:e,end:t,strictIndexing:i}={start:0,end:-1,strictIndexing:!0}){let r=typeof i>"u"?!0:i;return this.request(`${this.prefix}get_lines`,[e,t,r])}setLines(e,t,i=!1){let{start:r,end:o,strictIndexing:s}=t!=null?t:{};r=r!=null?r:0,o=o!=null?o:r+1;let a=s!=null?s:!0;return this[i?"notify":"request"](`${this.prefix}set_lines`,[r,o,a,typeof e=="string"?[e]:e])}setVirtualText(e,t,i,r={}){return this.client.isVim?Promise.resolve(-1):(this.notify(`${this.prefix}set_virtual_text`,[e,t,i,r]),Promise.resolve(e))}deleteExtMark(e,t){this.client.isVim||this.notify(`${this.prefix}del_extmark`,[e,t])}async getExtMarkById(e,t,i={}){return this.client.isVim?Promise.resolve([]):this.request(`${this.prefix}get_extmark_by_id`,[e,t,i])}async getExtMarks(e,t,i,r={}){return this.client.isVim?Promise.resolve([]):this.request(`${this.prefix}get_extmarks`,[e,t,i,r])}setExtMark(e,t,i,r={}){this.client.isVim||this.notify(`${this.prefix}set_extmark`,[e,t,i,r])}insert(e,t){return this.setLines(e,{start:t,end:t,strictIndexing:!0})}replace(e,t){let i=typeof e=="string"?[e]:e;return this.setLines(i,{start:t,end:t+i.length,strictIndexing:!1})}remove(e,t,i=!1){return this.setLines([],{start:e,end:t,strictIndexing:i})}append(e){return this.setLines(e,{start:-1,end:-1,strictIndexing:!1})}get name(){return this.request(`${this.prefix}get_name`,[])}setName(e){return this.request(`${this.prefix}set_name`,[e])}get valid(){return this.request(`${this.prefix}is_valid`,[])}mark(e){return this.request(`${this.prefix}get_mark`,[e])}getKeymap(e){return this.request(`${this.prefix}get_keymap`,[e])}setKeymap(e,t,i,r={}){this.client.call("coc#compat#buf_add_keymap",[this.id,e,t,i,r],!0)}get loaded(){return this.request(`${this.prefix}is_loaded`,[])}getOffset(e){return this.request(`${this.prefix}get_offset`,[e])}addHighlight({hlGroup:e,line:t,colStart:i,colEnd:r,srcId:o}){if(!e)throw new Error("hlGroup should not empty");let s=typeof r<"u"?r:-1,a=typeof i<"u"?i:-0,l=typeof o<"u"?o:-1,u=l==0?"request":"notify",c=this[u](`${this.prefix}add_highlight`,[l,e,t,a,s]);return u==="request"?c:Promise.resolve(null)}clearHighlight(e={}){let t={srcId:-1,lineStart:0,lineEnd:-1},{srcId:i,lineStart:r,lineEnd:o}=Object.assign({},t,e);return this.notify(`${this.prefix}clear_highlight`,[i,r,o])}highlightRanges(e,t,i){this.client.call("coc#highlight#ranges",[this.id,e,t,i],!0)}clearNamespace(e,t=0,i=-1){this.client.call("coc#highlight#clear_highlight",[this.id,e,t,i],!0)}placeSign(e){let t={lnum:e.lnum};typeof e.priority=="number"&&(t.priority=e.priority),this.client.call("sign_place",[e.id||0,e.group||"",e.name,this.id,t],!0)}unplaceSign(e){let t={buffer:this.id};e.id!=null&&(t.id=e.id),this.client.call("sign_unplace",[e.group||"",t],!0)}async getSigns(e){return(await this.client.call("sign_getplaced",[this.id,e||{}]))[0].signs}async getHighlights(e,t=0,i=-1){let r=[],o=await this.client.call("coc#highlight#get_highlights",[this.id,e,t,i]);for(let s of o)r.push({hlGroup:s[0],lnum:s[1],colStart:s[2],colEnd:s[3],id:s[4]});return r}updateHighlights(e,t,i={}){if(typeof i=="number"){this.client.logError("Bad option for buffer.updateHighlights()",new Error().stack);return}let r=typeof i.start=="number"?i.start:0,o=typeof i.end=="number"?i.end:-1,s=typeof i.changedtick=="number"?i.changedtick:null,a=typeof i.priority=="number"?i.priority:null;if(r==0&&o==-1){let l=t.map(u=>[u.hlGroup,u.lnum,u.colStart,u.colEnd,u.combine===!1?0:1,u.start_incl?1:0,u.end_incl?1:0]);this.client.call("coc#highlight#buffer_update",[this.id,e,l,a,s],!0);return}this.client.call("coc#highlight#update_highlights",[this.id,e,t,r,o,a,s],!0)}listen(e,t,i){this.client.attachBufferEvent(this,e,t),i&&i.push({dispose:()=>{this.client.detachBufferEvent(this,e,t)}})}};Em.Buffer=yM});var _d=b(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.Window=void 0;var Yce=Ed(),Vx=require("timers"),vM=class extends Yce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_win_"}get id(){return this.data}get buffer(){return this.request(`${this.prefix}get_buf`,[])}get tabpage(){return this.request(`${this.prefix}get_tabpage`,[])}get cursor(){return this.request(`${this.prefix}get_cursor`,[])}setCursor(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_cursor`,[e])}get height(){return this.request(`${this.prefix}get_height`,[])}setHeight(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_height`,[e])}get width(){return this.request(`${this.prefix}get_width`,[])}setWidth(e,t=!1){return this[t?"notify":"request"](`${this.prefix}set_height`,[e])}get position(){return this.request(`${this.prefix}get_position`,[])}get row(){return this.request(`${this.prefix}get_position`,[]).then(e=>e[0])}get col(){return this.request(`${this.prefix}get_position`,[]).then(e=>e[1])}get valid(){return this.request(`${this.prefix}is_valid`,[])}get number(){return this.request(`${this.prefix}get_number`,[])}setConfig(e,t){return this[t?"notify":"request"](`${this.prefix}set_config`,[e])}getConfig(){return this.request(`${this.prefix}get_config`,[])}close(e,t){if(t){this.notify(`${this.prefix}close`,[e]);let i=0,r=setInterval(()=>{if(i==5)return(0,Vx.clearInterval)(r);this.request(`${this.prefix}is_valid`,[]).then(o=>{o?this.notify(`${this.prefix}close`,[e]):(0,Vx.clearInterval)(r)},()=>{(0,Vx.clearInterval)(r)}),i++},50);return null}return this.request(`${this.prefix}close`,[e])}highlightRanges(e,t,i=10,r){if(r){this.client.call("coc#highlight#match_ranges",[this.id,0,t,e,i],!0);return}return this.client.call("coc#highlight#match_ranges",[this.id,0,t,e,i])}clearMatchGroup(e){this.client.call("coc#highlight#clear_match_group",[this.id,e],!0)}clearMatches(e){this.client.call("coc#highlight#clear_matches",[this.id,e],!0)}};Pm.Window=vM});var Rd=b(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.Tabpage=void 0;var Wce=Ed(),wM=class extends Wce.BaseApi{constructor(){super(...arguments);this.prefix="nvim_tabpage_"}get windows(){return this.request(`${this.prefix}list_wins`,[])}get window(){return this.request(`${this.prefix}get_win`,[])}get valid(){return this.request(`${this.prefix}is_valid`,[])}get number(){return this.request(`${this.prefix}get_number`,[])}getOption(){throw new Error("Tabpage does not have `getOption`")}setOption(){throw new Error("Tabpage does not have `setOption`")}};_m.Tabpage=wM});var DM=b(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.Metadata=al.ExtType=void 0;var Zce=Pd(),Jce=_d(),$ce=Rd(),Xce;(function(n){n[n.Buffer=0]="Buffer",n[n.Window=1]="Window",n[n.Tabpage=2]="Tabpage"})(Xce=al.ExtType||(al.ExtType={}));al.Metadata=[{constructor:Zce.Buffer,name:"Buffer",prefix:"nvim_buf_"},{constructor:Jce.Window,name:"Window",prefix:"nvim_win_"},{constructor:$ce.Tabpage,name:"Tabpage",prefix:"nvim_tabpage_"}]});var Yu=b(qs=>{"use strict";var rS=qs&&qs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qs,"__esModule",{value:!0});qs.createLogger=qs.nullLogger=void 0;var eS=rS(require("fs")),Uce=rS(require("os")),tS=rS(require("path"));qs.nullLogger={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},trace:()=>{}};function Gce(){let n=process.env.NODE_CLIENT_LOG_FILE;if(n)return n;let e=process.env.XDG_RUNTIME_DIR;return e?tS.default.join(e,"node-client.log"):tS.default.join(Uce.default.tmpdir(),`node-client-${process.pid}.log`)}var iS=Gce(),CM=process.env.NODE_CLIENT_LOG_LEVEL||"info",nS=process.getuid&&process.getuid()==0;if(!nS)try{eS.default.mkdirSync(tS.default.dirname(iS),{recursive:!0}),eS.default.writeFileSync(iS,"",{encoding:"utf8",mode:438})}catch{nS=!0}function xM(n){return n==null?n:Array.isArray(n)?n.map(e=>xM(e)):typeof n=="object"&&typeof n.prefix=="string"&&typeof n.data=="number"?"["+n.prefix+n.data+"]":n}function Qce(n){return n==null?String(n):typeof n=="object"?JSON.stringify(n,null,2):String(n)}function Kce(n){return`${n.getHours()}:${n.getMinutes()}:${n.getSeconds()}.${n.getMilliseconds()}`}var SM=class{constructor(e){this.name=e}get stream(){return nS?null:this._stream?this._stream:(this._stream=eS.default.createWriteStream(iS,{encoding:"utf8"}),this._stream)}getText(e,t,i){let r="";if(i.length){let o=xM(i);r=" "+o.map(s=>Qce(s))}return`${Kce(new Date)} ${e.toUpperCase()} [${this.name}] - ${t}${r} -`}debug(e,...t){CM!="debug"||this.stream==null||this.stream.write(this.getText("debug",e,t))}info(e,...t){this.stream!=null&&this.stream.write(this.getText("info",e,t))}warn(e,...t){this.stream!=null&&this.stream.write(this.getText("warn",e,t))}error(e,...t){this.stream!=null&&this.stream.write(this.getText("error",e,t))}trace(e,...t){CM!="trace"||this.stream==null||this.stream.write(this.getText("trace",e,t))}};function zce(n){return new SM(n)}qs.createLogger=zce});var sS=b(oS=>{"use strict";Object.defineProperty(oS,"__esModule",{value:!0});var Vce=require("events"),ehe=Yu(),TM=process.env.NODE_CLIENT_LOG_LEVEL=="debug",Ld=(0,ehe.createLogger)("transport"),kM=class extends Vce.EventEmitter{constructor(e){super();this.logger=e,this.pauseLevel=0,this.paused=new Map}debug(e,...t){!TM||Ld.debug(e,...t)}info(e,...t){Ld.info(e,...t)}debugMessage(e){if(!TM)return;let t=e[0];t==0?Ld.debug("receive request:",e.slice(1)):t==1||(t==2?Ld.debug("receive notification:",e.slice(1)):Ld.debug("unknown message:",e))}pauseNotification(){this.pauseLevel=this.pauseLevel+1,this.paused.set(this.pauseLevel,[])}cancelNotification(){let{pauseLevel:e}=this;e>0&&(this.paused.delete(e),this.pauseLevel=e-1)}resumeNotification(e=!1){let{pauseLevel:t}=this;if(t==0)return e?null:Promise.resolve([[],null]);let i=Error().stack;this.pauseLevel=t-1;let r=this.paused.get(t);return this.paused.delete(t),r&&r.length?new Promise((o,s)=>{if(!e)return this.request("nvim_call_atomic",[r],(a,l)=>{if(a){let u=new Error(`call_atomic error: ${a[1]}`);return u.stack=i,s(u)}if(Array.isArray(l)&&l[1]!=null){let[u,c,h]=l[1],[d,g]=r[u],f=new Error(`call_atomic request error on "${d}": ${h}`);return f.stack=i,this.logger.error(`call_atomic request error ${c} on "${d}"`,g,h,i),s(f)}o(l)});this.notify("nvim_call_atomic",[r]),o(void 0)}):e?null:Promise.resolve([[],void 0])}};oS.default=kM});var _M=b(Xn=>{"use strict";var the=Xn&&Xn.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,i,r)}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),ihe=Xn&&Xn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),nhe=Xn&&Xn.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.prototype.hasOwnProperty.call(n,t)&&the(e,n,t);return ihe(e,n),e},EM=Xn&&Xn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Xn,"__esModule",{value:!0});Xn.NvimTransport=void 0;var Mo=nhe(fM()),rhe=EM(mM()),ohe=DM(),she=EM(sS()),PM=class extends she.default{constructor(e){super(e);this.pending=new Map,this.nextRequestId=1,this.attached=!1;let t=this.setupCodec();this.encodeStream=Mo.createEncodeStream({codec:t}),this.decodeStream=Mo.createDecodeStream({codec:t}),this.decodeStream.on("data",i=>{this.parseMessage(i)}),this.decodeStream.on("end",()=>{this.detach(),this.emit("detach")})}parseMessage(e){let t=e[0];if(this.debugMessage(e),t===0)this.emit("request",e[2].toString(),e[3],this.createResponse(e[1]));else if(t===1){let i=e[1],r=this.pending.get(i);if(r){this.pending.delete(i);let o=e[2];o&&o.length!=2&&(o=[0,o instanceof Error?o.message:o]),r(o,e[3])}}else t===2?this.emit("notification",e[1].toString(),e[2]):console.error(`Invalid message type ${t}`)}setupCodec(){let e=Mo.createCodec();return ohe.Metadata.forEach(({constructor:t},i)=>{e.addExtPacker(i,t,r=>Mo.encode(r.data)),e.addExtUnpacker(i,r=>new t({transport:this,client:this.client,data:Mo.decode(r)}))}),this.codec=e,this.codec}attach(e,t,i){this.encodeStream=this.encodeStream.pipe(e);let r=new rhe.default;t.pipe(r).pipe(this.decodeStream),this.writer=e,this.reader=t,this.client=i,this.attached=!0}detach(){!this.attached||(this.attached=!1,this.encodeStream.unpipe(this.writer),this.reader.unpipe(this.decodeStream))}request(e,t,i){if(!this.attached)return;let r=this.nextRequestId;this.nextRequestId=this.nextRequestId+1;let o=Date.now();this.debug("request to nvim:",r,e,t),this.encodeStream.write(Mo.encode([0,r,e,t],{codec:this.codec}));let s=Error().stack,a=setTimeout(()=>{this.debug(`request to vim blocked more than 1s: ${e}`,t,s)},1e3);this.pending.set(r,(l,u)=>{clearTimeout(a),this.debug("response of nvim:",r,`${Date.now()-o}ms`,u,l),i(l,u)})}notify(e,t){if(!!this.attached){if(this.pauseLevel!=0){let i=this.paused.get(this.pauseLevel);if(i){i.push([e,t]);return}}this.debug("nvim notification:",e,t),this.encodeStream.write(Mo.encode([2,e,t],{codec:this.codec}))}}send(e){this.encodeStream.write(Mo.encode(e,{codec:this.codec}))}createResponse(e){let{encodeStream:t}=this,i=Date.now(),r=!1,o=setTimeout(()=>{this.debug("request to client cost more than 1s",e)},1e3);return{send:(s,a)=>{clearTimeout(o),!(r||!this.attached)&&(this.debug("response of client:",e,`${Date.now()-i}ms`,s,a==!0),r=!0,t.write(Mo.encode([1,e,a?s:null,a?null:s])))}}}};Xn.NvimTransport=PM});var FM=b(Fd=>{"use strict";var RM=Fd&&Fd.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Fd,"__esModule",{value:!0});var ahe=RM(require("events")),lhe=RM(require("readline")),uhe=Yu(),Wu=(0,uhe.createLogger)("connection"),LM=class extends ahe.default{constructor(e,t){super();this.readable=e,this.writeable=t;let i=lhe.default.createInterface(this.readable);i.on("line",r=>{this.parseData(r)}),i.on("close",()=>{Wu.error("connection closed"),process.exit(0)})}parseData(e){if(e.length==0)return;let t;try{t=JSON.parse(e)}catch{console.error(`Invalid data from vim: ${e}`);return}let[i,r]=t;i>0?(Wu.debug("received request:",i,r),this.emit("request",i,r)):i==0?(Wu.debug("received notification:",r),this.emit("notification",r)):(Wu.debug("received response:",i,r),this.emit("response",i,r))}response(e,t){this.send([e,t||null])}notify(e,t){this.send([0,[e,t||null]])}send(e){Wu.debug("send to vim:",e);try{this.writeable.write(JSON.stringify(e)+` -`)}catch{Wu.error("Send error:",e)}}redraw(e){this.send(["redraw",e?"force":""])}command(e){this.send(["ex",e])}expr(e){this.send(["expr",e])}call(e,t,i){if(!i){this.send(["call",e,t]);return}this.send(["call",e,t,i])}dispose(){this.removeAllListeners()}};Fd.default=LM});var jM=b(aS=>{"use strict";Object.defineProperty(aS,"__esModule",{value:!0});var che=Yu(),BPe=(0,che.createLogger)("request"),hhe=process.env.COC_NVIM=="1"?"coc#api#call":"nvim#api#call",IM=class{constructor(e,t,i){this.connection=e,this.cb=t,this.id=i}request(e,t=[]){this.method=e,this.connection.call(hhe,[e.slice(5),t],this.id)}callback(e,t,i){let{method:r,cb:o}=this;if(t)return o([0,t.toString()]);switch(r){case"nvim_list_wins":case"nvim_tabpage_list_wins":return o(null,i.map(s=>e.createWindow(s)));case"nvim_tabpage_get_win":case"nvim_get_current_win":case"nvim_open_win":return o(null,e.createWindow(i));case"nvim_list_bufs":return o(null,i.map(s=>e.createBuffer(s)));case"nvim_win_get_buf":case"nvim_create_buf":case"nvim_get_current_buf":return o(null,e.createBuffer(i));case"nvim_list_tabpages":return o(null,i.map(s=>e.createTabpage(s)));case"nvim_get_current_tabpage":return o(null,e.createTabpage(i));default:return o(null,i)}}};aS.default=IM});var OM=b(Zu=>{"use strict";var lS=Zu&&Zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.VimTransport=void 0;var dhe=lS(sS()),ghe=lS(FM()),fhe=lS(jM()),AM=class extends dhe.default{constructor(e){super(e);this.pending=new Map,this.nextRequestId=-1,this.attached=!1,this.errText="",this.outText="",this.notifyMethod=process.env.COC_NVIM=="1"?"coc#api#notify":"nvim#api#notify"}attach(e,t,i){let r=this.connection=new ghe.default(t,e);this.attached=!0,this.client=i,r.on("request",(o,s)=>{let[a,l]=s;this.emit("request",a,l,this.createResponse(o))}),r.on("notification",o=>{let[s,a]=o;this.emit("notification",s.toString(),a)}),r.on("response",(o,s)=>{let a=this.pending.get(o);if(a){this.pending.delete(o);let l=null,u=null;Array.isArray(s)?(l=s[0],u=s[1]):l=s,a.callback(this.client,l,u)}})}send(e){this.connection.send(e)}detach(){!this.attached||(this.attached=!1,this.connection.dispose())}request(e,t,i){if(!this.attached)return i([0,"transport disconnected"]);let r=this.nextRequestId;this.nextRequestId=this.nextRequestId-1;let o=Date.now();this.debug("request to vim:",r,e,t);let s=setTimeout(()=>{this.debug("request to vim cost more than 1s",e,t)},1e3),a=new fhe.default(this.connection,(l,u)=>{clearTimeout(s),this.debug("response from vim cost:",r,`${Date.now()-o}ms`),i(l,u)},r);this.pending.set(r,a),a.request(e,t)}notify(e,t){if(!this.attached)return;if(this.pauseLevel!=0){let r=this.paused.get(this.pauseLevel);if(r){r.push([e,t]);return}}let i=e.slice(5);if(i=="err_write"){this.errText=this.errText+t[0].toString();return}if(i=="out_write"){let r=t[0].toString()||"";if(!r.includes(` -`))this.outText=this.outText+r;else{let o=this.outText+t[0].toString();this.outText="",this.connection.call(this.notifyMethod,[i,[o]])}return}if(i=="err_writeln"){let r=this.errText+t[0].toString();this.errText="",this.connection.call(this.notifyMethod,[i,[r]]);return}this.connection.call(this.notifyMethod,[i,t])}createResponse(e){let t=!1,{connection:i}=this,r=Date.now(),o=setTimeout(()=>{this.debug("request to client cost more than 1s",e)},1e3);return{send:(s,a)=>{if(clearTimeout(o),t||!this.attached)return;t=!0;let l=null;a&&(l=typeof s=="string"?s:s.toString()),this.debug("response of client cost:",e,`${Date.now()-r}ms`),i.response(e,[l,a?null:s])}}}};Zu.VimTransport=AM});var NM=b(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.Neovim=void 0;var phe=Ed(),mhe=Pd(),bhe=Rd(),yhe=_d(),vhe=process.env.VIM_NODE_RPC=="1",MM=class extends phe.BaseApi{constructor(){super(...arguments);this.prefix="nvim_",this.Buffer=mhe.Buffer,this.Window=yhe.Window,this.Tabpage=bhe.Tabpage}getArgs(e){return e?Array.isArray(e)?e:[e]:[]}get apiInfo(){return this.request(`${this.prefix}get_api_info`)}get buffers(){return this.request(`${this.prefix}list_bufs`)}get buffer(){return this.request(`${this.prefix}get_current_buf`)}async setBuffer(e){await this.request(`${this.prefix}set_current_buf`,[e])}get chans(){return this.request(`${this.prefix}list_chans`)}getChanInfo(e){return this.request(`${this.prefix}get_chan_info`,[e])}createNamespace(e=""){return process.env.COC_NVIM=="1"?(e=e.startsWith("coc-")?e.slice(4):e,this.request(`${this.prefix}call_function`,["coc#highlight#create_namespace",[e]])):this.request(`${this.prefix}create_namespace`,[e])}get namespaces(){return this.request(`${this.prefix}get_namespaces`,[])}get commands(){return this.getCommands()}getCommands(e={}){return this.request(`${this.prefix}get_commands`,[e])}get tabpages(){return this.request(`${this.prefix}list_tabpages`)}get tabpage(){return this.request(`${this.prefix}get_current_tabpage`)}async setTabpage(e){await this.request(`${this.prefix}set_current_tabpage`,[e])}get windows(){return this.getWindows()}get window(){return this.request(`${this.prefix}get_current_win`)}getWindows(){return this.request(`${this.prefix}list_wins`)}async setWindow(e){await this.request(`${this.prefix}set_current_win`,[e])}get runtimePaths(){return this.request(`${this.prefix}list_runtime_paths`)}setDirectory(e){return this.request(`${this.prefix}set_current_dir`,[e])}get line(){return this.getLine()}createNewBuffer(e=!1,t=!1){return this.request(`${this.prefix}create_buf`,[e,t])}openFloatWindow(e,t,i){return this.request(`${this.prefix}open_win`,[e,t,i])}getLine(){return this.request(`${this.prefix}get_current_line`)}setLine(e){return this.request(`${this.prefix}set_current_line`,[e])}getKeymap(e){return this.request(`${this.prefix}get_keymap`,[e])}get mode(){return this.request(`${this.prefix}get_mode`)}get colorMap(){return this.request(`${this.prefix}get_color_map`)}getColorByName(e){return this.request(`${this.prefix}get_color_by_name`,[e])}getHighlight(e,t=!0){let i=typeof e=="string"?"by_name":"by_id";return this.request(`${this.prefix}get_hl_${i}`,[e,t])}getHighlightByName(e,t=!0){return this.request(`${this.prefix}get_hl_by_name`,[e,t])}getHighlightById(e,t=!0){return this.request(`${this.prefix}get_hl_by_id`,[e,t])}deleteCurrentLine(){return this.request(`${this.prefix}del_current_line`)}eval(e){return this.request(`${this.prefix}eval`,[e])}lua(e,t=[]){return this.request(`${this.prefix}exec_lua`,[e,t])}executeLua(e,t=[]){let i=this.getArgs(t);return this.lua(e,i)}callDictFunction(e,t,i=[]){let r=this.getArgs(i);return this.request(`${this.prefix}call_dict_function`,[e,t,r])}call(e,t=[],i){let r=this.getArgs(t);return i?(this.notify(`${this.prefix}call_function`,[e,r]),null):this.request(`${this.prefix}call_function`,[e,r])}callTimer(e,t=[],i){let r=this.getArgs(t);return i?(this.notify(`${this.prefix}call_function`,["coc#util#timer",[e,r]]),null):vhe?(this.notify(`${this.prefix}call_function`,["coc#util#timer",[e,r]]),new Promise(o=>{setTimeout(()=>{o(null)},20)})):this.request(`${this.prefix}call_function`,["coc#util#timer",[e,r]])}callAsync(e,t=[]){let i=this.getArgs(t);return this.client.sendAsyncRequest(e,i)}callFunction(e,t=[]){return this.call(e,t)}callAtomic(e){return this.request(`${this.prefix}call_atomic`,[e])}command(e,t){return t?(this.notify(`${this.prefix}command`,[e]),null):this.request(`${this.prefix}command`,[e])}commandOutput(e){return this.request(`${this.prefix}command_output`,[e])}exec(e,t=!1){return this.request(`${this.prefix}exec`,[e,t])}getVvar(e){return this.request(`${this.prefix}get_vvar`,[e])}feedKeys(e,t,i){return this.request(`${this.prefix}feedkeys`,[e,t,i])}input(e){return this.request(`${this.prefix}input`,[e])}parseExpression(e,t,i){return this.request(`${this.prefix}parse_expression`,[e,t,i])}getProc(e){return this.request(`${this.prefix}get_proc`,[e])}getProcChildren(e){return this.request(`${this.prefix}get_proc_children`,[e])}replaceTermcodes(e,t,i,r){return this.request(`${this.prefix}replace_termcodes`,[e,t,i,r])}strWidth(e){return this.request(`${this.prefix}strwidth`,[e])}outWrite(e){this.notify(`${this.prefix}out_write`,[e])}outWriteLine(e){this.outWrite(`${e} -`)}errWrite(e){this.notify(`${this.prefix}err_write`,[e])}errWriteLine(e){this.notify(`${this.prefix}err_writeln`,[e])}get uis(){return this.request(`${this.prefix}list_uis`)}uiAttach(e,t,i){return this.request(`${this.prefix}ui_attach`,[e,t,i])}uiDetach(){return this.request(`${this.prefix}ui_detach`,[])}uiTryResize(e,t){return this.request(`${this.prefix}ui_try_resize`,[e,t])}uiSetOption(e,t){return this.request(`${this.prefix}ui_set_option`,[e,t])}subscribe(e){return this.request(`${this.prefix}subscribe`,[e])}unsubscribe(e){return this.request(`${this.prefix}unsubscribe`,[e])}setClientInfo(e,t,i,r,o){this.notify(`${this.prefix}set_client_info`,[e,t,i,r,o])}async quit(){this.command("qa!",!0),this.transport&&this.transport.detach()}};Rm.Neovim=MM});var Fm=b(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.NeovimClient=Ju.AsyncResponse=void 0;var whe=_M(),Dhe=OM(),Che=NM(),xhe=Pd(),She=_d(),The=Rd(),khe=Yu(),BM=(0,khe.createLogger)("client"),Lm=process.env.VIM_NODE_RPC=="1",uS=class{constructor(e,t){this.requestId=e,this.cb=t,this.finished=!1}finish(e,t){if(!this.finished){if(this.finished=!0,e){this.cb(new Error(e));return}this.cb(null,t)}}};Ju.AsyncResponse=uS;var HM=class extends Che.Neovim{constructor(e){super({});this.logger=e,this.requestId=1,this.responses=new Map,this.attachedBuffers=new Map,this.isVim=Lm,Object.defineProperty(this,"client",{value:this});let t=Lm?new Dhe.VimTransport(e):new whe.NvimTransport(e);this.setTransport(t),this.transportAttached=!1,this.handleRequest=this.handleRequest.bind(this),this.handleNotification=this.handleNotification.bind(this)}echoError(e){let t=process.env.COC_NVIM=="1"?"[coc.nvim] ":"";e instanceof Error?(this.errWriteLine(t+e.message+" use :CocOpenLog for details"),this.logError(e.message||"Unknown error",e.stack)):(this.errWriteLine(t+e),this.logError(e.toString(),Error().stack))}logError(e,...t){!this.logger||this.logger.error(e,...t)}createBuffer(e){return new xhe.Buffer({transport:this.transport,data:e,client:this})}createWindow(e){return new She.Window({transport:this.transport,data:e,client:this})}createTabpage(e){return new The.Tabpage({transport:this.transport,data:e,client:this})}send(e){this.transport.send(e)}redrawVim(e){!Lm||this.transport.notify("nvim_command",["redraw"+(e?"!":"")])}attach({reader:e,writer:t},i=!0){this.transport.attach(t,e,this),this.transportAttached=!0,this.setupTransport(i)}detach(){this.transport.detach(),this.transportAttached=!1}get isApiReady(){return this.transportAttached&&typeof this._channelId<"u"}get channelId(){return this._isReady.then(()=>this._channelId)}isAttached(e){return this.attachedBuffers.has(e)}handleRequest(e,t,i){this.emit("request",e,t,i)}sendAsyncRequest(e,t){let i=this.requestId;return this.requestId=i+1,this.notify("nvim_call_function",["coc#rpc#async_request",[i,e,t||[]]]),new Promise((r,o)=>{let s=new uS(i,(a,l)=>{if(a)return o(a);r(l)});this.responses.set(i,s)})}emitNotification(e,t){if(e.endsWith("_event")){if(e.startsWith("nvim_buf_")){let i=e.replace(/nvim_buf_(.*)_event/,"$1"),{id:r}=t[0];if(!this.attachedBuffers.has(r))return;(this.attachedBuffers.get(r).get(i)||[]).forEach(a=>a(...t)),i==="detach"&&this.attachedBuffers.delete(r);return}if(e.startsWith("nvim_async_request")){let[i,r,o]=t;this.handleRequest(r,o,{send:(s,a)=>{this.notify("nvim_call_function",["coc#rpc#async_response",[i,s,a]])}});return}if(e.startsWith("nvim_async_response")){let[i,r,o]=t,s=this.responses.get(i);if(!s){console.error(`Response not found for request ${i}`);return}this.responses.delete(i),s.finish(r,o);return}if(e==="nvim_error_event"){this.logger.error("Error event from nvim:",t[0],t[1]);return}this.logger.debug(`Unhandled event: ${e}`,t)}else this.emit("notification",e,t)}handleNotification(e,t){this.emitNotification(e,t)}setupTransport(e=!0){if(!this.transportAttached)throw new Error("Not attached to input/output");this.transport.on("request",this.handleRequest),this.transport.on("notification",this.handleNotification),this.transport.on("detach",()=>{this.emit("disconnect"),this.transport.removeAllListeners("request"),this.transport.removeAllListeners("notification"),this.transport.removeAllListeners("detach")}),e?this._isReady=this.generateApi():(this._channelId=0,this._isReady=Promise.resolve(!0))}requestApi(){return new Promise((e,t)=>{this.transport.request("nvim_get_api_info",[],(i,r)=>{i?t(new Error(Array.isArray(i)?i[1]:i.message||i.toString())):e(r)})})}async generateApi(){let e;try{e=await this.requestApi()}catch(t){console.error("Could not get vim api results"),BM.error(t)}if(e)try{let[t,i]=e;return this.functions=i.functions.map(r=>r.name),this._channelId=t,!0}catch(t){return BM.error(t.stack),null}return null}attachBufferEvent(e,t,i){let r=this.attachedBuffers.get(e.id)||new Map,o=r.get(t)||[];o.includes(i)||(o.push(i),r.set(t,o),this.attachedBuffers.set(e.id,r))}detachBufferEvent(e,t,i){let r=this.attachedBuffers.get(e.id);if(!r||!r.has(t))return;let o=r.get(t).filter(s=>s!==i);r.set(t,o)}pauseNotification(){let e=Error().stack;this.transport.pauseLevel!=0&&this.logError("Nested nvim.pauseNotification() detected, please avoid it:",e),this.transport.pauseNotification(),process.nextTick(()=>{this.transport.pauseLevel>0&&this.logError("resumeNotification not called within same tick:",e)})}resumeNotification(e,t){return Lm&&e&&this.transport.notify("nvim_command",["redraw"]),t?(this.transport.resumeNotification(!0),Promise.resolve(null)):this.transport.resumeNotification()}hasFunction(e){return this.functions?this.functions.includes(e):!0}};Ju.NeovimClient=HM});var qM=b(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.attach=void 0;var Ehe=require("net"),Phe=Fm(),_he=Yu();function Rhe({reader:n,writer:e,proc:t,socket:i},r=null,o=!0){let s,a,l;if(r||(r=_he.nullLogger),i){let u=(0,Ehe.createConnection)(i);s=u,a=u,u.once("close",()=>{l.detach()})}else n&&e?(s=e,a=n):t&&(s=t.stdin,a=t.stdout,t.once("disconnect",()=>{l.detach()}));if(s.on("error",u=>{u.code=="EPIPE"&&l.detach()}),s&&a)return l=new Phe.NeovimClient(r),l.attach({writer:s,reader:a},o),l;throw new Error("Invalid arguments, could not attach")}Im.attach=Rhe});var YM=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.Tabpage=Un.Window=Un.Buffer=Un.NeovimClient=Un.Neovim=void 0;var Lhe=Fm();Object.defineProperty(Un,"Neovim",{enumerable:!0,get:function(){return Lhe.NeovimClient}});var Fhe=Fm();Object.defineProperty(Un,"NeovimClient",{enumerable:!0,get:function(){return Fhe.NeovimClient}});var Ihe=Pd();Object.defineProperty(Un,"Buffer",{enumerable:!0,get:function(){return Ihe.Buffer}});var jhe=_d();Object.defineProperty(Un,"Window",{enumerable:!0,get:function(){return jhe.Window}});var Ahe=Rd();Object.defineProperty(Un,"Tabpage",{enumerable:!0,get:function(){return Ahe.Tabpage}})});var WM=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.Window=an.Tabpage=an.Buffer=an.NeovimClient=an.Neovim=an.attach=void 0;var Ohe=qM();Object.defineProperty(an,"attach",{enumerable:!0,get:function(){return Ohe.attach}});var Id=YM();Object.defineProperty(an,"Neovim",{enumerable:!0,get:function(){return Id.Neovim}});Object.defineProperty(an,"NeovimClient",{enumerable:!0,get:function(){return Id.NeovimClient}});Object.defineProperty(an,"Buffer",{enumerable:!0,get:function(){return Id.Buffer}});Object.defineProperty(an,"Tabpage",{enumerable:!0,get:function(){return Id.Tabpage}});Object.defineProperty(an,"Window",{enumerable:!0,get:function(){return Id.Window}})});var No=b(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});var cS;function hS(){if(cS===void 0)throw new Error("No runtime abstraction layer installed");return cS}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");cS=t}n.install=e})(hS||(hS={}));dS.default=hS});var gS=b(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.Disposable=void 0;var Mhe;(function(n){function e(t){return{dispose:t}}n.create=e})(Mhe=jd.Disposable||(jd.Disposable={}))});var JM=b(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});jm.AbstractMessageBuffer=void 0;var Nhe=13,Bhe=10,Hhe=`\r -`,ZM=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let e=0,t=0,i=0,r=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),i=0,r=0;for(;e>0;){let o=this._chunks[r];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,i),i+=e,this._chunks[r]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,i),i+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};jm.AbstractMessageBuffer=ZM});var QM=b(pS=>{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});var qhe=No(),$M=require("util"),ll=gS(),Yhe=JM(),Ad=class extends Yhe.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return Ad.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new $M.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}};Ad.emptyBuffer=Buffer.allocUnsafe(0);var XM=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),ll.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),ll.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),ll.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),ll.Disposable.create(()=>this.stream.off("data",e))}},UM=class{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),ll.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),ll.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),ll.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((i,r)=>{let o=s=>{s==null?i():r(s)};typeof e=="string"?this.stream.write(e,t,o):this.stream.write(e,o)})}end(){this.stream.end()}},GM=Object.freeze({messageBuffer:Object.freeze({create:n=>new Ad(n)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(n,e)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(n,void 0,0),e.charset))}catch(t){return Promise.reject(t)}}}),decoder:Object.freeze({name:"application/json",decode:(n,e)=>{try{return n instanceof Buffer?Promise.resolve(JSON.parse(n.toString(e.charset))):Promise.resolve(JSON.parse(new $M.TextDecoder(e.charset).decode(n)))}catch(t){return Promise.reject(t)}}})}),stream:Object.freeze({asReadableStream:n=>new XM(n),asWritableStream:n=>new UM(n)}),console,timer:Object.freeze({setTimeout(n,e,...t){return setTimeout(n,e,...t)},clearTimeout(n){clearTimeout(n)},setImmediate(n,...e){return setImmediate(n,...e)},clearImmediate(n){clearImmediate(n)}})});function fS(){return GM}(function(n){function e(){qhe.default.install(GM)}n.install=e})(fS||(fS={}));pS.default=fS});var $u=b(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.stringArray=ki.array=ki.func=ki.error=ki.number=ki.string=ki.boolean=void 0;function Whe(n){return n===!0||n===!1}ki.boolean=Whe;function KM(n){return typeof n=="string"||n instanceof String}ki.string=KM;function Zhe(n){return typeof n=="number"||n instanceof Number}ki.number=Zhe;function Jhe(n){return n instanceof Error}ki.error=Jhe;function $he(n){return typeof n=="function"}ki.func=$he;function zM(n){return Array.isArray(n)}ki.array=zM;function Xhe(n){return zM(n)&&n.every(e=>KM(e))}ki.stringArray=Xhe});var mS=b(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.isResponseMessage=ne.isNotificationMessage=ne.isRequestMessage=ne.NotificationType9=ne.NotificationType8=ne.NotificationType7=ne.NotificationType6=ne.NotificationType5=ne.NotificationType4=ne.NotificationType3=ne.NotificationType2=ne.NotificationType1=ne.NotificationType0=ne.NotificationType=ne.RequestType9=ne.RequestType8=ne.RequestType7=ne.RequestType6=ne.RequestType5=ne.RequestType4=ne.RequestType3=ne.RequestType2=ne.RequestType1=ne.RequestType=ne.RequestType0=ne.AbstractMessageSignature=ne.ParameterStructures=ne.ResponseError=ne.ErrorCodes=void 0;var ul=$u(),VM;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=n.jsonrpcReservedErrorRangeStart,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=n.jsonrpcReservedErrorRangeEnd})(VM=ne.ErrorCodes||(ne.ErrorCodes={}));var Am=class extends Error{constructor(e,t,i){super(t);this.code=ul.number(e)?e:VM.UnknownErrorCode,this.data=i,Object.setPrototypeOf(this,Am.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}};ne.ResponseError=Am;var mi=class{constructor(e){this.kind=e}static is(e){return e===mi.auto||e===mi.byName||e===mi.byPosition}toString(){return this.kind}};ne.ParameterStructures=mi;mi.auto=new mi("auto");mi.byPosition=new mi("byPosition");mi.byName=new mi("byName");var St=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return mi.auto}};ne.AbstractMessageSignature=St;var eN=class extends St{constructor(e){super(e,0)}};ne.RequestType0=eN;var tN=class extends St{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.RequestType=tN;var iN=class extends St{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.RequestType1=iN;var nN=class extends St{constructor(e){super(e,2)}};ne.RequestType2=nN;var rN=class extends St{constructor(e){super(e,3)}};ne.RequestType3=rN;var oN=class extends St{constructor(e){super(e,4)}};ne.RequestType4=oN;var sN=class extends St{constructor(e){super(e,5)}};ne.RequestType5=sN;var aN=class extends St{constructor(e){super(e,6)}};ne.RequestType6=aN;var lN=class extends St{constructor(e){super(e,7)}};ne.RequestType7=lN;var uN=class extends St{constructor(e){super(e,8)}};ne.RequestType8=uN;var cN=class extends St{constructor(e){super(e,9)}};ne.RequestType9=cN;var hN=class extends St{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.NotificationType=hN;var dN=class extends St{constructor(e){super(e,0)}};ne.NotificationType0=dN;var gN=class extends St{constructor(e,t=mi.auto){super(e,1);this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};ne.NotificationType1=gN;var fN=class extends St{constructor(e){super(e,2)}};ne.NotificationType2=fN;var pN=class extends St{constructor(e){super(e,3)}};ne.NotificationType3=pN;var mN=class extends St{constructor(e){super(e,4)}};ne.NotificationType4=mN;var bN=class extends St{constructor(e){super(e,5)}};ne.NotificationType5=bN;var yN=class extends St{constructor(e){super(e,6)}};ne.NotificationType6=yN;var vN=class extends St{constructor(e){super(e,7)}};ne.NotificationType7=vN;var wN=class extends St{constructor(e){super(e,8)}};ne.NotificationType8=wN;var DN=class extends St{constructor(e){super(e,9)}};ne.NotificationType9=DN;function Uhe(n){let e=n;return e&&ul.string(e.method)&&(ul.string(e.id)||ul.number(e.id))}ne.isRequestMessage=Uhe;function Ghe(n){let e=n;return e&&ul.string(e.method)&&n.id===void 0}ne.isNotificationMessage=Ghe;function Qhe(n){let e=n;return e&&(e.result!==void 0||!!e.error)&&(ul.string(e.id)||ul.number(e.id)||e.id===null)}ne.isResponseMessage=Qhe});var Xu=b(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.Emitter=cl.Event=void 0;var Khe=No(),zhe;(function(n){let e={dispose(){}};n.None=function(){return e}})(zhe=cl.Event||(cl.Event={}));var CN=class{add(e,t=null,i){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(i)&&i.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let i=!1;for(let r=0,o=this._callbacks.length;r{this._callbacks||(this._callbacks=new CN),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let r={dispose:()=>{!this._callbacks||(this._callbacks.remove(e,t),r.dispose=Od._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};cl.Emitter=Od;Od._noop=function(){}});var wS=b(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});hl.CancellationTokenSource=hl.CancellationToken=void 0;var xN=No(),Vhe=$u(),bS=Xu(),yS;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:bS.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:bS.Event.None});function e(t){let i=t;return i&&(i===n.None||i===n.Cancelled||Vhe.boolean(i.isCancellationRequested)&&!!i.onCancellationRequested)}n.is=e})(yS=hl.CancellationToken||(hl.CancellationToken={}));var ede=Object.freeze(function(n,e){let t=xN.default().timer.setTimeout(n.bind(e),0);return{dispose(){xN.default().timer.clearTimeout(t)}}}),vS=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ede:(this._emitter||(this._emitter=new bS.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},SN=class{get token(){return this._token||(this._token=new vS),this._token}cancel(){this._token?this._token.cancel():this._token=yS.Cancelled}dispose(){this._token?this._token instanceof vS&&this._token.dispose():this._token=yS.None}};hl.CancellationTokenSource=SN});var kN=b(Bo=>{"use strict";Object.defineProperty(Bo,"__esModule",{value:!0});Bo.ReadableStreamMessageReader=Bo.AbstractMessageReader=Bo.MessageReader=void 0;var Om=No(),Uu=$u(),DS=Xu(),tde;(function(n){function e(t){let i=t;return i&&Uu.func(i.listen)&&Uu.func(i.dispose)&&Uu.func(i.onError)&&Uu.func(i.onClose)&&Uu.func(i.onPartialMessage)}n.is=e})(tde=Bo.MessageReader||(Bo.MessageReader={}));var xS=class{constructor(){this.errorEmitter=new DS.Emitter,this.closeEmitter=new DS.Emitter,this.partialMessageEmitter=new DS.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Uu.string(e.message)?e.message:"unknown"}`)}};Bo.AbstractMessageReader=xS;var CS;(function(n){function e(t){var i;let r,o,s,a=new Map,l,u=new Map;if(t===void 0||typeof t=="string")r=t!=null?t:"utf-8";else{if(r=(i=t.charset)!==null&&i!==void 0?i:"utf-8",t.contentDecoder!==void 0&&(s=t.contentDecoder,a.set(s.name,s)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)a.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(l=t.contentTypeDecoder,u.set(l.name,l)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)u.set(c.name,c)}return l===void 0&&(l=Om.default().applicationJson.decoder,u.set(l.name,l)),{charset:r,contentDecoder:s,contentDecoders:a,contentTypeDecoder:l,contentTypeDecoders:u}}n.fromOptions=e})(CS||(CS={}));var TN=class extends xS{constructor(e,t){super();this.readable=e,this.options=CS.fromOptions(t),this.buffer=Om.default().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(i=>{this.onData(i)});return this.readable.onError(i=>this.fireError(i)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders();if(!r)return;let o=r.get("Content-Length");if(!o)throw new Error("Header must provide a Content-Length property.");let s=parseInt(o);if(isNaN(s))throw new Error("Content-Length value must be a number.");this.nextMessageLength=s}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let i;this.options.contentDecoder!==void 0?i=this.options.contentDecoder.decode(t):i=Promise.resolve(t),i.then(r=>{this.options.contentTypeDecoder.decode(r,this.options).then(o=>{this.callback(o)},o=>{this.fireError(o)})},r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(Om.default().timer.clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=Om.default().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Bo.ReadableStreamMessageReader=TN});var PN=b(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.Semaphore=void 0;var ide=No(),EN=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,i)=>{this._waiting.push({thunk:e,resolve:t,reject:i}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||ide.default().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(i=>{this._active--,e.resolve(i),this.runNext()},i=>{this._active--,e.reject(i),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Mm.Semaphore=EN});var IN=b(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.WriteableStreamMessageWriter=Ho.AbstractMessageWriter=Ho.MessageWriter=void 0;var _N=No(),Md=$u(),nde=PN(),RN=Xu(),rde="Content-Length: ",LN=`\r -`,ode;(function(n){function e(t){let i=t;return i&&Md.func(i.dispose)&&Md.func(i.onClose)&&Md.func(i.onError)&&Md.func(i.write)}n.is=e})(ode=Ho.MessageWriter||(Ho.MessageWriter={}));var TS=class{constructor(){this.errorEmitter=new RN.Emitter,this.closeEmitter=new RN.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,i){this.errorEmitter.fire([this.asError(e),t,i])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${Md.string(e.message)?e.message:"unknown"}`)}};Ho.AbstractMessageWriter=TS;var SS;(function(n){function e(t){var i,r;return t===void 0||typeof t=="string"?{charset:t!=null?t:"utf-8",contentTypeEncoder:_N.default().applicationJson.encoder}:{charset:(i=t.charset)!==null&&i!==void 0?i:"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:(r=t.contentTypeEncoder)!==null&&r!==void 0?r:_N.default().applicationJson.encoder}}n.fromOptions=e})(SS||(SS={}));var FN=class extends TS{constructor(e,t){super();this.writable=e,this.options=SS.fromOptions(t),this.errorCount=0,this.writeSemaphore=new nde.Semaphore(1),this.writable.onError(i=>this.fireError(i)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(i=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(i):i).then(i=>{let r=[];return r.push(rde,i.byteLength.toString(),LN),r.push(LN),this.doWrite(e,r,i)},i=>{throw this.fireError(i),i}))}async doWrite(e,t,i){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(i)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};Ho.WriteableStreamMessageWriter=FN});var AN=b(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.LRUCache=qo.LinkedMap=qo.Touch=void 0;var Ji;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(Ji=qo.Touch||(qo.Touch={}));var kS=class{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=Ji.None){let i=this._map.get(e);if(!!i)return t!==Ji.None&&this.touch(i,t),i.value}set(e,t,i=Ji.None){let r=this._map.get(e);if(r)r.value=t,i!==Ji.None&&this.touch(r,i);else{switch(r={key:e,value:t,next:void 0,previous:void 0},i){case Ji.None:this.addItemLast(r);break;case Ji.First:this.addItemFirst(r);break;case Ji.Last:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(!!t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let i=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:i.key,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}values(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:i.value,done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}entries(){let e=this,t=this._state,i=this._head,r={[Symbol.iterator](){return r},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){let o={value:[i.key,i.value],done:!1};return i=i.next,o}else return{value:void 0,done:!0}}};return r}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==Ji.First&&t!==Ji.Last)){if(t===Ji.First){if(e===this._head)return;let i=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r,r.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===Ji.Last){if(e===this._tail)return;let i=e.next,r=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=r,r.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(let[t,i]of e)this.set(t,i)}};qo.LinkedMap=kS;var jN=class extends kS{constructor(e,t=1){super();this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=Ji.AsNew){return super.get(e,t)}peek(e){return super.get(e,Ji.None)}set(e,t){return super.set(e,t,Ji.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};qo.LRUCache=jN});var qN=b(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.createMessageConnection=ye.ConnectionOptions=ye.CancellationStrategy=ye.CancellationSenderStrategy=ye.CancellationReceiverStrategy=ye.ConnectionStrategy=ye.ConnectionError=ye.ConnectionErrors=ye.LogTraceNotification=ye.SetTraceNotification=ye.TraceFormat=ye.Trace=ye.NullLogger=ye.ProgressType=void 0;var ON=No(),ai=$u(),me=mS(),MN=AN(),Nd=Xu(),ES=wS(),Bd;(function(n){n.type=new me.NotificationType("$/cancelRequest")})(Bd||(Bd={}));var Bm;(function(n){n.type=new me.NotificationType("$/progress")})(Bm||(Bm={}));var NN=class{constructor(){}};ye.ProgressType=NN;var PS;(function(n){function e(t){return ai.func(t)}n.is=e})(PS||(PS={}));ye.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var Zt;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Verbose=2]="Verbose"})(Zt=ye.Trace||(ye.Trace={}));(function(n){function e(i){if(!ai.string(i))return n.Off;switch(i=i.toLowerCase(),i){case"off":return n.Off;case"messages":return n.Messages;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(i){switch(i){case n.Off:return"off";case n.Messages:return"messages";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(Zt=ye.Trace||(ye.Trace={}));var Cr;(function(n){n.Text="text",n.JSON="json"})(Cr=ye.TraceFormat||(ye.TraceFormat={}));(function(n){function e(t){return t=t.toLowerCase(),t==="json"?n.JSON:n.Text}n.fromString=e})(Cr=ye.TraceFormat||(ye.TraceFormat={}));var BN;(function(n){n.type=new me.NotificationType("$/setTrace")})(BN=ye.SetTraceNotification||(ye.SetTraceNotification={}));var _S;(function(n){n.type=new me.NotificationType("$/logTrace")})(_S=ye.LogTraceNotification||(ye.LogTraceNotification={}));var Nm;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Nm=ye.ConnectionErrors||(ye.ConnectionErrors={}));var dl=class extends Error{constructor(e,t){super(t);this.code=e,Object.setPrototypeOf(this,dl.prototype)}};ye.ConnectionError=dl;var HN;(function(n){function e(t){let i=t;return i&&ai.func(i.cancelUndispatched)}n.is=e})(HN=ye.ConnectionStrategy||(ye.ConnectionStrategy={}));var RS;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new ES.CancellationTokenSource}});function e(t){let i=t;return i&&ai.func(i.createCancellationTokenSource)}n.is=e})(RS=ye.CancellationReceiverStrategy||(ye.CancellationReceiverStrategy={}));var LS;(function(n){n.Message=Object.freeze({sendCancellation(t,i){t.sendNotification(Bd.type,{id:i})},cleanup(t){}});function e(t){let i=t;return i&&ai.func(i.sendCancellation)&&ai.func(i.cleanup)}n.is=e})(LS=ye.CancellationSenderStrategy||(ye.CancellationSenderStrategy={}));var FS;(function(n){n.Message=Object.freeze({receiver:RS.Message,sender:LS.Message});function e(t){let i=t;return i&&RS.is(i.receiver)&&LS.is(i.sender)}n.is=e})(FS=ye.CancellationStrategy||(ye.CancellationStrategy={}));var sde;(function(n){function e(t){let i=t;return i&&(FS.is(i.cancellationStrategy)||HN.is(i.connectionStrategy))}n.is=e})(sde=ye.ConnectionOptions||(ye.ConnectionOptions={}));var xr;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(xr||(xr={}));function ade(n,e,t,i){let r=t!==void 0?t:ye.NullLogger,o=0,s=0,a=0,l="2.0",u,c=Object.create(null),h,d=Object.create(null),g=new Map,f,p=new MN.LinkedMap,m=Object.create(null),v=Object.create(null),w=Zt.Off,D=Cr.Text,S,L=xr.New,j=new Nd.Emitter,I=new Nd.Emitter,W=new Nd.Emitter,A=new Nd.Emitter,M=new Nd.Emitter,F=i&&i.cancellationStrategy?i.cancellationStrategy:FS.Message;function N(E){if(E===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+E.toString()}function Z(E){return E===null?"res-unknown-"+(++a).toString():"res-"+E.toString()}function z(){return"not-"+(++s).toString()}function ae(E,$){me.isRequestMessage($)?E.set(N($.id),$):me.isResponseMessage($)?E.set(Z($.id),$):E.set(z(),$)}function je(E){}function Re(){return L===xr.Listening}function et(){return L===xr.Closed}function _t(){return L===xr.Disposed}function Ci(){(L===xr.New||L===xr.Listening)&&(L=xr.Closed,I.fire(void 0))}function bs(E){j.fire([E,void 0,void 0])}function Ro(E){j.fire(E)}n.onClose(Ci),n.onError(bs),e.onClose(Ci),e.onError(Ro);function fp(){f||p.size===0||(f=ON.default().timer.setImmediate(()=>{f=void 0,pp()}))}function pp(){if(p.size===0)return;let E=p.shift();try{me.isRequestMessage(E)?hu(E):me.isNotificationMessage(E)?Le(E):me.isResponseMessage(E)?du(E):Te(E)}finally{fp()}}let kC=E=>{try{if(me.isNotificationMessage(E)&&E.method===Bd.type.method){let $=N(E.params.id),Q=p.get($);if(me.isRequestMessage(Q)){let ue=i==null?void 0:i.connectionStrategy,Ze=ue&&ue.cancelUndispatched?ue.cancelUndispatched(Q,je):void 0;if(Ze&&(Ze.error!==void 0||Ze.result!==void 0)){p.delete($),Ze.id=Q.id,jt(Ze,E.method,Date.now()),e.write(Ze);return}}}ae(p,E)}finally{fp()}};function hu(E){if(_t())return;function $(Xe,Ot,Ue){let Qt={jsonrpc:l,id:E.id};Xe instanceof me.ResponseError?Qt.error=Xe.toJson():Qt.result=Xe===void 0?null:Xe,jt(Qt,Ot,Ue),e.write(Qt)}function Q(Xe,Ot,Ue){let Qt={jsonrpc:l,id:E.id,error:Xe.toJson()};jt(Qt,Ot,Ue),e.write(Qt)}function ue(Xe,Ot,Ue){Xe===void 0&&(Xe=null);let Qt={jsonrpc:l,id:E.id,result:Xe};jt(Qt,Ot,Ue),e.write(Qt)}fr(E);let Ze=c[E.method],At,Gt;Ze&&(At=Ze.type,Gt=Ze.handler);let ri=Date.now();if(Gt||u){let Xe=String(E.id),Ot=F.receiver.createCancellationTokenSource(Xe);v[Xe]=Ot;try{let Ue;if(Gt)if(E.params===void 0){if(At!==void 0&&At.numberOfParams!==0){Q(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${E.method} defines ${At.numberOfParams} params but recevied none.`),E.method,ri);return}Ue=Gt(Ot.token)}else if(Array.isArray(E.params)){if(At!==void 0&&At.parameterStructures===me.ParameterStructures.byName){Q(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${E.method} defines parameters by name but received parameters by position`),E.method,ri);return}Ue=Gt(...E.params,Ot.token)}else{if(At!==void 0&&At.parameterStructures===me.ParameterStructures.byPosition){Q(new me.ResponseError(me.ErrorCodes.InvalidParams,`Request ${E.method} defines parameters by position but received parameters by name`),E.method,ri);return}Ue=Gt(E.params,Ot.token)}else u&&(Ue=u(E.method,E.params,Ot.token));let Qt=Ue;Ue?Qt.then?Qt.then(nn=>{delete v[Xe],$(nn,E.method,ri)},nn=>{delete v[Xe],nn instanceof me.ResponseError?Q(nn,E.method,ri):nn&&ai.string(nn.message)?Q(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${E.method} failed with message: ${nn.message}`),E.method,ri):Q(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${E.method} failed unexpectedly without providing any details.`),E.method,ri)}):(delete v[Xe],$(Ue,E.method,ri)):(delete v[Xe],ue(Ue,E.method,ri))}catch(Ue){delete v[Xe],Ue instanceof me.ResponseError?$(Ue,E.method,ri):Ue&&ai.string(Ue.message)?Q(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${E.method} failed with message: ${Ue.message}`),E.method,ri):Q(new me.ResponseError(me.ErrorCodes.InternalError,`Request ${E.method} failed unexpectedly without providing any details.`),E.method,ri)}}else Q(new me.ResponseError(me.ErrorCodes.MethodNotFound,`Unhandled method ${E.method}`),E.method,ri)}function du(E){if(!_t())if(E.id===null)E.error?r.error(`Received response message without id: Error is: -${JSON.stringify(E.error,void 0,4)}`):r.error("Received response message without id. No further error information provided.");else{let $=String(E.id),Q=m[$];if(kn(E,Q),Q){delete m[$];try{if(E.error){let ue=E.error;Q.reject(new me.ResponseError(ue.code,ue.message,ue.data))}else if(E.result!==void 0)Q.resolve(E.result);else throw new Error("Should never happen.")}catch(ue){ue.message?r.error(`Response handler '${Q.method}' failed with message: ${ue.message}`):r.error(`Response handler '${Q.method}' failed unexpectedly.`)}}}}function Le(E){if(_t())return;let $,Q;if(E.method===Bd.type.method)Q=ue=>{let Ze=ue.id,At=v[String(Ze)];At&&At.cancel()};else{let ue=d[E.method];ue&&(Q=ue.handler,$=ue.type)}if(Q||h)try{pr(E),Q?E.params===void 0?($!==void 0&&$.numberOfParams!==0&&$.parameterStructures!==me.ParameterStructures.byName&&r.error(`Notification ${E.method} defines ${$.numberOfParams} params but recevied none.`),Q()):Array.isArray(E.params)?($!==void 0&&($.parameterStructures===me.ParameterStructures.byName&&r.error(`Notification ${E.method} defines parameters by name but received parameters by position`),$.numberOfParams!==E.params.length&&r.error(`Notification ${E.method} defines ${$.numberOfParams} params but received ${E.params.length} argumennts`)),Q(...E.params)):($!==void 0&&$.parameterStructures===me.ParameterStructures.byPosition&&r.error(`Notification ${E.method} defines parameters by position but received parameters by name`),Q(E.params)):h&&h(E.method,E.params)}catch(ue){ue.message?r.error(`Notification handler '${E.method}' failed with message: ${ue.message}`):r.error(`Notification handler '${E.method}' failed unexpectedly.`)}else W.fire(E)}function Te(E){if(!E){r.error("Received empty message.");return}r.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(E,null,4)}`);let $=E;if(ai.string($.id)||ai.number($.id)){let Q=String($.id),ue=m[Q];ue&&ue.reject(new Error("The received response has neither a result nor an error property."))}}function ke(E){if(!(w===Zt.Off||!S))if(D===Cr.Text){let $;w===Zt.Verbose&&E.params&&($=`Params: ${JSON.stringify(E.params,null,4)} - -`),S.log(`Sending request '${E.method} - (${E.id})'.`,$)}else ys("send-request",E)}function Fe(E){if(!(w===Zt.Off||!S))if(D===Cr.Text){let $;w===Zt.Verbose&&(E.params?$=`Params: ${JSON.stringify(E.params,null,4)} - -`:$=`No parameters provided. - -`),S.log(`Sending notification '${E.method}'.`,$)}else ys("send-notification",E)}function jt(E,$,Q){if(!(w===Zt.Off||!S))if(D===Cr.Text){let ue;w===Zt.Verbose&&(E.error&&E.error.data?ue=`Error data: ${JSON.stringify(E.error.data,null,4)} - -`:E.result?ue=`Result: ${JSON.stringify(E.result,null,4)} - -`:E.error===void 0&&(ue=`No result returned. - -`)),S.log(`Sending response '${$} - (${E.id})'. Processing request took ${Date.now()-Q}ms`,ue)}else ys("send-response",E)}function fr(E){if(!(w===Zt.Off||!S))if(D===Cr.Text){let $;w===Zt.Verbose&&E.params&&($=`Params: ${JSON.stringify(E.params,null,4)} - -`),S.log(`Received request '${E.method} - (${E.id})'.`,$)}else ys("receive-request",E)}function pr(E){if(!(w===Zt.Off||!S||E.method===_S.type.method))if(D===Cr.Text){let $;w===Zt.Verbose&&(E.params?$=`Params: ${JSON.stringify(E.params,null,4)} - -`:$=`No parameters provided. - -`),S.log(`Received notification '${E.method}'.`,$)}else ys("receive-notification",E)}function kn(E,$){if(!(w===Zt.Off||!S))if(D===Cr.Text){let Q;if(w===Zt.Verbose&&(E.error&&E.error.data?Q=`Error data: ${JSON.stringify(E.error.data,null,4)} - -`:E.result?Q=`Result: ${JSON.stringify(E.result,null,4)} - -`:E.error===void 0&&(Q=`No result returned. - -`)),$){let ue=E.error?` Request failed: ${E.error.message} (${E.error.code}).`:"";S.log(`Received response '${$.method} - (${E.id})' in ${Date.now()-$.timerStart}ms.${ue}`,Q)}else S.log(`Received response ${E.id} without active response promise.`,Q)}else ys("receive-response",E)}function ys(E,$){if(!S||w===Zt.Off)return;let Q={isLSPMessage:!0,type:E,message:$,timestamp:Date.now()};S.log(Q)}function vs(){if(et())throw new dl(Nm.Closed,"Connection is closed.");if(_t())throw new dl(Nm.Disposed,"Connection is disposed.")}function iie(){if(Re())throw new dl(Nm.AlreadyListening,"Connection is already listening")}function nie(){if(!Re())throw new Error("Call listen() first.")}function qh(E){return E===void 0?null:E}function pR(E){if(E!==null)return E}function mR(E){return E!=null&&!Array.isArray(E)&&typeof E=="object"}function EC(E,$){switch(E){case me.ParameterStructures.auto:return mR($)?pR($):[qh($)];case me.ParameterStructures.byName:if(!mR($))throw new Error("Recevied parameters by name but param is not an object literal.");return pR($);case me.ParameterStructures.byPosition:return[qh($)];default:throw new Error(`Unknown parameter structure ${E.toString()}`)}}function bR(E,$){let Q,ue=E.numberOfParams;switch(ue){case 0:Q=void 0;break;case 1:Q=EC(E.parameterStructures,$[0]);break;default:Q=[];for(let Ze=0;Ze<$.length&&Ze{vs();let Q,ue;if(ai.string(E)){Q=E;let At=$[0],Gt=0,ri=me.ParameterStructures.auto;me.ParameterStructures.is(At)&&(Gt=1,ri=At);let Xe=$.length,Ot=Xe-Gt;switch(Ot){case 0:ue=void 0;break;case 1:ue=EC(ri,$[Gt]);break;default:if(ri===me.ParameterStructures.byName)throw new Error(`Recevied ${Ot} parameters for 'by Name' notification parameter structure.`);ue=$.slice(Gt,Xe).map(Ue=>qh(Ue));break}}else{let At=$;Q=E.method,ue=bR(E,At)}let Ze={jsonrpc:l,method:Q,params:ue};Fe(Ze),e.write(Ze)},onNotification:(E,$)=>{vs();let Q;return ai.func(E)?h=E:$&&(ai.string(E)?(Q=E,d[E]={type:void 0,handler:$}):(Q=E.method,d[E.method]={type:E,handler:$})),{dispose:()=>{Q!==void 0?delete d[Q]:h=void 0}}},onProgress:(E,$,Q)=>{if(g.has($))throw new Error(`Progress handler for token ${$} already registered`);return g.set($,Q),{dispose:()=>{g.delete($)}}},sendProgress:(E,$,Q)=>{gu.sendNotification(Bm.type,{token:$,value:Q})},onUnhandledProgress:A.event,sendRequest:(E,...$)=>{vs(),nie();let Q,ue,Ze;if(ai.string(E)){Q=E;let Xe=$[0],Ot=$[$.length-1],Ue=0,Qt=me.ParameterStructures.auto;me.ParameterStructures.is(Xe)&&(Ue=1,Qt=Xe);let nn=$.length;ES.CancellationToken.is(Ot)&&(nn=nn-1,Ze=Ot);let Na=nn-Ue;switch(Na){case 0:ue=void 0;break;case 1:ue=EC(Qt,$[Ue]);break;default:if(Qt===me.ParameterStructures.byName)throw new Error(`Recevied ${Na} parameters for 'by Name' request parameter structure.`);ue=$.slice(Ue,nn).map(ws=>qh(ws));break}}else{let Xe=$;Q=E.method,ue=bR(E,Xe);let Ot=E.numberOfParams;Ze=ES.CancellationToken.is(Xe[Ot])?Xe[Ot]:void 0}let At=o++,Gt;return Ze&&(Gt=Ze.onCancellationRequested(()=>{F.sender.sendCancellation(gu,At)})),new Promise((Xe,Ot)=>{let Ue={jsonrpc:l,id:At,method:Q,params:ue},Qt=ws=>{Xe(ws),F.sender.cleanup(At),Gt==null||Gt.dispose()},nn=ws=>{Ot(ws),F.sender.cleanup(At),Gt==null||Gt.dispose()},Na={method:Q,timerStart:Date.now(),resolve:Qt,reject:nn};ke(Ue);try{e.write(Ue)}catch(ws){Na.reject(new me.ResponseError(me.ErrorCodes.MessageWriteError,ws.message?ws.message:"Unknown reason")),Na=null}Na&&(m[String(At)]=Na)})},onRequest:(E,$)=>{vs();let Q=null;return PS.is(E)?(Q=void 0,u=E):ai.string(E)?(Q=null,$!==void 0&&(Q=E,c[E]={handler:$,type:void 0})):$!==void 0&&(Q=E.method,c[E.method]={type:E,handler:$}),{dispose:()=>{Q!==null&&(Q!==void 0?delete c[Q]:u=void 0)}}},trace:(E,$,Q)=>{let ue=!1,Ze=Cr.Text;Q!==void 0&&(ai.boolean(Q)?ue=Q:(ue=Q.sendNotification||!1,Ze=Q.traceFormat||Cr.Text)),w=E,D=Ze,w===Zt.Off?S=void 0:S=$,ue&&!et()&&!_t()&&gu.sendNotification(BN.type,{value:Zt.toString(E)})},onError:j.event,onClose:I.event,onUnhandledNotification:W.event,onDispose:M.event,end:()=>{e.end()},dispose:()=>{if(_t())return;L=xr.Disposed,M.fire(void 0);let E=new Error("Connection got disposed.");Object.keys(m).forEach($=>{m[$].reject(E)}),m=Object.create(null),v=Object.create(null),p=new MN.LinkedMap,ai.func(e.dispose)&&e.dispose(),ai.func(n.dispose)&&n.dispose()},listen:()=>{vs(),iie(),L=xr.Listening,n.listen(kC)},inspect:()=>{ON.default().console.log("inspect")}};return gu.onNotification(_S.type,E=>{w===Zt.Off||!S||S.log(E.message,w===Zt.Verbose?E.verbose:void 0)}),gu.onNotification(Bm.type,E=>{let $=g.get(E.token);$?$(E.value):A.fire(E)}),gu}ye.createMessageConnection=ade});var AS=b(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.CancellationSenderStrategy=X.CancellationReceiverStrategy=X.ConnectionError=X.ConnectionErrors=X.LogTraceNotification=X.SetTraceNotification=X.TraceFormat=X.Trace=X.ProgressType=X.createMessageConnection=X.NullLogger=X.ConnectionOptions=X.ConnectionStrategy=X.WriteableStreamMessageWriter=X.AbstractMessageWriter=X.MessageWriter=X.ReadableStreamMessageReader=X.AbstractMessageReader=X.MessageReader=X.CancellationToken=X.CancellationTokenSource=X.Emitter=X.Event=X.Disposable=X.ParameterStructures=X.NotificationType9=X.NotificationType8=X.NotificationType7=X.NotificationType6=X.NotificationType5=X.NotificationType4=X.NotificationType3=X.NotificationType2=X.NotificationType1=X.NotificationType0=X.NotificationType=X.ErrorCodes=X.ResponseError=X.RequestType9=X.RequestType8=X.RequestType7=X.RequestType6=X.RequestType5=X.RequestType4=X.RequestType3=X.RequestType2=X.RequestType1=X.RequestType0=X.RequestType=X.RAL=void 0;X.CancellationStrategy=void 0;var yt=mS();Object.defineProperty(X,"RequestType",{enumerable:!0,get:function(){return yt.RequestType}});Object.defineProperty(X,"RequestType0",{enumerable:!0,get:function(){return yt.RequestType0}});Object.defineProperty(X,"RequestType1",{enumerable:!0,get:function(){return yt.RequestType1}});Object.defineProperty(X,"RequestType2",{enumerable:!0,get:function(){return yt.RequestType2}});Object.defineProperty(X,"RequestType3",{enumerable:!0,get:function(){return yt.RequestType3}});Object.defineProperty(X,"RequestType4",{enumerable:!0,get:function(){return yt.RequestType4}});Object.defineProperty(X,"RequestType5",{enumerable:!0,get:function(){return yt.RequestType5}});Object.defineProperty(X,"RequestType6",{enumerable:!0,get:function(){return yt.RequestType6}});Object.defineProperty(X,"RequestType7",{enumerable:!0,get:function(){return yt.RequestType7}});Object.defineProperty(X,"RequestType8",{enumerable:!0,get:function(){return yt.RequestType8}});Object.defineProperty(X,"RequestType9",{enumerable:!0,get:function(){return yt.RequestType9}});Object.defineProperty(X,"ResponseError",{enumerable:!0,get:function(){return yt.ResponseError}});Object.defineProperty(X,"ErrorCodes",{enumerable:!0,get:function(){return yt.ErrorCodes}});Object.defineProperty(X,"NotificationType",{enumerable:!0,get:function(){return yt.NotificationType}});Object.defineProperty(X,"NotificationType0",{enumerable:!0,get:function(){return yt.NotificationType0}});Object.defineProperty(X,"NotificationType1",{enumerable:!0,get:function(){return yt.NotificationType1}});Object.defineProperty(X,"NotificationType2",{enumerable:!0,get:function(){return yt.NotificationType2}});Object.defineProperty(X,"NotificationType3",{enumerable:!0,get:function(){return yt.NotificationType3}});Object.defineProperty(X,"NotificationType4",{enumerable:!0,get:function(){return yt.NotificationType4}});Object.defineProperty(X,"NotificationType5",{enumerable:!0,get:function(){return yt.NotificationType5}});Object.defineProperty(X,"NotificationType6",{enumerable:!0,get:function(){return yt.NotificationType6}});Object.defineProperty(X,"NotificationType7",{enumerable:!0,get:function(){return yt.NotificationType7}});Object.defineProperty(X,"NotificationType8",{enumerable:!0,get:function(){return yt.NotificationType8}});Object.defineProperty(X,"NotificationType9",{enumerable:!0,get:function(){return yt.NotificationType9}});Object.defineProperty(X,"ParameterStructures",{enumerable:!0,get:function(){return yt.ParameterStructures}});var lde=gS();Object.defineProperty(X,"Disposable",{enumerable:!0,get:function(){return lde.Disposable}});var YN=Xu();Object.defineProperty(X,"Event",{enumerable:!0,get:function(){return YN.Event}});Object.defineProperty(X,"Emitter",{enumerable:!0,get:function(){return YN.Emitter}});var WN=wS();Object.defineProperty(X,"CancellationTokenSource",{enumerable:!0,get:function(){return WN.CancellationTokenSource}});Object.defineProperty(X,"CancellationToken",{enumerable:!0,get:function(){return WN.CancellationToken}});var IS=kN();Object.defineProperty(X,"MessageReader",{enumerable:!0,get:function(){return IS.MessageReader}});Object.defineProperty(X,"AbstractMessageReader",{enumerable:!0,get:function(){return IS.AbstractMessageReader}});Object.defineProperty(X,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return IS.ReadableStreamMessageReader}});var jS=IN();Object.defineProperty(X,"MessageWriter",{enumerable:!0,get:function(){return jS.MessageWriter}});Object.defineProperty(X,"AbstractMessageWriter",{enumerable:!0,get:function(){return jS.AbstractMessageWriter}});Object.defineProperty(X,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return jS.WriteableStreamMessageWriter}});var ln=qN();Object.defineProperty(X,"ConnectionStrategy",{enumerable:!0,get:function(){return ln.ConnectionStrategy}});Object.defineProperty(X,"ConnectionOptions",{enumerable:!0,get:function(){return ln.ConnectionOptions}});Object.defineProperty(X,"NullLogger",{enumerable:!0,get:function(){return ln.NullLogger}});Object.defineProperty(X,"createMessageConnection",{enumerable:!0,get:function(){return ln.createMessageConnection}});Object.defineProperty(X,"ProgressType",{enumerable:!0,get:function(){return ln.ProgressType}});Object.defineProperty(X,"Trace",{enumerable:!0,get:function(){return ln.Trace}});Object.defineProperty(X,"TraceFormat",{enumerable:!0,get:function(){return ln.TraceFormat}});Object.defineProperty(X,"SetTraceNotification",{enumerable:!0,get:function(){return ln.SetTraceNotification}});Object.defineProperty(X,"LogTraceNotification",{enumerable:!0,get:function(){return ln.LogTraceNotification}});Object.defineProperty(X,"ConnectionErrors",{enumerable:!0,get:function(){return ln.ConnectionErrors}});Object.defineProperty(X,"ConnectionError",{enumerable:!0,get:function(){return ln.ConnectionError}});Object.defineProperty(X,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return ln.CancellationReceiverStrategy}});Object.defineProperty(X,"CancellationSenderStrategy",{enumerable:!0,get:function(){return ln.CancellationSenderStrategy}});Object.defineProperty(X,"CancellationStrategy",{enumerable:!0,get:function(){return ln.CancellationStrategy}});var ude=No();X.RAL=ude.default});var zu=b(Je=>{"use strict";var cde=Je&&Je.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),hde=Je&&Je.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&cde(e,n,t)};Object.defineProperty(Je,"__esModule",{value:!0});Je.createMessageConnection=Je.createServerSocketTransport=Je.createClientSocketTransport=Je.createServerPipeTransport=Je.createClientPipeTransport=Je.generateRandomPipeName=Je.StreamMessageWriter=Je.StreamMessageReader=Je.SocketMessageWriter=Je.SocketMessageReader=Je.IPCMessageWriter=Je.IPCMessageReader=void 0;var Gu=QM();Gu.default.install();var Qr=AS(),ZN=require("path"),dde=require("os"),gde=require("crypto"),Hm=require("net");hde(AS(),Je);var $N=class extends Qr.AbstractMessageReader{constructor(e){super();this.process=e;let t=this.process;t.on("error",i=>this.fireError(i)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),Qr.Disposable.create(()=>this.process.off("message",e))}};Je.IPCMessageReader=$N;var XN=class extends Qr.AbstractMessageWriter{constructor(e){super();this.process=e,this.errorCount=0;let t=this.process;t.on("error",i=>this.fireError(i)),t.on("close",()=>this.fireClose)}write(e){try{return typeof this.process.send=="function"&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};Je.IPCMessageWriter=XN;var Qu=class extends Qr.ReadableStreamMessageReader{constructor(e,t="utf-8"){super(Gu.default().stream.asReadableStream(e),t)}};Je.SocketMessageReader=Qu;var Ku=class extends Qr.WriteableStreamMessageWriter{constructor(e,t){super(Gu.default().stream.asWritableStream(e),t);this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};Je.SocketMessageWriter=Ku;var OS=class extends Qr.ReadableStreamMessageReader{constructor(e,t){super(Gu.default().stream.asReadableStream(e),t)}};Je.StreamMessageReader=OS;var MS=class extends Qr.WriteableStreamMessageWriter{constructor(e,t){super(Gu.default().stream.asWritableStream(e),t)}};Je.StreamMessageWriter=MS;var JN=process.env.XDG_RUNTIME_DIR,fde=new Map([["linux",107],["darwin",103]]);function pde(){let n=gde.randomBytes(21).toString("hex");if(process.platform==="win32")return`\\\\.\\pipe\\vscode-jsonrpc-${n}-sock`;let e;JN?e=ZN.join(JN,`vscode-ipc-${n}.sock`):e=ZN.join(dde.tmpdir(),`vscode-${n}.sock`);let t=fde.get(process.platform);return t!==void 0&&e.length>=t&&Gu.default().console.warn(`WARNING: IPC handle "${e}" is longer than ${t} characters.`),e}Je.generateRandomPipeName=pde;function mde(n,e="utf-8"){let t,i=new Promise((r,o)=>{t=r});return new Promise((r,o)=>{let s=Hm.createServer(a=>{s.close(),t([new Qu(a,e),new Ku(a,e)])});s.on("error",o),s.listen(n,()=>{s.removeListener("error",o),r({onConnected:()=>i})})})}Je.createClientPipeTransport=mde;function bde(n,e="utf-8"){let t=Hm.createConnection(n);return[new Qu(t,e),new Ku(t,e)]}Je.createServerPipeTransport=bde;function yde(n,e="utf-8"){let t,i=new Promise((r,o)=>{t=r});return new Promise((r,o)=>{let s=Hm.createServer(a=>{s.close(),t([new Qu(a,e),new Ku(a,e)])});s.on("error",o),s.listen(n,"127.0.0.1",()=>{s.removeListener("error",o),r({onConnected:()=>i})})})}Je.createClientSocketTransport=yde;function vde(n,e="utf-8"){let t=Hm.createConnection(n,"127.0.0.1");return[new Qu(t,e),new Ku(t,e)]}Je.createServerSocketTransport=vde;function wde(n){let e=n;return e.read!==void 0&&e.addListener!==void 0}function Dde(n){let e=n;return e.write!==void 0&&e.addListener!==void 0}function Cde(n,e,t,i){t||(t=Qr.NullLogger);let r=wde(n)?new OS(n):n,o=Dde(e)?new MS(e):e;return Qr.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),Qr.createMessageConnection(r,o,t,i)}Je.createMessageConnection=Cde});var NS=b((l_e,UN)=>{"use strict";UN.exports=zu()});var QN={};Ds(QN,{AnnotatedTextEdit:()=>Yo,ChangeAnnotation:()=>gl,ChangeAnnotationIdentifier:()=>bi,CodeAction:()=>p0,CodeActionContext:()=>f0,CodeActionKind:()=>g0,CodeDescription:()=>XS,CodeLens:()=>m0,Color:()=>Ym,ColorInformation:()=>qS,ColorPresentation:()=>YS,Command:()=>Vu,CompletionItem:()=>i0,CompletionItemKind:()=>KS,CompletionItemTag:()=>VS,CompletionList:()=>n0,CreateFile:()=>Ws,DeleteFile:()=>Wo,Diagnostic:()=>qd,DiagnosticRelatedInformation:()=>Wm,DiagnosticSeverity:()=>JS,DiagnosticTag:()=>$S,DocumentHighlight:()=>l0,DocumentHighlightKind:()=>a0,DocumentLink:()=>y0,DocumentSymbol:()=>d0,EOL:()=>Sde,FoldingRange:()=>ZS,FoldingRangeKind:()=>WS,FormattingOptions:()=>b0,Hover:()=>r0,InsertReplaceEdit:()=>e0,InsertTextFormat:()=>zS,InsertTextMode:()=>t0,Location:()=>cn,LocationLink:()=>HS,MarkedString:()=>Wd,MarkupContent:()=>Jm,MarkupKind:()=>ec,OptionalVersionedTextDocumentIdentifier:()=>Yd,ParameterInformation:()=>o0,Position:()=>zt,Range:()=>He,RenameFile:()=>Zs,SelectionRange:()=>v0,SignatureInformation:()=>s0,SymbolInformation:()=>h0,SymbolKind:()=>u0,SymbolTag:()=>c0,TextDocument:()=>w0,TextDocumentEdit:()=>Ys,TextDocumentIdentifier:()=>US,TextDocumentItem:()=>QS,TextEdit:()=>un,VersionedTextDocumentIdentifier:()=>GS,WorkspaceChange:()=>xde,WorkspaceEdit:()=>Zm,integer:()=>BS,uinteger:()=>Hd});var BS,Hd,zt,He,cn,HS,Ym,qS,YS,WS,ZS,Wm,JS,$S,XS,qd,Vu,un,gl,bi,Yo,Ys,Ws,Zs,Wo,Zm,qm,GN,xde,US,GS,Yd,QS,ec,Jm,KS,zS,VS,e0,t0,i0,n0,Wd,r0,o0,s0,a0,l0,u0,c0,h0,d0,g0,f0,p0,m0,b0,y0,v0,Sde,w0,Tde,Y,Kr=_(()=>{"use strict";(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(BS||(BS={}));(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(Hd||(Hd={}));(function(n){function e(i,r){return i===Number.MAX_VALUE&&(i=Hd.MAX_VALUE),r===Number.MAX_VALUE&&(r=Hd.MAX_VALUE),{line:i,character:r}}n.create=e;function t(i){var r=i;return Y.objectLiteral(r)&&Y.uinteger(r.line)&&Y.uinteger(r.character)}n.is=t})(zt||(zt={}));(function(n){function e(i,r,o,s){if(Y.uinteger(i)&&Y.uinteger(r)&&Y.uinteger(o)&&Y.uinteger(s))return{start:zt.create(i,r),end:zt.create(o,s)};if(zt.is(i)&&zt.is(r))return{start:i,end:r};throw new Error("Range#create called with invalid arguments["+i+", "+r+", "+o+", "+s+"]")}n.create=e;function t(i){var r=i;return Y.objectLiteral(r)&&zt.is(r.start)&&zt.is(r.end)}n.is=t})(He||(He={}));(function(n){function e(i,r){return{uri:i,range:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&He.is(r.range)&&(Y.string(r.uri)||Y.undefined(r.uri))}n.is=t})(cn||(cn={}));(function(n){function e(i,r,o,s){return{targetUri:i,targetRange:r,targetSelectionRange:o,originSelectionRange:s}}n.create=e;function t(i){var r=i;return Y.defined(r)&&He.is(r.targetRange)&&Y.string(r.targetUri)&&(He.is(r.targetSelectionRange)||Y.undefined(r.targetSelectionRange))&&(He.is(r.originSelectionRange)||Y.undefined(r.originSelectionRange))}n.is=t})(HS||(HS={}));(function(n){function e(i,r,o,s){return{red:i,green:r,blue:o,alpha:s}}n.create=e;function t(i){var r=i;return Y.numberRange(r.red,0,1)&&Y.numberRange(r.green,0,1)&&Y.numberRange(r.blue,0,1)&&Y.numberRange(r.alpha,0,1)}n.is=t})(Ym||(Ym={}));(function(n){function e(i,r){return{range:i,color:r}}n.create=e;function t(i){var r=i;return He.is(r.range)&&Ym.is(r.color)}n.is=t})(qS||(qS={}));(function(n){function e(i,r,o){return{label:i,textEdit:r,additionalTextEdits:o}}n.create=e;function t(i){var r=i;return Y.string(r.label)&&(Y.undefined(r.textEdit)||un.is(r))&&(Y.undefined(r.additionalTextEdits)||Y.typedArray(r.additionalTextEdits,un.is))}n.is=t})(YS||(YS={}));(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(WS||(WS={}));(function(n){function e(i,r,o,s,a){var l={startLine:i,endLine:r};return Y.defined(o)&&(l.startCharacter=o),Y.defined(s)&&(l.endCharacter=s),Y.defined(a)&&(l.kind=a),l}n.create=e;function t(i){var r=i;return Y.uinteger(r.startLine)&&Y.uinteger(r.startLine)&&(Y.undefined(r.startCharacter)||Y.uinteger(r.startCharacter))&&(Y.undefined(r.endCharacter)||Y.uinteger(r.endCharacter))&&(Y.undefined(r.kind)||Y.string(r.kind))}n.is=t})(ZS||(ZS={}));(function(n){function e(i,r){return{location:i,message:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&cn.is(r.location)&&Y.string(r.message)}n.is=t})(Wm||(Wm={}));(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(JS||(JS={}));(function(n){n.Unnecessary=1,n.Deprecated=2})($S||($S={}));(function(n){function e(t){var i=t;return i!=null&&Y.string(i.href)}n.is=e})(XS||(XS={}));(function(n){function e(i,r,o,s,a,l){var u={range:i,message:r};return Y.defined(o)&&(u.severity=o),Y.defined(s)&&(u.code=s),Y.defined(a)&&(u.source=a),Y.defined(l)&&(u.relatedInformation=l),u}n.create=e;function t(i){var r,o=i;return Y.defined(o)&&He.is(o.range)&&Y.string(o.message)&&(Y.number(o.severity)||Y.undefined(o.severity))&&(Y.integer(o.code)||Y.string(o.code)||Y.undefined(o.code))&&(Y.undefined(o.codeDescription)||Y.string((r=o.codeDescription)===null||r===void 0?void 0:r.href))&&(Y.string(o.source)||Y.undefined(o.source))&&(Y.undefined(o.relatedInformation)||Y.typedArray(o.relatedInformation,Wm.is))}n.is=t})(qd||(qd={}));(function(n){function e(i,r){for(var o=[],s=2;s0&&(a.arguments=o),a}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.title)&&Y.string(r.command)}n.is=t})(Vu||(Vu={}));(function(n){function e(o,s){return{range:o,newText:s}}n.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}n.insert=t;function i(o){return{range:o,newText:""}}n.del=i;function r(o){var s=o;return Y.objectLiteral(s)&&Y.string(s.newText)&&He.is(s.range)}n.is=r})(un||(un={}));(function(n){function e(i,r,o){var s={label:i};return r!==void 0&&(s.needsConfirmation=r),o!==void 0&&(s.description=o),s}n.create=e;function t(i){var r=i;return r!==void 0&&Y.objectLiteral(r)&&Y.string(r.label)&&(Y.boolean(r.needsConfirmation)||r.needsConfirmation===void 0)&&(Y.string(r.description)||r.description===void 0)}n.is=t})(gl||(gl={}));(function(n){function e(t){var i=t;return typeof i=="string"}n.is=e})(bi||(bi={}));(function(n){function e(o,s,a){return{range:o,newText:s,annotationId:a}}n.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}n.insert=t;function i(o,s){return{range:o,newText:"",annotationId:s}}n.del=i;function r(o){var s=o;return un.is(s)&&(gl.is(s.annotationId)||bi.is(s.annotationId))}n.is=r})(Yo||(Yo={}));(function(n){function e(i,r){return{textDocument:i,edits:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Yd.is(r.textDocument)&&Array.isArray(r.edits)}n.is=t})(Ys||(Ys={}));(function(n){function e(i,r,o){var s={kind:"create",uri:i};return r!==void 0&&(r.overwrite!==void 0||r.ignoreIfExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(i){var r=i;return r&&r.kind==="create"&&Y.string(r.uri)&&(r.options===void 0||(r.options.overwrite===void 0||Y.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Y.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(Ws||(Ws={}));(function(n){function e(i,r,o,s){var a={kind:"rename",oldUri:i,newUri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(i){var r=i;return r&&r.kind==="rename"&&Y.string(r.oldUri)&&Y.string(r.newUri)&&(r.options===void 0||(r.options.overwrite===void 0||Y.boolean(r.options.overwrite))&&(r.options.ignoreIfExists===void 0||Y.boolean(r.options.ignoreIfExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(Zs||(Zs={}));(function(n){function e(i,r,o){var s={kind:"delete",uri:i};return r!==void 0&&(r.recursive!==void 0||r.ignoreIfNotExists!==void 0)&&(s.options=r),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(i){var r=i;return r&&r.kind==="delete"&&Y.string(r.uri)&&(r.options===void 0||(r.options.recursive===void 0||Y.boolean(r.options.recursive))&&(r.options.ignoreIfNotExists===void 0||Y.boolean(r.options.ignoreIfNotExists)))&&(r.annotationId===void 0||bi.is(r.annotationId))}n.is=t})(Wo||(Wo={}));(function(n){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(r){return Y.string(r.kind)?Ws.is(r)||Zs.is(r)||Wo.is(r):Ys.is(r)}))}n.is=e})(Zm||(Zm={}));qm=function(){function n(e,t){this.edits=e,this.changeAnnotations=t}return n.prototype.insert=function(e,t,i){var r,o;if(i===void 0?r=un.insert(e,t):bi.is(i)?(o=i,r=Yo.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=Yo.insert(e,t,o)),this.edits.push(r),o!==void 0)return o},n.prototype.replace=function(e,t,i){var r,o;if(i===void 0?r=un.replace(e,t):bi.is(i)?(o=i,r=Yo.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(i),r=Yo.replace(e,t,o)),this.edits.push(r),o!==void 0)return o},n.prototype.delete=function(e,t){var i,r;if(t===void 0?i=un.del(e):bi.is(t)?(r=t,i=Yo.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),i=Yo.del(e,r)),this.edits.push(i),r!==void 0)return r},n.prototype.add=function(e){this.edits.push(e)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),GN=function(){function n(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(e,t){var i;if(bi.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}(),xde=function(){function n(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new GN(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(Ys.is(i)){var r=new qm(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(function(i){var r=new qm(e.changes[i]);t._textEditChanges[i]=r})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(e){if(Yd.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var r=[],o={textDocument:t,edits:r};this._workspaceEdit.documentChanges.push(o),i=new qm(r,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var r=[];this._workspaceEdit.changes[e]=r,i=new qm(r),this._textEditChanges[e]=i}return i}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new GN,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;gl.is(t)||bi.is(t)?r=t:i=t;var o,s;if(r===void 0?o=Ws.create(e,i):(s=bi.is(r)?r:this._changeAnnotations.manage(r),o=Ws.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.renameFile=function(e,t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;gl.is(i)||bi.is(i)?o=i:r=i;var s,a;if(o===void 0?s=Zs.create(e,t,r):(a=bi.is(o)?o:this._changeAnnotations.manage(o),s=Zs.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},n.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r;gl.is(t)||bi.is(t)?r=t:i=t;var o,s;if(r===void 0?o=Wo.create(e,i):(s=bi.is(r)?r:this._changeAnnotations.manage(r),o=Wo.create(e,i,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n}();(function(n){function e(i){return{uri:i}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)}n.is=t})(US||(US={}));(function(n){function e(i,r){return{uri:i,version:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&Y.integer(r.version)}n.is=t})(GS||(GS={}));(function(n){function e(i,r){return{uri:i,version:r}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&(r.version===null||Y.integer(r.version))}n.is=t})(Yd||(Yd={}));(function(n){function e(i,r,o,s){return{uri:i,languageId:r,version:o,text:s}}n.create=e;function t(i){var r=i;return Y.defined(r)&&Y.string(r.uri)&&Y.string(r.languageId)&&Y.integer(r.version)&&Y.string(r.text)}n.is=t})(QS||(QS={}));(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(ec||(ec={}));(function(n){function e(t){var i=t;return i===n.PlainText||i===n.Markdown}n.is=e})(ec||(ec={}));(function(n){function e(t){var i=t;return Y.objectLiteral(t)&&ec.is(i.kind)&&Y.string(i.value)}n.is=e})(Jm||(Jm={}));(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(KS||(KS={}));(function(n){n.PlainText=1,n.Snippet=2})(zS||(zS={}));(function(n){n.Deprecated=1})(VS||(VS={}));(function(n){function e(i,r,o){return{newText:i,insert:r,replace:o}}n.create=e;function t(i){var r=i;return r&&Y.string(r.newText)&&He.is(r.insert)&&He.is(r.replace)}n.is=t})(e0||(e0={}));(function(n){n.asIs=1,n.adjustIndentation=2})(t0||(t0={}));(function(n){function e(t){return{label:t}}n.create=e})(i0||(i0={}));(function(n){function e(t,i){return{items:t||[],isIncomplete:!!i}}n.create=e})(n0||(n0={}));(function(n){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(i){var r=i;return Y.string(r)||Y.objectLiteral(r)&&Y.string(r.language)&&Y.string(r.value)}n.is=t})(Wd||(Wd={}));(function(n){function e(t){var i=t;return!!i&&Y.objectLiteral(i)&&(Jm.is(i.contents)||Wd.is(i.contents)||Y.typedArray(i.contents,Wd.is))&&(t.range===void 0||He.is(t.range))}n.is=e})(r0||(r0={}));(function(n){function e(t,i){return i?{label:t,documentation:i}:{label:t}}n.create=e})(o0||(o0={}));(function(n){function e(t,i){for(var r=[],o=2;o=0;c--){var h=l[c],d=o.offsetAt(h.range.start),g=o.offsetAt(h.range.end);if(g<=u)a=a.substring(0,d)+h.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");u=d}return a}n.applyEdits=i;function r(o,s){if(o.length<=1)return o;var a=o.length/2|0,l=o.slice(0,a),u=o.slice(a);r(l,s),r(u,s);for(var c=0,h=0,d=0;c0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},n.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,r=t.length;if(r===0)return zt.create(0,e);for(;ie?r=o:i=o+1}var s=i-1;return zt.create(s,e-t[s])},n.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],r=e.line+1"u"}n.undefined=i;function r(g){return g===!0||g===!1}n.boolean=r;function o(g){return e.call(g)==="[object String]"}n.string=o;function s(g){return e.call(g)==="[object Number]"}n.number=s;function a(g,f,p){return e.call(g)==="[object Number]"&&f<=g&&g<=p}n.numberRange=a;function l(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=l;function u(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=u;function c(g){return e.call(g)==="[object Function]"}n.func=c;function h(g){return g!==null&&typeof g=="object"}n.objectLiteral=h;function d(g,f){return Array.isArray(g)&&g.every(f)}n.typedArray=d})(Y||(Y={}))});var li=b(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ProtocolNotificationType=Gn.ProtocolNotificationType0=Gn.ProtocolRequestType=Gn.ProtocolRequestType0=Gn.RegistrationType=void 0;var tc=zu(),KN=class{constructor(e){this.method=e}};Gn.RegistrationType=KN;var zN=class extends tc.RequestType0{constructor(e){super(e)}};Gn.ProtocolRequestType0=zN;var VN=class extends tc.RequestType{constructor(e){super(e,tc.ParameterStructures.byName)}};Gn.ProtocolRequestType=VN;var eB=class extends tc.NotificationType0{constructor(e){super(e)}};Gn.ProtocolNotificationType0=eB;var tB=class extends tc.NotificationType{constructor(e){super(e,tc.ParameterStructures.byName)}};Gn.ProtocolNotificationType=tB});var rB=b(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.objectLiteral=Jt.typedArray=Jt.stringArray=Jt.array=Jt.func=Jt.error=Jt.number=Jt.string=Jt.boolean=void 0;function kde(n){return n===!0||n===!1}Jt.boolean=kde;function iB(n){return typeof n=="string"||n instanceof String}Jt.string=iB;function Ede(n){return typeof n=="number"||n instanceof Number}Jt.number=Ede;function Pde(n){return n instanceof Error}Jt.error=Pde;function _de(n){return typeof n=="function"}Jt.func=_de;function nB(n){return Array.isArray(n)}Jt.array=nB;function Rde(n){return nB(n)&&n.every(e=>iB(e))}Jt.stringArray=Rde;function Lde(n,e){return Array.isArray(n)&&n.every(e)}Jt.typedArray=Lde;function Fde(n){return n!==null&&typeof n=="object"}Jt.objectLiteral=Fde});var oB=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.ImplementationRequest=void 0;var Ide=li(),jde;(function(n){n.method="textDocument/implementation",n.type=new Ide.ProtocolRequestType(n.method)})(jde=Zd.ImplementationRequest||(Zd.ImplementationRequest={}))});var sB=b(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.TypeDefinitionRequest=void 0;var Ade=li(),Ode;(function(n){n.method="textDocument/typeDefinition",n.type=new Ade.ProtocolRequestType(n.method)})(Ode=Jd.TypeDefinitionRequest||(Jd.TypeDefinitionRequest={}))});var lB=b(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.DidChangeWorkspaceFoldersNotification=Js.WorkspaceFoldersRequest=void 0;var aB=li(),Mde;(function(n){n.type=new aB.ProtocolRequestType0("workspace/workspaceFolders")})(Mde=Js.WorkspaceFoldersRequest||(Js.WorkspaceFoldersRequest={}));var Nde;(function(n){n.type=new aB.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(Nde=Js.DidChangeWorkspaceFoldersNotification||(Js.DidChangeWorkspaceFoldersNotification={}))});var uB=b($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.ConfigurationRequest=void 0;var Bde=li(),Hde;(function(n){n.type=new Bde.ProtocolRequestType("workspace/configuration")})(Hde=$d.ConfigurationRequest||($d.ConfigurationRequest={}))});var hB=b($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.ColorPresentationRequest=$s.DocumentColorRequest=void 0;var cB=li(),qde;(function(n){n.method="textDocument/documentColor",n.type=new cB.ProtocolRequestType(n.method)})(qde=$s.DocumentColorRequest||($s.DocumentColorRequest={}));var Yde;(function(n){n.type=new cB.ProtocolRequestType("textDocument/colorPresentation")})(Yde=$s.ColorPresentationRequest||($s.ColorPresentationRequest={}))});var dB=b(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.FoldingRangeRequest=Xs.FoldingRangeKind=void 0;var Wde=li(),Zde;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Zde=Xs.FoldingRangeKind||(Xs.FoldingRangeKind={}));var Jde;(function(n){n.method="textDocument/foldingRange",n.type=new Wde.ProtocolRequestType(n.method)})(Jde=Xs.FoldingRangeRequest||(Xs.FoldingRangeRequest={}))});var gB=b(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.DeclarationRequest=void 0;var $de=li(),Xde;(function(n){n.method="textDocument/declaration",n.type=new $de.ProtocolRequestType(n.method)})(Xde=Xd.DeclarationRequest||(Xd.DeclarationRequest={}))});var fB=b(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.SelectionRangeRequest=void 0;var Ude=li(),Gde;(function(n){n.method="textDocument/selectionRange",n.type=new Ude.ProtocolRequestType(n.method)})(Gde=Ud.SelectionRangeRequest||(Ud.SelectionRangeRequest={}))});var mB=b(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.WorkDoneProgressCancelNotification=Sr.WorkDoneProgressCreateRequest=Sr.WorkDoneProgress=void 0;var Qde=zu(),pB=li(),Kde;(function(n){n.type=new Qde.ProgressType;function e(t){return t===n.type}n.is=e})(Kde=Sr.WorkDoneProgress||(Sr.WorkDoneProgress={}));var zde;(function(n){n.type=new pB.ProtocolRequestType("window/workDoneProgress/create")})(zde=Sr.WorkDoneProgressCreateRequest||(Sr.WorkDoneProgressCreateRequest={}));var Vde;(function(n){n.type=new pB.ProtocolNotificationType("window/workDoneProgress/cancel")})(Vde=Sr.WorkDoneProgressCancelNotification||(Sr.WorkDoneProgressCancelNotification={}))});var bB=b(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.CallHierarchyOutgoingCallsRequest=Tr.CallHierarchyIncomingCallsRequest=Tr.CallHierarchyPrepareRequest=void 0;var D0=li(),ege;(function(n){n.method="textDocument/prepareCallHierarchy",n.type=new D0.ProtocolRequestType(n.method)})(ege=Tr.CallHierarchyPrepareRequest||(Tr.CallHierarchyPrepareRequest={}));var tge;(function(n){n.method="callHierarchy/incomingCalls",n.type=new D0.ProtocolRequestType(n.method)})(tge=Tr.CallHierarchyIncomingCallsRequest||(Tr.CallHierarchyIncomingCallsRequest={}));var ige;(function(n){n.method="callHierarchy/outgoingCalls",n.type=new D0.ProtocolRequestType(n.method)})(ige=Tr.CallHierarchyOutgoingCallsRequest||(Tr.CallHierarchyOutgoingCallsRequest={}))});var yB=b(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.SemanticTokensRefreshRequest=Ve.SemanticTokensRangeRequest=Ve.SemanticTokensDeltaRequest=Ve.SemanticTokensRequest=Ve.SemanticTokensRegistrationType=Ve.TokenFormat=Ve.SemanticTokens=Ve.SemanticTokenModifiers=Ve.SemanticTokenTypes=void 0;var Gd=li(),nge;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator"})(nge=Ve.SemanticTokenTypes||(Ve.SemanticTokenTypes={}));var rge;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(rge=Ve.SemanticTokenModifiers||(Ve.SemanticTokenModifiers={}));var oge;(function(n){function e(t){let i=t;return i!==void 0&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}n.is=e})(oge=Ve.SemanticTokens||(Ve.SemanticTokens={}));var sge;(function(n){n.Relative="relative"})(sge=Ve.TokenFormat||(Ve.TokenFormat={}));var age;(function(n){n.method="textDocument/semanticTokens",n.type=new Gd.RegistrationType(n.method)})(age=Ve.SemanticTokensRegistrationType||(Ve.SemanticTokensRegistrationType={}));var lge;(function(n){n.method="textDocument/semanticTokens/full",n.type=new Gd.ProtocolRequestType(n.method)})(lge=Ve.SemanticTokensRequest||(Ve.SemanticTokensRequest={}));var uge;(function(n){n.method="textDocument/semanticTokens/full/delta",n.type=new Gd.ProtocolRequestType(n.method)})(uge=Ve.SemanticTokensDeltaRequest||(Ve.SemanticTokensDeltaRequest={}));var cge;(function(n){n.method="textDocument/semanticTokens/range",n.type=new Gd.ProtocolRequestType(n.method)})(cge=Ve.SemanticTokensRangeRequest||(Ve.SemanticTokensRangeRequest={}));var hge;(function(n){n.method="workspace/semanticTokens/refresh",n.type=new Gd.ProtocolRequestType0(n.method)})(hge=Ve.SemanticTokensRefreshRequest||(Ve.SemanticTokensRefreshRequest={}))});var vB=b(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.ShowDocumentRequest=void 0;var dge=li(),gge;(function(n){n.method="window/showDocument",n.type=new dge.ProtocolRequestType(n.method)})(gge=Qd.ShowDocumentRequest||(Qd.ShowDocumentRequest={}))});var wB=b(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.LinkedEditingRangeRequest=void 0;var fge=li(),pge;(function(n){n.method="textDocument/linkedEditingRange",n.type=new fge.ProtocolRequestType(n.method)})(pge=Kd.LinkedEditingRangeRequest||(Kd.LinkedEditingRangeRequest={}))});var DB=b(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.WillDeleteFilesRequest=Rt.DidDeleteFilesNotification=Rt.DidRenameFilesNotification=Rt.WillRenameFilesRequest=Rt.DidCreateFilesNotification=Rt.WillCreateFilesRequest=Rt.FileOperationPatternKind=void 0;var ic=li(),mge;(function(n){n.file="file",n.folder="folder"})(mge=Rt.FileOperationPatternKind||(Rt.FileOperationPatternKind={}));var bge;(function(n){n.method="workspace/willCreateFiles",n.type=new ic.ProtocolRequestType(n.method)})(bge=Rt.WillCreateFilesRequest||(Rt.WillCreateFilesRequest={}));var yge;(function(n){n.method="workspace/didCreateFiles",n.type=new ic.ProtocolNotificationType(n.method)})(yge=Rt.DidCreateFilesNotification||(Rt.DidCreateFilesNotification={}));var vge;(function(n){n.method="workspace/willRenameFiles",n.type=new ic.ProtocolRequestType(n.method)})(vge=Rt.WillRenameFilesRequest||(Rt.WillRenameFilesRequest={}));var wge;(function(n){n.method="workspace/didRenameFiles",n.type=new ic.ProtocolNotificationType(n.method)})(wge=Rt.DidRenameFilesNotification||(Rt.DidRenameFilesNotification={}));var Dge;(function(n){n.method="workspace/didDeleteFiles",n.type=new ic.ProtocolNotificationType(n.method)})(Dge=Rt.DidDeleteFilesNotification||(Rt.DidDeleteFilesNotification={}));var Cge;(function(n){n.method="workspace/willDeleteFiles",n.type=new ic.ProtocolRequestType(n.method)})(Cge=Rt.WillDeleteFilesRequest||(Rt.WillDeleteFilesRequest={}))});var CB=b(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.MonikerRequest=kr.MonikerKind=kr.UniquenessLevel=void 0;var xge=li(),Sge;(function(n){n.document="document",n.project="project",n.group="group",n.scheme="scheme",n.global="global"})(Sge=kr.UniquenessLevel||(kr.UniquenessLevel={}));var Tge;(function(n){n.import="import",n.export="export",n.local="local"})(Tge=kr.MonikerKind||(kr.MonikerKind={}));var kge;(function(n){n.method="textDocument/moniker",n.type=new xge.ProtocolRequestType(n.method)})(kge=kr.MonikerRequest||(kr.MonikerRequest={}))});var EB=b(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.DocumentLinkRequest=T.CodeLensRefreshRequest=T.CodeLensResolveRequest=T.CodeLensRequest=T.WorkspaceSymbolRequest=T.CodeActionResolveRequest=T.CodeActionRequest=T.DocumentSymbolRequest=T.DocumentHighlightRequest=T.ReferencesRequest=T.DefinitionRequest=T.SignatureHelpRequest=T.SignatureHelpTriggerKind=T.HoverRequest=T.CompletionResolveRequest=T.CompletionRequest=T.CompletionTriggerKind=T.PublishDiagnosticsNotification=T.WatchKind=T.FileChangeType=T.DidChangeWatchedFilesNotification=T.WillSaveTextDocumentWaitUntilRequest=T.WillSaveTextDocumentNotification=T.TextDocumentSaveReason=T.DidSaveTextDocumentNotification=T.DidCloseTextDocumentNotification=T.DidChangeTextDocumentNotification=T.TextDocumentContentChangeEvent=T.DidOpenTextDocumentNotification=T.TextDocumentSyncKind=T.TelemetryEventNotification=T.LogMessageNotification=T.ShowMessageRequest=T.ShowMessageNotification=T.MessageType=T.DidChangeConfigurationNotification=T.ExitNotification=T.ShutdownRequest=T.InitializedNotification=T.InitializeError=T.InitializeRequest=T.WorkDoneProgressOptions=T.TextDocumentRegistrationOptions=T.StaticRegistrationOptions=T.FailureHandlingKind=T.ResourceOperationKind=T.UnregistrationRequest=T.RegistrationRequest=T.DocumentSelector=T.DocumentFilter=void 0;T.MonikerRequest=T.MonikerKind=T.UniquenessLevel=T.WillDeleteFilesRequest=T.DidDeleteFilesNotification=T.WillRenameFilesRequest=T.DidRenameFilesNotification=T.WillCreateFilesRequest=T.DidCreateFilesNotification=T.FileOperationPatternKind=T.LinkedEditingRangeRequest=T.ShowDocumentRequest=T.SemanticTokensRegistrationType=T.SemanticTokensRefreshRequest=T.SemanticTokensRangeRequest=T.SemanticTokensDeltaRequest=T.SemanticTokensRequest=T.TokenFormat=T.SemanticTokens=T.SemanticTokenModifiers=T.SemanticTokenTypes=T.CallHierarchyPrepareRequest=T.CallHierarchyOutgoingCallsRequest=T.CallHierarchyIncomingCallsRequest=T.WorkDoneProgressCancelNotification=T.WorkDoneProgressCreateRequest=T.WorkDoneProgress=T.SelectionRangeRequest=T.DeclarationRequest=T.FoldingRangeRequest=T.ColorPresentationRequest=T.DocumentColorRequest=T.ConfigurationRequest=T.DidChangeWorkspaceFoldersNotification=T.WorkspaceFoldersRequest=T.TypeDefinitionRequest=T.ImplementationRequest=T.ApplyWorkspaceEditRequest=T.ExecuteCommandRequest=T.PrepareRenameRequest=T.RenameRequest=T.PrepareSupportDefaultBehavior=T.DocumentOnTypeFormattingRequest=T.DocumentRangeFormattingRequest=T.DocumentFormattingRequest=T.DocumentLinkResolveRequest=void 0;var Us=rB(),we=li(),Ege=oB();Object.defineProperty(T,"ImplementationRequest",{enumerable:!0,get:function(){return Ege.ImplementationRequest}});var Pge=sB();Object.defineProperty(T,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Pge.TypeDefinitionRequest}});var xB=lB();Object.defineProperty(T,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return xB.WorkspaceFoldersRequest}});Object.defineProperty(T,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return xB.DidChangeWorkspaceFoldersNotification}});var _ge=uB();Object.defineProperty(T,"ConfigurationRequest",{enumerable:!0,get:function(){return _ge.ConfigurationRequest}});var SB=hB();Object.defineProperty(T,"DocumentColorRequest",{enumerable:!0,get:function(){return SB.DocumentColorRequest}});Object.defineProperty(T,"ColorPresentationRequest",{enumerable:!0,get:function(){return SB.ColorPresentationRequest}});var Rge=dB();Object.defineProperty(T,"FoldingRangeRequest",{enumerable:!0,get:function(){return Rge.FoldingRangeRequest}});var Lge=gB();Object.defineProperty(T,"DeclarationRequest",{enumerable:!0,get:function(){return Lge.DeclarationRequest}});var Fge=fB();Object.defineProperty(T,"SelectionRangeRequest",{enumerable:!0,get:function(){return Fge.SelectionRangeRequest}});var C0=mB();Object.defineProperty(T,"WorkDoneProgress",{enumerable:!0,get:function(){return C0.WorkDoneProgress}});Object.defineProperty(T,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return C0.WorkDoneProgressCreateRequest}});Object.defineProperty(T,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return C0.WorkDoneProgressCancelNotification}});var x0=bB();Object.defineProperty(T,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return x0.CallHierarchyIncomingCallsRequest}});Object.defineProperty(T,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return x0.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(T,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return x0.CallHierarchyPrepareRequest}});var Zo=yB();Object.defineProperty(T,"SemanticTokenTypes",{enumerable:!0,get:function(){return Zo.SemanticTokenTypes}});Object.defineProperty(T,"SemanticTokenModifiers",{enumerable:!0,get:function(){return Zo.SemanticTokenModifiers}});Object.defineProperty(T,"SemanticTokens",{enumerable:!0,get:function(){return Zo.SemanticTokens}});Object.defineProperty(T,"TokenFormat",{enumerable:!0,get:function(){return Zo.TokenFormat}});Object.defineProperty(T,"SemanticTokensRequest",{enumerable:!0,get:function(){return Zo.SemanticTokensRequest}});Object.defineProperty(T,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Zo.SemanticTokensDeltaRequest}});Object.defineProperty(T,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Zo.SemanticTokensRangeRequest}});Object.defineProperty(T,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Zo.SemanticTokensRefreshRequest}});Object.defineProperty(T,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Zo.SemanticTokensRegistrationType}});var Ige=vB();Object.defineProperty(T,"ShowDocumentRequest",{enumerable:!0,get:function(){return Ige.ShowDocumentRequest}});var jge=wB();Object.defineProperty(T,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return jge.LinkedEditingRangeRequest}});var fl=DB();Object.defineProperty(T,"FileOperationPatternKind",{enumerable:!0,get:function(){return fl.FileOperationPatternKind}});Object.defineProperty(T,"DidCreateFilesNotification",{enumerable:!0,get:function(){return fl.DidCreateFilesNotification}});Object.defineProperty(T,"WillCreateFilesRequest",{enumerable:!0,get:function(){return fl.WillCreateFilesRequest}});Object.defineProperty(T,"DidRenameFilesNotification",{enumerable:!0,get:function(){return fl.DidRenameFilesNotification}});Object.defineProperty(T,"WillRenameFilesRequest",{enumerable:!0,get:function(){return fl.WillRenameFilesRequest}});Object.defineProperty(T,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return fl.DidDeleteFilesNotification}});Object.defineProperty(T,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return fl.WillDeleteFilesRequest}});var S0=CB();Object.defineProperty(T,"UniquenessLevel",{enumerable:!0,get:function(){return S0.UniquenessLevel}});Object.defineProperty(T,"MonikerKind",{enumerable:!0,get:function(){return S0.MonikerKind}});Object.defineProperty(T,"MonikerRequest",{enumerable:!0,get:function(){return S0.MonikerRequest}});var TB;(function(n){function e(t){let i=t;return Us.string(i.language)||Us.string(i.scheme)||Us.string(i.pattern)}n.is=e})(TB=T.DocumentFilter||(T.DocumentFilter={}));var kB;(function(n){function e(t){if(!Array.isArray(t))return!1;for(let i of t)if(!Us.string(i)&&!TB.is(i))return!1;return!0}n.is=e})(kB=T.DocumentSelector||(T.DocumentSelector={}));var Age;(function(n){n.type=new we.ProtocolRequestType("client/registerCapability")})(Age=T.RegistrationRequest||(T.RegistrationRequest={}));var Oge;(function(n){n.type=new we.ProtocolRequestType("client/unregisterCapability")})(Oge=T.UnregistrationRequest||(T.UnregistrationRequest={}));var Mge;(function(n){n.Create="create",n.Rename="rename",n.Delete="delete"})(Mge=T.ResourceOperationKind||(T.ResourceOperationKind={}));var Nge;(function(n){n.Abort="abort",n.Transactional="transactional",n.TextOnlyTransactional="textOnlyTransactional",n.Undo="undo"})(Nge=T.FailureHandlingKind||(T.FailureHandlingKind={}));var Bge;(function(n){function e(t){let i=t;return i&&Us.string(i.id)&&i.id.length>0}n.hasId=e})(Bge=T.StaticRegistrationOptions||(T.StaticRegistrationOptions={}));var Hge;(function(n){function e(t){let i=t;return i&&(i.documentSelector===null||kB.is(i.documentSelector))}n.is=e})(Hge=T.TextDocumentRegistrationOptions||(T.TextDocumentRegistrationOptions={}));var qge;(function(n){function e(i){let r=i;return Us.objectLiteral(r)&&(r.workDoneProgress===void 0||Us.boolean(r.workDoneProgress))}n.is=e;function t(i){let r=i;return r&&Us.boolean(r.workDoneProgress)}n.hasWorkDoneProgress=t})(qge=T.WorkDoneProgressOptions||(T.WorkDoneProgressOptions={}));var Yge;(function(n){n.type=new we.ProtocolRequestType("initialize")})(Yge=T.InitializeRequest||(T.InitializeRequest={}));var Wge;(function(n){n.unknownProtocolVersion=1})(Wge=T.InitializeError||(T.InitializeError={}));var Zge;(function(n){n.type=new we.ProtocolNotificationType("initialized")})(Zge=T.InitializedNotification||(T.InitializedNotification={}));var Jge;(function(n){n.type=new we.ProtocolRequestType0("shutdown")})(Jge=T.ShutdownRequest||(T.ShutdownRequest={}));var $ge;(function(n){n.type=new we.ProtocolNotificationType0("exit")})($ge=T.ExitNotification||(T.ExitNotification={}));var Xge;(function(n){n.type=new we.ProtocolNotificationType("workspace/didChangeConfiguration")})(Xge=T.DidChangeConfigurationNotification||(T.DidChangeConfigurationNotification={}));var Uge;(function(n){n.Error=1,n.Warning=2,n.Info=3,n.Log=4})(Uge=T.MessageType||(T.MessageType={}));var Gge;(function(n){n.type=new we.ProtocolNotificationType("window/showMessage")})(Gge=T.ShowMessageNotification||(T.ShowMessageNotification={}));var Qge;(function(n){n.type=new we.ProtocolRequestType("window/showMessageRequest")})(Qge=T.ShowMessageRequest||(T.ShowMessageRequest={}));var Kge;(function(n){n.type=new we.ProtocolNotificationType("window/logMessage")})(Kge=T.LogMessageNotification||(T.LogMessageNotification={}));var zge;(function(n){n.type=new we.ProtocolNotificationType("telemetry/event")})(zge=T.TelemetryEventNotification||(T.TelemetryEventNotification={}));var Vge;(function(n){n.None=0,n.Full=1,n.Incremental=2})(Vge=T.TextDocumentSyncKind||(T.TextDocumentSyncKind={}));var efe;(function(n){n.method="textDocument/didOpen",n.type=new we.ProtocolNotificationType(n.method)})(efe=T.DidOpenTextDocumentNotification||(T.DidOpenTextDocumentNotification={}));var tfe;(function(n){function e(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}n.isIncremental=e;function t(i){let r=i;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}n.isFull=t})(tfe=T.TextDocumentContentChangeEvent||(T.TextDocumentContentChangeEvent={}));var ife;(function(n){n.method="textDocument/didChange",n.type=new we.ProtocolNotificationType(n.method)})(ife=T.DidChangeTextDocumentNotification||(T.DidChangeTextDocumentNotification={}));var nfe;(function(n){n.method="textDocument/didClose",n.type=new we.ProtocolNotificationType(n.method)})(nfe=T.DidCloseTextDocumentNotification||(T.DidCloseTextDocumentNotification={}));var rfe;(function(n){n.method="textDocument/didSave",n.type=new we.ProtocolNotificationType(n.method)})(rfe=T.DidSaveTextDocumentNotification||(T.DidSaveTextDocumentNotification={}));var ofe;(function(n){n.Manual=1,n.AfterDelay=2,n.FocusOut=3})(ofe=T.TextDocumentSaveReason||(T.TextDocumentSaveReason={}));var sfe;(function(n){n.method="textDocument/willSave",n.type=new we.ProtocolNotificationType(n.method)})(sfe=T.WillSaveTextDocumentNotification||(T.WillSaveTextDocumentNotification={}));var afe;(function(n){n.method="textDocument/willSaveWaitUntil",n.type=new we.ProtocolRequestType(n.method)})(afe=T.WillSaveTextDocumentWaitUntilRequest||(T.WillSaveTextDocumentWaitUntilRequest={}));var lfe;(function(n){n.type=new we.ProtocolNotificationType("workspace/didChangeWatchedFiles")})(lfe=T.DidChangeWatchedFilesNotification||(T.DidChangeWatchedFilesNotification={}));var ufe;(function(n){n.Created=1,n.Changed=2,n.Deleted=3})(ufe=T.FileChangeType||(T.FileChangeType={}));var cfe;(function(n){n.Create=1,n.Change=2,n.Delete=4})(cfe=T.WatchKind||(T.WatchKind={}));var hfe;(function(n){n.type=new we.ProtocolNotificationType("textDocument/publishDiagnostics")})(hfe=T.PublishDiagnosticsNotification||(T.PublishDiagnosticsNotification={}));var dfe;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.TriggerForIncompleteCompletions=3})(dfe=T.CompletionTriggerKind||(T.CompletionTriggerKind={}));var gfe;(function(n){n.method="textDocument/completion",n.type=new we.ProtocolRequestType(n.method)})(gfe=T.CompletionRequest||(T.CompletionRequest={}));var ffe;(function(n){n.method="completionItem/resolve",n.type=new we.ProtocolRequestType(n.method)})(ffe=T.CompletionResolveRequest||(T.CompletionResolveRequest={}));var pfe;(function(n){n.method="textDocument/hover",n.type=new we.ProtocolRequestType(n.method)})(pfe=T.HoverRequest||(T.HoverRequest={}));var mfe;(function(n){n.Invoked=1,n.TriggerCharacter=2,n.ContentChange=3})(mfe=T.SignatureHelpTriggerKind||(T.SignatureHelpTriggerKind={}));var bfe;(function(n){n.method="textDocument/signatureHelp",n.type=new we.ProtocolRequestType(n.method)})(bfe=T.SignatureHelpRequest||(T.SignatureHelpRequest={}));var yfe;(function(n){n.method="textDocument/definition",n.type=new we.ProtocolRequestType(n.method)})(yfe=T.DefinitionRequest||(T.DefinitionRequest={}));var vfe;(function(n){n.method="textDocument/references",n.type=new we.ProtocolRequestType(n.method)})(vfe=T.ReferencesRequest||(T.ReferencesRequest={}));var wfe;(function(n){n.method="textDocument/documentHighlight",n.type=new we.ProtocolRequestType(n.method)})(wfe=T.DocumentHighlightRequest||(T.DocumentHighlightRequest={}));var Dfe;(function(n){n.method="textDocument/documentSymbol",n.type=new we.ProtocolRequestType(n.method)})(Dfe=T.DocumentSymbolRequest||(T.DocumentSymbolRequest={}));var Cfe;(function(n){n.method="textDocument/codeAction",n.type=new we.ProtocolRequestType(n.method)})(Cfe=T.CodeActionRequest||(T.CodeActionRequest={}));var xfe;(function(n){n.method="codeAction/resolve",n.type=new we.ProtocolRequestType(n.method)})(xfe=T.CodeActionResolveRequest||(T.CodeActionResolveRequest={}));var Sfe;(function(n){n.method="workspace/symbol",n.type=new we.ProtocolRequestType(n.method)})(Sfe=T.WorkspaceSymbolRequest||(T.WorkspaceSymbolRequest={}));var Tfe;(function(n){n.method="textDocument/codeLens",n.type=new we.ProtocolRequestType(n.method)})(Tfe=T.CodeLensRequest||(T.CodeLensRequest={}));var kfe;(function(n){n.method="codeLens/resolve",n.type=new we.ProtocolRequestType(n.method)})(kfe=T.CodeLensResolveRequest||(T.CodeLensResolveRequest={}));var Efe;(function(n){n.method="workspace/codeLens/refresh",n.type=new we.ProtocolRequestType0(n.method)})(Efe=T.CodeLensRefreshRequest||(T.CodeLensRefreshRequest={}));var Pfe;(function(n){n.method="textDocument/documentLink",n.type=new we.ProtocolRequestType(n.method)})(Pfe=T.DocumentLinkRequest||(T.DocumentLinkRequest={}));var _fe;(function(n){n.method="documentLink/resolve",n.type=new we.ProtocolRequestType(n.method)})(_fe=T.DocumentLinkResolveRequest||(T.DocumentLinkResolveRequest={}));var Rfe;(function(n){n.method="textDocument/formatting",n.type=new we.ProtocolRequestType(n.method)})(Rfe=T.DocumentFormattingRequest||(T.DocumentFormattingRequest={}));var Lfe;(function(n){n.method="textDocument/rangeFormatting",n.type=new we.ProtocolRequestType(n.method)})(Lfe=T.DocumentRangeFormattingRequest||(T.DocumentRangeFormattingRequest={}));var Ffe;(function(n){n.method="textDocument/onTypeFormatting",n.type=new we.ProtocolRequestType(n.method)})(Ffe=T.DocumentOnTypeFormattingRequest||(T.DocumentOnTypeFormattingRequest={}));var Ife;(function(n){n.Identifier=1})(Ife=T.PrepareSupportDefaultBehavior||(T.PrepareSupportDefaultBehavior={}));var jfe;(function(n){n.method="textDocument/rename",n.type=new we.ProtocolRequestType(n.method)})(jfe=T.RenameRequest||(T.RenameRequest={}));var Afe;(function(n){n.method="textDocument/prepareRename",n.type=new we.ProtocolRequestType(n.method)})(Afe=T.PrepareRenameRequest||(T.PrepareRenameRequest={}));var Ofe;(function(n){n.type=new we.ProtocolRequestType("workspace/executeCommand")})(Ofe=T.ExecuteCommandRequest||(T.ExecuteCommandRequest={}));var Mfe;(function(n){n.type=new we.ProtocolRequestType("workspace/applyEdit")})(Mfe=T.ApplyWorkspaceEditRequest||(T.ApplyWorkspaceEditRequest={}))});var _B=b($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.createProtocolConnection=void 0;var PB=zu();function Nfe(n,e,t,i){return PB.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),PB.createMessageConnection(n,e,t,i)}$m.createProtocolConnection=Nfe});var RB=b($i=>{"use strict";var Bfe=$i&&$i.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),Xm=$i&&$i.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Bfe(e,n,t)};Object.defineProperty($i,"__esModule",{value:!0});$i.LSPErrorCodes=$i.createProtocolConnection=void 0;Xm(zu(),$i);Xm((Kr(),Ha(QN)),$i);Xm(li(),$i);Xm(EB(),$i);var Hfe=_B();Object.defineProperty($i,"createProtocolConnection",{enumerable:!0,get:function(){return Hfe.createProtocolConnection}});var qfe;(function(n){n.lspReservedErrorRangeStart=-32899,n.ContentModified=-32801,n.RequestCancelled=-32800,n.lspReservedErrorRangeEnd=-32800})(qfe=$i.LSPErrorCodes||($i.LSPErrorCodes={}))});var q=b(zr=>{"use strict";var Yfe=zr&&zr.__createBinding||(Object.create?function(n,e,t,i){i===void 0&&(i=t),Object.defineProperty(n,i,{enumerable:!0,get:function(){return e[t]}})}:function(n,e,t,i){i===void 0&&(i=t),n[i]=e[t]}),LB=zr&&zr.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yfe(e,n,t)};Object.defineProperty(zr,"__esModule",{value:!0});zr.createProtocolConnection=void 0;var Wfe=NS();LB(NS(),zr);LB(RB(),zr);function Zfe(n,e,t,i){return Wfe.createMessageConnection(n,e,t,i)}zr.createProtocolConnection=Zfe});var Ei=b((R_e,FB)=>{function T0(n,e,t){var i,r,o,s,a;e==null&&(e=100);function l(){var c=Date.now()-s;c=0?i=setTimeout(l,e-c):(i=null,t||(a=n.apply(o,r),o=r=null))}var u=function(){o=this,r=arguments,s=Date.now();var c=t&&!i;return i||(i=setTimeout(l,e)),c&&(a=n.apply(o,r),o=r=null),a};return u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(o,r),o=r=null,clearTimeout(i),i=null)},u}T0.debounce=T0;FB.exports=T0});var jB=b((L_e,IB)=>{"use strict";var Bt={rfc3986:{}};Bt.generate=function(){var n="|",e="0-9",t="["+e+"]",i="a-zA-Z",r="["+i+"]";Bt.rfc3986.cidr=t+n+"[1-2]"+t+n+"3[0-2]";var o=e+"A-Fa-f",s="["+o+"]",a=i+e+"-\\._~",l="!\\$&'\\(\\)\\*\\+,;=",u="%"+o,c=a+u+l+":@",h="["+c+"]",d="0?",g="(?:"+d+d+t+n+d+"[1-9]"+t+n+"1"+t+t+n+"2[0-4]"+t+n+"25[0-5])";Bt.rfc3986.IPv4address="(?:"+g+"\\.){3}"+g;var f=s+"{1,4}",p="(?:"+f+":"+f+"|"+Bt.rfc3986.IPv4address+")",m="(?:"+f+":){6}"+p,v="::(?:"+f+":){5}"+p,w="(?:"+f+")?::(?:"+f+":){4}"+p,D="(?:(?:"+f+":){0,1}"+f+")?::(?:"+f+":){3}"+p,S="(?:(?:"+f+":){0,2}"+f+")?::(?:"+f+":){2}"+p,L="(?:(?:"+f+":){0,3}"+f+")?::"+f+":"+p,j="(?:(?:"+f+":){0,4}"+f+")?::"+p,I="(?:(?:"+f+":){0,5}"+f+")?::"+f,W="(?:(?:"+f+":){0,6}"+f+")?::";Bt.rfc3986.IPv6address="(?:"+m+n+v+n+w+n+D+n+S+n+L+n+j+n+I+n+W+")",Bt.rfc3986.IPvFuture="v"+s+"+\\.["+a+l+":]+",Bt.rfc3986.scheme=r+"["+i+e+"+-\\.]*";var A="["+a+u+l+":]*";Bt.rfc3986.IPLiteral="\\[(?:"+Bt.rfc3986.IPv6address+n+Bt.rfc3986.IPvFuture+")\\]";var M="["+a+u+l+"]{0,255}",F="(?:"+Bt.rfc3986.IPLiteral+n+Bt.rfc3986.IPv4address+n+M+")",N=t+"*",Z="(?:"+A+"@)?"+F+"(?::"+N+")?",z=h+"*",ae=h+"+",je="(?:\\/"+z+")*",Re="\\/(?:"+ae+je+")?",et=ae+je;Bt.rfc3986.hierPart="(?:(?:\\/\\/"+Z+je+")"+n+Re+n+et+")",Bt.rfc3986.query="["+c+"\\/\\?]*(?=#|$)",Bt.rfc3986.fragment="["+c+"\\/\\?]*",Bt.rfc3986.uri="^(?:"+Bt.rfc3986.scheme+":"+Bt.rfc3986.hierPart+")(?:\\?"+Bt.rfc3986.query+")?(?:#"+Bt.rfc3986.fragment+")?$"};Bt.generate();IB.exports=Bt.rfc3986});var k0=b((F_e,AB)=>{"use strict";var zd=jB();function Jfe(n){return n.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}var Vd={Uri:{createUriRegex:function(n){if(n=n||{},typeof n!="object"||Array.isArray(n))throw new Error("options must be an object");var e="";if(n.scheme){if(Array.isArray(n.scheme)||(n.scheme=[n.scheme]),n.scheme.length<=0)throw new Error("scheme must have at least 1 scheme specified");for(var t=0;t=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||e&&o===47)i!==-1&&(t+=encodeURIComponent(n.substring(i,r)),i=-1),t!==void 0&&(t+=n.charAt(r));else{t===void 0&&(t=n.substr(0,r));var s=HB[o];s!==void 0?(i!==-1&&(t+=encodeURIComponent(n.substring(i,r)),i=-1),t+=s):i===-1&&(i=r)}}return i!==-1&&(t+=encodeURIComponent(n.substring(i))),t!==void 0?t:n}function epe(n){for(var e=void 0,t=0;t1&&n.scheme==="file"?t="//"+n.authority+n.path:n.path.charCodeAt(0)===47&&(n.path.charCodeAt(1)>=65&&n.path.charCodeAt(1)<=90||n.path.charCodeAt(1)>=97&&n.path.charCodeAt(1)<=122)&&n.path.charCodeAt(2)===58?e?t=n.path.substr(1):t=n.path[1].toLowerCase()+n.path.substr(2):t=n.path,eg&&(t=t.replace(/\//g,"\\")),t}function E0(n,e){var t=e?epe:MB,i="",r=n.scheme,o=n.authority,s=n.path,a=n.query,l=n.fragment;if(r&&(i+=r,i+=":"),(o||r==="file")&&(i+=Er,i+=Er),o){var u=o.indexOf("@");if(u!==-1){var c=o.substr(0,u);o=o.substr(u+1),u=c.indexOf(":"),u===-1?i+=t(c,!1):(i+=t(c.substr(0,u),!1),i+=":",i+=t(c.substr(u+1),!1)),i+="@"}o=o.toLowerCase(),u=o.indexOf(":"),u===-1?i+=t(o,!1):(i+=t(o.substr(0,u),!1),i+=o.substr(u))}if(s){if(s.length>=3&&s.charCodeAt(0)===47&&s.charCodeAt(2)===58){var h=s.charCodeAt(1);h>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3))}else if(s.length>=2&&s.charCodeAt(1)===58){var h=s.charCodeAt(0);h>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}i+=t(s,!0)}return a&&(i+="?",i+=t(a,!1)),l&&(i+="#",i+=e?l:MB(l,!1)),i}function YB(n){try{return decodeURIComponent(n)}catch{return n.length>3?n.substr(0,3)+YB(n.substr(3)):n}}function Um(n){return n.match(NB)?n.replace(NB,function(e){return YB(e)}):n}var $fe,Ht,eg,OB,Xfe,Ufe,Gfe,ut,Er,Vfe,B,BB,nc,HB,NB,De=_(()=>{"use strict";$fe=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o])},n(e,t)};return function(e,t){n(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();typeof process=="object"?eg=process.platform==="win32":typeof navigator=="object"&&(OB=navigator.userAgent,eg=OB.indexOf("Windows")>=0);Xfe=/^\w[\w\d+.-]*$/,Ufe=/^\//,Gfe=/^\/\//;ut="",Er="/",Vfe=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,B=function(){function n(e,t,i,r,o,s){s===void 0&&(s=!1),typeof e=="object"?(this.scheme=e.scheme||ut,this.authority=e.authority||ut,this.path=e.path||ut,this.query=e.query||ut,this.fragment=e.fragment||ut):(this.scheme=Kfe(e,s),this.authority=t||ut,this.path=zfe(this.scheme,i||ut),this.query=r||ut,this.fragment=o||ut,Qfe(this,s))}return n.isUri=function(e){return e instanceof n?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="function"&&typeof e.with=="function"&&typeof e.toString=="function":!1},Object.defineProperty(n.prototype,"fsPath",{get:function(){return qB(this,!1)},enumerable:!0,configurable:!0}),n.prototype.with=function(e){if(!e)return this;var t=e.scheme,i=e.authority,r=e.path,o=e.query,s=e.fragment;return t===void 0?t=this.scheme:t===null&&(t=ut),i===void 0?i=this.authority:i===null&&(i=ut),r===void 0?r=this.path:r===null&&(r=ut),o===void 0?o=this.query:o===null&&(o=ut),s===void 0?s=this.fragment:s===null&&(s=ut),t===this.scheme&&i===this.authority&&r===this.path&&o===this.query&&s===this.fragment?this:new nc(t,i,r,o,s)},n.parse=function(e,t){t===void 0&&(t=!1);var i=Vfe.exec(e);return i?new nc(i[2]||ut,Um(i[4]||ut),Um(i[5]||ut),Um(i[7]||ut),Um(i[9]||ut),t):new nc(ut,ut,ut,ut,ut)},n.file=function(e){var t=ut;if(eg&&(e=e.replace(/\\/g,Er)),e[0]===Er&&e[1]===Er){var i=e.indexOf(Er,2);i===-1?(t=e.substring(2),e=Er):(t=e.substring(2,i),e=e.substring(i)||Er)}return new nc("file",t,e,ut,ut)},n.from=function(e){return new nc(e.scheme,e.authority,e.path,e.query,e.fragment)},n.prototype.toString=function(e){return e===void 0&&(e=!1),E0(this,e)},n.prototype.toJSON=function(){return this},n.revive=function(e){if(e){if(e instanceof n)return e;var t=new nc(e);return t._formatted=e.external,t._fsPath=e._sep===BB?e.fsPath:null,t}else return e},n}(),BB=eg?1:void 0,nc=function(n){$fe(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=qB(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),e.prototype.toString=function(t){return t===void 0&&(t=!1),t?E0(this,!0):(this._formatted||(this._formatted=E0(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=BB),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(B),HB=(Ht={},Ht[58]="%3A",Ht[47]="%2F",Ht[63]="%3F",Ht[35]="%23",Ht[91]="%5B",Ht[93]="%5D",Ht[64]="%40",Ht[33]="%21",Ht[36]="%24",Ht[38]="%26",Ht[39]="%27",Ht[40]="%28",Ht[41]="%29",Ht[42]="%2A",Ht[43]="%2B",Ht[44]="%2C",Ht[59]="%3B",Ht[61]="%3D",Ht[32]="%20",Ht);NB=/(%[0-9A-Za-z][0-9A-Za-z])+/g});var XB=b((j_e,$B)=>{$B.exports=JB;JB.sync=ipe;var WB=require("fs");function tpe(n,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{KB.exports=GB;GB.sync=npe;var UB=require("fs");function GB(n,e,t){UB.stat(n,function(i,r){t(i,i?!1:QB(r,e))})}function npe(n,e){return QB(UB.statSync(n),e)}function QB(n,e){return n.isFile()&&rpe(n,e)}function rpe(n,e){var t=n.mode,i=n.uid,r=n.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,h=t&u||t&l&&r===s||t&a&&i===o||t&c&&o===0;return h}});var eH=b((M_e,VB)=>{var O_e=require("fs"),Gm;process.platform==="win32"||global.TESTING_WINDOWS?Gm=XB():Gm=zB();VB.exports=P0;P0.sync=ope;function P0(n,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,r){P0(n,e||{},function(o,s){o?r(o):i(s)})})}Gm(n,e||{},function(i,r){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,r=!1),t(i,r)})}function ope(n,e){try{return Gm.sync(n,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var tg=b((N_e,sH)=>{var rc=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",tH=require("path"),spe=rc?";":":",iH=eH(),nH=n=>Object.assign(new Error(`not found: ${n}`),{code:"ENOENT"}),rH=(n,e)=>{let t=e.colon||spe,i=n.match(/\//)||rc&&n.match(/\\/)?[""]:[...rc?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],r=rc?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=rc?r.split(t):[""];return rc&&n.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:r}},oH=(n,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:r,pathExtExe:o}=rH(n,e),s=[],a=u=>new Promise((c,h)=>{if(u===i.length)return e.all&&s.length?c(s):h(nH(n));let d=i[u],g=/^".*"$/.test(d)?d.slice(1,-1):d,f=tH.join(g,n),p=!g&&/^\.[\\\/]/.test(n)?n.slice(0,2)+f:f;c(l(p,u,0))}),l=(u,c,h)=>new Promise((d,g)=>{if(h===r.length)return d(a(c+1));let f=r[h];iH(u+f,{pathExt:o},(p,m)=>{if(!p&&m)if(e.all)s.push(u+f);else return d(u+f);return d(l(u,c,h+1))})});return t?a(0).then(u=>t(null,u),t):a(0)},ape=(n,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:r}=rH(n,e),o=[];for(let s=0;smpe,OperatingSystem:()=>lH,Platform:()=>aH,globals:()=>ppe,isLinux:()=>cpe,isMacintosh:()=>oc,isNative:()=>hpe,isWeb:()=>dpe,isWindows:()=>Xi,language:()=>upe,platform:()=>gpe});var Km,zm,_0,R0,lpe,upe,aH,Qm,Xi,oc,cpe,hpe,dpe,gpe,fpe,ppe,lH,mpe,sc=_(()=>{"use strict";Km=!1,zm=!1,_0=!1,R0=!1,lpe=!1,upe="en";typeof process=="object"&&typeof process.nextTick=="function"&&typeof process.platform=="string"&&(Km=process.platform==="win32",zm=process.platform==="darwin",_0=process.platform==="linux",R0=!0);aH=(r=>(r[r.Web=0]="Web",r[r.Mac=1]="Mac",r[r.Linux=2]="Linux",r[r.Windows=3]="Windows",r))(aH||{}),Qm=0;R0&&(zm?Qm=1:Km?Qm=3:_0&&(Qm=2));Xi=Km,oc=zm,cpe=_0,hpe=R0,dpe=lpe,gpe=Qm,fpe=typeof self=="object"?self:typeof global=="object"?global:{},ppe=fpe,lH=(i=>(i[i.Windows=1]="Windows",i[i.Macintosh=2]="Macintosh",i[i.Linux=3]="Linux",i))(lH||{}),mpe=zm?2:Km?1:3});function ig(n){return!!(pl.MarkupContent.is(n)&&n.kind==pl.MarkupKind.Markdown)}function vt(n){return n<=0?Promise.resolve(void 0):new Promise(e=>{setTimeout(()=>{e(void 0)},n)})}function fH(n){return new Promise(e=>{process.nextTick(()=>{n&&n(),e(void 0)})})}function Vr(){return new Promise(n=>{setImmediate(()=>{n(void 0)})})}function Vm(n,e,t,i){return n?(Xi&&!i&&!n.startsWith("jdt://")&&(n=L0.default.win32.normalize(n)),L0.default.isAbsolute(n)?B.file(n).toString():dH.default.isValid(n)?B.parse(n).toString():t!=""?`${t}:${e}`:`unknown:${e}`):`untitled:${e}`}function J(n){for(;n.length;){let e=n.pop();e&&e.dispose()}}function ng(n){try{gH.default.sync(n)}catch{return!1}return!0}function eo(n,e={},t){return Xi||(e.shell=e.shell||process.env.SHELL),e.maxBuffer=500*1024,new Promise((i,r)=>{let o;t&&(o=setTimeout(()=>{r(new Error(`timeout after ${t}s`))},t*1e3)),(0,uH.exec)(n,e,(s,a,l)=>{if(o&&clearTimeout(o),s){r(new Error(`exited with ${s.code} -${s} -${l}`));return}i(a)})})}function ac(n,e){let t=(0,cH.default)(e,100);try{let i=hH.default.watch(n,{persistent:!0,recursive:!1,encoding:"utf8"},()=>{t()});return pl.Disposable.create(()=>{t.clear(),i.close()})}catch{return pl.Disposable.create(()=>{t.clear()})}}function pH(n){try{return process.kill(n,0)==!0}catch(e){return e.code==="EPERM"}}function F0(n){return n=="n"||n=="o"||n=="x"||n=="v"?"":n=="i"?"":n=="s"?"":""}function rg(n,e,t=3){if(n.length==0)return Promise.resolve();let i=0,r=n.length,o=n.slice();return new Promise(s=>{let a=l=>{let u=()=>{if(i=i+1,i==r)s();else if(o.length){let c=o.shift();a(c)}};e(l).then(u,u)};for(let l=0;l{"use strict";uH=require("child_process"),cH=x(Ei()),hH=x(require("fs")),dH=x(k0()),L0=x(require("path")),pl=x(q());De();gH=x(tg());sc();q_e=H()("util-index"),Pr="coc-settings.json"});function Qn(n){return typeof n=="boolean"}function Pe(n){return typeof n=="string"}function eb(n){return typeof n=="number"}function Gs(n){return typeof n=="function"}function Lt(n){return n!=null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function mH(n){if(!Lt(n))return!1;for(let e in n)if(bpe.call(n,e))return!1;return!0}function I0(n,e){return Array.isArray(n)&&n.every(e)}var bpe,Kn=_(()=>{"use strict";bpe=Object.prototype.hasOwnProperty});function _r(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.keys(n).forEach(t=>{n[t]&&typeof n[t]=="object"?e[t]=_r(n[t]):e[t]=n[t]}),e}function bH(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(ype.call(t,i)){let r=t[i];typeof r=="object"&&!Object.isFrozen(r)&&e.push(r)}}return n}function j0(n,e,t=!0){return Lt(n)?(Lt(e)&&Object.keys(e).forEach(i=>{i in n?t&&(Lt(n[i])&&Lt(e[i])?j0(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Me(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t{"use strict";Kn();ype=Object.prototype.hasOwnProperty});function yH(n){return n>=97&&n<=122?1:n>=65&&n<=90?2:0}function vH(n,e){let t=e==0?0:yH(n[e-1]);for(let i=e;i0&&r!=t)return[i,n[i]];t=r}}function wH(n,e){let t=[];for(let i=0;i0?n[0].toUpperCase()+n.slice(1):""}function Ae(n,e){let t=n.slice(0,e);return Buffer.byteLength(t)}function Ui(n,e){return Buffer.from(n,"utf8").slice(0,e).toString("utf8").length}function tt(n,e,t){return Buffer.from(n,"utf8").slice(e,t).toString("utf8")}function lc(n){let e=n.charCodeAt(0);return e>128?!1:!!(e==95||e>=48&&e<=57||A0(e))}function A0(n){return n>=65&&n<=90||n>=97&&n<=122}function DH(n,e){return e&&n.endsWith(` -`)?n.slice(0,-1).split(` -`):n.split(` -`)}var _e=_(()=>{"use strict"});var uc,vpe,CH,P,ge=_(()=>{"use strict";uc=x(q());V();Vt();_e();vpe=H()("events"),CH=class{constructor(){this.handlers=new Map;this._recentInserts=[];this._lastChange=0;this._insertMode=!1;this._pumAlignTop=!1;this._pumVisible=!1;this._completing=!1}set completing(e){this._completing=e,this._pumVisible=e}get completing(){return this._completing}get cursor(){return this._cursor}get bufnr(){return this._bufnr}get pumvisible(){return this._pumVisible}get pumAlignTop(){return this._pumAlignTop}get insertMode(){return this._insertMode}get lastChangeTs(){return this._lastChange}race(e,t){let i=[];return new Promise(r=>{if(typeof t=="number"){let o=setTimeout(()=>{J(i),r(void 0)},t);i.push(uc.Disposable.create(()=>{clearTimeout(o)}))}else uc.CancellationToken.is(t)&&t.onCancellationRequested(()=>{J(i),r(void 0)},null,i);e.forEach(o=>{this.on(o,(...s)=>{J(i),r({name:o,args:s})},null,i)})})}async fire(e,t){var r,o;let i=this.handlers.get(e);if(e=="InsertEnter")this._insertMode=!0;else if(e=="InsertLeave")this._insertMode=!1,this._pumVisible=!1,this._recentInserts=[];else if(e=="CursorHoldI"||e=="CursorMovedI")this._bufnr=t[0],this._insertMode||(this._insertMode=!0,this.fire("InsertEnter",[t[0]]));else if(e=="CursorHold"||e=="CursorMoved")this._bufnr=t[0],this._insertMode&&(this._insertMode=!1,this.fire("InsertLeave",[t[0]]));else if(e=="MenuPopupChanged")this._pumVisible=!0,this._pumAlignTop=t[1]>t[0].row;else if(e=="InsertCharPre")this._recentInserts.push([t[1],t[0]]);else if(e=="TextChanged")this._lastChange=Date.now();else if(e=="BufEnter")this._bufnr=t[0];else if(e=="TextChangedI"||e=="TextChangedP"){let s=this._recentInserts.filter(u=>u[0]==t[0]);this._bufnr=t[0],this._recentInserts=[],this._lastChange=Date.now();let a=t[1],l=tt((r=a.line)!=null?r:"",0,a.col-1);if(a.pre=l,this._cursor=Object.freeze({bufnr:t[0],lnum:a.lnum,col:a.col,insert:!0}),s.length&&l.length){let u=l.slice(-1);s.findIndex(c=>c[1]==u)!==-1&&(a.insertChar=u,process.nextTick(()=>{this.fire("TextInsert",[...t,u])}))}}if(e=="CursorMoved"||e=="CursorMovedI"){t.push(this._recentInserts.length>0);let s={bufnr:t[0],lnum:t[1][0],col:t[1][1],insert:e=="CursorMovedI"};if(this._cursor&&Me(this._cursor,s))return;this._cursor=Object.freeze(s)}if(i)try{t.forEach(s=>{typeof s=="object"&&Object.freeze(s)}),await Promise.all(i.slice().map(s=>s(t)))}catch(s){if(s instanceof Error&&((o=s.message)==null?void 0:o.includes("transport disconnected")))return;vpe.error(`Error on event: ${e}`,s instanceof Error?s.stack:s)}}on(e,t,i,r){if(Array.isArray(e)){let o=r||[];for(let s of e)this.on(s,t,i,o);return uc.Disposable.create(()=>{J(o)})}else{let o=this.handlers.get(e)||[],s=l=>new Promise((u,c)=>{try{Promise.resolve(t.apply(i!=null?i:null,l)).then(()=>{u(void 0)},h=>{c(h)})}catch(h){c(h)}});o.push(s),this.handlers.set(e,o);let a=uc.Disposable.create(()=>{let l=o.indexOf(s);l!==-1&&o.splice(l,1)});return Array.isArray(r)&&r.push(a),a}}},P=new CH});function _H(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function wpe(n){cc=n}function ui(n,e){if(e){if(Dpe.test(n))return n.replace(Cpe,xH)}else if(xpe.test(n))return n.replace(Spe,xH);return n}function RH(n){return n.replace(kpe,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}function ct(n,e){n=n.source||n,e=e||"";let t={replace:(i,r)=>(r=r.source||r,r=r.replace(Epe,"$1"),n=n.replace(i,r),t),getRegex:()=>new RegExp(n,e)};return t}function SH(n,e,t){if(n){let i;try{i=decodeURIComponent(RH(t)).replace(Ppe,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}e&&!_pe.test(t)&&(t=Ipe(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function Ipe(n,e){tb[" "+n]||(Rpe.test(n)?tb[" "+n]=n+"/":tb[" "+n]=ib(n,"/",!0)),n=tb[" "+n];let t=n.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:n.replace(Lpe,"$1")+e:e.charAt(0)==="/"?t?e:n.replace(Fpe,"$1")+e:n+e}function Rr(n){let e=1,t,i;for(;e{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),i=t.split(/ \|/),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>e)i.splice(e);else for(;i.length1;)e&1&&(t+=n),e>>=1,n+=n;return t+n}function EH(n,e,t,i){let r=e.href,o=e.title?ui(e.title):null,s=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){i.state.inLink=!0;let a={type:"link",raw:t,href:r,title:o,text:s,tokens:i.inlineTokens(s,[])};return i.state.inLink=!1,a}else return{type:"image",raw:t,href:r,title:o,text:ui(s)}}function Ape(n,e){let t=n.match(/^(\s+)(?:```)/);if(t===null)return e;let i=t[1];return e.split(` -`).map(r=>{let o=r.match(/^\s+/);if(o===null)return r;let[s]=o;return s.length>=i.length?r.slice(i.length):r}).join(` -`)}function Ope(n){return n.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function PH(n){let e="",t,i,r=n.length;for(t=0;t.5&&(i="x"+i.toString(16)),e+="&#"+i+";";return e}function fe(n,e,t){if(typeof n>"u"||n===null)throw new Error("marked(): input parameter is undefined or null");if(typeof n!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=Rr({},fe.defaults,e||{}),LH(e),t){let i=e.highlight,r;try{r=to.lex(n,e)}catch(a){return t(a)}let o=function(a){let l;if(!a)try{e.walkTokens&&fe.walkTokens(r,e.walkTokens),l=io.parse(r,e)}catch(u){a=u}return e.highlight=i,a?t(a):t(null,l)};if(!i||i.length<3||(delete e.highlight,!r.length))return o();let s=0;fe.walkTokens(r,function(a){a.type==="code"&&(s++,setTimeout(()=>{i(a.text,a.lang,function(l,u){if(l)return o(l);u!=null&&u!==a.text&&(a.text=u,a.escaped=!0),s--,s===0&&o()})},0))}),s===0&&o();return}try{let i=to.lex(n,e);return e.walkTokens&&fe.walkTokens(i,e.walkTokens),io.parse(i,e)}catch(i){if(i.message+=` -Please report this to https://github.com/markedjs/marked.`,e.silent)return"

An error occurred:

"+ui(i.message+"",!0)+"
";throw i}}var cc,Dpe,Cpe,xpe,Spe,Tpe,xH,kpe,Epe,Ppe,_pe,tb,Rpe,Lpe,Fpe,nb,rb,ce,ee,to,ob,O0,M0,io,G_e,Q_e,K_e,z_e,V_e,eRe,tRe,FH=_(()=>{cc=_H();Dpe=/[&<>"']/,Cpe=/[&<>"']/g,xpe=/[<>"']|&(?!#?\w+;)/,Spe=/[<>"']|&(?!#?\w+;)/g,Tpe={"&":"&","<":"<",">":">",'"':""","'":"'"},xH=n=>Tpe[n];kpe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;Epe=/(^|[^\[])\^/g;Ppe=/[^\w:]/g,_pe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;tb={},Rpe=/^[^:]+:\/*[^/]*$/,Lpe=/^([^:]+:)[\s\S]*$/,Fpe=/^([^:]+:\/*[^/]*)[\s\S]*$/;nb={exec:function(){}};rb=class{constructor(e){this.options=e||cc}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:ib(i,` -`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let i=t[0],r=Ape(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){let o=ib(i,"#");(this.options.pedantic||!o||/ $/.test(o))&&(i=o.trim())}let r={type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let i=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,r,o,s,a,l,u,c,h,d,g,f,p=t[1].trim(),m=p.length>1,v={type:"list",raw:"",ordered:m,start:m?+p.slice(0,-1):"",loose:!1,items:[]};p=m?`\\d{1,9}\\${p.slice(-1)}`:`\\${p}`,this.options.pedantic&&(p=m?p:"[*+-]");let w=new RegExp(`^( {0,3}${p})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,!(!(t=w.exec(e))||this.rules.block.hr.test(e)));){if(i=t[0],e=e.substring(i.length),c=t[2].split(` -`,1)[0],h=e.split(` -`,1)[0],this.options.pedantic?(s=2,g=c.trimLeft()):(s=t[2].search(/[^ ]/),s=s>4?1:s,g=c.slice(s),s+=t[1].length),l=!1,!c&&/^ *$/.test(h)&&(i+=h+` -`,e=e.substring(h.length+1),f=!0),!f){let S=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(d=e.split(` -`,1)[0],c=d,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!S.test(c));){if(c.search(/[^ ]/)>=s||!c.trim())g+=` -`+c.slice(s);else if(!l)g+=` -`+c;else break;!l&&!c.trim()&&(l=!0),i+=d+` -`,e=e.substring(d.length+1)}}v.loose||(u?v.loose=!0:/\n *\n *$/.test(i)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(g),r&&(o=r[0]!=="[ ] ",g=g.replace(/^\[[ xX]\] +/,""))),v.items.push({type:"list_item",raw:i,task:!!r,checked:o,loose:!1,text:g}),v.raw+=i}v.items[v.items.length-1].raw=i.trimRight(),v.items[v.items.length-1].text=g.trimRight(),v.raw=v.raw.trimRight();let D=v.items.length;for(a=0;aj.type==="space"),L=S.every(j=>{let I=j.raw.split(""),W=0;for(let A of I)if(A===` -`&&(W+=1),W>1)return!0;return!1});!v.loose&&S.length&&L&&(v.loose=!0,v.items[a].loose=!0)}return v}}html(e){let t=this.rules.block.html.exec(e);if(t){let i={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};return this.options.sanitize&&(i.type="paragraph",i.text=this.options.sanitizer?this.options.sanitizer(t[0]):ui(t[0]),i.tokens=[],this.lexer.inline(i.text,i.tokens)),i}}def(e){let t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));let i=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:i,raw:t[0],href:t[2],title:t[3]}}}table(e){let t=this.rules.block.table.exec(e);if(t){let i={type:"table",header:TH(t[1]).map(r=>({text:r})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(i.header.length===i.align.length){i.raw=t[0];let r=i.align.length,o,s,a,l;for(o=0;o({text:u}));for(r=i.header.length,s=0;s/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):ui(t[0]):t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;let s=ib(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=jpe(t[2],"()");if(s>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s&&(r=s[1],o=s[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^$/.test(i)?r=r.slice(1):r=r.slice(1,-1)),EH(t,{href:r&&r.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let r=(i[2]||i[1]).replace(/\s+/g," ");if(r=t[r.toLowerCase()],!r||!r.href){let o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return EH(i,r,i[0],this.lexer)}}emStrong(e,t,i=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r||r[3]&&i.match(/[\p{L}\p{N}]/u))return;let o=r[1]||r[2]||"";if(!o||o&&(i===""||this.rules.inline.punctuation.exec(i))){let s=r[0].length-1,a,l,u=s,c=0,h=r[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+s);(r=h.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(l=a.length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;if(l=Math.min(l,l+u+c),Math.min(s,l)%2){let g=e.slice(1,s+r.index+l);return{type:"em",raw:e.slice(0,s+r.index+l+1),text:g,tokens:this.lexer.inlineTokens(g,[])}}let d=e.slice(2,s+r.index+l-1);return{type:"strong",raw:e.slice(0,s+r.index+l+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," "),r=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return r&&o&&(i=i.substring(1,i.length-1)),i=ui(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){let i=this.rules.inline.autolink.exec(e);if(i){let r,o;return i[2]==="@"?(r=ui(this.options.mangle?t(i[1]):i[1]),o="mailto:"+r):(r=ui(i[1]),o=r),{type:"link",raw:i[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let r,o;if(i[2]==="@")r=ui(this.options.mangle?t(i[0]):i[0]),o="mailto:"+r;else{let s;do s=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0];while(s!==i[0]);r=ui(i[0]),i[1]==="www."?o="http://"+r:o=r}return{type:"link",raw:i[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e,t){let i=this.rules.inline.text.exec(e);if(i){let r;return this.lexer.state.inRawBlock?r=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):ui(i[0]):i[0]:r=ui(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:r}}}},ce={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:nb,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ce.def=ct(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex();ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;ce.listItemStart=ct(/^( *)(bull) */).replace("bull",ce.bullet).getRegex();ce.list=ct(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex();ce._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";ce._comment=/|$)/;ce.html=ct(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ce.paragraph=ct(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.blockquote=ct(ce.blockquote).replace("paragraph",ce.paragraph).getRegex();ce.normal=Rr({},ce);ce.gfm=Rr({},ce.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});ce.gfm.table=ct(ce.gfm.table).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.gfm.paragraph=ct(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ce.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ce._tag).getRegex();ce.pedantic=Rr({},ce.normal,{html:ct(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:nb,paragraph:ct(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:nb,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:nb,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ee.punctuation=ct(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex();ee.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ee.escapedEmSt=/\\\*|\\_/g;ee._comment=ct(ce._comment).replace("(?:-->|$)","-->").getRegex();ee.emStrong.lDelim=ct(ee.emStrong.lDelim).replace(/punct/g,ee._punctuation).getRegex();ee.emStrong.rDelimAst=ct(ee.emStrong.rDelimAst,"g").replace(/punct/g,ee._punctuation).getRegex();ee.emStrong.rDelimUnd=ct(ee.emStrong.rDelimUnd,"g").replace(/punct/g,ee._punctuation).getRegex();ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ee._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;ee.autolink=ct(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex();ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ee.tag=ct(ee.tag).replace("comment",ee._comment).replace("attribute",ee._attribute).getRegex();ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ee._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ee.link=ct(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex();ee.reflink=ct(ee.reflink).replace("label",ee._label).replace("ref",ce._label).getRegex();ee.nolink=ct(ee.nolink).replace("ref",ce._label).getRegex();ee.reflinkSearch=ct(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex();ee.normal=Rr({},ee);ee.pedantic=Rr({},ee.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ct(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:ct(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()});ee.gfm=Rr({},ee.normal,{escape:ct(ee.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\(i=a.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&t.length>0?t[t.length-1].raw+=` -`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=` -`+i.raw,r.text+=` -`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&(r.type==="paragraph"||r.type==="text")?(r.raw+=` -`+i.raw,r.text+=` -`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=e.slice(1),u;this.options.extensions.startBlock.forEach(function(c){u=c.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){r=t[t.length-1],s&&r.type==="paragraph"?(r.raw+=` -`+i.raw,r.text+=` -`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i),s=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&r.type==="text"?(r.raw+=` -`+i.raw,r.text+=` -`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,r,o,s=e,a,l,u;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+kH("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,a.index)+"["+kH("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(s))!=null;)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(i=c.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),r=t[t.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),r=t[t.length-1],r&&i.type==="text"&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,s,u)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e,PH)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e,PH))){e=e.substring(i.raw.length),t.push(i);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0,h=e.slice(1),d;this.options.extensions.startInline.forEach(function(g){d=g.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(i=this.tokenizer.inlineText(o,Ope)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(u=i.raw.slice(-1)),l=!0,r=t[t.length-1],r&&r.type==="text"?(r.raw+=i.raw,r.text+=i.text):t.push(i);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},ob=class{constructor(e){this.options=e||cc}code(e,t,i){let r=(t||"").match(/\S*/)[0];if(this.options.highlight){let o=this.options.highlight(e,r);o!=null&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+` -`,r?'
'+(i?e:ui(e,!0))+`
-`:"
"+(i?e:ui(e,!0))+`
-`}blockquote(e){return`
-`+e+`
-`}html(e){return e}heading(e,t,i,r){return this.options.headerIds?"'+e+" -`:""+e+" -`}hr(){return this.options.xhtml?`
-`:`
-`}list(e,t,i){let r=t?"ol":"ul",o=t&&i!==1?' start="'+i+'"':"";return"<"+r+o+`> -`+e+" -`}listitem(e){return"
  • "+e+`
  • -`}checkbox(e){return" "}paragraph(e){return"

    "+e+`

    -`}table(e,t){return t&&(t=""+t+""),` - -`+e+` -`+t+`
    -`}tablerow(e){return` -`+e+` -`}tablecell(e,t){let i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+" -`}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,i){if(e=SH(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let r='",r}image(e,t,i){if(e=SH(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let r=''+i+'":">",r}text(e){return e}},O0=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}},M0=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,r=0;if(this.seen.hasOwnProperty(i)){r=this.seen[e];do r++,i=e+"-"+r;while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=r,this.seen[i]=0),i}slug(e,t={}){let i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}},io=class{constructor(e){this.options=e||cc,this.options.renderer=this.options.renderer||new ob,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new O0,this.slugger=new M0}static parse(e,t){return new io(t).parse(e)}static parseInline(e,t){return new io(t).parseInline(e)}parse(e,t=!0){let i="",r,o,s,a,l,u,c,h,d,g,f,p,m,v,w,D,S,L,j,I=e.length;for(r=0;r0&&w.tokens[0].type==="paragraph"?(w.tokens[0].text=L+" "+w.tokens[0].text,w.tokens[0].tokens&&w.tokens[0].tokens.length>0&&w.tokens[0].tokens[0].type==="text"&&(w.tokens[0].tokens[0].text=L+" "+w.tokens[0].tokens[0].text)):w.tokens.unshift({type:"text",text:L}):v+=L),v+=this.parse(w.tokens,m),d+=this.renderer.listitem(v,S,D);i+=this.renderer.list(d,f,p);continue}case"html":{i+=this.renderer.html(g.text);continue}case"paragraph":{i+=this.renderer.paragraph(this.parseInline(g.tokens));continue}case"text":{for(d=g.tokens?this.parseInline(g.tokens):g.text;r+1{if(r.extensions&&(i=!0,r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){let s=t.renderers?t.renderers[o.name]:null;s?t.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:t.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[o.level]?t[o.level].unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}o.childTokens&&(t.childTokens[o.name]=o.childTokens)})),r.renderer){let o=fe.defaults.renderer||new ob;for(let s in r.renderer){let a=o[s];o[s]=(...l)=>{let u=r.renderer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}e.renderer=o}if(r.tokenizer){let o=fe.defaults.tokenizer||new rb;for(let s in r.tokenizer){let a=o[s];o[s]=(...l)=>{let u=r.tokenizer[s].apply(o,l);return u===!1&&(u=a.apply(o,l)),u}}e.tokenizer=o}if(r.walkTokens){let o=fe.defaults.walkTokens;e.walkTokens=function(s){r.walkTokens.call(this,s),o&&o.call(this,s)}}i&&(e.extensions=t),fe.setOptions(e)})};fe.walkTokens=function(n,e){for(let t of n)switch(e.call(fe,t),t.type){case"table":{for(let i of t.header)fe.walkTokens(i.tokens,e);for(let i of t.rows)for(let r of i)fe.walkTokens(r.tokens,e);break}case"list":{fe.walkTokens(t.items,e);break}default:fe.defaults.extensions&&fe.defaults.extensions.childTokens&&fe.defaults.extensions.childTokens[t.type]?fe.defaults.extensions.childTokens[t.type].forEach(function(i){fe.walkTokens(t[i],e)}):t.tokens&&fe.walkTokens(t.tokens,e)}};fe.parseInline=function(n,e){if(typeof n>"u"||n===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof n!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected");e=Rr({},fe.defaults,e||{}),LH(e);try{let t=to.lexInline(n,e);return e.walkTokens&&fe.walkTokens(t,e.walkTokens),io.parseInline(t,e)}catch(t){if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,e.silent)return"

    An error occurred:

    "+ui(t.message+"",!0)+"
    ";throw t}};fe.Parser=io;fe.parser=io.parse;fe.Renderer=ob;fe.TextRenderer=O0;fe.Lexer=to;fe.lexer=to.lex;fe.Tokenizer=rb;fe.Slugger=M0;fe.parse=fe;G_e=fe.options,Q_e=fe.setOptions,K_e=fe.use,z_e=fe.walkTokens,V_e=fe.parseInline,eRe=io.parse,tRe=to.lex});var OH=b((nRe,AH)=>{var jH={};AH.exports=jH;var IH={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(IH).forEach(function(n){var e=IH[n],t=jH[n]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var NH=b((rRe,MH)=>{var sg=process.argv;MH.exports=function(){return sg.indexOf("--no-color")!==-1||sg.indexOf("--color=false")!==-1?!1:sg.indexOf("--color")!==-1||sg.indexOf("--color=true")!==-1||sg.indexOf("--color=always")!==-1?!0:process.stdout&&!process.stdout.isTTY?!1:process.platform==="win32"||"COLORTERM"in process.env?!0:process.env.TERM==="dumb"?!1:!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)}()});var HH=b((oRe,BH)=>{BH.exports=function(e,t){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(o){o=o.toLowerCase();var s=r[o]||[" "],a=Math.floor(Math.random()*s.length);typeof r[o]<"u"?i+=r[o][a]:i+=o}),i}});var YH=b((sRe,qH)=>{qH.exports=function(e,t){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(i.up,i.down,i.mid),o={};function s(u){var c=Math.floor(Math.random()*u);return c}function a(u){var c=!1;return r.filter(function(h){c=h===u}),c}function l(u,c){var h="",d,g;c=c||{},c.up=c.up||!0,c.mid=c.mid||!0,c.down=c.down||!0,c.size=c.size||"maxi",u=u.split("");for(g in u)if(!a(g)){switch(h=h+u[g],d={up:0,down:0,mid:0},c.size){case"mini":d.up=s(8),d.min=s(2),d.down=s(8);break;case"maxi":d.up=s(16)+3,d.min=s(4)+1,d.down=s(64)+3;break;default:d.up=s(8)+1,d.mid=s(6)/2,d.down=s(8)+1;break}var f=["up","mid","down"];for(var p in f)for(var m=f[p],v=0;v<=d[m];v++)c[m]&&(h=h+i[m][s(i[m].length)])}return h}return l(e)}});var ZH=b((aRe,WH)=>{var N0=hc();WH.exports=function(){return function(n,e,t){if(n===" ")return n;switch(e%3){case 0:return N0.red(n);case 1:return N0.white(n);case 2:return N0.blue(n)}}}()});var $H=b((lRe,JH)=>{var Mpe=hc();JH.exports=function(n,e,t){return e%2===0?n:Mpe.inverse(n)}});var UH=b((uRe,XH)=>{var Npe=hc();XH.exports=function(){var n=["red","yellow","green","blue","magenta"];return function(e,t,i){return e===" "?e:Npe[n[t++%n.length]](e)}}()});var QH=b((cRe,GH)=>{var Bpe=hc();GH.exports=function(){var n=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta"];return function(e,t,i){return e===" "?e:Bpe[n[Math.round(Math.random()*(n.length-1))]](e)}}()});var hc=b((dRe,iq)=>{var it={};iq.exports=it;it.themes={};var Qs=it.styles=OH(),VH=Object.defineProperties;it.supportsColor=NH();typeof it.enabled>"u"&&(it.enabled=it.supportsColor);it.stripColors=it.strip=function(n){return(""+n).replace(/\x1B\[\d+m/g,"")};var hRe=it.stylize=function(e,t){return Qs[t].open+e+Qs[t].close},Hpe=/[|\\{}()[\]^$+*?.]/g,qpe=function(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(Hpe,"\\$&")};function eq(n){var e=function t(){return Wpe.apply(t,arguments)};return e._styles=n,e.__proto__=Ype,e}var tq=function(){var n={};return Qs.grey=Qs.gray,Object.keys(Qs).forEach(function(e){Qs[e].closeRe=new RegExp(qpe(Qs[e].close),"g"),n[e]={get:function(){return eq(this._styles.concat(e))}}}),n}(),Ype=VH(function(){},tq);function Wpe(){var n=arguments,e=n.length,t=e!==0&&String(arguments[0]);if(e>1)for(var i=1;i{var $pe=hc();nq.exports=$pe});var sq=b(dc=>{dc.repeat=function(n,e){return Array(e+1).join(n)};dc.pad=function(n,e,t,i){if(e+1>=n.length)switch(i){case"left":n=Array(e+1-n.length).join(t)+n;break;case"both":var r=Math.ceil((padlen=e-n.length)/2),o=padlen-r;n=Array(o+1).join(t)+n+Array(r+1).join(t);break;default:n=n+Array(e+1-n.length).join(t)}return n};dc.truncate=function(n,e,t){return t=t||"\u2026",n.length>=e?n.substr(0,e-t.length)+t:n};function oq(n,e){for(var t in e)t==="__proto__"||t==="constructor"||t==="prototype"||(e[t]&&e[t].constructor&&e[t].constructor===Object?(n[t]=n[t]||{},oq(n[t],e[t])):n[t]=e[t]);return n}dc.options=oq;dc.strlen=function(n){var e=/\u001b\[(?:\d*;){0,5}\d*m/g,t=(""+n).replace(e,""),i=t.split(` -`);return i.reduce(function(r,o){return o.length>r?o.length:r},0)}});var aq=b((pRe,H0)=>{var Xpe=rq(),ml=sq(),B0=ml.repeat,Upe=ml.truncate,Gpe=ml.pad;function ag(n){this.options=ml.options({chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],colAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]},n)}ag.prototype.__proto__=Array.prototype;ag.prototype.__defineGetter__("width",function(){var n=this.toString().split(` -`);return n.length?n[0].length:0});ag.prototype.render;ag.prototype.toString=function(){var n="",e=this.options,t=e.style,i=e.head,r=e.chars,o=e.truncate,s=e.colWidths||new Array(this.head.length),a=0;if(!i.length&&!this.length)return"";if(!s.length){var l=this.slice(0);i.length&&(l=l.concat([i])),l.forEach(function(v){if(typeof v=="object"&&v.length)u(v);else{var w=Object.keys(v)[0],D=v[w];s[0]=Math.max(s[0]||0,c(w)||0),typeof D=="object"&&D.length?u(D,1):s[1]=Math.max(s[1]||0,c(D)||0)}})}a=(s.length==1?s[0]:s.reduce(function(v,w){return v+w}))+s.length+1;function u(v,D){var D=D||0;v.forEach(function(S,L){s[L+D]=Math.max(s[L+D]||0,c(S)||0)})}function c(v){return typeof v=="object"&&v.width!=null?v.width:(typeof v=="object"?ml.strlen(v.text):ml.strlen(v))+(t["padding-left"]||0)+(t["padding-right"]||0)}function h(j,w,D,S){var L=0,j=w+B0(j,a-2)+D;return s.forEach(function(I,W){W!=s.length-1&&(L+=I+1,j=j.substr(0,L)+S+j.substr(L+1))}),f(e.style.border,j)}function d(){var v=h(r.top,r["top-left"]||r.top,r["top-right"]||r.top,r["top-mid"]);v&&(n+=v+` -`)}function g(v,w){var D=[],S=0;if(!Array.isArray(v)&&typeof v=="object"){var L=Object.keys(v)[0],j=v[L],I=!0;Array.isArray(j)?(v=j,v.unshift(L)):v=[L,j]}v.forEach(function(M,F){var N=M.toString().split(` -`).reduce(function(z,ae){return z.push(p(ae,F)),z},[]),Z=N.length;Z>S&&(S=Z),D.push({contents:N,height:Z})});var W=new Array(S);D.forEach(function(M,F){M.contents.forEach(function(z,ae){W[ae]||(W[ae]=[]),(w||I&&F===0&&e.style.head)&&(z=f(e.style.head,z)),W[ae].push(z)});for(var N=M.height,Z=S;N0&&(A+=` -`+f(e.style.border,r.left)),A+=M.join(f(e.style.border,r.middle))+f(e.style.border,r.right)}),f(e.style.border,r.left)+A}function f(v,w){return w?(v.forEach(function(D){w=Xpe[D](w)}),w):""}function p(D,w){var D=String(typeof D=="object"&&D.text?D.text:D),S=ml.strlen(D),L=s[w]-(t["padding-left"]||0)-(t["padding-right"]||0),j=e.colAligns[w]||"left";return B0(" ",t["padding-left"]||0)+(S==L?D:S{"use strict";var lq=(n=0)=>e=>`\x1B[${38+n};5;${e}m`,uq=(n=0)=>(e,t,i)=>`\x1B[${38+n};2;${e};${t};${i}m`;function Qpe(){let n=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,i]of Object.entries(e)){for(let[r,o]of Object.entries(i))e[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[r]=e[r],n.set(o[0],o[1]);Object.defineProperty(e,t,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:n,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi256=lq(),e.color.ansi16m=uq(),e.bgColor.ansi256=lq(10),e.bgColor.ansi16m=uq(10),Object.defineProperties(e,{rgbToAnsi256:{value:(t,i,r)=>t===i&&i===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let i=/(?[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!i)return[0,0,0];let{colorString:r}=i.groups;r.length===3&&(r=r.split("").map(s=>s+s).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>e.rgbToAnsi256(...e.hexToRgb(t)),enumerable:!1}}),e}Object.defineProperty(cq,"exports",{enumerable:!0,get:Qpe})});function dq(n){return`${yi.default.gray.open}${n}${yi.default.gray.close}`}function q0(n){return`${yi.default.magenta.open}${n}${yi.default.magenta.close}`}function gq(n){return`${yi.default.bold.open}${n}${yi.default.bold.close}`}function Y0(n){return`${yi.default.underline.open}${n}${yi.default.underline.close}`}function fq(n){return`${yi.default.strikethrough.open}${n}${yi.default.strikethrough.close}`}function pq(n){return`${yi.default.italic.open}${n}${yi.default.italic.close}`}function mq(n){return`${yi.default.yellow.open}${n}${yi.default.yellow.close}`}function W0(n){return`${yi.default.blue.open}${n}${yi.default.blue.close}`}var yi,bq=_(()=>{"use strict";yi=x(hq())});function Lr(n){return n}function tme(n){return dq(n.replace(/(<([^>]+)>)/ig,""))}function yq(n,e){return e?n.replace(eme,/\n/g):n}function nme(n,e){return e.replace(/(^|\n)(.+)/g,"$1"+n+"$2")}function rme(n,e){return e&&n+e.split(` -`).join(` -`+n)}function ame(n,e){let t=new RegExp("(\\S(?: | )?)((?:"+e+")+)("+Sq+"(?:.*)+)$","gm");return n.replace(t,`$1 -`+e+"$2$3")}function kq(n){return" ".repeat(n.length)}function lme(n,e){return Tq(e,n)?e:kq($0)+e}function ume(n,e){let t=lme.bind(null,e);return n.split(` -`).filter(Lr).map(t).join(` -`)}function cme(n,e,t){return Tq(e,n)?{num:t+1,line:e.replace($0,vq(t+1))}:{num:t,line:kq(vq(t))+e}}function hme(n,e){let t=cme.bind(null,e),i=0;return n.split(` -`).filter(Lr).map(r=>{let o=t(r,i);return i=o.num,o.line}).join(` -`)}function dme(n,e,t){return n=n.trim(),n=e?hme(n,t):ume(n,t),n}function lg(n){return n+` - -`}function gme(n){return n.replace(Vpe,":")}function wq(n,e=null){if(!n)return[];e=e||Lr;let t=e(n).split(` -`),i=[];return t.forEach(function(r){if(!r)return;let o=r.replace(zpe,"").split(Cq);i.push(o.splice(0,o.length-1))}),i}function Eq(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fme(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}var Dq,bRe,Cq,J0,zpe,xq,Vpe,eme,ime,ome,sme,Sq,Tq,$0,vq,Z0,Pq,X0,_q=_(()=>{"use strict";Dq=x(aq());bq();bRe=H()("markdown-renderer"),Cq="^*||*^",J0="*|*|*|*",zpe=new RegExp(Eq(J0),"g"),xq="*#COLON|*",Vpe=new RegExp(Eq(xq),"g"),eme="\r";ime={code:Lr,blockquote:Lr,html:tme,heading:q0,firstHeading:q0,hr:Lr,listitem:Lr,list:dme,table:Lr,paragraph:Lr,strong:gq,em:pq,codespan:mq,del:fq,link:Y0,href:Y0,text:Lr,unescape:!0,emoji:!1,width:80,showSectionPrefix:!0,tab:2,tableOptions:{}};ome="\\*",sme="\\d+\\.",Sq="(?:"+[ome,sme].join("|")+")";Tq=function(n,e){return n.match("^(?:"+e+")*"+Sq)};$0="* ";vq=function(n){return n+". "};Z0=new Map,Pq=class{constructor(e={},t={}){this.options=e;this.highlightOptions=t;this.o=Object.assign({},ime,e),this.tab=" ",this.tableSettings=this.o.tableOptions,this.unescape=this.o.unescape?fme:Lr,this.highlightOptions=t||{},this.transform=this.compose(gme,this.unescape)}text(e){return this.o.text(e)}code(e,t,i){return"``` "+t+` -`+e+"\n```\n"}blockquote(e){return lg(this.o.blockquote(rme(this.tab,e.trim())))}html(e){return this.o.html(e)}heading(e,t,i){return e=this.transform(e),e=(this.o.showSectionPrefix?new Array(t+1).join("#")+" ":"")+e,lg(t===1?this.o.firstHeading(e):this.o.heading(e))}hr(){return`\u2500\u2500\u2500 -`}list(e,t){return e=this.o.list(e,t,this.tab),lg(ame(nme(this.tab,e),this.tab))}listitem(e){let t=this.compose(this.o.listitem,this.transform);return e.indexOf(` -`)!==-1&&(e=e.trim()),` -`+$0+t(e)}checkbox(e){return"["+(e?"X":" ")+"] "}paragraph(e){return e=this.compose(this.o.paragraph,this.transform)(e),lg(e)}table(e,t){let i=new Dq.default(Object.assign({},{head:wq(e)[0]},this.tableSettings));return wq(t,this.transform).forEach(function(r){i.push(r)}),lg(this.o.table(i.toString()))}tablerow(e){return J0+e+J0+` -`}tablecell(e,t){return e+Cq}strong(e){return this.o.strong(e)}em(e){return e=yq(e,this.o.reflowText),this.o.em(e)}codespan(e){return e=yq(e,this.o.reflowText),this.o.codespan(e.replace(/:/g,xq))}br(){return` -`}del(e){return this.o.del(e)}link(e,t,i){let r;try{r=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch{return""}if(r.startsWith("javascript:"))return"";if(i&&e&&i!=e&&Z0.set(i,e),i&&i!=e)return W0(i);let o=this.o.href(e);return this.o.link(o)}image(e,t,i){let r="!["+i;return t&&(r+=" \u2013 "+t),r+"]("+e+")"}compose(...e){return(...t)=>{for(let i=e.length;i-- >0;)t=[e[i].apply(this,t)];return t[0]}}static getLinks(){let e=[];for(let[t,i]of Z0.entries())e.push(`${W0(t)}: ${i}`);return Z0.clear(),e}},X0=Pq});function gc(n,e=!1){let t=ug(n),i=[],r="";for(let o of t){if(!o.text)continue;let{foreground:s,background:a}=o,l=G(r),u=[l,l+G(o.text)];if(s&&a){let c=`CocList${hn(s)}${hn(a)}`;i.push({span:u,hlGroup:c})}else if(s){let c;e?s=="yellow"?c="CocMarkdownCode":s=="blue"?c="CocMarkdownLink":s=="magenta"?c="CocMarkdownHeader":c=`CocListFg${hn(s)}`:c=`CocListFg${hn(s)}`,i.push({span:u,hlGroup:c})}else if(a){let c=`CocListBg${hn(a)}`;i.push({span:u,hlGroup:c})}o.bold?i.push({span:u,hlGroup:"CocBold"}):o.italic?i.push({span:u,hlGroup:"CocItalic"}):o.underline?i.push({span:u,hlGroup:"CocUnderline"}):o.strikethrough&&i.push({span:u,hlGroup:"CocStrikeThrough"}),r=r+o.text}return{line:r,highlights:i}}function ug(n){let e=null,t=null,i="",r=[],o=[],s={},a;a=()=>{let l,u;i.length?i=i.substr(0,i.length-1):o.length&&(l=o.length-1,u=o[l].text,u.length===1?o.pop():o[l].text=u.substr(0,u.length-1))};for(let l=0;l{Rq[u]?s.foreground=Rq[u]:Lq[u]?s.background=Lq[u]:u==39?delete s.foreground:u==49?delete s.background:Fq[u]?s[Fq[u]]=!0:u==22?s.bold=!1:u==23?s.italic=!1:u==24?s.underline=!1:u==29&&(s.strikethrough=!1)}),r=[]):t+=n[l];continue}n[l]=="\x1B"?e=n[l]:n[l]=="\b"?a():i+=n[l]}return i&&(s.text=i+(e||""),o.push(s)),o}var Rq,Lq,Fq,fc=_(()=>{"use strict";_e();Rq={30:"black",31:"red",32:"green",33:"yellow",34:"blue",35:"magenta",36:"cyan",37:"white",90:"grey"},Lq={40:"black",41:"red",42:"green",43:"yellow",44:"blue",45:"magenta",46:"cyan",47:"white"},Fq={1:"bold",3:"italic",4:"underline",9:"strikethrough"}});var jq=b((DRe,Iq)=>{"use strict";Iq.exports=({onlyFirst:n=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,n?void 0:"g")}});var cg=b((CRe,Aq)=>{"use strict";var pme=jq();Aq.exports=n=>typeof n=="string"?n.replace(pme(),""):n});function sb(n,e={}){let t=[],i=[],r=[],o=0;for(let s of n){let a=t.length,{content:l,filetype:u}=s,c=s.highlights;if(u=="markdown"){let h=yme(l,e);r.push(...h.codes.map(d=>(d.startLine=d.startLine+a,d.endLine=d.endLine+a,d))),i.push(...h.highlights.map(d=>(d.lnum=d.lnum+a,d))),t.push(...h.lines)}else{let h=l.trim().split(/\r?\n/);mme.includes(s.filetype)?r.push({hlGroup:`Coc${u}Float`,startLine:a,endLine:a+h.length}):r.push({filetype:s.filetype,startLine:a,endLine:a+h.length}),t.push(...h)}if(Array.isArray(c)&&i.push(...c.map(h=>Object.assign({},h,{lnum:h.lnum+a}))),Array.isArray(s.active)){let h=bme(l,a,s.active);h.length&&i.push(...h)}o!=n.length-1&&t.push("\u2500"),o=o+1}return{lines:t,highlights:i,codes:r}}function bme(n,e,t){let i=[],[r,o]=t,s=n.split(/\r?\n/),a=0,l=!1;for(let u=0;uo){let h=G(c.slice(0,o-a));i.push({colStart:0,colEnd:h,lnum:u+e,hlGroup:"CocUnderline"}),l=!1;break}else{let h=G(c);i.push({colStart:0,colEnd:h,lnum:u+e,hlGroup:"CocUnderline"})}else if(a+c.length>r){l=!0;let h=G(c.slice(0,r-a));if(a+c.length>o){let d=G(c.slice(0,o-a));l=!1,i.push({colStart:h,colEnd:d,lnum:u+e,hlGroup:"CocUnderline"});break}else{let d=G(c);i.push({colStart:h,colEnd:d,lnum:u+e,hlGroup:"CocUnderline"})}}a=a+c.length+1}return i}function yme(n,e){fe.setOptions({renderer:new X0,gfm:!0,breaks:!0});let t=[],i=[],r=[],o=0,s=!1,a,l=0,u=fe(n),c=X0.getLinks();c.length&&(u=u+` - -`+c.join(` -`)),u=u.replace(/\s*$/,"");let h=u.split(/\n/);for(let d=0;d{"use strict";FH();_q();fc();_e();Oq=x(cg()),mme=["Error","Warning","Info","Hint"],ERe=H()("markdown-index")});var ei,no=_(()=>{"use strict";ei=class{constructor(){this.tasks=[];this.count=1}sched(){this.count>0&&this.tasks.length>0&&(this.count--,this.tasks.shift()())}get busy(){return this.count==0}acquire(){return new Promise(e=>{let t=()=>{let i=!1;e(()=>{i||(i=!0,this.count++,this.sched())})};this.tasks.push(t),process.nextTick(this.sched.bind(this))})}use(e){return this.acquire().then(t=>e().then(i=>(t(),i)).catch(i=>{throw t(),i}))}}});var Mq,Nq,vme,ORe,ci,$o=_(()=>{"use strict";Mq=x(Ei()),Nq=x(q());ge();U0();V();no();Vt();vme=process.env.VIM_NODE_RPC=="1",ORe=H()("model-float"),ci=class{constructor(e){this.nvim=e;this.winid=0;this._bufnr=0;this.mutex=new ei;this.disposables=[];this.onCursorMoved=(0,Mq.default)(this._onCursorMoved.bind(this),100)}bindEvents(e,t){let i=["InsertLeave","InsertEnter","BufEnter"];for(let r of i)P.on(r,o=>{o!=this._bufnr&&this.close()},null,this.disposables);P.on("MenuPopupChanged",()=>{P.pumAlignTop==t&&this.close()},null,this.disposables),this.disposables.push(Nq.Disposable.create(()=>{this.onCursorMoved.clear()})),P.on("CursorMoved",this.onCursorMoved.bind(this,e),this,this.disposables),P.on("CursorMovedI",this.onCursorMoved.bind(this,e),this,this.disposables)}unbind(){this.disposables.length&&(J(this.disposables),this.disposables=[])}_onCursorMoved(e,t,i){if(t!=this._bufnr&&!(t==this.targetBufnr&&Me(i,this.cursor))&&(e||t!=this.targetBufnr||!P.insertMode)){this.close();return}}async create(e,t=!1,i=0){await this.show(e,{offsetX:i})}applyFloatConfig(e,t){for(let i of Object.keys(t)){if(i=="border"){t.border&&(e.border=[1,1,1,1]);continue}e[i]=t[i]}return e}async show(e,t={}){if(e.length==0||e.every(o=>o.content.length==0)){this.close();return}let i=Date.now(),r=await this.mutex.acquire();try{await this.createPopup(e,t,i),r()}catch(o){this.nvim.echoError(o),r()}}async createPopup(e,t,i){e=e.filter(p=>p.content.trim().length>0);let{lines:r,codes:o,highlights:s}=sb(e),a={codes:o,highlights:s,pumAlignTop:P.pumAlignTop,preferTop:typeof t.preferTop=="boolean"?t.preferTop:!1,offsetX:t.offsetX||0,title:t.title||"",close:t.close?1:0,rounded:t.rounded?1:0,modes:t.modes||["n","i","ic","s"]};vme||(typeof t.winblend=="number"&&(a.winblend=t.winblend),t.focusable!=null&&(a.focusable=t.focusable?1:0),t.shadow&&(a.shadow=1)),t.maxHeight&&(a.maxHeight=t.maxHeight),t.maxWidth&&(a.maxWidth=t.maxWidth),t.border&&!t.border.every(p=>p==0)&&(a.border=t.border,a.rounded=t.rounded?1:0),t.title&&!a.border&&(a.border=[1,1,1,1]),t.highlight&&(a.highlight=t.highlight),t.borderhighlight&&(a.borderhighlight=t.borderhighlight),t.cursorline&&(a.cursorline=1);let l=t.autoHide!=!1;l&&(a.autohide=1),this.unbind();let u=await this.nvim.call("coc#dialog#create_cursor_float",[this.winid,this._bufnr,r,a]);if(this.nvim.redrawVim(),!u||u.length==0||this.closeTs>i){let p=u&&u.length>0?u[2]:this.winid;p&&(this.winid=0,this.nvim.call("coc#float#close",[p],!0),this.nvim.redrawVim());return}let[c,h,d,g,f]=u;this.winid=d,this._bufnr=g,this.targetBufnr=c,this.cursor=h,this.bindEvents(l,f==1)}close(){let{winid:e,nvim:t}=this;this.closeTs=Date.now(),this.unbind(),e&&(this.winid=0,t.call("coc#float#close",[e],!0),t.redrawVim())}checkRetrigger(e){return!!(this.winid&&this.targetBufnr==e)}get bufnr(){return this._bufnr}get buffer(){return this.bufnr?this.nvim.createBuffer(this.bufnr):null}get window(){return this.winid?this.nvim.createWindow(this.winid):null}async activated(){return this.winid?await this.nvim.call("coc#float#valid",[this.winid])!=0:!1}dispose(){this.cursor=void 0,this.close()}}});var Hq=b((NRe,Bq)=>{Bq.exports=function(n,e){for(var t=[],i=0;i{"use strict";Zq.exports=Yq;function Yq(n,e,t){n instanceof RegExp&&(n=qq(n,t)),e instanceof RegExp&&(e=qq(e,t));var i=Wq(n,e,t);return i&&{start:i[0],end:i[1],pre:t.slice(0,i[0]),body:t.slice(i[0]+n.length,i[1]),post:t.slice(i[1]+e.length)}}function qq(n,e){var t=e.match(n);return t?t[0]:null}Yq.range=Wq;function Wq(n,e,t){var i,r,o,s,a,l=t.indexOf(n),u=t.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(n===e)return[l,u];for(i=[],o=t.length;c>=0&&!a;)c==l?(i.push(c),l=t.indexOf(n,c+1)):i.length==1?a=[i.pop(),u]:(r=i.pop(),r=0?l:u;i.length&&(a=[o,s])}return a}});var Vq=b((HRe,zq)=>{var Dme=Hq(),$q=Jq();zq.exports=Sme;var Xq="\0SLASH"+Math.random()+"\0",Uq="\0OPEN"+Math.random()+"\0",Q0="\0CLOSE"+Math.random()+"\0",Gq="\0COMMA"+Math.random()+"\0",Qq="\0PERIOD"+Math.random()+"\0";function G0(n){return parseInt(n,10)==n?parseInt(n,10):n.charCodeAt(0)}function Cme(n){return n.split("\\\\").join(Xq).split("\\{").join(Uq).split("\\}").join(Q0).split("\\,").join(Gq).split("\\.").join(Qq)}function xme(n){return n.split(Xq).join("\\").split(Uq).join("{").split(Q0).join("}").split(Gq).join(",").split(Qq).join(".")}function Kq(n){if(!n)return[""];var e=[],t=$q("{","}",n);if(!t)return n.split(",");var i=t.pre,r=t.body,o=t.post,s=i.split(",");s[s.length-1]+="{"+r+"}";var a=Kq(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function Sme(n){return n?(n.substr(0,2)==="{}"&&(n="\\{\\}"+n.substr(2)),pc(Cme(n),!0).map(xme)):[]}function Tme(n){return"{"+n+"}"}function kme(n){return/^-?0\d/.test(n)}function Eme(n,e){return n<=e}function Pme(n,e){return n>=e}function pc(n,e){var t=[],i=$q("{","}",n);if(!i||/\$$/.test(i.pre))return[n];var r=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),s=r||o,a=i.body.indexOf(",")>=0;if(!s&&!a)return i.post.match(/,.*\}/)?(n=i.pre+"{"+i.body+Q0+i.post,pc(n)):[n];var l;if(s)l=i.body.split(/\.\./);else if(l=Kq(i.body),l.length===1&&(l=pc(l[0],!1).map(Tme),l.length===1)){var c=i.post.length?pc(i.post,!1):[""];return c.map(function(F){return i.pre+l[0]+F})}var u=i.pre,c=i.post.length?pc(i.post,!1):[""],h;if(s){var d=G0(l[0]),g=G0(l[1]),f=Math.max(l[0].length,l[1].length),p=l.length==3?Math.abs(G0(l[2])):1,m=Eme,v=g0){var j=new Array(L+1).join("0");D<0?S="-"+j+S.slice(1):S=j+S}}h.push(S)}}else h=Dme(l,function(M){return pc(M,!1)});for(var I=0;I{o2.exports=zn;zn.Minimatch=hi;var hg={sep:"/"};try{hg=require("path")}catch{}var V0=zn.GLOBSTAR=hi.GLOBSTAR={},_me=Vq(),e2={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},K0="[^/]",z0=K0+"*?",Rme="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Lme="(?:(?!(?:\\/|^)\\.).)*?",t2=Fme("().*{}+?[]^$\\!");function Fme(n){return n.split("").reduce(function(e,t){return e[t]=!0,e},{})}var n2=/\/+/;zn.filter=Ime;function Ime(n,e){return e=e||{},function(t,i,r){return zn(t,n,e)}}function i2(n,e){n=n||{},e=e||{};var t={};return Object.keys(e).forEach(function(i){t[i]=e[i]}),Object.keys(n).forEach(function(i){t[i]=n[i]}),t}zn.defaults=function(n){if(!n||!Object.keys(n).length)return zn;var e=zn,t=function(r,o,s){return e.minimatch(r,o,i2(n,s))};return t.Minimatch=function(r,o){return new e.Minimatch(r,i2(n,o))},t};hi.defaults=function(n){return!n||!Object.keys(n).length?hi:zn.defaults(n).Minimatch};function zn(n,e,t){if(typeof e!="string")throw new TypeError("glob pattern string required");return t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:e.trim()===""?n==="":new hi(e,t).match(n)}function hi(n,e){if(!(this instanceof hi))return new hi(n,e);if(typeof n!="string")throw new TypeError("glob pattern string required");e||(e={}),n=n.trim(),hg.sep!=="/"&&(n=n.split(hg.sep).join("/")),this.options=e,this.set=[],this.pattern=n,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}hi.prototype.debug=function(){};hi.prototype.make=jme;function jme(){if(!this._made){var n=this.pattern,e=this.options;if(!e.nocomment&&n.charAt(0)==="#"){this.comment=!0;return}if(!n){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error),this.debug(this.pattern,t),t=this.globParts=t.map(function(i){return i.split(n2)}),this.debug(this.pattern,t),t=t.map(function(i,r,o){return i.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(i){return i.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}}hi.prototype.parseNegate=Ame;function Ame(){var n=this.pattern,e=!1,t=this.options,i=0;if(!t.nonegate){for(var r=0,o=n.length;r"u"?this.pattern:n,typeof n>"u")throw new TypeError("undefined pattern");return e.nobrace||!n.match(/\{.*\}/)?[n]:_me(n)}hi.prototype.parse=Ome;var ab={};function Ome(n,e){if(n.length>1024*64)throw new TypeError("pattern is too long");var t=this.options;if(!t.noglobstar&&n==="**")return V0;if(n==="")return"";var i="",r=!!t.nocase,o=!1,s=[],a=[],l,u=!1,c=-1,h=-1,d=n.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this;function f(){if(l){switch(l){case"*":i+=z0,r=!0;break;case"?":i+=K0,r=!0;break;default:i+="\\"+l;break}g.debug("clearStateChar %j %j",l,i),l=!1}}for(var p=0,m=n.length,v;p-1;W--){var A=a[W],M=i.slice(0,A.reStart),F=i.slice(A.reStart,A.reEnd-8),N=i.slice(A.reEnd-8,A.reEnd),Z=i.slice(A.reEnd);N+=Z;var z=M.split("(").length-1,ae=Z;for(p=0;p=0&&(r=n[o],!r);o--);for(o=0;o>> no match, partial?`,n,c,e,h),c===s))}var g;if(typeof l=="string"?(i.nocase?g=u.toLowerCase()===l.toLowerCase():g=u===l,this.debug("string match",l,u,g)):(g=u.match(l),this.debug("pattern match",l,u,g)),!g)return!1}if(r===s&&o===a)return!0;if(r===s)return t;if(o===a){var f=r===s-1&&n[r]==="";return f}throw new Error("wtf?")};function Bme(n){return n.replace(/\\(.)/g,"$1")}function Hme(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var s2=b(eT=>{var bl=require("path"),zs=process.platform==="win32",Ks=require("fs"),qme=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function Yme(){var n;if(qme){var e=new Error;n=t}else n=i;return n;function t(r){r&&(e.message=r.message,r=e,i(r))}function i(r){if(r){if(process.throwDeprecation)throw r;if(!process.noDeprecation){var o="fs: missing callback "+(r.stack||r.message);process.traceDeprecation?console.trace(o):console.error(o)}}}}function Wme(n){return typeof n=="function"?n:Yme()}var YRe=bl.normalize;zs?Xo=/(.*?)(?:[\/\\]+|$)/g:Xo=/(.*?)(?:[\/]+|$)/g;var Xo;zs?dg=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:dg=/^[\/]*/;var dg;eT.realpathSync=function(e,t){if(e=bl.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var i=e,r={},o={},s,a,l,u;c();function c(){var m=dg.exec(e);s=m[0].length,a=m[0],l=m[0],u="",zs&&!o[l]&&(Ks.lstatSync(l),o[l]=!0)}for(;s=e.length)return t&&(t[r]=e),i(null,e);Xo.lastIndex=a;var m=Xo.exec(e);return c=l,l+=m[0],u=c+m[1],a=Xo.lastIndex,s[u]||t&&t[u]===u?process.nextTick(d):t&&Object.prototype.hasOwnProperty.call(t,u)?p(t[u]):Ks.lstat(u,g)}function g(m,v){if(m)return i(m);if(!v.isSymbolicLink())return s[u]=!0,t&&(t[u]=u),process.nextTick(d);if(!zs){var w=v.dev.toString(32)+":"+v.ino.toString(32);if(o.hasOwnProperty(w))return f(null,o[w],u)}Ks.stat(u,function(D){if(D)return i(D);Ks.readlink(u,function(S,L){zs||(o[w]=L),f(S,L)})})}function f(m,v,w){if(m)return i(m);var D=bl.resolve(c,v);t&&(t[w]=D),p(D)}function p(m){e=bl.resolve(m,e.slice(a)),h()}}});var rT=b((ZRe,c2)=>{c2.exports=Vs;Vs.realpath=Vs;Vs.sync=nT;Vs.realpathSync=nT;Vs.monkeypatch=Jme;Vs.unmonkeypatch=$me;var mc=require("fs"),tT=mc.realpath,iT=mc.realpathSync,Zme=process.version,a2=/^v[0-5]\./.test(Zme),l2=s2();function u2(n){return n&&n.syscall==="realpath"&&(n.code==="ELOOP"||n.code==="ENOMEM"||n.code==="ENAMETOOLONG")}function Vs(n,e,t){if(a2)return tT(n,e,t);typeof e=="function"&&(t=e,e=null),tT(n,e,function(i,r){u2(i)?l2.realpath(n,e,t):t(i,r)})}function nT(n,e){if(a2)return iT(n,e);try{return iT(n,e)}catch(t){if(u2(t))return l2.realpathSync(n,e);throw t}}function Jme(){mc.realpath=Vs,mc.realpathSync=nT}function $me(){mc.realpath=tT,mc.realpathSync=iT}});var h2=b((JRe,oT)=>{typeof Object.create=="function"?oT.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:oT.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}});var d2=b(($Re,aT)=>{try{if(sT=require("util"),typeof sT.inherits!="function")throw"";aT.exports=sT.inherits}catch{aT.exports=h2()}var sT});var ub=b((XRe,lb)=>{"use strict";function g2(n){return n.charAt(0)==="/"}function f2(n){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=e.exec(n),i=t[1]||"",r=Boolean(i&&i.charAt(1)!==":");return Boolean(t[2]||r)}lb.exports=process.platform==="win32"?f2:g2;lb.exports.posix=g2;lb.exports.win32=f2});var uT=b(ea=>{ea.setopts=zme;ea.ownProp=p2;ea.makeAbs=gg;ea.finish=Vme;ea.mark=ebe;ea.isIgnored=b2;ea.childrenIgnored=tbe;function p2(n,e){return Object.prototype.hasOwnProperty.call(n,e)}var Xme=require("fs"),bc=require("path"),Ume=Vn(),m2=ub(),lT=Ume.Minimatch;function Gme(n,e){return n.localeCompare(e,"en")}function Qme(n,e){n.ignore=e.ignore||[],Array.isArray(n.ignore)||(n.ignore=[n.ignore]),n.ignore.length&&(n.ignore=n.ignore.map(Kme))}function Kme(n){var e=null;if(n.slice(-3)==="/**"){var t=n.replace(/(\/\*\*)+$/,"");e=new lT(t,{dot:!0})}return{matcher:new lT(n,{dot:!0}),gmatcher:e}}function zme(n,e,t){if(t||(t={}),t.matchBase&&e.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}n.silent=!!t.silent,n.pattern=e,n.strict=t.strict!==!1,n.realpath=!!t.realpath,n.realpathCache=t.realpathCache||Object.create(null),n.follow=!!t.follow,n.dot=!!t.dot,n.mark=!!t.mark,n.nodir=!!t.nodir,n.nodir&&(n.mark=!0),n.sync=!!t.sync,n.nounique=!!t.nounique,n.nonull=!!t.nonull,n.nosort=!!t.nosort,n.nocase=!!t.nocase,n.stat=!!t.stat,n.noprocess=!!t.noprocess,n.absolute=!!t.absolute,n.fs=t.fs||Xme,n.maxLength=t.maxLength||1/0,n.cache=t.cache||Object.create(null),n.statCache=t.statCache||Object.create(null),n.symlinks=t.symlinks||Object.create(null),Qme(n,t),n.changedCwd=!1;var i=process.cwd();p2(t,"cwd")?(n.cwd=bc.resolve(t.cwd),n.changedCwd=n.cwd!==i):n.cwd=i,n.root=t.root||bc.resolve(n.cwd,"/"),n.root=bc.resolve(n.root),process.platform==="win32"&&(n.root=n.root.replace(/\\/g,"/")),n.cwdAbs=m2(n.cwd)?n.cwd:gg(n,n.cwd),process.platform==="win32"&&(n.cwdAbs=n.cwdAbs.replace(/\\/g,"/")),n.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,n.minimatch=new lT(e,t),n.options=n.minimatch.options}function Vme(n){for(var e=n.nounique,t=e?[]:Object.create(null),i=0,r=n.matches.length;i{D2.exports=w2;w2.GlobSync=ti;var ibe=rT(),y2=Vn(),GRe=y2.Minimatch,QRe=hb().Glob,KRe=require("util"),cT=require("path"),v2=require("assert"),cb=ub(),yl=uT(),nbe=yl.setopts,hT=yl.ownProp,rbe=yl.childrenIgnored,obe=yl.isIgnored;function w2(n,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob -See: https://github.com/isaacs/node-glob/issues/167`);return new ti(n,e).found}function ti(n,e){if(!n)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob -See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof ti))return new ti(n,e);if(nbe(this,n,e),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var i=0;ithis.maxLength)return!1;if(!this.stat&&hT(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!t||s==="DIR")return s;if(t&&s==="FILE")return!1}var i,r=this.statCache[e];if(!r){var o;try{o=this.fs.lstatSync(e)}catch(a){if(a&&(a.code==="ENOENT"||a.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(o&&o.isSymbolicLink())try{r=this.fs.statSync(e)}catch{r=o}else r=o}this.statCache[e]=r;var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,t&&s==="FILE"?!1:s};ti.prototype._mark=function(n){return yl.mark(this,n)};ti.prototype._makeAbs=function(n){return yl.makeAbs(this,n)}});var dT=b((VRe,S2)=>{S2.exports=x2;function x2(n,e){if(n&&e)return x2(n)(e);if(typeof n!="function")throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(i){t[i]=n[i]}),t;function t(){for(var i=new Array(arguments.length),r=0;r{var T2=dT();gT.exports=T2(db);gT.exports.strict=T2(k2);db.proto=db(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return db(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return k2(this)},configurable:!0})});function db(n){var e=function(){return e.called?e.value:(e.called=!0,e.value=n.apply(this,arguments))};return e.called=!1,e}function k2(n){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=n.apply(this,arguments)},t=n.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var P2=b((tLe,E2)=>{var sbe=dT(),fg=Object.create(null),abe=fT();E2.exports=sbe(lbe);function lbe(n,e){return fg[n]?(fg[n].push(e),null):(fg[n]=[e],ube(n))}function ube(n){return abe(function e(){var t=fg[n],i=t.length,r=cbe(arguments);try{for(var o=0;oi?(t.splice(0,i),process.nextTick(function(){e.apply(null,r)})):delete fg[n]}})}function cbe(n){for(var e=n.length,t=[],i=0;i{R2.exports=vl;var hbe=rT(),_2=Vn(),iLe=_2.Minimatch,dbe=d2(),gbe=require("events").EventEmitter,pT=require("path"),mT=require("assert"),pg=ub(),yT=C2(),wl=uT(),fbe=wl.setopts,bT=wl.ownProp,vT=P2(),nLe=require("util"),pbe=wl.childrenIgnored,mbe=wl.isIgnored,bbe=fT();function vl(n,e,t){if(typeof e=="function"&&(t=e,e={}),e||(e={}),e.sync){if(t)throw new TypeError("callback provided to sync glob");return yT(n,e)}return new Ge(n,e,t)}vl.sync=yT;var ybe=vl.GlobSync=yT.GlobSync;vl.glob=vl;function vbe(n,e){if(e===null||typeof e!="object")return n;for(var t=Object.keys(e),i=t.length;i--;)n[t[i]]=e[t[i]];return n}vl.hasMagic=function(n,e){var t=vbe({},e);t.noprocess=!0;var i=new Ge(n,t),r=i.minimatch.set;if(!n)return!1;if(r.length>1)return!0;for(var o=0;othis.maxLength)return e();if(!this.stat&&bT(this.cache,t)){var r=this.cache[t];if(Array.isArray(r)&&(r="DIR"),!i||r==="DIR")return e(null,r);if(i&&r==="FILE")return e()}var o,s=this.statCache[t];if(s!==void 0){if(s===!1)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&a==="FILE"?e():e(null,a,s)}var l=this,u=vT("stat\0"+t,c);u&&l.fs.lstat(t,u);function c(h,d){if(d&&d.isSymbolicLink())return l.fs.stat(t,function(g,f){g?l._stat2(n,t,null,d,e):l._stat2(n,t,g,f,e)});l._stat2(n,t,h,d,e)}};Ge.prototype._stat2=function(n,e,t,i,r){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return this.statCache[e]=!1,r();var o=n.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return r(null,!1,i);var s=!0;return i&&(s=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&s==="FILE"?r():r(null,s,i)}});async function qt(n){let e=null;try{e=await Fr.default.stat(n)}catch{}return e}async function j2(n){if(!n)return!1;let e=await qt(n);if(!e||!e.isFile())return!1;let t=null;try{let{stdout:r}=await CT.default.promisify(DT.exec)("git rev-parse --show-toplevel",{cwd:Gi.default.dirname(n)});t=r.trim()}catch{}if(!t)return!1;let i=Gi.default.relative(t,n);try{let{stdout:r}=await CT.default.promisify(DT.exec)(`git check-ignore ${i}`,{cwd:t});return r.trim()==i}catch{}return!1}function wT(n,e=[]){return!e||!e.length?!1:e.some(t=>(0,xT.default)(n,t,{dot:!0}))}function fb(n,e,t,i=!1,r=!0,o=[]){let s=mg(n);if(r&&t&&Oe(t,s,!0)&&!wT(t,o)&&gb(t,e))return t;let a=s.split(Gi.default.sep);if(i){for(;a.length>0;){let l=a.join(Gi.default.sep);if(!wT(l,o)&&gb(l,e))return l;a.pop()}return null}else{let l=[a.shift()];for(let u of a){l.push(u);let c=l.join(Gi.default.sep);if(!wT(c,o)&&gb(c,e))return c}return null}}async function A2(n,e,t=500){return new Promise((i,r)=>{let o=setTimeout(()=>{a.abort(),i(!1)},t),s=!1,a=(0,I2.default)(e,{nosort:!0,dot:!0,cwd:n,nodir:!0,absolute:!1},l=>{if(clearTimeout(o),l)return r(l);i(s)});a.on("match",()=>{clearTimeout(o),s=!0,a.abort(),i(!0)}),a.on("end",()=>{clearTimeout(o),i(s)})})}function gb(n,e){try{let t=Fr.default.readdirSync(n);for(let i of e)if(i.includes("*")?xT.default.match(t,i,{nobrace:!0,noext:!0,nocomment:!0,nonegate:!0,dot:!0}).length!==0:t.includes(i))return!0}catch{}return!1}function yc(n,e){let t=Gi.default.parse(e).root,i=Array.isArray(n)?n:[n];for(;e&&e!==t;){if(gb(e,i))for(let o of i){let s=Gi.default.join(e,o);if(Fr.default.existsSync(s))return s}e=Gi.default.dirname(e)}return null}function vc(n,e){return new Promise((t,i)=>{Fr.default.readFile(n,e,(r,o)=>{r&&i(r),t(o)})})}function O2(n){let e,t=0;return new Promise((i,r)=>{Fr.default.createReadStream(n).on("error",o=>r(o)).on("data",o=>{for(e=0;ei(t))})}function ta(n,e,t){if(!Fr.default.existsSync(n))return Promise.reject(new Error(`file does not exist: ${n}`));let i=[],r=Fr.default.createReadStream(n,{encoding:"utf8"}),o=ST.default.createInterface({input:r,crlfDelay:1/0,terminal:!1}),s=0;return new Promise((a,l)=>{o.on("line",u=>{s>=e&&s<=t&&i.push(u),s==t&&o.close(),s=s+1}),o.on("close",()=>{a(i),r.close()}),o.on("error",l)})}function M2(n,e){if(!Fr.default.existsSync(n))return Promise.reject(new Error(`file does not exist: ${n}`));let t=Fr.default.createReadStream(n,{encoding:"utf8"}),i=ST.default.createInterface({input:t,crlfDelay:1/0,terminal:!1}),r=0;return new Promise((o,s)=>{i.on("line",a=>{if(r==e){r==0&&a.startsWith("\uFEFF")&&(a=a.slice(1)),i.close(),t.close(),o(a);return}r=r+1}),i.on("error",s)})}function ii(n,e,t){return t=typeof t=="boolean"?t:Xi||oc,!n||!e?!1:t?n.toLowerCase()===e.toLowerCase():n===e}function L2(n,e){return Xi||oc?n.toLowerCase().startsWith(e.toLowerCase()):n.startsWith(e)}async function pb(n,e){await Fr.default.writeFile(n,e,{encoding:"utf8"})}function bg(n){return n.startsWith("file:")}function Oe(n,e,t=!1){let i=mg(Gi.default.resolve(Gi.default.normalize(n))),r=mg(Gi.default.resolve(Gi.default.normalize(e)));return i=="//"&&(i="/"),ii(i,r)?!!t:i.endsWith(Gi.default.sep)?L2(r,i):L2(r,i)&&r[i.length]==Gi.default.sep}function mg(n,e=F2.default.platform()){return e!="win32"||n[1]!=":"?n:n[0].toUpperCase()+n.slice(1)}var DT,Fr,xT,F2,Gi,ST,CT,I2,oLe,$e=_(()=>{"use strict";DT=require("child_process"),Fr=x(Rn()),xT=x(Vn()),F2=x(require("os")),Gi=x(require("path")),ST=x(require("readline")),CT=x(require("util")),I2=x(hb());sc();oLe=H()("util-fs")});function Pi(n,e){return ht(n.start,e)===0&&ht(n.end,e)===0}function N2(n,e){return n.line===e.line&&n.character===e.character}function B2(n,e){let{start:t,end:i}=n;if(t.line>i.line||t.line===i.line&&t.character>i.character){let r=t;t=i,i=r}return t=wc.Position.create(Math.max(0,t.line),Math.max(0,t.character)),i=wc.Position.create(Math.max(0,i.line),Math.max(0,i.character)),{start:t,end:i}}function mb(n,e){return Ce(n.end,e.start)==0||Ce(e.end,n.start)==0}function Dc(n,e){let{start:t,end:i}=n;return!(Ce(i,e.start)<=0||Ce(t,e.end)>=0)}function Dl(n,e){return!!(ht(n.start,e)==0||ht(n.end,e)==0||Pi(e,n))}function H2(n,e){let{line:t,character:i}=e,{start:r,end:o}=n,s=o.line==r.line?o.character+i:o.character;return wc.Range.create(r.line+t,i+r.character,o.line+t,s)}function q2(n,e){let{start:t,end:i}=e;return n>=t.line&&n<=i.line}function Tt(n){let{start:e,end:t}=n;return e.line==t.line&&e.character==t.character}function ht(n,e){let{start:t,end:i}=e;return Ce(n,t)<0?-1:Ce(n,i)>0?1:0}function Ce(n,e){return n.line>e.line||e.line==n.line&&n.character>e.character?1:e.line==n.line&&n.character==e.character?0:-1}function Y2(n){return n.start.line==n.end.line}function _i(n,e){let t=e.split(/\r?\n/),i=t.length,r=t[i-1],o=i==1?n.character+e.length:r.length;return wc.Position.create(n.line+i-1,o)}var wc,wt=_(()=>{"use strict";wc=x(q())});var aLe,bb,W2=_(()=>{"use strict";aLe=H()("outpubChannel"),bb=class{constructor(e,t,i){this.name=e;this.nvim=t;this.onDispose=i;this.lines=[""];this._disposed=!1;this.created=!1;if(!/^[\w\s-.]+$/.test(e))throw new Error(`Invalid channel name "${e}", only word characters and white space allowed.`)}get content(){return this.lines.join(` -`)}_append(e){let{nvim:t}=this,i=this.lines.length-1,r=e.split(/\r?\n/),o=this.lines[i]+r[0];this.lines[i]=o;let s=r.slice(1);this.lines=this.lines.concat(s),this.created&&(t.pauseNotification(),t.call("setbufline",[this.bufname,"$",o],!0),s.length&&t.call("appendbufline",[this.bufname,"$",s],!0),t.resumeNotification(!1,!0))}append(e){!this.validate()||this._append(e)}appendLine(e){!this.validate()||this._append(e+` -`)}clear(e){if(!this.validate())return;let{nvim:t}=this;this.lines=e?this.lines.slice(-e):[],this.created&&(t.pauseNotification(),t.call("deletebufline",[this.bufname,1,"$"],!0),this.lines.length&&t.call("appendbufline",[this.bufname,"$",this.lines],!0),t.resumeNotification(!0,!0))}hide(){this.created=!1,this.nvim.command(`exe 'silent! bd! '.fnameescape('${this.bufname}')`,!0)}get bufname(){return`output:///${this.name}`}show(e,t="vs"){let{nvim:i}=this;i.pauseNotification(),i.command(`exe '${t} '.fnameescape('${this.bufname}')`,!0),e&&i.command("wincmd p",!0),i.resumeNotification(!0,!0),this.created=!0}validate(){return!this._disposed}dispose(){this.onDispose&&this.onDispose(),this._disposed=!0,this.hide(),this.lines=[]}}});var hLe,Z2,Uo,yb=_(()=>{"use strict";ge();W2();hLe=H()("core-channels"),Z2=class{constructor(){this.outputChannels=new Map;this.bufnrs=new Map;this.disposable=P.on("BufUnload",e=>{let t=this.bufnrs.get(e);if(t){let i=this.outputChannels.get(t);i&&(i.created=!1)}})}getProvider(e){return{onDidChange:null,provideTextDocumentContent:async i=>{let r=this.get(i.path.slice(1));if(!r)return"";e.pauseNotification(),e.call("bufnr",["%"],!0),e.command("setlocal nospell nofoldenable nowrap noswapfile",!0),e.command("setlocal buftype=nofile bufhidden=hide",!0),e.command("setfiletype log",!0);let o=await e.resumeNotification();return this.bufnrs.set(o[0][0],r.name),r.created=!0,r.content}}}get names(){return Array.from(this.outputChannels.keys())}get(e){return this.outputChannels.get(e)}create(e,t){if(this.outputChannels.has(e))return this.outputChannels.get(e);let i=new bb(e,t,()=>{this.outputChannels.delete(e)});return this.outputChannels.set(e,i),i}show(e,t,i){let r=this.outputChannels.get(e);!r||r.show(i,t)}dispose(){this.disposable.dispose();for(let e of this.outputChannels.values())e.dispose();this.outputChannels.clear()}},Uo=new Z2});var gLe,vb,J2=_(()=>{"use strict";gLe=H()("model-terminal"),vb=class{constructor(e,t,i,r,o){this.cmd=e;this.args=t;this.nvim=i;this._name=r;this.strictEnv=o;this.pid=0}async start(e,t){let{nvim:i}=this,r=[this.cmd,...this.args],[o,s]=await i.call("coc#terminal#start",[r,e,t||{},!!this.strictEnv]);this.bufnr=o,this.pid=s}onExit(e){this.exitStatus={code:e===-1?void 0:e}}get name(){return this._name||this.cmd}get processId(){return Promise.resolve(this.pid)}sendText(e,t=!0){!this.bufnr||this.nvim.call("coc#terminal#send",[this.bufnr,e,t],!0)}async show(e){let{bufnr:t,nvim:i}=this;if(!t)return;let[r,o,s]=await i.eval(`[bufloaded(${t}),bufwinid(${t}),win_getid()]`);return r?(s==o||(i.pauseNotification(),o==-1?(i.command(`below ${t}sb`,!0),i.command("resize 8",!0),i.call("coc#util#do_autocmd",["CocTerminalOpen"],!0)):i.call("win_gotoid",[o],!0),i.command("normal! G",!0),e&&i.command("wincmd p",!0),await i.resumeNotification()),!0):!1}async hide(){let{bufnr:e,nvim:t}=this;!e||await t.eval(`coc#window#close(bufwinid(${e}))`)}dispose(){this.exitStatus||(this.exitStatus={code:void 0});let{bufnr:e,nvim:t}=this;!e||(this.bufnr=void 0,t.call("coc#terminal#close",[e],!0))}}});var TT,Cbe,wb,$2=_(()=>{"use strict";J2();TT=x(q());V();ge();Cbe=H()("core-terminals"),wb=class{constructor(){this._terminals=new Map;this.disposables=[];this._onDidOpenTerminal=new TT.Emitter;this._onDidCloseTerminal=new TT.Emitter;this.onDidCloseTerminal=this._onDidCloseTerminal.event;this.onDidOpenTerminal=this._onDidOpenTerminal.event;P.on("BufUnload",e=>{if(this._terminals.has(e)){Cbe.debug("terminal detach",e);let t=this._terminals.get(e);this._onDidCloseTerminal.fire(t),this._terminals.delete(e)}},null,this.disposables),P.on("TermExit",(e,t)=>{let i=this._terminals.get(e);i&&(i.onExit(t),i.dispose())},null,this.disposables)}get terminals(){return Array.from(this._terminals.values())}async createTerminal(e,t){let i=t.cwd,r=t.shellPath,o=t.shellArgs;r||(r=await e.getOption("shell")),i||(i=await e.call("getcwd"));let s=new vb(r,o||[],e,t.name,t.strictEnv);return await s.start(i,t.env),this._terminals.set(s.bufnr,s),this._onDidOpenTerminal.fire(s),s}reset(){for(let e of this._terminals.values())e.dispose();this._terminals.clear()}dispose(){this._onDidOpenTerminal.dispose(),this._onDidCloseTerminal.dispose(),J(this.disposables),this.reset()}}});async function Db(n){let[e,t]=await n.eval("[line('.')-1, strpart(getline('.'), 0, col('.') - 1)]");return Cc.Position.create(e,t.length)}async function Cb(n,e){return await n.callAsync("coc#dialog#prompt_confirm",[e])==1}async function X2(n,e,t){await n.call("coc#cursor#move_to",[e.line,e.character]),t&&n.command("redraw",!0)}async function U2(n){return await n.call("coc#cursor#char_offset")}async function G2(n){let[e,t]=await n.call("coc#cursor#screen_pos");return{row:e,col:t}}function Q2(n,e,t="MoreMsg",i=!1){n[i||xbe?"callTimer":"call"]("coc#ui#echo_messages",[t,("[coc.nvim] "+e).split(` -`)],!0)}async function K2(n,e){if(e==="line"){let i=await n.call("line",["."]);return Cc.Range.create(i-1,0,i,0)}if(e==="cursor"){let[i,r]=await n.eval("coc#cursor#position()");return Cc.Range.create(i,r,i,r)}let t=await n.call("coc#cursor#get_selection",[e==="char"?1:0]);return t?Cc.Range.create(t[0],t[1],t[2],t[3]):null}async function z2(n,e,t){let{start:i,end:r}=e,[o,s]=await n.eval(`[getline(${i.line+1}),getline(${r.line+1})]`),a=o.length>0?G(o.slice(0,i.character)):0,l,u,c=r.character==0;if(c){u=r.line==0?0:r.line-1;let h=await n.call("getline",[u+1]);l=G(h)}else u=r.line,l=s.length>0?G(s.slice(0,r.character)):0;n.pauseNotification(),n.command(`noa call cursor(${i.line+1},${a+1})`,!0),n.command("normal! v",!0),n.command(`noa call cursor(${u+1},${l})`,!0),c&&n.command("normal! $",!0),await n.resumeNotification(t)}var Cc,xbe,xb=_(()=>{"use strict";Cc=x(q());_e();xbe=process.env.VIM_NODE_RPC=="1"});var Sb,ET=_(()=>{Sb="0.0.82"});var yg,vg,Tb,kb,wg,Eb,Ir=_(()=>{"use strict";yg=(i=>(i[i.Buffer=0]="Buffer",i[i.LanguageServer=1]="LanguageServer",i[i.Global=2]="Global",i))(yg||{}),vg=(i=>(i[i.Native=0]="Native",i[i.Remote=1]="Remote",i[i.Service=2]="Service",i))(vg||{}),Tb=(i=>(i[i.More=0]="More",i[i.Warning=1]="Warning",i[i.Error=2]="Error",i))(Tb||{}),kb=(i=>(i[i.Global=0]="Global",i[i.User=1]="User",i[i.Workspace=2]="Workspace",i))(kb||{}),wg=(s=>(s[s.Initial=0]="Initial",s[s.Starting=1]="Starting",s[s.StartFailed=2]="StartFailed",s[s.Running=3]="Running",s[s.Stopping=4]="Stopping",s[s.Stopped=5]="Stopped",s))(wg||{}),Eb=(r=>(r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink",r))(Eb||{})});function PT(n,e){if(n.length<=1)return n;let t=n.length/2|0,i=n.slice(0,t),r=n.slice(t);PT(i,e),PT(r,e);let o=0,s=0,a=0;for(;ot.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function Tbe(n){let e=eY(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var xc,In,Sc=_(()=>{"use strict";xc=class{constructor(e,t,i,r){this._uri=e,this._languageId=t,this._version=i,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content}update(e,t){for(let i of e)if(xc.isIncremental(i)){let r=eY(i.range),o=this.offsetAt(r.start),s=this.offsetAt(r.end);this._content=this._content.substring(0,o)+i.text+this._content.substring(s,this._content.length);let a=Math.max(r.start.line,0),l=Math.max(r.end.line,0),u=this._lineOffsets,c=V2(i.text,!1,o);if(l-a===c.length)for(let d=0,g=c.length;de?r=s:i=s+1}let o=i-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1{let d=c.range.start.line-h.range.start.line;return d===0?c.range.start.character-h.range.start.character:d}),l=0,u=[];for(let c of a){let h=r.offsetAt(c.range.start);if(hl&&u.push(s.substring(l,h)),c.newText.length&&u.push(c.newText),l=r.offsetAt(c.range.end)}return u.push(s.substr(l)),u.join("")}n.applyEdits=i})(In||(In={}))});function Cg(n,e){e===void 0&&(e=!1);var t=n.length,i=0,r="",o=0,s=16,a=0,l=0,u=0,c=0,h=0;function d(D,S){for(var L=0,j=0;L=48&&I<=57)j=j*16+I-48;else if(I>=65&&I<=70)j=j*16+I-65+10;else if(I>=97&&I<=102)j=j*16+I-97+10;else break;i++,L++}return L=t){D+=n.substring(S,i),h=2;break}var L=n.charCodeAt(i);if(L===34){D+=n.substring(S,i),i++;break}if(L===92){if(D+=n.substring(S,i),i++,i>=t){h=2;break}var j=n.charCodeAt(i++);switch(j){case 34:D+='"';break;case 92:D+="\\";break;case 47:D+="/";break;case 98:D+="\b";break;case 102:D+="\f";break;case 110:D+=` -`;break;case 114:D+="\r";break;case 116:D+=" ";break;case 117:var I=d(4,!0);I>=0?D+=String.fromCharCode(I):h=4;break;default:h=5}S=i;continue}if(L>=0&&L<=31)if(Dg(L)){D+=n.substring(S,i),h=2;break}else h=6;i++}return D}function m(){if(r="",h=0,o=i,l=a,c=u,i>=t)return o=t,s=17;var D=n.charCodeAt(i);if(_T(D)){do i++,r+=String.fromCharCode(D),D=n.charCodeAt(i);while(_T(D));return s=15}if(Dg(D))return i++,r+=String.fromCharCode(D),D===13&&n.charCodeAt(i)===10&&(i++,r+=` -`),a++,u=i,s=14;switch(D){case 123:return i++,s=1;case 125:return i++,s=2;case 91:return i++,s=3;case 93:return i++,s=4;case 58:return i++,s=6;case 44:return i++,s=5;case 34:return i++,r=p(),s=10;case 47:var S=i-1;if(n.charCodeAt(i+1)===47){for(i+=2;i=12&&D<=15);return D}return{setPosition:g,getPosition:function(){return i},scan:e?w:m,getToken:function(){return s},getTokenValue:function(){return r},getTokenOffset:function(){return o},getTokenLength:function(){return i-o},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return o-c},getTokenError:function(){return h}}}function _T(n){return n===32||n===9||n===11||n===12||n===160||n===5760||n>=8192&&n<=8203||n===8239||n===8287||n===12288||n===65279}function Dg(n){return n===10||n===13||n===8232||n===8233}function Tc(n){return n>=48&&n<=57}var Pb=_(()=>{"use strict"});function LT(n,e,t){var i,r,o,s,a;if(e){for(s=e.offset,a=s+e.length,o=s;o>0&&!xg(n,o-1);)o--;for(var l=a;ls)&&n.substring(Z,z)!==N&&v.push({offset:Z,length:z-Z,content:N})}var D=m();if(D!==17){var S=g.getTokenOffset()+o,L=RT(d,i);w(L,o,S)}for(;D!==17;){for(var j=g.getTokenOffset()+g.getTokenLength()+o,I=m(),W="",A=!1;!c&&(I===12||I===13);){var M=g.getTokenOffset()+o;w(" ",j,M),j=g.getTokenOffset()+g.getTokenLength()+o,A=I===12,W=A?p():"",I=m()}if(I===2)D!==1&&(h--,W=p());else if(I===4)D!==3&&(h--,W=p());else{switch(D){case 3:case 1:h++,W=p();break;case 5:case 12:W=p();break;case 13:c?W=p():A||(W=" ");break;case 6:A||(W=" ");break;case 10:if(I===6){A||(W="");break}case 7:case 8:case 9:case 11:case 2:case 4:I===12||I===13?A||(W=" "):I!==5&&I!==17&&(f=!0);break;case 16:f=!0;break}c&&(I===12||I===13)&&(W=p())}I===17&&(W=t.insertFinalNewline?u:"");var F=g.getTokenOffset()+o;w(W,j,F),D=I}return v}function RT(n,e){for(var t="",i=0;i{"use strict";Pb()});function tY(n,e,t){e===void 0&&(e=[]),t===void 0&&(t=Sg.DEFAULT);var i=null,r=[],o=[];function s(l){Array.isArray(r)?r.push(l):i!==null&&(r[i]=l)}var a={onObjectBegin:function(){var l={};s(l),o.push(r),r=l,i=null},onObjectProperty:function(l){i=l},onObjectEnd:function(){r=o.pop()},onArrayBegin:function(){var l=[];s(l),o.push(r),r=l,i=null},onArrayEnd:function(){r=o.pop()},onLiteralValue:s,onError:function(l,u,c){e.push({error:l,offset:u,length:c})}};return jT(n,a,t),r[0]}function IT(n,e,t){e===void 0&&(e=[]),t===void 0&&(t=Sg.DEFAULT);var i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function r(l){i.type==="property"&&(i.length=l-i.offset,i=i.parent)}function o(l){return i.children.push(l),l}var s={onObjectBegin:function(l){i=o({type:"object",offset:l,length:-1,parent:i,children:[]})},onObjectProperty:function(l,u,c){i=o({type:"property",offset:u,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:l,offset:u,length:c,parent:i})},onObjectEnd:function(l,u){r(l+u),i.length=l+u-i.offset,i=i.parent,r(l+u)},onArrayBegin:function(l,u){i=o({type:"array",offset:l,length:-1,parent:i,children:[]})},onArrayEnd:function(l,u){i.length=l+u-i.offset,i=i.parent,r(l+u)},onLiteralValue:function(l,u,c){o({type:Rbe(l),offset:u,length:c,parent:i,value:l}),r(u+c)},onSeparator:function(l,u,c){i.type==="property"&&(l===":"?i.colonOffset=u:l===","&&r(u))},onError:function(l,u,c){e.push({error:l,offset:u,length:c})}};jT(n,s,t);var a=i.children[0];return a&&delete a.parent,a}function _b(n,e){if(!!n){for(var t=n,i=0,r=e;i=t.children.length)return;t=t.children[c]}}return t}}function jT(n,e,t){t===void 0&&(t=Sg.DEFAULT);var i=Cg(n,!1);function r(A){return A?function(){return A(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function o(A){return A?function(M){return A(M,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var s=r(e.onObjectBegin),a=o(e.onObjectProperty),l=r(e.onObjectEnd),u=r(e.onArrayBegin),c=r(e.onArrayEnd),h=o(e.onLiteralValue),d=o(e.onSeparator),g=r(e.onComment),f=o(e.onError),p=t&&t.disallowComments,m=t&&t.allowTrailingComma;function v(){for(;;){var A=i.scan();switch(i.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:p||w(11);break;case 2:w(12);break;case 6:w(16);break}switch(A){case 12:case 13:p?w(10):g();break;case 16:w(1);break;case 15:case 14:break;default:return A}}}function w(A,M,F){if(M===void 0&&(M=[]),F===void 0&&(F=[]),f(A),M.length+F.length>0)for(var N=i.getToken();N!==17;){if(M.indexOf(N)!==-1){v();break}else if(F.indexOf(N)!==-1)break;N=v()}}function D(A){var M=i.getTokenValue();return A?h(M):a(M),v(),!0}function S(){switch(i.getToken()){case 11:var A=i.getTokenValue(),M=Number(A);isNaN(M)&&(w(2),M=0),h(M);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return v(),!0}function L(){return i.getToken()!==10?(w(3,[],[2,5]),!1):(D(!1),i.getToken()===6?(d(":"),v(),W()||w(4,[],[2,5])):w(5,[],[2,5]),!0)}function j(){s(),v();for(var A=!1;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(A||w(4,[],[]),d(","),v(),i.getToken()===2&&m)break}else A&&w(6,[],[]);L()||w(4,[],[2,5]),A=!0}return l(),i.getToken()!==2?w(7,[2],[]):v(),!0}function I(){u(),v();for(var A=!1;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(A||w(4,[],[]),d(","),v(),i.getToken()===4&&m)break}else A&&w(6,[],[]);W()||w(4,[],[4,5]),A=!0}return c(),i.getToken()!==4?w(8,[4],[]):v(),!0}function W(){switch(i.getToken()){case 3:return I();case 1:return j();case 10:return D(!0);default:return S()}}return v(),i.getToken()===17?t.allowEmptyContent?!0:(w(4,[],[]),!1):W()?(i.getToken()!==17&&w(9,[],[]),!0):(w(4,[],[]),!1)}function Rbe(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(n){if(Array.isArray(n))return"array"}else return"null";return"object"}default:return"null"}}var Sg,AT=_(()=>{"use strict";Pb();(function(n){n.DEFAULT={allowTrailingComma:!1}})(Sg||(Sg={}))});function iY(n,e,t,i){for(var r,o=e.slice(),s=[],a=IT(n,s),l=void 0,u=void 0;o.length>0&&(u=o.pop(),l=_b(a,o),l===void 0&&t!==void 0);)typeof u=="string"?t=(r={},r[u]=t,r):t=[t];if(l)if(l.type==="object"&&typeof u=="string"&&Array.isArray(l.children)){var c=_b(l,[u]);if(c!==void 0)if(t===void 0){if(!c.parent)throw new Error("Malformed AST");var h=l.children.indexOf(c.parent),d=void 0,g=c.parent.offset+c.parent.length;if(h>0){var f=l.children[h-1];d=f.offset+f.length}else if(d=l.offset+1,l.children.length>1){var p=l.children[1];g=p.offset}return Cl(n,{offset:d,length:g-d,content:""},i)}else return Cl(n,{offset:c.offset,length:c.length,content:JSON.stringify(t)},i);else{if(t===void 0)return[];var m=JSON.stringify(u)+": "+JSON.stringify(t),v=i.getInsertionIndex?i.getInsertionIndex(l.children.map(function(A){return A.children[0].value})):l.children.length,w=void 0;if(v>0){var f=l.children[v-1];w={offset:f.offset+f.length,length:0,content:","+m}}else l.children.length===0?w={offset:l.offset+1,length:0,content:m}:w={offset:l.offset+1,length:0,content:m+","};return Cl(n,w,i)}}else if(l.type==="array"&&typeof u=="number"&&Array.isArray(l.children)){var D=u;if(D===-1){var m=""+JSON.stringify(t),w=void 0;if(l.children.length===0)w={offset:l.offset+1,length:0,content:m};else{var f=l.children[l.children.length-1];w={offset:f.offset+f.length,length:0,content:","+m}}return Cl(n,w,i)}else if(t===void 0&&l.children.length>=0){var S=u,L=l.children[S],w=void 0;if(l.children.length===1)w={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===S){var f=l.children[S-1],j=f.offset+f.length,I=l.offset+l.length;w={offset:j,length:I-2-j,content:""}}else w={offset:L.offset,length:l.children[S+1].offset-L.offset,content:""};return Cl(n,w,i)}else if(t!==void 0){var w=void 0,m=""+JSON.stringify(t);if(!i.isArrayInsertion&&l.children.length>u){var W=l.children[u];w={offset:W.offset,length:W.length,content:m}}else if(l.children.length===0||u===0)w={offset:l.offset+1,length:0,content:l.children.length===0?m:m+","};else{var v=u>l.children.length?l.children.length:u,f=l.children[v-1];w={offset:f.offset+f.length,length:0,content:","+m}}return Cl(n,w,i)}else throw new Error("Can not "+(t===void 0?"remove":i.isArrayInsertion?"insert":"modify")+" Array index "+D+" as length is not sufficient")}else throw new Error("Can not add "+(typeof u!="number"?"index":"property")+" to parent of type "+l.type);else{if(t===void 0)throw new Error("Can not delete in empty document");return Cl(n,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(t)},i)}}function Cl(n,e,t){if(!t.formattingOptions)return[e];var i=Rb(n,e),r=e.offset,o=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;r>0&&!xg(i,r-1);)r--;for(;o=0;a--){var l=s[a];i=Rb(i,l),r=Math.min(r,l.offset),o=Math.max(o,l.offset+l.length),o+=l.content.length-l.length}var u=n.length-(i.length-o)-r;return[{offset:r,length:u,content:i.substring(r,o)}]}function Rb(n,e){return n.substring(0,e.offset)+e.content+n.substring(e.offset+e.length)}var nY=_(()=>{"use strict";FT();AT()});function rY(n,e,t,i){return iY(n,e,t,i)}function oY(n,e){for(var t=e.length-1;t>=0;t--)n=Rb(n,e[t]);return n}var kc,Tg=_(()=>{"use strict";FT();nY();Pb();AT();kc=tY});function aY(n){let e={};for(let t of Object.keys(n))if(t.indexOf(".")==-1)e[t]=n[t];else{let i=t.split("."),r=e,o=i.length;for(let s=0;s"u"?t:o}function MT(){let n=Ib.default.join(jbe,"data/schema.json"),e=Lb.default.readFileSync(n,"utf8"),{properties:t}=JSON.parse(e),i={};return Object.keys(t).forEach(r=>{let o=t[r].default;o!==void 0&&kg(i,r,o,s=>{Ibe.error(s)})}),{contents:i}}function OT(n,e){let t=[];for(let i of Object.keys(n)){let r=n[i],o=e?`${e}.${i}`:i;t.push(o),Lt(r)&&t.push(...OT(r,o))}return t}function hY(n,e){let t=[],i=OT(n),r=OT(e),o=r.filter(a=>!i.includes(a)),s=i.filter(a=>!r.includes(a));t.push(...o),t.push(...s);for(let a of i){if(!r.includes(a))continue;let l=Fb(n,a),u=Fb(e,a);Me(l,u)||t.push(a)}return t}var sY,Lb,Ib,Ibe,jbe,jb=_(()=>{"use strict";sY=x(q());Sc();Tg();Kn();Vt();Lb=x(require("fs"));De();Ib=x(require("path")),Ibe=H()("configuration-util"),jbe=(0,Ib.dirname)(__dirname)});var dn,NT=_(()=>{"use strict";Kn();Vt();jb();dn=class{constructor(e={}){this._contents=e}get contents(){return this._contents}clone(){return new dn(_r(this._contents))}getValue(e){return e?Fb(this.contents,e):this.contents}merge(...e){let t=_r(this.contents);for(let i of e)this.mergeContents(t,i.contents);return new dn(t)}freeze(){return Object.isFrozen(this._contents)||Object.freeze(this._contents),this}mergeContents(e,t){for(let i of Object.keys(t)){if(i in e&&Lt(e[i])&&Lt(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=_r(t[i])}}setValue(e,t){kg(this.contents,e,t,i=>{console.error(i)})}removeValue(e){uY(this.contents,e)}}});var Ab,dY=_(()=>{"use strict";NT();Ab=class{constructor(e,t,i,r=new dn){this._defaultConfiguration=e;this._userConfiguration=t;this._workspaceConfiguration=i;this._memoryConfiguration=r}getConsolidateConfiguration(){return this._consolidateConfiguration||(this._consolidateConfiguration=this._defaultConfiguration.merge(this._userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._consolidateConfiguration=this._consolidateConfiguration.freeze()),this._consolidateConfiguration}getValue(e){return this.getConsolidateConfiguration().getValue(e)}inspect(e){let t=this.getConsolidateConfiguration(),{_workspaceConfiguration:i,_memoryConfiguration:r}=this;return{default:this._defaultConfiguration.freeze().getValue(e),user:this._userConfiguration.freeze().getValue(e),workspace:i.freeze().getValue(e),memory:r.freeze().getValue(e),value:t.getValue(e)}}get defaults(){return this._defaultConfiguration}get user(){return this._userConfiguration}get workspace(){return this._workspaceConfiguration}toData(){return{defaults:{contents:this._defaultConfiguration.contents},user:{contents:this._userConfiguration.contents},workspace:{contents:this._workspaceConfiguration.contents}}}}});function BT(n,e){if(e){if(n&&n.hasOwnProperty(e))return n[e];let t=e.split("."),i=n;for(let r=0;i&&r{"use strict";HT=x(require("fs")),gY=x(require("os")),ro=x(require("path")),qT=x(q());De();Ir();V();$e();Kn();Vt();dY();NT();jb();Ec=H()("configurations");Go=class{constructor(e,t){this.userConfigFile=e;this._proxy=t;this.cwd=process.cwd();this._errorItems=[];this._folderConfigurations=new Map;this._onError=new qT.Emitter;this._onChange=new qT.Emitter;this.disposables=[];this.onError=this._onError.event;this.onDidChange=this._onChange.event;let i=this.parseContentFromFile(e),r={defaults:MT(),user:i,workspace:{contents:{}}};this._configuration=Go.parse(r),this.watchFile(e,1),this.addFolderFromCwd()}parseContentFromFile(e){if(!e)return{contents:{}};let t=B.file(e).toString();this._errorItems=this._errorItems.filter(r=>r.location.uri!=t);let i=lY(e,r=>{this._errorItems.push(...r)});return this._onError.fire(this._errorItems),i}get errorItems(){return this._errorItems}get foldConfigurations(){return this._folderConfigurations}extendsDefaults(e){let{defaults:t}=this._configuration,{contents:i}=t;i=_r(i),Object.keys(e).forEach(o=>{kg(i,o,e[o],s=>{Ec.error(s)})});let r={defaults:{contents:i},user:this._configuration.user,workspace:this._configuration.workspace};this._configuration=Go.parse(r)}updateUserConfig(e){if(!e||Object.keys(e).length==0)return;let{user:t}=this._configuration,i=t.clone();Object.keys(e).forEach(r=>{let o=e[r];if(o===void 0)i.removeValue(r);else if(Lt(o))for(let s of Object.keys(o))i.setValue(`${r}.${s}`,o[s]);else i.setValue(r,o)}),this.changeConfiguration(1,i,void 0)}get defaults(){return this._configuration.defaults}get user(){return this._configuration.user}get workspace(){return this._configuration.workspace}addFolderFile(e,t=!0,i=!1){if(!HT.default.existsSync(e)||ii(this.userConfigFile,e)||ii(e,ro.default.join(gY.default.homedir(),`.vim/${Pr}`)))return!1;this._folderConfigurations.has(e)||this.watchFile(e,2);let r=this.updateFolderConfiguration(e);return Ec.info(`Add folder configuration from ${i?"cwd":"file"}:`,e),t&&this.workspaceConfigFile!==e&&(this.workspaceConfigFile=e,Ec.info(`Change folder configuration from ${i?"cwd":"file"} to:`,e),this.changeConfiguration(2,r,e)),!0}addFolderFromCwd(){let e=ro.default.join(this.cwd,`.vim/${Pr}`);this.addFolderFile(e,!0,!0)}watchFile(e,t){if(!HT.default.existsSync(e)||global.__TEST__)return;let i=t===2,r=ac(e,()=>{let o=this.parseContentFromFile(e);i?(this._folderConfigurations.set(e,new dn(o.contents)),ii(this.workspaceConfigFile,e)&&this.changeConfiguration(t,o,e)):this.changeConfiguration(t,o,e)});this.disposables.push(r)}updateFolderConfiguration(e){let t=this.parseContentFromFile(e);return this._folderConfigurations.set(e,new dn(t.contents)),t}changeConfiguration(e,t,i){let{defaults:r,user:o,workspace:s}=this._configuration,a={defaults:e==0?t:r,user:e==1?t:o,workspace:e==2?t:s},l=Go.parse(a),u=hY(this._configuration.getValue(),l.getValue());u.length!=0&&(this._configuration=l,this._onChange.fire({affectsConfiguration:(c,h)=>{if(!h||!h.startsWith("file:")||e!=2)return u.includes(c);let g=B.parse(h).fsPath;return i&&!Oe(ro.default.resolve(i,"../.."),g)?!1:u.includes(c)}}))}getFolderConfigFile(e){let{folders:t}=this,i=t.find(r=>Oe(r,e,!0));return i?ro.default.join(i,`.vim/${Pr}`):void 0}getConfigFile(e){return e==0?null:e==1?this.userConfigFile:this.workspaceConfigFile}get folders(){let e=[],{_folderConfigurations:t}=this;for(let i of t.keys())e.push(ro.default.resolve(i,"../.."));return e}get configuration(){return this._configuration}getWorkspaceConfigUri(e){let t;return e||(t=this.workspaceConfigFile?B.file(this.workspaceConfigFile):void 0),!t&&this._proxy&&typeof this._proxy.getWorkspaceConfig=="function"&&(t=this._proxy.getWorkspaceConfig(e),t&&ii(this.userConfigFile,t.fsPath)&&(t=void 0)),t}getConfiguration(e,t){let i,r;if(t){let{defaults:a,user:l}=this._configuration,[u,c]=this.getFolderConfiguration(t);r=u,i=new Ab(a,l,c)}else r=this.workspaceConfigFile?B.file(this.workspaceConfigFile):void 0,i=this._configuration;let o=Object.freeze(BT(i.getValue(null),e)),s={has(a){return typeof BT(o,a)<"u"},get:(a,l)=>{let u=BT(o,a);return u==null?l:u},update:(a,l,u=!1)=>{let c=e?`${e}.${a}`:a,h=u?1:2,d=h==1?this.user.clone():this.workspace.clone();if(l===void 0?d.removeValue(c):d.setValue(c,l),r||(r=this.getWorkspaceConfigUri(t)),r&&!ii(this.workspaceConfigFile,r.fsPath)&&(Ec.info(`Change folder configuration ${t?"by "+t:""} to:`,r.fsPath),this.workspaceConfigFile=r.fsPath),this.changeConfiguration(h,d,h==2?this.workspaceConfigFile:this.userConfigFile),!u&&!r){global.__TEST__||console.error(`Unable to locate workspace configuration ${t?"for "+t:""}, workspace folder not resolved.`),Ec.error("Unable to locate workspace configuration",t);return}let g=u?B.parse(this.userConfigFile):r;this._proxy&&!global.__TEST__&&(l===void 0?this._proxy.$removeConfigurationOption(h,c,{resource:g}):this._proxy.$updateConfigurationOption(h,c,l,{resource:g})),!u&&r&&this.addFolderFile(r.fsPath,!1)},inspect:a=>{a=e?`${e}.${a}`:a;let l=this._configuration.inspect(a);return{key:a,defaultValue:l.default,globalValue:l.user,workspaceValue:l.workspace}}};return Object.defineProperty(s,"has",{enumerable:!1}),Object.defineProperty(s,"get",{enumerable:!1}),Object.defineProperty(s,"update",{enumerable:!1}),Object.defineProperty(s,"inspect",{enumerable:!1}),typeof o=="object"&&j0(s,o,!1),bH(s)}getFolderConfiguration(e){let t=B.parse(e),i;t.scheme!="file"?i=this.cwd:i=t.fsPath;for(let[r,o]of this.foldConfigurations){let s=ro.default.resolve(r,"../..");if(Oe(s,i,!0))return[B.file(r),o]}return[void 0,new dn]}resolveFolderConfigution(e){let t=B.parse(e);if(t.scheme!="file")return;let i=ro.default.dirname(t.fsPath),r=this.getFolderConfigFile(i);if(r)return r;let o=yc(".vim",i);if(!o)return;let s=ro.default.join(o,Pr);if(!!this.addFolderFile(s,!1))return s}setFolderConfiguration(e){let t=B.parse(e);if(t.scheme!="file")return;let i=t.fsPath;for(let[r,o]of this.foldConfigurations){let s=ro.default.resolve(r,"../..");if(Oe(s,i,!0)){this.workspaceConfigFile!=r&&(this.workspaceConfigFile=r,Ec.info("Change folder configuration to:",r),this.changeConfiguration(2,o,r));break}}}static parse(e){let t=new dn(e.defaults.contents),i=new dn(e.user.contents),r=new dn(e.workspace.contents);return new Ab(t,i,r,new dn)}reset(){this._errorItems=[],this._folderConfigurations.clear();let e=this.parseContentFromFile(this.userConfigFile),t={defaults:MT(),user:e,workspace:{contents:{}}};this._configuration=Go.parse(t),this._onChange.fire({affectsConfiguration:()=>!0})}dispose(){this._folderConfigurations.clear(),this._onError.dispose(),this._onChange.dispose(),J(this.disposables)}}});var Eg,pY,YT,Mbe,Ob,mY=_(()=>{"use strict";Eg=x(require("fs"));Tg();pY=x(require("os")),YT=x(require("path"));De();V();$e();Mbe=H()("configuration-shape"),Ob=class{constructor(e){this.resolver=e}modifyConfiguration(e,t,i){if(!e||e.scheme!=="file")return;Mbe.info("modify configuration file:",e.fsPath);let r=e.fsPath,o=YT.default.dirname(r),s={tabSize:2,insertSpaces:!0};Eg.default.existsSync(o)||Eg.default.mkdirSync(o,{recursive:!0});let a=Eg.default.readFileSync(r,{encoding:"utf8",flag:"a+"});a=a||"{}";let l=rY(a,[t],i,{formattingOptions:s});a=oY(a,l),Eg.default.writeFileSync(r,a,"utf8")}getWorkspaceConfig(e){let t;if(e){if(typeof this.resolver.getWorkspaceFolder=="function"){let i=this.resolver.getWorkspaceFolder(e);i&&(t=B.parse(i.uri).fsPath)}}else t=this.resolver.root;if(t&&!ii(t,pY.default.homedir()))return B.file(YT.default.join(t,".vim",Pr))}$updateConfigurationOption(e,t,i,r){this.modifyConfiguration(r==null?void 0:r.resource,t,i)}$removeConfigurationOption(e,t,i){this.modifyConfiguration(i==null?void 0:i.resource,t)}}});var WT,bY,ZT,yY,Nbe,Mb,vY=_(()=>{"use strict";WT=x(Rn()),bY=x(require("os")),ZT=x(require("path")),yY=x(q());V();Nbe=H()("core-autocmds"),Mb=class{constructor(e,t){this.contentProvider=e;this.watchers=t;this._dynAutocmd=!1;this.autocmdMaxId=0;this.autocmds=new Map;this.disposables=[];this.contentProvider.onDidProviderChange(()=>{this.setupDynamicAutocmd()},null,this.disposables),this.watchers.onDidOptionChange(()=>{this.setupDynamicAutocmd()},null,this.disposables)}attach(e,t){this.nvim=e,this.env=t}async doAutocmd(e,t){let i=this.autocmds.get(e);if(i){let r=Array.isArray(i.event)?i.event.join(","):i.event;Nbe.debug(`invoke ${i.request?"request":"notify"} autocmd:`,r),await Promise.resolve(i.callback.apply(i.thisArg,t))}}registerAutocmd(e){this.autocmdMaxId+=1;let t=this.autocmdMaxId;return this.autocmds.set(t,e),this.setupDynamicAutocmd(),yY.Disposable.create(()=>{this.autocmds.delete(t),this.setupDynamicAutocmd()})}setupDynamicAutocmd(e=!1){if(!e&&!this._dynAutocmd)return;this._dynAutocmd=!0;let t=this.contentProvider.schemes,i=[];for(let o of t)i.push(`autocmd BufReadCmd,FileReadCmd,SourceCmd ${o}:/* call coc#rpc#request('CocAutocmd', ['BufReadCmd','${o}', expand('')])`);for(let[o,s]of this.autocmds.entries()){let a=s.arglist&&s.arglist.length?", "+s.arglist.join(", "):"",l=Array.isArray(s.event)?s.event.join(","):s.event,u=s.pattern!=null?s.pattern:"*";/\buser\b/i.test(l)&&(u=""),i.push(`autocmd ${l} ${u} call coc#rpc#${s.request?"request":"notify"}('doAutocmd', [${o}${a}])`)}for(let o of this.watchers.options)i.push(`autocmd OptionSet ${o} call coc#rpc#notify('OptionSet',[expand(''), v:option_old, v:option_new])`);let r=` -augroup coc_dynamic_autocmd - autocmd! - ${i.join(` - `)} -augroup end`;if(this.nvim.hasFunction("nvim_exec"))this.nvim.exec(r,!1);else{let o=ZT.default.join(process.env.TMPDIR||bY.default.tmpdir(),`coc.nvim-${process.pid}.vim`);WT.default.mkdirSync(o,{recursive:!0});let s=ZT.default.join(o,`coc-${process.pid}.vim`);WT.default.writeFileSync(s,r,"utf8");let a=`source ${s}`;this.env.isCygwin&&Jo.isWindows&&(a=`execute "source" . substitute(system('cygpath ${s.replace(/\\/g,"/")}'), '\\n', '', 'g')`),this.nvim.command(a)}}dispose(){this.nvim.command("augroup coc_dynamic_autocmd| autocmd!|augroup end",!0),J(this.disposables)}}});var xl,Nb,wY=_(()=>{"use strict";xl=x(q());De();ge();V();Nb=class{constructor(e){this.documents=e;this.disposables=[];this.providers=new Map;this._onDidProviderChange=new xl.Emitter;this.onDidProviderChange=this._onDidProviderChange.event}attach(e){this.nvim=e,P.on("BufReadCmd",this.onBufReadCmd,this,this.disposables)}get schemes(){return Array.from(this.providers.keys())}async onBufReadCmd(e,t){let i=this.providers.get(e);if(!i)return;let r=new xl.CancellationTokenSource,o=await Promise.resolve(i.provideTextDocumentContent(B.parse(t),r.token)),s=await this.nvim.buffer;await s.setLines(o.split(/\r?\n/),{start:0,end:-1,strictIndexing:!1}),process.nextTick(()=>{P.fire("BufCreate",[s.id])})}registerTextDocumentContentProvider(e,t){this.providers.set(e,t),this._onDidProviderChange.fire();let i=[];return t.onDidChange&&t.onDidChange(async r=>{let{buffer:o}=this.documents.getDocument(r.toString()),s=new xl.CancellationTokenSource,a=await Promise.resolve(t.provideTextDocumentContent(r,s.token));await o.setLines(a.split(/\r?\n/),{start:0,end:-1,strictIndexing:!1})},null,i),xl.Disposable.create(()=>{this.providers.delete(e),J(i),this._onDidProviderChange.fire()})}dispose(){J(this.disposables),this._onDidProviderChange.dispose(),this.providers.clear()}}});var xY=b((PFe,Bb)=>{"use strict";Bb.exports=Ybe;Bb.exports.format=DY;Bb.exports.parse=CY;var Bbe=/\B(?=(\d{3})+(?!\d))/g,Hbe=/(?:\.0*|(\.[^0]+)0+)$/,ia={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)},qbe=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function Ybe(n,e){return typeof n=="string"?CY(n):typeof n=="number"?DY(n,e):null}function DY(n,e){if(!Number.isFinite(n))return null;var t=Math.abs(n),i=e&&e.thousandsSeparator||"",r=e&&e.unitSeparator||"",o=e&&e.decimalPlaces!==void 0?e.decimalPlaces:2,s=Boolean(e&&e.fixedDecimals),a=e&&e.unit||"";(!a||!ia[a.toLowerCase()])&&(t>=ia.pb?a="PB":t>=ia.tb?a="TB":t>=ia.gb?a="GB":t>=ia.mb?a="MB":t>=ia.kb?a="KB":a="B");var l=n/ia[a.toLowerCase()],u=l.toFixed(o);return s||(u=u.replace(Hbe,"$1")),i&&(u=u.replace(Bbe,i)),u+r+a}function CY(n){if(typeof n=="number"&&!isNaN(n))return n;if(typeof n!="string")return null;var e=qbe.exec(n),t,i="b";return e?(t=parseFloat(e[1]),i=e[4].toLowerCase()):(t=parseInt(n,10),i="b"),Math.floor(ia[i]*t)}});var _g=b((_Fe,RY)=>{var oo=-1,jr=1,gn=0;function Pg(n,e,t,i){if(n===e)return n?[[gn,n]]:[];if(t!=null){var r=Xbe(n,e,t);if(r)return r}var o=$T(n,e),s=n.substring(0,o);n=n.substring(o),e=e.substring(o),o=XT(n,e);var a=n.substring(n.length-o);n=n.substring(0,n.length-o),e=e.substring(0,e.length-o);var l=Wbe(n,e);return s&&l.unshift([gn,s]),a&&l.push([gn,a]),TY(l,i),l}function Wbe(n,e){var t;if(!n)return[[jr,e]];if(!e)return[[oo,n]];var i=n.length>e.length?n:e,r=n.length>e.length?e:n,o=i.indexOf(r);if(o!==-1)return t=[[jr,i.substring(0,o)],[gn,r],[jr,i.substring(o+r.length)]],n.length>e.length&&(t[0][0]=t[2][0]=oo),t;if(r.length===1)return[[oo,n],[jr,e]];var s=Jbe(n,e);if(s){var a=s[0],l=s[1],u=s[2],c=s[3],h=s[4],d=Pg(a,u),g=Pg(l,c);return d.concat([[gn,h]],g)}return Zbe(n,e)}function Zbe(n,e){for(var t=n.length,i=e.length,r=Math.ceil((t+i)/2),o=r,s=2*r,a=new Array(s),l=new Array(s),u=0;ut)g+=2;else if(S>i)d+=2;else if(h){var L=o+c-v;if(L>=0&&L=j)return SY(n,e,D,S)}}}for(var I=-m+f;I<=m-p;I+=2){var L=o+I,j;I===-m||I!==m&&l[L-1]t)p+=2;else if(W>i)f+=2;else if(!h){var w=o+c-I;if(w>=0&&w=j)return SY(n,e,D,S)}}}}return[[oo,n],[jr,e]]}function SY(n,e,t,i){var r=n.substring(0,t),o=e.substring(0,i),s=n.substring(t),a=e.substring(i),l=Pg(r,o),u=Pg(s,a);return l.concat(u)}function $T(n,e){if(!n||!e||n.charAt(0)!==e.charAt(0))return 0;for(var t=0,i=Math.min(n.length,e.length),r=i,o=0;te.length?n:e,i=n.length>e.length?e:n;if(t.length<4||i.length*2=g.length?[D,S,L,j,w]:null}var o=r(t,i,Math.ceil(t.length/4)),s=r(t,i,Math.ceil(t.length/2)),a;if(!o&&!s)return null;s?o?a=o[4].length>s[4].length?o:s:a=s:a=o;var l,u,c,h;n.length>e.length?(l=a[0],u=a[1],c=a[2],h=a[3]):(c=a[0],h=a[1],l=a[2],u=a[3]);var d=a[4];return[l,u,c,h,d]}function TY(n,e){n.push([gn,""]);for(var t=0,i=0,r=0,o="",s="",a;t=0&&_Y(n[l][1])){var u=n[l][1].slice(-1);if(n[l][1]=n[l][1].slice(0,-1),o=u+o,s=u+s,!n[l][1]){n.splice(l,1),t--;var c=l-1;n[c]&&n[c][0]===jr&&(r++,s=n[c][1]+s,c--),n[c]&&n[c][0]===oo&&(i++,o=n[c][1]+o,c--),l=c}}if(PY(n[t][1])){var u=n[t][1].charAt(0);n[t][1]=n[t][1].slice(1),o+=u,s+=u}}if(t0||s.length>0){o.length>0&&s.length>0&&(a=$T(s,o),a!==0&&(l>=0?n[l][1]+=s.substring(0,a):(n.splice(0,0,[gn,s.substring(0,a)]),t++),s=s.substring(a),o=o.substring(a)),a=XT(s,o),a!==0&&(n[t][1]=s.substring(s.length-a)+n[t][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a)));var h=r+i;o.length===0&&s.length===0?(n.splice(t-h,h),t=t-h):o.length===0?(n.splice(t-h,h,[jr,s]),t=t-h+1):s.length===0?(n.splice(t-h,h,[oo,o]),t=t-h+1):(n.splice(t-h,h,[oo,o],[jr,s]),t=t-h+2)}t!==0&&n[t-1][0]===gn?(n[t-1][1]+=n[t][1],n.splice(t,1)):t++,r=0,i=0,o="",s="";break}}n[n.length-1][1]===""&&n.pop();var d=!1;for(t=1;t=55296&&n<=56319}function EY(n){return n>=56320&&n<=57343}function PY(n){return EY(n.charCodeAt(0))}function _Y(n){return kY(n.charCodeAt(n.length-1))}function $be(n){for(var e=[],t=0;t0&&e.push(n[t]);return e}function JT(n,e,t,i){return _Y(n)||PY(i)?null:$be([[gn,n],[oo,e],[jr,t],[gn,i]])}function Xbe(n,e,t){var i=typeof t=="number"?{index:t,length:0}:t.oldRange,r=typeof t=="number"?null:t.newRange,o=n.length,s=e.length;if(i.length===0&&(r===null||r.length===0)){var a=i.index,l=n.slice(0,a),u=n.slice(a),c=r?r.index:null;e:{var h=a+s-o;if(c!==null&&c!==h||h<0||h>s)break e;var d=e.slice(0,h),g=e.slice(h);if(g!==u)break e;var f=Math.min(a,h),p=l.slice(0,f),m=d.slice(0,f);if(p!==m)break e;var v=l.slice(f),w=d.slice(f);return JT(p,v,w,u)}e:{if(c!==null&&c!==a)break e;var D=a,d=e.slice(0,D),g=e.slice(D);if(d!==l)break e;var S=Math.min(o-D,s-D),L=u.slice(u.length-S),j=g.slice(g.length-S);if(L!==j)break e;var v=u.slice(0,u.length-S),w=g.slice(0,g.length-S);return JT(l,v,w,L)}}if(i.length>0&&r&&r.length===0){e:{var p=n.slice(0,i.index),L=n.slice(i.index+i.length),f=p.length,S=L.length;if(sr&&s.length){let l=0;for(let u=0;u=m&&v!==p&&(v+=1);let w=0;for(let L=0;L0?h.join(` -`)+` -`:"";if(!(d.length===0&&a===r-c))return un.replace(He.create(a,0,r-c,0),d)}var qb,FFe,UT=_(()=>{"use strict";qb=x(_g());Kr();_e();FFe=H()("util-diff")});function jY(n){let{start:e,end:t}=n.range;return n.newText.endsWith(` -`)&&e.line==t.line&&e.character==0&&t.character==0?e.line-1:e.line}function na(n){let{newText:e}=n,t=Yb(n.range),i=t.end.line-t.start.line;return e.split(/\r?\n/).length-i-1}function Yb(n){let e=n.start,t=n.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function Rg(n,e){if(n.length<=1)return n;let t=n.length/2|0,i=n.slice(0,t),r=n.slice(t);Rg(i,e),Rg(r,e);let o=0,s=0,a=0;for(;o0&&i.character==0,o;for(let s=0;s0){let h=t[t.length-1];h.newText=l,o=void 0;continue}o=void 0}l.includes("\r")&&(l=l.replace(/\r\n/g,` -`));let c=Ce(u.end,i);if(c>0&&(u.end={line:i.line,character:i.character}),n.getText(u)!==l){if(c===0&&r&&!Tt(u)&&l.endsWith(` -`)){l=l.slice(0,-1);let h=n.lines[i.line-1];u.end=er.Position.create(i.line-1,h.length)}else l.length==0&&(o=u.start);t.push({range:u,newText:l})}}return Rg(t,(s,a)=>{let l=s.range.start.line-a.range.start.line;return l===0?s.range.start.character-a.range.start.character:l})}function BY(n,e){var s,a;if(e.length==1){let{start:l,end:u}=e[0].range,{lines:c}=n,h=(s=c[l.line])!=null?s:"",d=(a=c[u.line])!=null?a:"",g=h.substring(0,l.character)+e[0].newText+d.substring(u.character);return u.line>=c.length&&n.eol?g==""?[...c.slice(0,l.line)]:(g.endsWith(` -`)&&(g=g.slice(0,-1)),[...c.slice(0,l.line),...g.split(` -`)]):[...c.slice(0,l.line),...g.split(` -`),...c.slice(u.line+1)]}let t=n.getText(),i=0,r=[];for(let l of e){let u=n.offsetAt(l.range.start);if(ui&&r.push(t.substring(i,u)),l.newText.length&&r.push(l.newText),i=n.offsetAt(l.range.end)}r.push(t.substring(i));let o=r.join("");if(o!==t)return DH(o,n.eol)}function HY(n,e){return e.map(t=>{var c,h;let{start:i,end:r}=t.range,o=(c=n[i.line])!=null?c:"",s=G(o.slice(0,i.character)),a=r.line==i.line?o:(h=n[r.line])!=null?h:"",l=G(a.slice(0,r.character)),{newText:u}=t;return[u.length>0?u.split(` -`):[],i.line,s,r.line,l]})}function Wb(n,e){let{range:t,newText:i}=e;if(Ce(t.end,n)<=0){let r=i.split(` -`),o=r.length-(t.end.line-t.start.line)-1,s=n.character;if(t.end.line==n.line){let a=r[r.length-1].length;r.length>1?s=a+s-t.end.character:s=t.start.character+a+s-t.end.character}return{line:o,character:s-n.character}}return{line:0,character:0}}function Zb(n,e){let{line:t,character:i}=n,{range:r,newText:o}=e,{end:s}=r,a=o.split(` -`),l=a.length-(s.line-r.start.line)-1,u=r.end.line-n.line;if(u>0)return{line:t,character:i};if(u<0)return{line:t+l,character:i};if(a.length>1){let h=a[a.length-1].length;return{line:t+l,character:h+i-s.character}}let c=r.start.character-r.end.character;return{line:t+l,character:c+o.length+i}}function Jb(n,e){let t=er.Position.create(n.line,n.character),i=!1;for(let r=e.length-1;r>=0;r--){let o=e[r];if(i){t.line+=na(o);continue}Ce(o.range.end,t)>0||(o.range.end.line==t.line?t=Zb(t,o):(i=!0,t.line+=na(o)))}return t}function GT(n,e){let t=0;for(let i of e){let r=Yb(i.range);Ce(r.end,n)<=0&&(t+=na(i))}return t}function qY(n,e,t){var c,h;let i=n[0].range.start,r=n[n.length-1].range.end,o=e.length-r.line,s=((c=e[r.line])!=null?c:"").length-r.character,a=t.length-o,l=((h=t[a])!=null?h:"").length-s,u=Ube(i,er.Position.create(a,l),t);return er.TextEdit.replace(er.Range.create(i,r),u)}function Ube(n,e,t){var r,o;if(n.line===e.line)return((r=t[n.line])!=null?r:"").slice(n.character,e.character);let i=[];for(let s=n.line;s<=e.line;s++){let a=(o=t[s])!=null?o:"";s===n.line?i.push(a.slice(n.character)):s===e.line?i.push(a.slice(0,e.character)):i.push(a)}return i.join(` -`)}var er,Ar=_(()=>{"use strict";er=x(q());wt();_e()});var QT,YFe,tr,Fg,YY=_(()=>{"use strict";QT=x(q());V();Sc();YFe=H()("model-chars"),tr=class{constructor(e,t){this.start=e,this.end=t||e}static fromKeywordOption(e){let t=e.split(","),i=[];i.push(new tr(65,90)),i.push(new tr(97,122));for(let r of t)if(r=="@")i.push(new tr(256,65535));else if(r=="@-@")i.push(new tr(64));else if(/^\d+-\d+$/.test(r)){let o=r.match(/^(\d+)-(\d+)$/);i.push(new tr(Number(o[1]),Number(o[2])))}else if(/^\d+$/.test(r))i.push(new tr(Number(r)));else{let o=r.charCodeAt(0);i.some(s=>s.contains(o))||i.push(new tr(o))}return i}contains(e){return e>=this.start&&e<=this.end}},Fg=class{constructor(e){this.ranges=[];e&&(this.ranges=tr.fromKeywordOption(e))}addKeyword(e){let t=e.charCodeAt(0),{ranges:i}=this;i.some(r=>r.contains(t))||i.push(new tr(t))}clone(){let e=new Fg;return e.ranges=this.ranges.slice(),e}setKeywordOption(e){this.ranges=tr.fromKeywordOption(e)}async matchLines(e,t=2,i){let r=new Set,o=Date.now();for(let s of e){if(s.length===0)continue;let a="";Date.now()-o>15&&(await Vr(),o=Date.now());for(let l of s){if(i&&i.isCancellationRequested)return;let u=l.codePointAt(0);this.isKeywordCode(u)?a=a+l:a.length>0&&(a.length>=t&&a.length<48&&r.add(a),a="")}a.length>=t&&a.length<48&&r.add(a)}return r}isKeywordCode(e){return e>255?!0:e<33?!1:this.ranges.some(t=>t.contains(e))}isKeywordChar(e){let{ranges:t}=this;if(/\s/.test(e))return!1;let i=e.charCodeAt(0);return i<33?!1:t.some(r=>r.contains(i))}isKeyword(e){for(let t=0,i=e.length;tr){let p=l.length,m=!1;for(;a>e.line+1;){let v=i[a-1].length;if(p-v1){let v=l.substring(g,p);o.set(v,p/c)}f=m}g=h-d,f=!1;for(let p=g;p1){let v=p==h-1?p+1:p,w=l.substring(g,v),D=o.get(w)||0,S=h-p+(v-g);S!==d&&o.set(w,Math.max(D,S/d))}f=m}return o}}});var KT,zT,WY=_(()=>{"use strict";KT=x(q()),zT=class{constructor(e,t,i){this._line=e,this._text=t,this._isLastLine=i}get lineNumber(){return this._line}get text(){return this._text}get range(){return KT.Range.create(this._line,0,this._line,this._text.length)}get rangeIncludingLineBreak(){return this._isLastLine?this.range:KT.Range.create(this._line,0,this._line+1,0)}get firstNonWhitespaceCharacterIndex(){return/^(\s*)/.exec(this._text)[1].length}get isEmptyOrWhitespace(){return this.firstNonWhitespaceCharacterIndex===this._text.length}}});function Gbe(n,e){let t=[],i=0;for(let r of n)t.push(i),i+=r.length+1;return e&&t.push(i),t}var $b,Ig,ZY=_(()=>{"use strict";$b=x(q());WY();Ig=class{constructor(e,t,i,r,o,s){this.uri=e;this.languageId=t;this.version=i;this.lines=r;this.bufnr=o;this.eol=s}get content(){return this._content||(this._content=this.lines.join(` -`)+(this.eol?` -`:"")),this._content}get length(){if(!this._content){let e=this.lines.reduce((t,i)=>t+i.length+1,0);return this.eol?e:e-1}return this._content.length}get end(){let e=this.lineCount-1;return this.eol?$b.Position.create(e,0):$b.Position.create(e,this.lines[e].length)}get lineCount(){return this.lines.length+(this.eol?1:0)}getText(e){var t;if(e){let{start:i,end:r}=e;return i.line===r.line?i.character===r.character?"":((t=this.lines[i.line])!=null?t:"").substring(i.character,r.character):this.content.substring(this.offsetAt(e.start),this.offsetAt(e.end))}return this.content}lineAt(e){var i;let t=$b.Position.is(e)?e.line:e;if(typeof t!="number"||t<0||t>=this.lineCount||Math.floor(t)!==t)throw new Error("Illegal value for `line`");return new zT(t,(i=this.lines[t])!=null?i:"",t===this.lineCount-1)}positionAt(e){e=Math.max(Math.min(e,this.content.length),0);let t=this.getLineOffsets(),i=0,r=t.length;if(r===0)return{line:0,character:e};for(;ie?r=s:i=s+1}let o=i-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this.content.length;if(e.line<0)return 0;let i=t[e.line],r=e.line+1{"use strict";ek=x(Ei()),ir=x(q());De();ge();UT();V();Vt();wt();_e();Ar();YY();ZY();uIe=H()("model-document"),Xb=class{constructor(e,t,i,r){this.buffer=e;this.env=t;this.nvim=i;this.isIgnored=!1;this.eol=!0;this._disposed=!1;this._attached=!1;this._previewwindow=!1;this._winid=-1;this.disposables=[];this.lines=[];this._onDocumentChange=new ir.Emitter;this.onDocumentChange=this._onDocumentChange.event;this.fireContentChanges=(0,ek.default)(()=>{this._fireContentChanges()},global.__TEST__?20:150),this.fetchContent=(0,ek.default)(()=>{this._fetchContent()},100),this.init(r)}get content(){return this.syncLines.join(` -`)+(this.eol?` -`:"")}get attached(){return this._attached}get textDocument(){return this._textDocument}get syncLines(){return this._textDocument.lines}get version(){return this._textDocument.version}get bufnr(){return this.buffer.id}get bufname(){return this._bufname}get filetype(){return this._filetype}get uri(){return this._uri}get isCommandLine(){return this.uri&&this.uri.endsWith("%5BCommand%20Line%5D")}get enabled(){return this.getVar("enabled",!0)}get languageId(){let{_filetype:e}=this;return e.includes(".")?e.match(/(.*?)\./)[1]:e}get changedtick(){return this._changedtick}convertFiletype(e){switch(e){case"javascript.jsx":return"javascriptreact";case"typescript.jsx":case"typescript.tsx":return"typescriptreact";case"tex":return"latex";default:{let t=this.env.filetypeMap;return String(t[e]||e)}}}get schema(){return B.parse(this.uri).scheme}get lineCount(){return this.lines.length}get winid(){return this._winid}get indentkeys(){return this._indentkeys}get previewwindow(){return this._previewwindow}init(e){let t=this.buftype=e.buftype;this._indentkeys=e.indentkeys,this._bufname=e.bufname,this._previewwindow=!!e.previewwindow,this._winid=e.winid,this.variables=e.variables||{},this._changedtick=e.changedtick,this.eol=e.eol==1,this._uri=Vm(e.fullpath,this.bufnr,t,this.env.isCygwin),Array.isArray(e.lines)&&(this.lines=e.lines,this._noFetch=!0,this._attached=!0,this.attach()),this._filetype=this.convertFiletype(e.filetype),this.setIskeyword(e.iskeyword),this.createTextDocument(1,this.lines)}attach(){if(this.env.isVim)return;let e=this.lines;this.buffer.attach(!0).then(t=>{t||VT(this.bufnr)},t=>{VT(this.bufnr)}),this.buffer.listen("lines",(t,i,r,o,s)=>{if(!(t.id!==this.bufnr||!this._attached||i==null)&&i>this._changedtick){if(this._changedtick=i,e=[...e.slice(0,r),...s,...o==-1?[]:e.slice(o)],e.length==0&&(e=[""]),this.lines=e,Pc(t.id),P.pumvisible)return;this.fireContentChanges()}},this.disposables),this.buffer.listen("detach",()=>{VT(this.bufnr)},this.disposables)}get dirty(){return this.lines!==this.syncLines}get hasChanged(){return this.dirty?!Me(this.lines,this.syncLines):!1}_fireContentChanges(e){var s;if(this.lines===this.syncLines)return;let t=this._textDocument,i=[];if(!e){let{cursor:a}=P,l;if(a&&a.bufnr==this.bufnr){let u=(s=this.lines[a.lnum-1])!=null?s:"";l=ir.Position.create(a.lnum-1,Ui(u,a.col-1))}e=IY(t.lines,this.lines,l,a?a.insert:!1)}let r;e?(r=t.getText(e.range),i.push({range:e.range,text:e.newText,rangeLength:r.length})):r="";let o=this.createTextDocument(this.version+(e?1:0),this.lines);this._onDocumentChange.fire(Object.freeze({bufnr:this.bufnr,original:r,originalLines:t.lines,textDocument:{version:o.version,uri:this.uri},contentChanges:i}))}async applyEdits(e,t=!1,i=!1){var m,v;if(Array.isArray(arguments[1])&&(e=arguments[1]),!this._attached||e.length===0)return;this._forceSync();let r=this.textDocument;if(e=NY(r,e),e.length===0)return;let o=BY(r,e);if(!o)return;let s=r.lines,a=LY(s,o,jY(e[0]));if(a.start===a.end&&a.replacement.length==0)return;let l=a.start===a.end&&a.start===s.length+(this.eol?0:1),u=s.slice(a.start,a.end),c=[];this.nvim.hasFunction("nvim_buf_set_text")&&e.length<200&&a.start!==a.end&&e[e.length-1].range.end.line0?` -`:""))}async changeLines(e){let t=[],i=this.lines.slice();for(let[r,o]of e)i[r]!=o&&(t.push([r,o]),i[r]=o);!t.length||(this.nvim.call("coc#ui#change_lines",[this.bufnr,t],!0),this.nvim.redrawVim(),this.lines=i,Pc(this.bufnr),this._forceSync())}_forceSync(){this.fireContentChanges.clear(),this._fireContentChanges()}forceSync(){global.hasOwnProperty("__TEST__")&&this._forceSync()}getOffset(e,t){return this.textDocument.offsetAt({line:e-1,character:t})}isWord(e){return this.chars.isKeyword(e)}async matchWords(e){return await this.chars.matchLines(this.textDocument.lines,2,e)}getWordRangeAtPosition(e,t,i=!0){let r=this.chars.clone();if(t&&t.length)for(let u of t)r.addKeyword(u);let o=this.getline(e.line,i),s=o[e.character];if(s==null||!r.isKeywordChar(s))return null;let a=e.character,l=e.character+1;for(;a>=0;){let u=o[a-1];if(!u||!r.isKeywordChar(u))break;a=a-1}for(;l<=o.length;){let u=o[l];if(!u||!r.isKeywordChar(u))break;l=l+1}return ir.Range.create(e.line,a,e.line,l)}createTextDocument(e,t){let{uri:i,languageId:r,eol:o}=this;return this._textDocument=new Ig(i,r,e,t,this.bufnr,o)}async _fetchContent(e){if(!this.env.isVim||!this._attached)return;let{nvim:t,bufnr:i,changedtick:r}=this,o=await t.call("coc#util#get_buf_lines",[i,r]);this._noFetch=!0,o?(this._changedtick=o.changedtick,this.lines=o.lines,Pc(this.bufnr),e?this._forceSync():this.fireContentChanges()):e&&this._forceSync()}changeLine(e,t,i){if(this.lines[e-1]===void 0)return;let o=this.lines.slice();o[e-1]=t,this.lines=o,Pc(this.bufnr),this._changedtick=i}async patchChange(e){if(!!this._attached)if(this.env.isVim)if(e){let t=await this.nvim.call("coc#util#get_changeinfo",[]);if(t.bufnr!==this.bufnr)return;if(t.changedtick0&&!d&&l==e&&s.push(ir.Range.create(o.positionAt(u-l.length),o.positionAt(u))),d||(l="")}return s}fixStartcol(e,t){let i=this.getline(e.line);if(!i)return null;let{character:r}=e,o=i.slice(0,r),s=G(o),{chars:a}=this;for(let l=o.length-1;l>=0;l--){let u=o[l];if(u==" "||!a.isKeywordChar(u)&&!t.includes(u))break;s=s-G(u)}return s}addHighlights(e,t,i,r={}){let{start:o,end:s}=i;if(!Tt(i))for(let a=o.line;a<=s.line;a++){let l=this.getline(a,!1),u=a==o.line?Ae(l,o.character):0,c=a==s.line?Ae(l,s.character):global.Buffer.byteLength(l);u>=c||e.push(Object.assign({hlGroup:t,lnum:a,colStart:u,colEnd:c},r))}}getline(e,t=!0){return t?this.lines[e]||"":this.syncLines[e]||""}getLines(e,t){return this.lines.slice(e!=null?e:0,t!=null?t:this.lines.length)}getDocumentContent(){let e=this.lines.join(` -`);return this.eol?e+` -`:e}getVar(e,t){let i=this.variables[`coc_${e}`];return i===void 0?t:i}getPosition(e,t){let i=this.getline(e-1);if(!i||t==0)return{line:e-1,character:0};let r=tt(i,0,t-1);return{line:e-1,character:r.length}}getEndOffset(e,t,i){let r=0,o=this.lines.length;for(let s=e-1;s{"use strict";$Y=x(xY()),tk=x(require("fs")),ik=x(require("os")),Sl=x(require("path")),fn=x(q());De();ge();JY();V();$e();_e();Ub=H()("core-documents"),Gb=class{constructor(e,t){this.configurations=e;this.workspaceFolder=t;this._initialized=!1;this._attached=!1;this._currentResolve=!1;this.disposables=[];this.creating=new Map;this.buffers=new Map;this.winids=new Set;this.resolves=[];this._onDidOpenTextDocument=new fn.Emitter;this._onDidCloseDocument=new fn.Emitter;this._onDidChangeDocument=new fn.Emitter;this._onDidSaveDocument=new fn.Emitter;this._onWillSaveDocument=new fn.Emitter;this.onDidOpenTextDocument=this._onDidOpenTextDocument.event;this.onDidCloseDocument=this._onDidCloseDocument.event;this.onDidChangeDocument=this._onDidChangeDocument.event;this.onDidSaveTextDocument=this._onDidSaveDocument.event;this.onWillSaveTextDocument=this._onWillSaveDocument.event;this._cwd=process.cwd()}async attach(e,t){if(this._attached)return;this.nvim=e,this._env=t,this._attached=!0;let r=this.configurations.getConfiguration("coc.preferences").get("maxFileSize","10MB");this.maxFileSize=$Y.default.parse(r),e.setVar("coc_max_filesize",this.maxFileSize,!0);let{bufnrs:o,winid:s,bufnr:a,winids:l}=await this.nvim.call("coc#util#all_state");this.winids=new Set(l),this._bufnr=a,await Promise.all(o.map(c=>this.createDocument(c))),P.on("BufDetach",this.onBufDetach,this,this.disposables),P.on("VimLeavePre",()=>{this.resolveCurrent(void 0)},null,this.disposables),P.on("WinEnter",c=>{this.winids.add(c)},null,this.disposables),P.on("BufWinEnter",(c,h)=>{this.winids.add(h)},null,this.disposables),P.on("DirChanged",c=>{this._cwd=c},null,this.disposables),P.on("CursorHold",async()=>{let{bufnrs:c,winids:h}=await this.nvim.call("coc#util#all_state");for(let d of this.buffers.keys())c.includes(d)||P.fire("BufUnload",[d]);for(let d of this.winids)h.includes(d)||P.fire("WinClosed",[d]);this.winids=new Set(h)},null,this.disposables);let u=c=>{this._bufnr=c,this.createDocument(c)};P.on("CursorMoved",u,null,this.disposables),P.on("CursorMovedI",u,null,this.disposables),P.on("BufUnload",this.onBufUnload,this,this.disposables),P.on("BufEnter",this.onBufEnter,this,this.disposables),P.on("BufCreate",this.onBufCreate,this,this.disposables),P.on("TermOpen",this.onBufCreate,this,this.disposables),P.on("BufWritePost",this.onBufWritePost,this,this.disposables),P.on("BufWritePre",this.onBufWritePre,this,this.disposables),P.on("FileType",this.onFileTypeChange,this,this.disposables),P.fire("BufEnter",[a]),P.fire("BufWinEnter",[a,s]),P.on("BufEnter",c=>{this.createDocument(c)},null,this.disposables),this._env.isVim?["TextChangedP","TextChangedI","TextChanged"].forEach(c=>{P.on(c,(h,d)=>{let g=this.buffers.get(h);g!=null&&g.attached&&g.onTextChange(c,d)},null,this.disposables)}):P.on("CompleteDone",async()=>{let c=await P.race(["TextChangedI","TextChanged","MenuPopupChanged"],100);if(c&&(c.name==="TextChangedI"||c.name==="TextChanged")){let h=this.buffers.get(P.bufnr);h!=null&&h.attached&&h._forceSync()}},null,this.disposables),this._initialized=!0}get bufnr(){return this._bufnr}get root(){return this._root}get cwd(){return this._cwd}get documents(){return Array.from(this.buffers.values()).filter(e=>e.attached&&!e.isCommandLine)}get bufnrs(){return Array.from(this.buffers.keys())}detach(){if(!!this._attached){this._attached=!1;for(let e of this.buffers.keys())this.onBufUnload(e);J(this.disposables)}}get textDocuments(){let e=[];for(let t of this.buffers.values())t.attached&&e.push(t.textDocument);return e}getDocument(e){if(typeof e=="number")return this.buffers.get(e);let t=Jo.isWindows||Jo.isMacintosh;e=B.parse(e).toString();for(let i of this.buffers.values())if(i.uri===e||t&&i.uri.toLowerCase()===e.toLowerCase())return i;return null}expand(e){if(e.startsWith("~")&&(e=ik.default.homedir()+e.slice(1)),e.includes("$")){let t=this.getDocument(this.bufnr),i=t?B.parse(t.uri).fsPath:"";e=e.replace(/\$\{(.*?)\}/g,(r,o)=>{if(o.startsWith("env:")){let s=o.split(":")[1];return s?process.env[s]:""}switch(o){case"workspace":case"workspaceRoot":case"workspaceFolder":return this._root;case"workspaceFolderBasename":return Sl.default.dirname(this._root);case"cwd":return this._cwd;case"file":return i;case"fileDirname":return i?Sl.default.dirname(i):"";case"fileExtname":return i?Sl.default.extname(i):"";case"fileBasename":return i?Sl.default.basename(i):"";case"fileBasenameNoExtension":{let s=i?Sl.default.basename(i):"";return s?s.slice(0,s.length-Sl.default.extname(s).length):""}default:return r}}),e=e.replace(/\$[\w]+/g,r=>r=="$HOME"?ik.default.homedir():process.env[r.slice(1)]||r)}return e}get document(){return this._currentResolve?new Promise(e=>{this.resolves.push(e)}):(this._currentResolve=!0,new Promise((e,t)=>{this.nvim.eval('coc#util#get_bufoptions(bufnr("%"))').then(i=>{let r;i!=null&&(this.creating.delete(i.bufnr),r=this._createDocument(i)),this.resolveCurrent(r),e(r),this._currentResolve=!1},t)}))}resolveCurrent(e){if(this.resolves.length>0)for(;this.resolves.length;){let t=this.resolves.pop();t&&t(e)}}get uri(){let{bufnr:e}=this;if(e){let t=this.getDocument(e);if(t)return t.uri}return null}get filetypes(){let e=new Set;for(let t of this.documents)e.add(t.filetype);return e}get languageIds(){let e=new Set;for(let t of this.documents)e.add(t.languageId);return e}async getFormatOptions(e){let t;e&&(t=this.getDocument(e));let i=t?t.bufnr:0,r=await this.nvim.call("coc#util#get_format_opts",[i]),o={tabSize:r.tabsize,insertSpaces:r.expandtab==1};return o.insertFinalNewline=r.insertFinalNewline==1,r.trimTrailingWhitespace&&(o.trimTrailingWhitespace=!0),r.trimFinalNewlines&&(o.trimFinalNewlines=!0),o}async createDocument(e){let t=this.buffers.get(e);if(t)return t;if(this.creating.has(e))return await this.creating.get(e);let i=new Promise(r=>{this.nvim.call("coc#util#get_bufoptions",[e]).then(o=>{if(!this.creating.has(e)){r(void 0);return}if(this.creating.delete(e),!o){r(void 0);return}t=this._createDocument(o),r(t)},()=>{this.creating.delete(e),r(void 0)})});return this.creating.set(e,i),await i}async onBufCreate(e){this.onBufUnload(e),await this.createDocument(e)}_createDocument(e){let{bufnr:t}=e;if(this.buffers.has(t))return this.buffers.get(t);let i=this.nvim.createBuffer(t),r=new Xb(i,this._env,this.nvim,e);if(this.buffers.set(t,r),r.attached){if(r.schema=="file"){let o=this.configurations.resolveFolderConfigution(r.uri),s=this.workspaceFolder.resolveRoot(r,this._cwd,this._initialized,this.expand.bind(this));t==this._bufnr&&(o&&this.configurations.setFolderConfiguration(r.uri),s&&(this._root=s))}this._onDidOpenTextDocument.fire(r.textDocument),r.onDocumentChange(o=>this._onDidChangeDocument.fire(o))}return Ub.debug("buffer created",t,r.attached,r.uri),r}onBufEnter(e){this._bufnr=e;let t=this.buffers.get(e);if(t){this.configurations.setFolderConfiguration(t.uri);let i=this.workspaceFolder.getWorkspaceFolder(B.parse(t.uri));i&&(this._root=B.parse(i.uri).fsPath)}}onBufUnload(e){this.creating.delete(e),this.onBufDetach(e,!1)}async onBufDetach(e,t=!0){this.detachBuffer(e),t&&await this.nvim.call("bufloaded",[e])&&await this.createDocument(e)}detachBuffer(e){let t=this.buffers.get(e);!t||(Ub.debug("document detach",e,t.uri),this._onDidCloseDocument.fire(t.textDocument),this.buffers.delete(e),t.detach())}async onBufWritePost(e,t){let i=this.buffers.get(e);i&&(i.changedtick!=t&&await i.patchChange(),this._onDidSaveDocument.fire(i.textDocument))}async onBufWritePre(e,t,i){let r=this.buffers.get(e);if(!r||!r.attached||r.bufname!=t&&(this.detachBuffer(e),r=await this.createDocument(e),!r.attached))return;r.changedtick!=i?await r.synchronize():await r.patchChange();let o=!0,s=[],a={document:r.textDocument,reason:fn.TextDocumentSaveReason.Manual,waitUntil:u=>{o?s.push(u):(Ub.error("Can't call waitUntil in async manner:",Error().stack),this.nvim.echoError("waitUntil can't be used in async manner, check log for details"))}};this._onWillSaveDocument.fire(a),o=!1;let l=s.length;if(l){let c=await new Promise(h=>{let g=this.configurations.getConfiguration("coc.preferences").get("willSaveHandlerTimeout",500),f=setTimeout(()=>{this.nvim.outWriteLine(`Will save handler timeout after ${g}ms`),h(void 0)},g),p=0,m=!1;for(let v of s){let w=D=>{m||(m=!0,clearTimeout(f),h(D))};v.then(D=>{if(Array.isArray(D)&&D.length&&fn.TextEdit.is(D[0]))return w(D);p=p+1,p==l&&w(void 0)},D=>{Ub.error("Error on will save handler:",D),p=p+1,p==l&&w(void 0)})}});c&&await r.applyEdits(c,!1,this.bufnr===r.bufnr)}}onFileTypeChange(e,t){let i=this.getDocument(t);!i||i.convertFiletype(e)==i.filetype||(this._onDidCloseDocument.fire(i.textDocument),i.setFiletype(e),this._onDidOpenTextDocument.fire(i.textDocument))}async getQuickfixList(e){let t={},i=e.reduce((r,o)=>{let s=B.parse(o.uri);return s.scheme=="file"&&!r.includes(s.fsPath)&&!this.getDocument(o.uri)&&r.push(s.fsPath),r},[]);return await Promise.all(i.map(r=>new Promise(o=>{tk.default.readFile(r,"utf8",(s,a)=>{if(s)return o(void 0);t[r]=a.split(/\r?\n/),o(void 0)})}))),await Promise.all(e.map(r=>{let{uri:o,range:s}=r,{fsPath:a}=B.parse(o),l,u=t[a];return u&&(l=u[s.start.line]),this.getQuickfixItem(r,l)}))}async getQuickfixItem(e,t,i="",r){fn.LocationLink.is(e)&&(e=fn.Location.create(e.targetUri,e.targetRange));let o=this.getDocument(e.uri),{uri:s,range:a}=e,{start:l,end:u}=a,c=B.parse(s);!t&&c.scheme=="file"&&(t=await this.getLine(s,l.line));let h=l.line==u.line?t:await this.getLine(s,u.line),d={uri:s,filename:c.scheme=="file"?c.fsPath:s,lnum:l.line+1,end_lnum:u.line+1,col:t?Ae(t,l.character)+1:l.character+1,end_col:h?Ae(h,u.character)+1:u.character+1,text:t||"",range:a};return r&&(d.module=r),i&&(d.type=i),o&&(d.bufnr=o.bufnr),d}async getLine(e,t){let i=this.getDocument(e);if(i&&i.attached)return i.getline(t)||"";if(!e.startsWith("file:"))return"";let r=B.parse(e).fsPath;return tk.default.existsSync(r)?await M2(r,t):""}async readFile(e){let t=this.getDocument(e);if(t)return await t.patchChange(),t.content;let i=B.parse(e);return i.scheme!="file"?"":(await this.nvim.call("readfile",[i.fsPath])).join(` -`)+` -`}reset(){this.creating.clear();for(let e of this.buffers.keys())this.onBufUnload(e);this.buffers.clear(),this._root=process.cwd()}dispose(){for(let e of this.buffers.keys())this.onBufUnload(e);this._attached=!1,this.buffers.clear(),J(this.disposables)}}});function jg(){return UY.default.randomBytes(16)}var UY,nk=_(()=>{UY=x(require("crypto"))});function Qbe(n,e){var t=e||0,i=GY;return[i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],"-",i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]],i[n[t++]]].join("")}var GY,Ag,Qb,rk=_(()=>{GY=[];for(Ag=0;Ag<256;++Ag)GY[Ag]=(Ag+256).toString(16).substr(1);Qb=Qbe});function Kbe(n,e,t){var i=e&&t||0,r=e||[];n=n||{};var o=n.node||QY,s=n.clockseq!==void 0?n.clockseq:ok;if(o==null||s==null){var a=n.random||(n.rng||jg)();o==null&&(o=QY=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=ok=(a[6]<<8|a[7])&16383)}var l=n.msecs!==void 0?n.msecs:new Date().getTime(),u=n.nsecs!==void 0?n.nsecs:ak+1,c=l-sk+(u-ak)/1e4;if(c<0&&n.clockseq===void 0&&(s=s+1&16383),(c<0||l>sk)&&n.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");sk=l,ak=u,ok=s,l+=122192928e5;var h=((l&268435455)*1e4+u)%4294967296;r[i++]=h>>>24&255,r[i++]=h>>>16&255,r[i++]=h>>>8&255,r[i++]=h&255;var d=l/4294967296*1e4&268435455;r[i++]=d>>>8&255,r[i++]=d&255,r[i++]=d>>>24&15|16,r[i++]=d>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(var g=0;g<6;++g)r[i+g]=o[g];return e||Qb(r)}var QY,ok,sk,ak,Qo,KY=_(()=>{nk();rk();sk=0,ak=0;Qo=Kbe});function zbe(n,e,t){var i=e&&t||0;typeof n=="string"&&(e=n==="binary"?new Array(16):null,n=null),n=n||{};var r=n.random||(n.rng||jg)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var o=0;o<16;++o)e[i+o]=r[o];return e||Qb(r)}var re,zY=_(()=>{nk();rk();re=zbe});var Ne=_(()=>{KY();zY()});var Ri,ra=_(()=>{"use strict";fc();_e();Ri=class{constructor(){this.lines=[];this._highlights=[]}addLine(e,t){if(e.includes(` -`)){for(let i of e.split(/\r?\n/))this.addLine(i,t);return}if(t&&this._highlights.push({lnum:this.lines.length,colStart:e.match(/^\s*/)[0].length,colEnd:G(e),hlGroup:t}),e.includes("\x1B")){let i=gc(e);for(let r of i.highlights){let{span:o,hlGroup:s}=r;o[0]!=o[1]&&this._highlights.push({lnum:this.lines.length,colStart:o[0],colEnd:o[1],hlGroup:s})}this.lines.push(i.line)}else this.lines.push(e)}addLines(e){this.lines.push(...e)}addTexts(e){let t=this.lines.length,i="";for(let r of e){let o=G(i);r.hlGroup&&this._highlights.push({lnum:t,colStart:o,colEnd:o+G(r.text),hlGroup:r.hlGroup}),i+=r.text}this.lines.push(i)}addText(e,t){let{lines:i}=this,r=i[i.length-1]||"";if(e.includes(` -`)){let o=e.split(` -`);this.addText(o[0],t);for(let s of o.slice(1))this.addLine(s,t);return}if(t){let o=G(r);this._highlights.push({lnum:i.length?i.length-1:0,colStart:o,colEnd:o+G(e),hlGroup:t})}i.length?i[i.length-1]=`${r}${e}`:i.push(e)}get length(){return this.lines.length}getline(e){return this.lines[e]||""}get highlights(){return this._highlights}get content(){return this.lines.join(` -`)}render(e,t=0,i=-1){e.setLines(this.lines,{start:t,end:i,strictIndexing:!1},!0);for(let r of this._highlights)e.addHighlight({hlGroup:r.hlGroup,colStart:r.colStart,colEnd:r.colEnd==null?-1:r.colEnd,line:t+r.lnum,srcId:-1})}}});function eye(n,e){var i,r;let t=new Map;for(let o of n){let s=(i=Lg(o))!=null?i:null,a=s&&(r=e[s].label)!=null?r:null,l=t.get(a);l?l.push(o):t.set(a,[o])}return t}var Og,Kb,JIe,Vbe,zb,VY=_(()=>{"use strict";Og=x(_g()),Kb=x(require("path"));Kr();De();ge();V();$e();Ar();ra();JIe=H()("mdoe-editInspect"),Vbe=0,zb=class{constructor(e,t){this.nvim=e;this.keymaps=t;this.disposables=[];this.items=[];this.renameMap=new Map;P.on("BufUnload",i=>{i==this.bufnr&&this.dispose()},null,this.disposables)}addFile(e,t,i){this.items.push({index:t.length,filepath:e,lnum:i})}async show(e){var c,h;let{nvim:t}=this,i=Vbe++;t.pauseNotification(),t.command(`tabe +setl\\ buftype=nofile CocWorkspaceEdit${i}`,!0),t.command("setl bufhidden=wipe nolist",!0),t.command("setl nobuflisted wrap undolevels=-1 filetype=cocedits noswapfile",!0),await t.resumeNotification(!0);let r=await t.buffer,o=await t.call("getcwd");this.bufnr=r.id;let s=d=>{let g=B.parse(d).fsPath;return Oe(o,g,!0)?Kb.default.relative(o,g):g},a=d=>Kb.default.isAbsolute(d)?d:Kb.default.join(o,d),l=new Ri,u=eye((c=e.edit.documentChanges)!=null?c:[],(h=e.edit.changeAnnotations)!=null?h:{});for(let[d,g]of u.entries()){d&&(l.addLine(d,"MoreMsg"),l.addLine(""));for(let f of g)if(Ys.is(f)){let p=e.changes[f.textDocument.uri],m=s(f.textDocument.uri);l.addTexts([{text:"Change",hlGroup:"Title"},{text:" "},{text:m,hlGroup:"Directory"},{text:`:${p.lnum}`,hlGroup:"LineNr"}]),this.addFile(m,l,p.lnum),l.addLine(""),this.addChangedLines(l,p,m,p.lnum),l.addLine("")}else if(Ws.is(f)||Wo.is(f)){let p=Wo.is(f)?"Delete":"Create",m=s(f.uri);l.addTexts([{text:p,hlGroup:"Title"},{text:" "},{text:m,hlGroup:"Directory"}]),this.addFile(m,l),l.addLine("")}else if(Zs.is(f)){let p=s(f.oldUri),m=s(f.newUri);l.addTexts([{text:"Rename",hlGroup:"Title"},{text:" "},{text:p,hlGroup:"Directory"},{text:"->",hlGroup:"Comment"},{text:m,hlGroup:"Directory"}]),this.renameMap.set(p,m),this.addFile(m,l),l.addLine("")}}t.pauseNotification(),l.render(r),r.setOption("modifiable",!1,!0),await t.resumeNotification(!0),this.disposables.push(this.keymaps.registerLocalKeymap("n","",async()=>{var v;let d=await t.call("line","."),g=await t.call("col","."),f;for(let w=this.items.length-1;w>=0;w--){let D=this.items[w];if(d>=D.index){f=D;break}}if(!f)return;let p=B.file(a(f.filepath)).toString(),m=this.renameMap.has(f.filepath)?this.renameMap.get(f.filepath):f.filepath;if(await t.call("coc#util#open_file",["tab drop",a(m)]),typeof f.lnum=="number"){let D=((v=e.edit.documentChanges)!=null?v:[]).find(L=>Ys.is(L)&&L.textDocument.uri==p),S=f.lnum;if(D){let L=Rg(D.edits,(I,W)=>{let A=I.range.start.line-W.range.start.line;return A===0?I.range.start.character-W.range.start.character:A});S=Jb(zt.create(S-1,0),L).line+1}await t.call("cursor",[S,g])}t.redrawVim()},!0)),this.disposables.push(this.keymaps.registerLocalKeymap("n","",async()=>{t.command("bwipeout!",!0)},!0))}addChangedLines(e,t,i,r){let o=(0,Og.default)(t.oldLines.join(` -`),t.newLines.join(` -`));for(let s=0;s0&&e.addText(h)}r+=l.split(` -`).length-1}else a[0]==Og.default.DELETE?(r+=a[1].split(` -`).length-1,e.addText(a[1],"DiffDelete")):a[0]==Og.default.INSERT&&e.addText(a[1],"DiffAdd")}}dispose(){J(this.disposables)}}});function lk(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function uk(n){return new Error(`File ${n} already exists`)}function Vb(n){return new Error(`File ${n} not exists`)}function eW(n){return new Error(`${n} should not be called in an asynchronize manner`)}function ey(n){return new Error(`Change of ${n} not supported`)}var ck=_(()=>{"use strict"});function nye(n,e,t){let i=Or.default.join(n,e);if(typeof t!="string"){let r=t.baseUri.fsPath;if(!Oe(r,i))return!1;let o=Or.default.relative(r,i);return(0,hk.default)(o,t.pattern,{dot:!0})}return(0,hk.default)(e,t,{dot:!0})}function ty(n){return B.parse(n).fsPath}var dt,tW,hk,dk,Or,iW,kt,iye,iy,nW=_(()=>{"use strict";dt=x(Rn()),tW=x(hb()),hk=x(Vn()),dk=x(require("os")),Or=x(require("path")),iW=require("util");Ne();kt=x(q());De();ge();VY();ck();$e();_e();Ar();xb();iye=H()("core-files"),iy=class{constructor(e,t,i,r){this.documents=e;this.configurations=t;this.workspaceFolderControl=i;this.keymaps=r;this.operationTimeout=500;this._onDidCreateFiles=new kt.Emitter;this._onDidRenameFiles=new kt.Emitter;this._onDidDeleteFiles=new kt.Emitter;this._onWillCreateFiles=new kt.Emitter;this._onWillRenameFiles=new kt.Emitter;this._onWillDeleteFiles=new kt.Emitter;this.onDidCreateFiles=this._onDidCreateFiles.event;this.onDidRenameFiles=this._onDidRenameFiles.event;this.onDidDeleteFiles=this._onDidDeleteFiles.event;this.onWillCreateFiles=this._onWillCreateFiles.event;this.onWillRenameFiles=this._onWillRenameFiles.event;this.onWillDeleteFiles=this._onWillDeleteFiles.event}attach(e,t,i){this.nvim=e,this.env=t,this.window=i}async openTextDocument(e){e=typeof e=="string"?B.file(e):e;let t=this.documents.getDocument(e.toString());if(t)return await this.jumpTo(e.toString(),null,"drop"),t;let i=e.scheme;if(i=="file"){if(!dt.default.existsSync(e.fsPath))throw Vb(e.fsPath);dt.default.accessSync(e.fsPath,dt.default.constants.R_OK)}return i=="untitled"?(await this.nvim.call("coc#util#open_file",["tab drop",e.path]),await this.documents.document):await this.loadResource(e.toString())}async jumpTo(e,t,i){let r=this.configurations.getConfiguration("coc.preferences"),o=i||r.get("jumpCommand","edit"),{nvim:s}=this,a=this.documents.getDocument(e),l=a?a.bufnr:-1;if(l!=-1&&o=="edit"){if(s.pauseNotification(),s.command("silent! normal! m'",!0),s.command(`buffer ${l}`,!0),s.command("if &filetype ==# '' | filetype detect | endif",!0),t){let u=a.getline(t.line),c=G(u.slice(0,t.character))+1;s.call("cursor",[t.line+1,c],!0)}await s.resumeNotification(!0)}else{let{fsPath:u,scheme:c}=B.parse(e),h=t==null?null:[t.line,t.character];if(c=="file"){let d=mg(Or.default.normalize(u));await this.nvim.call("coc#util#jump",[o,d,h])}else await this.nvim.call("coc#util#jump",[o,e,h])}}async openResource(e){let{nvim:t}=this,i=B.parse(e);if(/^https?/.test(i.scheme)){await t.call("coc#ui#open_url",e);return}let r=await t.getOption("wildignore");await t.setOption("wildignore",""),await this.jumpTo(e),await t.setOption("wildignore",r)}async loadResource(e){let t=this.documents.getDocument(e);if(t)return t;let r=this.configurations.getConfiguration("workspace").get("openResourceCommand","tab drop"),o=B.parse(e),s=o.scheme==="file"?o.fsPath:e,a;if(r){let l=await this.nvim.call("win_getid");a=await this.nvim.call("coc#util#open_file",[r,s]),await this.nvim.call("win_gotoid",[l])}else a=(await this.nvim.call("coc#ui#open_files",[[s]]))[0];return await this.documents.createDocument(a)}async loadResources(e){let{documents:t}=this,i=e.map(o=>{let s=B.parse(o);return s.scheme=="file"?s.fsPath:o}),r=await this.nvim.call("coc#ui#open_files",[i]);return await Promise.all(r.map(o=>t.createDocument(o)))}async createFile(e,t={},i){let{nvim:r}=this,o=dt.default.existsSync(e);if(o&&!t.overwrite&&!t.ignoreIfExists)throw uk(e);if(!o||t.overwrite){let s=new kt.CancellationTokenSource;await this.fireWaitUntilEvent(this._onWillCreateFiles,{files:[B.file(e)],token:s.token},i),s.cancel();let a=Or.default.dirname(e);if(!dt.default.existsSync(a)){let c,h=a;for(;![".","/",Or.default.parse(a).root].includes(h);){if(dt.default.existsSync(Or.default.dirname(h))){c=h;break}h=Or.default.dirname(h)}await dt.default.mkdirp(a),i&&i.push(async()=>{dt.default.existsSync(c)&&await dt.default.remove(c)})}dt.default.writeFileSync(e,"","utf8"),i&&i.push(async()=>{dt.default.existsSync(e)&&await dt.default.unlink(e)});let u=(await this.loadResource(e)).bufnr;i&&i.push(()=>(P.fire("BufUnload",[u]),r.command(`silent! bd! ${u}`))),this._onDidCreateFiles.fire({files:[B.file(e)]})}}async deleteFile(e,t={},i){let{ignoreIfNotExists:r,recursive:o}=t,s=await qt(e),a=s&&s.isDirectory();if(!s&&!r)throw Vb(e);if(s==null)return;let l=B.file(e);if(await this.fireWaitUntilEvent(this._onWillDeleteFiles,{files:[l]},i),!a){let u=await this.nvim.call("bufnr",[e]);u&&(P.fire("BufUnload",[u]),await this.nvim.command(`silent! bwipeout ${u}`),i&&i.push(()=>this.loadResource(l.toString())))}if(a&&o){let u=Or.default.join(dk.default.tmpdir(),"coc-"+re());await dt.default.mkdir(u),await dt.default.copy(e,u,{recursive:!0}),await dt.default.remove(e),i&&i.push(async()=>{await dt.default.mkdir(e),await dt.default.copy(u,e,{recursive:!0}),await dt.default.remove(u)})}else if(a)await dt.default.rmdir(e),i&&i.push(()=>dt.default.mkdir(e));else{let u=Or.default.join(dk.default.tmpdir(),"coc-"+re());await dt.default.copyFile(e,u),await dt.default.unlink(e),i&&i.push(()=>dt.default.move(u,e,{overwrite:!0}))}this._onDidDeleteFiles.fire({files:[l]})}async renameFile(e,t,i={},r){let{nvim:o}=this,{overwrite:s,ignoreIfExists:a}=i;if(t===e)return;let l=dt.default.existsSync(t);if(l&&a&&!s)return;if(l&&!s)throw uk(t);let u=await qt(e),c=u&&u.isDirectory()?0:await o.call("bufloaded",[e]);if(!c&&!u)throw Vb(e);let h={newUri:B.parse(t),oldUri:B.parse(e)};if(i.skipEvent||await this.fireWaitUntilEvent(this._onWillRenameFiles,{files:[h]},r),c){let d=await o.call("coc#ui#rename_file",[e,t,u!=null]);await this.documents.onBufCreate(d)}else{if(u!=null&&u.isDirectory())for(let d of this.documents.documents){let g=B.parse(d.uri);if(g.scheme==="file"&&Oe(e,g.fsPath,!1)){let f=g.fsPath.replace(e,t),p=await o.call("coc#ui#rename_file",[g.fsPath,f,!1]);await this.documents.onBufCreate(p)}}dt.default.renameSync(e,t)}r&&r.push(()=>this.renameFile(t,e,{skipEvent:!0})),i.skipEvent||this._onDidRenameFiles.fire({files:[h]})}async renameCurrent(){let{nvim:e}=this,t=await e.call("expand",["%:p"]),i=await e.callAsync("coc#util#with_callback",["input",["New path: ",t,"file"]]);i=i?i.trim():null,!(i===t||!i)&&(t.toLowerCase()!=i.toLowerCase()&&dt.default.existsSync(i)&&!await Cb(this.nvim,`${i} exists, overwrite?`)||await this.renameFile(t,i,{overwrite:!0}))}get currentUri(){let e=this.documents.getDocument(this.documents.bufnr);return e?e.uri:null}async applyEdit(e,t){let i=MY(e),r=[],o=!1;try{let{changeAnnotations:s}=e,{currentUri:a}=this,l=s?OY(i,s):[],u={},c=[];for(let h of l){let d=s[h];d.needsConfirmation=!1,await this.window.showMenuPicker(["Yes","No"],{position:"center",title:"Confirm edits",content:d.label+(d.description?" "+d.description:"")})!==0&&c.push(h)}if(i=i.filter(h=>!c.includes(Lg(h))),!i.length)return!0;o=i.every(h=>kt.TextDocumentEdit.is(h)&&h.textDocument.uri===a),this.validateChanges(i);for(let h of i)if(kt.TextDocumentEdit.is(h)){let{textDocument:d,edits:g}=h,{uri:f}=d,p=await this.loadResource(f),m=await p.applyEdits(g,!1,f===a);if(m){let v=p.version,{newText:w,range:D}=m;u[f]={uri:f,lnum:D.start.line+1,newLines:p.getLines(D.start.line,D.end.line),oldLines:w.endsWith(` -`)?w.slice(0,-1).split(` -`):w.split(` -`)},r.push(async()=>{let S=this.documents.getDocument(f);!S||!S.attached||S.version!==v||(await S.applyEdits([m]),d.version=S.version)})}}else kt.CreateFile.is(h)?await this.createFile(ty(h.uri),h.options,r):kt.DeleteFile.is(h)?await this.deleteFile(ty(h.uri),h.options,r):kt.RenameFile.is(h)&&await this.renameFile(ty(h.oldUri),ty(h.newUri),h.options,r);if(r.length===0)return!0;t||(this.editState={edit:{documentChanges:i,changeAnnotations:e.changeAnnotations},changes:u,recovers:r,applied:!0}),this.nvim.redrawVim()}catch(s){return iye.error("Error on applyEdits:",e,s),await this.undoChanges(r),t||this.window.showErrorMessage(`Error on applyEdits: ${s}`),!1}return t||o||this.window.showInformationMessage("Use ':wa' to save changes or ':CocCommand workspace.inspectEdit' to inspect."),!0}async undoChanges(e){for(;e.length>0;)await e.pop()()}async inspectEdit(){if(!this.editState){this.window.showWarningMessage("No workspace edit to inspect");return}await new zb(this.nvim,this.keymaps).show(this.editState)}async undoWorkspaceEdit(){let{editState:e}=this;if(!e||!e.applied){this.window.showWarningMessage("No workspace edit to undo");return}e.applied=!1,await this.undoChanges(e.recovers)}async redoWorkspaceEdit(){let{editState:e}=this;if(!e||e.applied){this.window.showWarningMessage("No workspace edit to redo");return}this.editState=void 0,await this.applyEdit(e.edit)}validateChanges(e){let{documents:t}=this;for(let i of e)if(kt.TextDocumentEdit.is(i)){let{uri:r,version:o}=i.textDocument,s=t.getDocument(r);if(typeof o=="number"&&o>0){if(!s)throw new Error(`File ${r} not loaded`);if(s.version!=o)throw new Error(`${r} changed before apply edit`)}else if(!s&&!bg(r))throw ey(B.parse(r).scheme)}else if(kt.CreateFile.is(i)||kt.DeleteFile.is(i)){if(!bg(i.uri))throw ey(B.parse(i.uri).scheme)}else if(kt.RenameFile.is(i)&&(!bg(i.oldUri)||!bg(i.newUri)))throw ey(B.parse(i.oldUri).scheme)}async findFiles(e,t,i,r){let o=this.workspaceFolderControl.workspaceFolders;if((r==null?void 0:r.isCancellationRequested)||!o.length||i===0)return[];i=i!=null?i:1/0;let s=o.map(u=>B.parse(u.uri).fsPath);if(typeof e!="string"){let u=e.baseUri.fsPath;s=s.filter(c=>Oe(u,c,!0))}let a=typeof e=="string"?e:e.pattern,l=[];for(let u of s){if(l.length>=i)break;let c=await(0,iW.promisify)(tW.default)(a,{dot:!0,cwd:u,nodir:!0,absolute:!1});if(r!=null&&r.isCancellationRequested)return[];for(let h of c)if(!(t&&nye(u,h,t))&&(l.push(B.file(Or.default.join(u,h))),l.length===i))break}return l}async fireWaitUntilEvent(e,t,i){let r=!0,o=[];e.fire(Ba(de({},t),{waitUntil:s=>{if(!r)throw eW("waitUntil");let a=new Promise(u=>{setTimeout(u,this.operationTimeout)}),l=Promise.race([s,a]).then(u=>{if(u&&kt.WorkspaceEdit.is(u))return this.applyEdit(u,!0)});o.push(l)}})),r=!1,await Promise.all(o)}}});function Mg(n,e){for(let t of e)if(n.includes(t))return!0;return!1}function rW(n,e,t=0){let i=-1;for(let r=t;r{e(i)?t[0].push(i):t[1].push(i)}),t}function oa(n,e){if(!e)return n.filter((i,r)=>n.indexOf(i)===r);let t=Object.create(null);return n.filter(i=>{let r=e(i);return t[r]?!1:(t[r]=!0,!0)})}var so=_(()=>{"use strict"});var lW=b((cje,aW)=>{var gk=4294967296,sW=[];for(_c=0;_c<256;_c++)sW[_c]=(_c>15?"":"0")+_c.toString(16);var _c,Ng=aW.exports=function(n,e){n instanceof Buffer?(this.buffer=n,this.offset=e||0):Object.prototype.toString.call(n)=="[object Uint8Array]"?(this.buffer=new Buffer(n),this.offset=e||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};Ng.MAX_INT=Math.pow(2,53);Ng.MIN_INT=-Math.pow(2,53);Ng.prototype={constructor:Ng,_2scomp:function(){for(var n=this.buffer,e=this.offset,t=1,i=e+7;i>=e;i--){var r=(n[i]^255)+t;n[i]=r&255,t=r>>8}},setValue:function(n,e){var t=!1;if(arguments.length==1)if(typeof n=="number"){if(t=n<0,n=Math.abs(n),e=n%gk,n=n/gk,n>gk)throw new RangeError(n+" is outside Int64 range");n=n|0}else if(typeof n=="string")n=(n+"").replace(/^0x/,""),e=n.substr(-8),n=n.length>8?n.substr(0,n.length-8):"",n=parseInt(n,16),e=parseInt(e,16);else throw new Error(n+" must be a Number or String");for(var i=this.buffer,r=this.offset,o=7;o>=0;o--)i[r+o]=e&255,e=o==4?n:e>>>8;t&&this._2scomp()},toNumber:function(n){for(var e=this.buffer,t=this.offset,i=e[t]&128,r=0,o=1,s=7,a=1;s>=0;s--,a*=256){var l=e[t+s];i&&(l=(l^255)+o,o=l>>8,l=l&255),r+=l*a}return!n&&r>=Ng.MAX_INT?i?-1/0:1/0:i?-r:r},valueOf:function(){return this.toNumber(!1)},toString:function(n){return this.valueOf().toString(n||10)},toOctetString:function(n){for(var e=new Array(8),t=this.buffer,i=this.offset,r=0;r<8;r++)e[r]=sW[t[i+r]];return e.join(n||"")},toBuffer:function(n){if(n&&this.offset===0)return this.buffer;var e=new Buffer(8);return this.buffer.copy(e,0,this.offset,this.offset+8),e},copy:function(n,e){this.buffer.copy(n,e||0,this.offset,this.offset+8)},compare:function(n){if((this.buffer[this.offset]&128)!=(n.buffer[n.offset]&128))return n.buffer[n.offset]-this.buffer[this.offset];for(var e=0;e<8;e++)if(this.buffer[this.offset+e]!==n.buffer[n.offset+e])return this.buffer[this.offset+e]-n.buffer[n.offset+e];return 0},equals:function(n){return this.compare(n)===0},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}});var vW=b(Hg=>{var cW=require("events").EventEmitter,rye=require("util"),oye=require("os"),hje=require("assert"),Bg=lW(),sa=oye.endianness()=="BE";function hW(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function di(n){this.buf=Buffer.alloc(hW(n||8192)),this.readOffset=0,this.writeOffset=0}Hg.Accumulator=di;di.prototype.writeAvail=function(){return this.buf.length-this.writeOffset};di.prototype.readAvail=function(){return this.writeOffset-this.readOffset};di.prototype.reserve=function(n){if(!(n0&&(this.buf.copy(this.buf,0,this.readOffset,this.writeOffset),this.writeOffset-=this.readOffset,this.readOffset=0),!(n0)this.assertReadableSize(n);else if(n<0&&this.readOffset+n<0)throw new Error("advance with negative offset "+n+" would seek off the start of the buffer");this.readOffset+=n};di.prototype.writeByte=function(n){this.reserve(1),this.buf.writeInt8(n,this.writeOffset),++this.writeOffset};di.prototype.writeInt=function(n,e){switch(this.reserve(e),e){case 1:this.buf.writeInt8(n,this.writeOffset);break;case 2:sa?this.buf.writeInt16BE(n,this.writeOffset):this.buf.writeInt16LE(n,this.writeOffset);break;case 4:sa?this.buf.writeInt32BE(n,this.writeOffset):this.buf.writeInt32LE(n,this.writeOffset);break;default:throw new Error("unsupported integer size "+e)}this.writeOffset+=e};di.prototype.writeDouble=function(n){this.reserve(8),sa?this.buf.writeDoubleBE(n,this.writeOffset):this.buf.writeDoubleLE(n,this.writeOffset),this.writeOffset+=8};var pk=0,mk=1,bk=2,yk=3,vk=4,ay=5,sy=6,dW=7,gW=8,fW=9,pW=10,mW=11,sye=12,fk=0,uW=1,aye=127,lye=32767,uye=2147483647;function pn(){cW.call(this),this.buf=new di,this.state=fk}rye.inherits(pn,cW);Hg.BunserBuf=pn;pn.prototype.append=function(n,e){if(e)return this.buf.append(n),this.process(e);try{this.buf.append(n)}catch(t){this.emit("error",t);return}this.processLater()};pn.prototype.processLater=function(){var n=this;process.nextTick(function(){try{n.process(!1)}catch(e){n.emit("error",e)}})};pn.prototype.process=function(n){if(this.state==fk){if(this.buf.readAvail()<2)return;if(this.expectCode(0),this.expectCode(1),this.pduLen=this.decodeInt(!0),this.pduLen===!1){this.buf.readAdvance(-2);return}this.buf.reserve(this.pduLen),this.state=uW}if(this.state==uW){if(this.buf.readAvail()0&&this.processLater()};pn.prototype.raise=function(n){throw new Error(n+", in Buffer of length "+this.buf.buf.length+" ("+this.buf.readAvail()+" readable) at offset "+this.buf.readOffset+" buffer: "+JSON.stringify(this.buf.buf.slice(this.buf.readOffset,this.buf.readOffset+32).toJSON()))};pn.prototype.expectCode=function(n){var e=this.buf.readInt(1);e!=n&&this.raise("expected bser opcode "+n+" but got "+e)};pn.prototype.decodeAny=function(){var n=this.buf.peekInt(1);switch(n){case yk:case vk:case ay:case sy:return this.decodeInt();case dW:return this.buf.readAdvance(1),this.buf.readDouble();case gW:return this.buf.readAdvance(1),!0;case fW:return this.buf.readAdvance(1),!1;case pW:return this.buf.readAdvance(1),null;case bk:return this.decodeString();case pk:return this.decodeArray();case mk:return this.decodeObject();case mW:return this.decodeTemplate();default:this.raise("unhandled bser opcode "+n)}};pn.prototype.decodeArray=function(){this.expectCode(pk);for(var n=this.decodeInt(),e=[],t=0;t"u")throw Error("no bser found in string and no error raised!?");return t}Hg.loadFromBuffer=cye;function bW(n){for(var e=Buffer.alloc(n.length),t=0;t"u"&&r--}ry(n,r);for(var t=0;t"u")){oy(n,o);try{oy(n,s)}catch(c){throw new Error(c.message+" (while serializing object property with name `"+o+"')")}}}return;default:throw new Error("cannot serialize type "+typeof e+" to BSER")}}function hye(n){var e=new di;e.writeByte(0),e.writeByte(1),e.writeByte(ay),e.writeInt(0,4),oy(e,n);var t=e.writeOffset,i=t-7;return e.writeOffset=3,e.writeInt(i,4),e.writeOffset=t,e.buf.slice(0,t)}Hg.dumpToBuffer=hye});var kW=b((gje,TW)=>{"use strict";var dye=require("net"),xW=require("events").EventEmitter,gye=require("util"),fye=require("child_process"),SW=vW(),wW=["subscription","log"];function Ko(n){var e=this;xW.call(this),this.watchmanBinaryPath="watchman",n&&n.watchmanBinaryPath&&(this.watchmanBinaryPath=n.watchmanBinaryPath.trim()),this.commands=[]}gye.inherits(Ko,xW);TW.exports.Client=Ko;Ko.prototype.sendNextCommand=function(){this.currentCommand||(this.currentCommand=this.commands.shift(),this.currentCommand&&this.socket.write(SW.dumpToBuffer(this.currentCommand.cmd)))};Ko.prototype.cancelCommands=function(n){var e=new Error(n),t=this.commands;this.commands=[],this.currentCommand&&(t.unshift(this.currentCommand),this.currentCommand=null),t.forEach(function(i){i.cb(e)})};Ko.prototype.connect=function(){var n=this;function e(l){n.bunser=new SW.BunserBuf,n.bunser.on("value",function(u){for(var c=!1,h=0;h=0:!1}Ko.prototype._synthesizeCapabilityCheck=function(n,e,t){n.capabilities={};var i=n.version;return e.forEach(function(r){n.capabilities[r]=CW(i,r)}),t.forEach(function(r){var o=CW(i,r);n.capabilities[r]=o,o||(n.error="client required capability `"+r+"` is not supported by this server")}),n};Ko.prototype.capabilityCheck=function(n,e){var t=n.optional||[],i=n.required||[],r=this;this.command(["version",{optional:t,required:i}],function(o,s){if(o){e(o);return}if(!("capabilities"in s)&&(s=r._synthesizeCapabilityCheck(s,t,i),s.error)){o=new Error(s.error),o.watchmanResponse=s,e(o);return}e(null,s)})};Ko.prototype.end=function(){this.cancelCommands("The client was ended"),this.socket&&(this.socket.end(),this.socket=null),this.bunser=null}});function bye(n){return!(n=="/"||n=="/tmp"||n=="/private/tmp"||Oe(n,wk.default.homedir(),!0)||uy.default.parse(n).base==n||n.startsWith("/tmp/")||n.startsWith("/private/tmp/")||Oe(wk.default.tmpdir(),n,!0))}var EW,PW,wk,uy,ly,mye,aa,Dk=_(()=>{"use strict";EW=x(kW()),PW=x(Vn()),wk=x(require("os")),uy=x(require("path"));Ne();$e();ly=H()("core-watchman"),mye=["relative_root","cmd-watch-project","wildmatch","field-new"],aa=class{constructor(e,t){this.channel=t;this._disposed=!1;this.client=new EW.default.Client({watchmanBinaryPath:e}),this.client.setMaxListeners(300)}checkCapability(){let{client:e}=this;return new Promise((t,i)=>{e.capabilityCheck({optional:[],required:mye},(r,o)=>{if(r)return t(!1);let{capabilities:s}=o;for(let a of Object.keys(s))if(!s[a])return t(!1);t(!0)})})}async watchProject(e){let t=await this.command(["watch-project",e]),{watch:i,warning:r,relative_path:o}=t;return i?(r&&ly.warn(r),this.watch=i,this.relative_path=o,ly.info(`watchman watching project: ${e}`),this.appendOutput(`watchman watching project: ${e}`),!0):!1}command(e){return new Promise((t,i)=>{this.client.command(e,(r,o)=>{if(r)return i(r);t(o)})})}async subscribe(e,t){let{watch:i,relative_path:r}=this;if(!i)throw new Error("watchman not watching");let{clock:o}=await this.command(["clock",i]),s=Qo(),a={expression:["allof",["match","**/*","wholename"]],fields:["name","size","new","exists","type","mtime_ms","ctime_ms"],since:o},l=i;r&&(a.relative_root=r,l=uy.default.join(i,r));let{subscribe:u}=await this.command(["subscribe",i,s,a]);return this.appendOutput(`subscribing "${e}" in ${l}`),this.client.on("subscription",c=>{if(!c||c.subscription!=s)return;let{files:h}=c;if(!h||(h=h.filter(g=>g.type=="f"&&(0,PW.default)(g.name,e,{dot:!0})),!h.length))return;let d=Object.assign({},c);this.relative_path&&(d.root=uy.default.resolve(c.root,this.relative_path)),this.appendOutput(`file change detected: ${JSON.stringify(d,null,2)}`),t(d)}),{dispose:()=>{this.unsubscribe(u)},subscribe:u}}unsubscribe(e){if(this._disposed)return Promise.resolve();let{watch:t}=this;if(!!t)return this.appendOutput(`unsubscribe "${e}" in: ${t}`),this.command(["unsubscribe",t,e]).catch(i=>{var r;(r=i.message)!=null&&r.includes("The client was ended")&&ly.error(i)})}dispose(){this._disposed||(this._disposed=!0,this.client&&(this.client.removeAllListeners(),this.client.end(),this.client=void 0))}appendOutput(e,t="Info"){this.channel&&this.channel.appendLine(`[${t} - ${new Date().toLocaleTimeString()}] ${e}`)}static async createClient(e,t,i){if(!bye(t))return null;let r;try{if(r=new aa(e,i),!await r.checkCapability())throw new Error("required capabilities do not exist.");if(!await r.watchProject(t))throw new Error("unable to watch");return r}catch(o){return r&&r.dispose(),ly.error("Error on watchman create",o),null}}}});var _W,Rc,Lc,kje,qg,Yg,RW,LW=_(()=>{"use strict";_W=x(Vn()),Rc=x(require("path")),Lc=x(q());De();V();so();Dk();kje=H()("filesystem-watcher"),qg=class{constructor(e,t){this.workspaceFolder=e;this.watchmanPath=t;this.clientsMap=new Map;this.disposables=[];this.creating=new Set;this._onDidCreateClient=new Lc.Emitter;this.onDidCreateClient=this._onDidCreateClient.event}attach(e){this.channel=e;let t=i=>{let r=B.parse(i.uri).fsPath;this.creating.has(r)||(this.creating.add(r),this.createClient(r).finally(()=>{this.creating.delete(r)}))};this.workspaceFolder.workspaceFolders.forEach(i=>{t(i)}),this.workspaceFolder.onDidChangeWorkspaceFolders(i=>{i.added.forEach(r=>{t(r)}),i.removed.forEach(r=>{let o=B.parse(r.uri).fsPath,s=this.clientsMap.get(o);s&&(this.clientsMap.delete(o),s.dispose())})},null,this.disposables)}waitClient(e){return this.clientsMap.has(e)?Promise.resolve():new Promise(t=>{let i=this.onDidCreateClient(r=>{r==e&&(i.dispose(),t())})})}async createClient(e){if(!(this.watchmanPath==null||this.clientsMap.has(e)))try{let t=await aa.createClient(this.watchmanPath,e,this.channel);if(!t)return;this.clientsMap.set(e,t);for(let i of qg.watchers)i.listen(t);this._onDidCreateClient.fire(e)}catch(t){this.channel&&this.channel.appendLine("Error on create watchman client:"+t)}}createFileSystemWatcher(e,t,i,r){let o=new RW(e,t,i,r);for(let s of this.clientsMap.values())o.listen(s);return qg.watchers.add(o),o}dispose(){this._onDidCreateClient.dispose();for(let e of this.clientsMap.values())e&&e.dispose();this.clientsMap.clear(),qg.watchers.clear(),J(this.disposables)}},Yg=qg;Yg.watchers=new Set;RW=class{constructor(e,t,i,r){this.globPattern=e;this.ignoreCreateEvents=t;this.ignoreChangeEvents=i;this.ignoreDeleteEvents=r;this._onDidCreate=new Lc.Emitter;this._onDidChange=new Lc.Emitter;this._onDidDelete=new Lc.Emitter;this._onDidRename=new Lc.Emitter;this.disposables=[];this._disposed=!1;this.onDidCreate=this._onDidCreate.event;this.onDidChange=this._onDidChange.event;this.onDidDelete=this._onDidDelete.event;this.onDidRename=this._onDidRename.event}listen(e){let{globPattern:t,ignoreCreateEvents:i,ignoreChangeEvents:r,ignoreDeleteEvents:o}=this,s=a=>{let{root:l,files:u}=a;u=u.filter(c=>c.type=="f"&&(0,_W.default)(c.name,t,{dot:!0}));for(let c of u){let h=B.file(Rc.default.join(l,c.name));c.exists?c.new===!0?i||this._onDidCreate.fire(h):r||this._onDidChange.fire(h):o||this._onDidDelete.fire(h)}if(u.length==2&&u[0].exists!==u[1].exists){let c=u.find(d=>d.exists!==!0),h=u.find(d=>d.exists===!0);c.size==h.size&&this._onDidRename.fire({oldUri:B.file(Rc.default.join(l,c.name)),newUri:B.file(Rc.default.join(l,h.name))})}if(u.length>2&&u.length%2==0){let[c,h]=ny(u,d=>d.exists===!1);if(c.length==h.length)for(let d of c){let g=h.find(f=>f.size==d.size&&f.mtime_ms==d.mtime_ms);g&&this._onDidRename.fire({oldUri:B.file(Rc.default.join(l,d.name)),newUri:B.file(Rc.default.join(l,g.name))})}}};e.subscribe(t,s).then(a=>{if(this.subscribe=a.subscribe,this._disposed)return a.dispose();this.disposables.push(a)}).logError()}dispose(){this._disposed=!0,Yg.watchers.delete(this),this._onDidRename.dispose(),this._onDidCreate.dispose(),this._onDidChange.dispose(),J(this.disposables)}}});var Wg=b((Pje,FW)=>{var yye="2.0.0",vye=Number.MAX_SAFE_INTEGER||9007199254740991,wye=16;FW.exports={SEMVER_SPEC_VERSION:yye,MAX_LENGTH:256,MAX_SAFE_INTEGER:vye,MAX_SAFE_COMPONENT_LENGTH:wye}});var Zg=b((_je,IW)=>{var Dye=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};IW.exports=Dye});var Tl=b((la,jW)=>{var{MAX_SAFE_COMPONENT_LENGTH:Ck}=Wg(),Cye=Zg();la=jW.exports={};var xye=la.re=[],te=la.src=[],ie=la.t={},Sye=0,xe=(n,e,t)=>{let i=Sye++;Cye(n,i,e),ie[n]=i,te[i]=e,xye[i]=new RegExp(e,t?"g":void 0)};xe("NUMERICIDENTIFIER","0|[1-9]\\d*");xe("NUMERICIDENTIFIERLOOSE","[0-9]+");xe("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");xe("MAINVERSION",`(${te[ie.NUMERICIDENTIFIER]})\\.(${te[ie.NUMERICIDENTIFIER]})\\.(${te[ie.NUMERICIDENTIFIER]})`);xe("MAINVERSIONLOOSE",`(${te[ie.NUMERICIDENTIFIERLOOSE]})\\.(${te[ie.NUMERICIDENTIFIERLOOSE]})\\.(${te[ie.NUMERICIDENTIFIERLOOSE]})`);xe("PRERELEASEIDENTIFIER",`(?:${te[ie.NUMERICIDENTIFIER]}|${te[ie.NONNUMERICIDENTIFIER]})`);xe("PRERELEASEIDENTIFIERLOOSE",`(?:${te[ie.NUMERICIDENTIFIERLOOSE]}|${te[ie.NONNUMERICIDENTIFIER]})`);xe("PRERELEASE",`(?:-(${te[ie.PRERELEASEIDENTIFIER]}(?:\\.${te[ie.PRERELEASEIDENTIFIER]})*))`);xe("PRERELEASELOOSE",`(?:-?(${te[ie.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${te[ie.PRERELEASEIDENTIFIERLOOSE]})*))`);xe("BUILDIDENTIFIER","[0-9A-Za-z-]+");xe("BUILD",`(?:\\+(${te[ie.BUILDIDENTIFIER]}(?:\\.${te[ie.BUILDIDENTIFIER]})*))`);xe("FULLPLAIN",`v?${te[ie.MAINVERSION]}${te[ie.PRERELEASE]}?${te[ie.BUILD]}?`);xe("FULL",`^${te[ie.FULLPLAIN]}$`);xe("LOOSEPLAIN",`[v=\\s]*${te[ie.MAINVERSIONLOOSE]}${te[ie.PRERELEASELOOSE]}?${te[ie.BUILD]}?`);xe("LOOSE",`^${te[ie.LOOSEPLAIN]}$`);xe("GTLT","((?:<|>)?=?)");xe("XRANGEIDENTIFIERLOOSE",`${te[ie.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);xe("XRANGEIDENTIFIER",`${te[ie.NUMERICIDENTIFIER]}|x|X|\\*`);xe("XRANGEPLAIN",`[v=\\s]*(${te[ie.XRANGEIDENTIFIER]})(?:\\.(${te[ie.XRANGEIDENTIFIER]})(?:\\.(${te[ie.XRANGEIDENTIFIER]})(?:${te[ie.PRERELEASE]})?${te[ie.BUILD]}?)?)?`);xe("XRANGEPLAINLOOSE",`[v=\\s]*(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:\\.(${te[ie.XRANGEIDENTIFIERLOOSE]})(?:${te[ie.PRERELEASELOOSE]})?${te[ie.BUILD]}?)?)?`);xe("XRANGE",`^${te[ie.GTLT]}\\s*${te[ie.XRANGEPLAIN]}$`);xe("XRANGELOOSE",`^${te[ie.GTLT]}\\s*${te[ie.XRANGEPLAINLOOSE]}$`);xe("COERCE",`(^|[^\\d])(\\d{1,${Ck}})(?:\\.(\\d{1,${Ck}}))?(?:\\.(\\d{1,${Ck}}))?(?:$|[^\\d])`);xe("COERCERTL",te[ie.COERCE],!0);xe("LONETILDE","(?:~>?)");xe("TILDETRIM",`(\\s*)${te[ie.LONETILDE]}\\s+`,!0);la.tildeTrimReplace="$1~";xe("TILDE",`^${te[ie.LONETILDE]}${te[ie.XRANGEPLAIN]}$`);xe("TILDELOOSE",`^${te[ie.LONETILDE]}${te[ie.XRANGEPLAINLOOSE]}$`);xe("LONECARET","(?:\\^)");xe("CARETTRIM",`(\\s*)${te[ie.LONECARET]}\\s+`,!0);la.caretTrimReplace="$1^";xe("CARET",`^${te[ie.LONECARET]}${te[ie.XRANGEPLAIN]}$`);xe("CARETLOOSE",`^${te[ie.LONECARET]}${te[ie.XRANGEPLAINLOOSE]}$`);xe("COMPARATORLOOSE",`^${te[ie.GTLT]}\\s*(${te[ie.LOOSEPLAIN]})$|^$`);xe("COMPARATOR",`^${te[ie.GTLT]}\\s*(${te[ie.FULLPLAIN]})$|^$`);xe("COMPARATORTRIM",`(\\s*)${te[ie.GTLT]}\\s*(${te[ie.LOOSEPLAIN]}|${te[ie.XRANGEPLAIN]})`,!0);la.comparatorTrimReplace="$1$2$3";xe("HYPHENRANGE",`^\\s*(${te[ie.XRANGEPLAIN]})\\s+-\\s+(${te[ie.XRANGEPLAIN]})\\s*$`);xe("HYPHENRANGELOOSE",`^\\s*(${te[ie.XRANGEPLAINLOOSE]})\\s+-\\s+(${te[ie.XRANGEPLAINLOOSE]})\\s*$`);xe("STAR","(<|>)?=?\\s*\\*");xe("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");xe("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Jg=b((Rje,AW)=>{var Tye=["includePrerelease","loose","rtl"],kye=n=>n?typeof n!="object"?{loose:!0}:Tye.filter(e=>n[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};AW.exports=kye});var cy=b((Lje,NW)=>{var OW=/^[0-9]+$/,MW=(n,e)=>{let t=OW.test(n),i=OW.test(e);return t&&i&&(n=+n,e=+e),n===e?0:t&&!i?-1:i&&!t?1:nMW(e,n);NW.exports={compareIdentifiers:MW,rcompareIdentifiers:Eye}});var Li=b((Fje,YW)=>{var hy=Zg(),{MAX_LENGTH:BW,MAX_SAFE_INTEGER:dy}=Wg(),{re:HW,t:qW}=Tl(),Pye=Jg(),{compareIdentifiers:Fc}=cy(),nr=class{constructor(e,t){if(t=Pye(t),e instanceof nr){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>BW)throw new TypeError(`version is longer than ${BW} characters`);hy("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?HW[qW.LOOSE]:HW[qW.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>dy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&o=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(Fc(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};YW.exports=nr});var kl=b((Ije,$W)=>{var{MAX_LENGTH:_ye}=Wg(),{re:WW,t:ZW}=Tl(),JW=Li(),Rye=Jg(),Lye=(n,e)=>{if(e=Rye(e),n instanceof JW)return n;if(typeof n!="string"||n.length>_ye||!(e.loose?WW[ZW.LOOSE]:WW[ZW.FULL]).test(n))return null;try{return new JW(n,e)}catch{return null}};$W.exports=Lye});var UW=b((jje,XW)=>{var Fye=kl(),Iye=(n,e)=>{let t=Fye(n,e);return t?t.version:null};XW.exports=Iye});var QW=b((Aje,GW)=>{var jye=kl(),Aye=(n,e)=>{let t=jye(n.trim().replace(/^[=v]+/,""),e);return t?t.version:null};GW.exports=Aye});var VW=b((Oje,zW)=>{var KW=Li(),Oye=(n,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new KW(n instanceof KW?n.version:n,t).inc(e,i).version}catch{return null}};zW.exports=Oye});var rr=b((Mje,t3)=>{var e3=Li(),Mye=(n,e,t)=>new e3(n,t).compare(new e3(e,t));t3.exports=Mye});var gy=b((Nje,i3)=>{var Nye=rr(),Bye=(n,e,t)=>Nye(n,e,t)===0;i3.exports=Bye});var o3=b((Bje,r3)=>{var n3=kl(),Hye=gy(),qye=(n,e)=>{if(Hye(n,e))return null;{let t=n3(n),i=n3(e),r=t.prerelease.length||i.prerelease.length,o=r?"pre":"",s=r?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return o+a;return s}};r3.exports=qye});var a3=b((Hje,s3)=>{var Yye=Li(),Wye=(n,e)=>new Yye(n,e).major;s3.exports=Wye});var u3=b((qje,l3)=>{var Zye=Li(),Jye=(n,e)=>new Zye(n,e).minor;l3.exports=Jye});var h3=b((Yje,c3)=>{var $ye=Li(),Xye=(n,e)=>new $ye(n,e).patch;c3.exports=Xye});var g3=b((Wje,d3)=>{var Uye=kl(),Gye=(n,e)=>{let t=Uye(n,e);return t&&t.prerelease.length?t.prerelease:null};d3.exports=Gye});var p3=b((Zje,f3)=>{var Qye=rr(),Kye=(n,e,t)=>Qye(e,n,t);f3.exports=Kye});var b3=b((Jje,m3)=>{var zye=rr(),Vye=(n,e)=>zye(n,e,!0);m3.exports=Vye});var fy=b(($je,v3)=>{var y3=Li(),eve=(n,e,t)=>{let i=new y3(n,t),r=new y3(e,t);return i.compare(r)||i.compareBuild(r)};v3.exports=eve});var D3=b((Xje,w3)=>{var tve=fy(),ive=(n,e)=>n.sort((t,i)=>tve(t,i,e));w3.exports=ive});var x3=b((Uje,C3)=>{var nve=fy(),rve=(n,e)=>n.sort((t,i)=>nve(i,t,e));C3.exports=rve});var $g=b((Gje,S3)=>{var ove=rr(),sve=(n,e,t)=>ove(n,e,t)>0;S3.exports=sve});var py=b((Qje,T3)=>{var ave=rr(),lve=(n,e,t)=>ave(n,e,t)<0;T3.exports=lve});var xk=b((Kje,k3)=>{var uve=rr(),cve=(n,e,t)=>uve(n,e,t)!==0;k3.exports=cve});var my=b((zje,E3)=>{var hve=rr(),dve=(n,e,t)=>hve(n,e,t)>=0;E3.exports=dve});var by=b((Vje,P3)=>{var gve=rr(),fve=(n,e,t)=>gve(n,e,t)<=0;P3.exports=fve});var Sk=b((e1e,_3)=>{var pve=gy(),mve=xk(),bve=$g(),yve=my(),vve=py(),wve=by(),Dve=(n,e,t,i)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n===t;case"!==":return typeof n=="object"&&(n=n.version),typeof t=="object"&&(t=t.version),n!==t;case"":case"=":case"==":return pve(n,t,i);case"!=":return mve(n,t,i);case">":return bve(n,t,i);case">=":return yve(n,t,i);case"<":return vve(n,t,i);case"<=":return wve(n,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};_3.exports=Dve});var L3=b((t1e,R3)=>{var Cve=Li(),xve=kl(),{re:yy,t:vy}=Tl(),Sve=(n,e)=>{if(n instanceof Cve)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let t=null;if(!e.rtl)t=n.match(yy[vy.COERCE]);else{let i;for(;(i=yy[vy.COERCERTL].exec(n))&&(!t||t.index+t[0].length!==n.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),yy[vy.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;yy[vy.COERCERTL].lastIndex=-1}return t===null?null:xve(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};R3.exports=Sve});var I3=b((i1e,F3)=>{"use strict";F3.exports=function(n){n.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Xg=b((n1e,j3)=>{"use strict";j3.exports=qe;qe.Node=El;qe.create=qe;function qe(n){var e=this;if(e instanceof qe||(e=new qe),e.tail=null,e.head=null,e.length=0,n&&typeof n.forEach=="function")n.forEach(function(r){e.push(r)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=0;i!==null;r++)t=n(t,i.value,r),i=i.next;return t};qe.prototype.reduceReverse=function(n,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var r=this.length-1;i!==null;r--)t=n(t,i.value,r),i=i.prev;return t};qe.prototype.toArray=function(){for(var n=new Array(this.length),e=0,t=this.head;t!==null;e++)n[e]=t.value,t=t.next;return n};qe.prototype.toArrayReverse=function(){for(var n=new Array(this.length),e=0,t=this.tail;t!==null;e++)n[e]=t.value,t=t.prev;return n};qe.prototype.slice=function(n,e){e=e||this.length,e<0&&(e+=this.length),n=n||0,n<0&&(n+=this.length);var t=new qe;if(ethis.length&&(e=this.length);for(var i=0,r=this.head;r!==null&&ithis.length&&(e=this.length);for(var i=this.length,r=this.tail;r!==null&&i>e;i--)r=r.prev;for(;r!==null&&i>n;i--,r=r.prev)t.push(r.value);return t};qe.prototype.splice=function(n,e,...t){n>this.length&&(n=this.length-1),n<0&&(n=this.length+n);for(var i=0,r=this.head;r!==null&&i{"use strict";var Pve=Xg(),Pl=Symbol("max"),Vo=Symbol("length"),Ic=Symbol("lengthCalculator"),Gg=Symbol("allowStale"),_l=Symbol("maxAge"),zo=Symbol("dispose"),A3=Symbol("noDisposeOnSet"),gi=Symbol("lruList"),Mr=Symbol("cache"),M3=Symbol("updateAgeOnGet"),Tk=()=>1,N3=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Pl]=e.max||1/0,i=e.length||Tk;if(this[Ic]=typeof i!="function"?Tk:i,this[Gg]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[_l]=e.maxAge||0,this[zo]=e.dispose,this[A3]=e.noDisposeOnSet||!1,this[M3]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Pl]=e||1/0,Ug(this)}get max(){return this[Pl]}set allowStale(e){this[Gg]=!!e}get allowStale(){return this[Gg]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[_l]=e,Ug(this)}get maxAge(){return this[_l]}set lengthCalculator(e){typeof e!="function"&&(e=Tk),e!==this[Ic]&&(this[Ic]=e,this[Vo]=0,this[gi].forEach(t=>{t.length=this[Ic](t.value,t.key),this[Vo]+=t.length})),Ug(this)}get lengthCalculator(){return this[Ic]}get length(){return this[Vo]}get itemCount(){return this[gi].length}rforEach(e,t){t=t||this;for(let i=this[gi].tail;i!==null;){let r=i.prev;O3(this,e,i,t),i=r}}forEach(e,t){t=t||this;for(let i=this[gi].head;i!==null;){let r=i.next;O3(this,e,i,t),i=r}}keys(){return this[gi].toArray().map(e=>e.key)}values(){return this[gi].toArray().map(e=>e.value)}reset(){this[zo]&&this[gi]&&this[gi].length&&this[gi].forEach(e=>this[zo](e.key,e.value)),this[Mr]=new Map,this[gi]=new Pve,this[Vo]=0}dump(){return this[gi].map(e=>wy(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[gi]}set(e,t,i){if(i=i||this[_l],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let r=i?Date.now():0,o=this[Ic](t,e);if(this[Mr].has(e)){if(o>this[Pl])return jc(this,this[Mr].get(e)),!1;let l=this[Mr].get(e).value;return this[zo]&&(this[A3]||this[zo](e,l.value)),l.now=r,l.maxAge=i,l.value=t,this[Vo]+=o-l.length,l.length=o,this.get(e),Ug(this),!0}let s=new B3(e,t,o,r,i);return s.length>this[Pl]?(this[zo]&&this[zo](e,t),!1):(this[Vo]+=s.length,this[gi].unshift(s),this[Mr].set(e,this[gi].head),Ug(this),!0)}has(e){if(!this[Mr].has(e))return!1;let t=this[Mr].get(e).value;return!wy(this,t)}get(e){return kk(this,e,!0)}peek(e){return kk(this,e,!1)}pop(){let e=this[gi].tail;return e?(jc(this,e),e.value):null}del(e){jc(this,this[Mr].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let r=e[i],o=r.e||0;if(o===0)this.set(r.k,r.v);else{let s=o-t;s>0&&this.set(r.k,r.v,s)}}}prune(){this[Mr].forEach((e,t)=>kk(this,t,!1))}},kk=(n,e,t)=>{let i=n[Mr].get(e);if(i){let r=i.value;if(wy(n,r)){if(jc(n,i),!n[Gg])return}else t&&(n[M3]&&(i.value.now=Date.now()),n[gi].unshiftNode(i));return r.value}},wy=(n,e)=>{if(!e||!e.maxAge&&!n[_l])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:n[_l]&&t>n[_l]},Ug=n=>{if(n[Vo]>n[Pl])for(let e=n[gi].tail;n[Vo]>n[Pl]&&e!==null;){let t=e.prev;jc(n,e),e=t}},jc=(n,e)=>{if(e){let t=e.value;n[zo]&&n[zo](t.key,t.value),n[Vo]-=t.length,n[Mr].delete(t.key),n[gi].removeNode(e)}},B3=class{constructor(e,t,i,r,o){this.key=e,this.value=t,this.length=i,this.now=r,this.maxAge=o||0}},O3=(n,e,t,i)=>{let r=t.value;wy(n,r)&&(jc(n,t),n[Gg]||(r=void 0)),r&&e.call(i,r.value,r.key,n)};H3.exports=N3});var or=b((o1e,J3)=>{var Ac=class{constructor(e,t){if(t=Rve(t),e instanceof Ac)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Ac(e.raw,t);if(e instanceof Ek)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!W3(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&Ave(r[0])){this.set=[r];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=Y3.get(i);if(r)return r;let o=this.options.loose,s=o?mn[Qi.HYPHENRANGELOOSE]:mn[Qi.HYPHENRANGE];e=e.replace(s,Jve(this.options.includePrerelease)),Ft("hyphen replace",e),e=e.replace(mn[Qi.COMPARATORTRIM],Fve),Ft("comparator trim",e),e=e.replace(mn[Qi.TILDETRIM],Ive),e=e.replace(mn[Qi.CARETTRIM],jve),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(h=>Ove(h,this.options)).join(" ").split(/\s+/).map(h=>Zve(h,this.options));o&&(a=a.filter(h=>(Ft("loose invalid filter",h,this.options),!!h.match(mn[Qi.COMPARATORLOOSE])))),Ft("range list",a);let l=new Map,u=a.map(h=>new Ek(h,this.options));for(let h of u){if(W3(h))return[h];l.set(h.value,h)}l.size>1&&l.has("")&&l.delete("");let c=[...l.values()];return Y3.set(i,c),c}intersects(e,t){if(!(e instanceof Ac))throw new TypeError("a Range is required");return this.set.some(i=>Z3(i,t)&&e.set.some(r=>Z3(r,t)&&i.every(o=>r.every(s=>o.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Lve(e,this.options)}catch{return!1}for(let t=0;tn.value==="<0.0.0-0",Ave=n=>n.value==="",Z3=(n,e)=>{let t=!0,i=n.slice(),r=i.pop();for(;t&&i.length;)t=i.every(o=>r.intersects(o,e)),r=i.pop();return t},Ove=(n,e)=>(Ft("comp",n,e),n=Bve(n,e),Ft("caret",n),n=Mve(n,e),Ft("tildes",n),n=qve(n,e),Ft("xrange",n),n=Wve(n,e),Ft("stars",n),n),Ki=n=>!n||n.toLowerCase()==="x"||n==="*",Mve=(n,e)=>n.trim().split(/\s+/).map(t=>Nve(t,e)).join(" "),Nve=(n,e)=>{let t=e.loose?mn[Qi.TILDELOOSE]:mn[Qi.TILDE];return n.replace(t,(i,r,o,s,a)=>{Ft("tilde",n,i,r,o,s,a);let l;return Ki(r)?l="":Ki(o)?l=`>=${r}.0.0 <${+r+1}.0.0-0`:Ki(s)?l=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?(Ft("replaceTilde pr",a),l=`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`):l=`>=${r}.${o}.${s} <${r}.${+o+1}.0-0`,Ft("tilde return",l),l})},Bve=(n,e)=>n.trim().split(/\s+/).map(t=>Hve(t,e)).join(" "),Hve=(n,e)=>{Ft("caret",n,e);let t=e.loose?mn[Qi.CARETLOOSE]:mn[Qi.CARET],i=e.includePrerelease?"-0":"";return n.replace(t,(r,o,s,a,l)=>{Ft("caret",n,r,o,s,a,l);let u;return Ki(o)?u="":Ki(s)?u=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Ki(a)?o==="0"?u=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:l?(Ft("replaceCaret pr",l),o==="0"?s==="0"?u=`>=${o}.${s}.${a}-${l} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a}-${l} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a}-${l} <${+o+1}.0.0-0`):(Ft("no pr"),o==="0"?s==="0"?u=`>=${o}.${s}.${a}${i} <${o}.${s}.${+a+1}-0`:u=`>=${o}.${s}.${a}${i} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),Ft("caret return",u),u})},qve=(n,e)=>(Ft("replaceXRanges",n,e),n.split(/\s+/).map(t=>Yve(t,e)).join(" ")),Yve=(n,e)=>{n=n.trim();let t=e.loose?mn[Qi.XRANGELOOSE]:mn[Qi.XRANGE];return n.replace(t,(i,r,o,s,a,l)=>{Ft("xRange",n,i,r,o,s,a,l);let u=Ki(o),c=u||Ki(s),h=c||Ki(a),d=h;return r==="="&&d&&(r=""),l=e.includePrerelease?"-0":"",u?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&d?(c&&(s=0),a=0,r===">"?(r=">=",c?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",c?o=+o+1:s=+s+1),r==="<"&&(l="-0"),i=`${r+o}.${s}.${a}${l}`):c?i=`>=${o}.0.0${l} <${+o+1}.0.0-0`:h&&(i=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`),Ft("xRange return",i),i})},Wve=(n,e)=>(Ft("replaceStars",n,e),n.trim().replace(mn[Qi.STAR],"")),Zve=(n,e)=>(Ft("replaceGTE0",n,e),n.trim().replace(mn[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),Jve=n=>(e,t,i,r,o,s,a,l,u,c,h,d,g)=>(Ki(i)?t="":Ki(r)?t=`>=${i}.0.0${n?"-0":""}`:Ki(o)?t=`>=${i}.${r}.0${n?"-0":""}`:s?t=`>=${t}`:t=`>=${t}${n?"-0":""}`,Ki(u)?l="":Ki(c)?l=`<${+u+1}.0.0-0`:Ki(h)?l=`<${u}.${+c+1}.0-0`:d?l=`<=${u}.${c}.${h}-${d}`:n?l=`<${u}.${c}.${+h+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),$ve=(n,e,t)=>{for(let i=0;i0){let r=n[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0}});var Qg=b((s1e,Q3)=>{var Kg=Symbol("SemVer ANY"),zg=class{static get ANY(){return Kg}constructor(e,t){if(t=Xve(t),e instanceof zg){if(e.loose===!!t.loose)return e;e=e.value}_k("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Kg?this.value="":this.value=this.operator+this.semver.version,_k("comp",this)}parse(e){let t=this.options.loose?$3[X3.COMPARATORLOOSE]:$3[X3.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new U3(i[2],this.options.loose):this.semver=Kg}toString(){return this.value}test(e){if(_k("Comparator.test",e,this.options.loose),this.semver===Kg||e===Kg)return!0;if(typeof e=="string")try{e=new U3(e,this.options)}catch{return!1}return Pk(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof zg))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new G3(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new G3(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),o=this.semver.version===e.semver.version,s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=Pk(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Pk(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||r||o&&s||a||l}};Q3.exports=zg;var Xve=Jg(),{re:$3,t:X3}=Tl(),Pk=Sk(),_k=Zg(),U3=Li(),G3=or()});var Vg=b((a1e,K3)=>{var Uve=or(),Gve=(n,e,t)=>{try{e=new Uve(e,t)}catch{return!1}return e.test(n)};K3.exports=Gve});var V3=b((l1e,z3)=>{var Qve=or(),Kve=(n,e)=>new Qve(n,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));z3.exports=Kve});var tZ=b((u1e,eZ)=>{var zve=Li(),Vve=or(),ewe=(n,e,t)=>{let i=null,r=null,o=null;try{o=new Vve(e,t)}catch{return null}return n.forEach(s=>{o.test(s)&&(!i||r.compare(s)===-1)&&(i=s,r=new zve(i,t))}),i};eZ.exports=ewe});var nZ=b((c1e,iZ)=>{var twe=Li(),iwe=or(),nwe=(n,e,t)=>{let i=null,r=null,o=null;try{o=new iwe(e,t)}catch{return null}return n.forEach(s=>{o.test(s)&&(!i||r.compare(s)===1)&&(i=s,r=new twe(i,t))}),i};iZ.exports=nwe});var sZ=b((h1e,oZ)=>{var Rk=Li(),rwe=or(),rZ=$g(),owe=(n,e)=>{n=new rwe(n,e);let t=new Rk("0.0.0");if(n.test(t)||(t=new Rk("0.0.0-0"),n.test(t)))return t;t=null;for(let i=0;i{let a=new Rk(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||rZ(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!t||rZ(t,o))&&(t=o)}return t&&n.test(t)?t:null};oZ.exports=owe});var lZ=b((d1e,aZ)=>{var swe=or(),awe=(n,e)=>{try{return new swe(n,e).range||"*"}catch{return null}};aZ.exports=awe});var Dy=b((g1e,dZ)=>{var lwe=Li(),hZ=Qg(),{ANY:uwe}=hZ,cwe=or(),hwe=Vg(),uZ=$g(),cZ=py(),dwe=by(),gwe=my(),fwe=(n,e,t,i)=>{n=new lwe(n,i),e=new cwe(e,i);let r,o,s,a,l;switch(t){case">":r=uZ,o=dwe,s=cZ,a=">",l=">=";break;case"<":r=cZ,o=gwe,s=uZ,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(hwe(n,e,i))return!1;for(let u=0;u{g.semver===uwe&&(g=new hZ(">=0.0.0")),h=h||g,d=d||g,r(g.semver,h.semver,i)?h=g:s(g.semver,d.semver,i)&&(d=g)}),h.operator===a||h.operator===l||(!d.operator||d.operator===a)&&o(n,d.semver))return!1;if(d.operator===l&&s(n,d.semver))return!1}return!0};dZ.exports=fwe});var fZ=b((f1e,gZ)=>{var pwe=Dy(),mwe=(n,e,t)=>pwe(n,e,">",t);gZ.exports=mwe});var mZ=b((p1e,pZ)=>{var bwe=Dy(),ywe=(n,e,t)=>bwe(n,e,"<",t);pZ.exports=ywe});var vZ=b((m1e,yZ)=>{var bZ=or(),vwe=(n,e,t)=>(n=new bZ(n,t),e=new bZ(e,t),n.intersects(e));yZ.exports=vwe});var DZ=b((b1e,wZ)=>{var wwe=Vg(),Dwe=rr();wZ.exports=(n,e,t)=>{let i=[],r=null,o=null,s=n.sort((c,h)=>Dwe(c,h,t));for(let c of s)wwe(c,e,t)?(o=c,r||(r=c)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let a=[];for(let[c,h]of i)c===h?a.push(c):!h&&c===s[0]?a.push("*"):h?c===s[0]?a.push(`<=${h}`):a.push(`${c} - ${h}`):a.push(`>=${c}`);let l=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{var CZ=or(),Cy=Qg(),{ANY:Lk}=Cy,ef=Vg(),Fk=rr(),Cwe=(n,e,t={})=>{if(n===e)return!0;n=new CZ(n,t),e=new CZ(e,t);let i=!1;e:for(let r of n.set){for(let o of e.set){let s=xwe(r,o,t);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},xwe=(n,e,t)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Lk){if(e.length===1&&e[0].semver===Lk)return!0;t.includePrerelease?n=[new Cy(">=0.0.0-0")]:n=[new Cy(">=0.0.0")]}if(e.length===1&&e[0].semver===Lk){if(t.includePrerelease)return!0;e=[new Cy(">=0.0.0")]}let i=new Set,r,o;for(let g of n)g.operator===">"||g.operator===">="?r=xZ(r,g,t):g.operator==="<"||g.operator==="<="?o=SZ(o,g,t):i.add(g.semver);if(i.size>1)return null;let s;if(r&&o){if(s=Fk(r.semver,o.semver,t),s>0)return null;if(s===0&&(r.operator!==">="||o.operator!=="<="))return null}for(let g of i){if(r&&!ef(g,String(r),t)||o&&!ef(g,String(o),t))return null;for(let f of e)if(!ef(g,String(f),t))return!1;return!0}let a,l,u,c,h=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1,d=r&&!t.includePrerelease&&r.semver.prerelease.length?r.semver:!1;h&&h.prerelease.length===1&&o.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let g of e){if(c=c||g.operator===">"||g.operator===">=",u=u||g.operator==="<"||g.operator==="<=",r){if(d&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===d.major&&g.semver.minor===d.minor&&g.semver.patch===d.patch&&(d=!1),g.operator===">"||g.operator===">="){if(a=xZ(r,g,t),a===g&&a!==r)return!1}else if(r.operator===">="&&!ef(r.semver,String(g),t))return!1}if(o){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator==="<"||g.operator==="<="){if(l=SZ(o,g,t),l===g&&l!==o)return!1}else if(o.operator==="<="&&!ef(o.semver,String(g),t))return!1}if(!g.operator&&(o||r)&&s!==0)return!1}return!(r&&u&&!o&&s!==0||o&&c&&!r&&s!==0||d||h)},xZ=(n,e,t)=>{if(!n)return e;let i=Fk(n.semver,e.semver,t);return i>0?n:i<0||e.operator===">"&&n.operator===">="?e:n},SZ=(n,e,t)=>{if(!n)return e;let i=Fk(n.semver,e.semver,t);return i<0?n:i>0||e.operator==="<"&&n.operator==="<="?e:n};TZ.exports=Cwe});var tf=b((v1e,EZ)=>{var Ik=Tl();EZ.exports={re:Ik.re,src:Ik.src,tokens:Ik.t,SEMVER_SPEC_VERSION:Wg().SEMVER_SPEC_VERSION,SemVer:Li(),compareIdentifiers:cy().compareIdentifiers,rcompareIdentifiers:cy().rcompareIdentifiers,parse:kl(),valid:UW(),clean:QW(),inc:VW(),diff:o3(),major:a3(),minor:u3(),patch:h3(),prerelease:g3(),compare:rr(),rcompare:p3(),compareLoose:b3(),compareBuild:fy(),sort:D3(),rsort:x3(),gt:$g(),lt:py(),eq:gy(),neq:xk(),gte:my(),lte:by(),cmp:Sk(),coerce:L3(),Comparator:Qg(),Range:or(),satisfies:Vg(),toComparators:V3(),maxSatisfying:tZ(),minSatisfying:nZ(),minVersion:sZ(),validRange:lZ(),outside:Dy(),gtr:fZ(),ltr:mZ(),intersects:vZ(),simplifyRange:DZ(),subset:kZ()}});var Oc,PZ,jk,C1e,xy,_Z=_(()=>{"use strict";Oc=x(require("path")),PZ=x(require("fs"));V();$e();jk=x(cg()),C1e=H()("model-resolver"),xy=class{get nodeFolder(){return ng("npm")?this._npmFolder?Promise.resolve(this._npmFolder):eo("npm --loglevel silent root -g",{},3e3).then(e=>(this._npmFolder=(0,jk.default)(e).trim(),this._npmFolder)):Promise.resolve("")}get yarnFolder(){return ng("yarnpkg")?this._yarnFolder?Promise.resolve(this._yarnFolder):eo("yarnpkg global dir",{},3e3).then(e=>{let t=Oc.default.join((0,jk.default)(e).trim(),"node_modules"),i=PZ.default.existsSync(t);return i&&(this._yarnFolder=t),i?t:""}):Promise.resolve("")}async resolveModule(e){let t=await this.nodeFolder,i=await this.yarnFolder;if(i){let r=await qt(Oc.default.join(i,e,"package.json"));if(r&&r.isFile())return Oc.default.join(i,e)}if(t){let r=await qt(Oc.default.join(t,e,"package.json"));if(r&&r.isFile())return Oc.default.join(t,e)}return null}}});function IZ(n,e){if(!e.startsWith("nvim-")&&!e.startsWith("patch-"))throw new Error("Feature param could only starts with nvim and patch");if(!n.isVim&&e.startsWith("patch-")||n.isVim&&e.startsWith("nvim-"))return!1;if(n.isVim){let[t,i,r,o]=n.version.match(/^(\d)(\d{2})(\d+)$/),s=`${i}.${parseInt(r,10)}.${parseInt(o,10)}`;return Ok.default.gte(s,e.slice(6))}return Ok.default.gte(n.version,e.slice(5))}function jZ(n=""){return Ak.has(n)?Ak.get(n):(Sy=Sy+1,Ak.set(n,Sy),Sy)}function AZ(n){let t=n.getConfiguration("coc.preferences").get("watchmanPath","watchman");try{return FZ.default.sync(t)}catch{return null}}async function OZ(n,e,t){let i=await n.call("expand","%:p");i=nf.default.normalize(i);let r=i&&nf.default.isAbsolute(i);if(r&&!Oe(e,i,!0))return yc(t,nf.default.dirname(i));let o=yc(t,e);return o&&o!=LZ.default.homedir()?o:r?yc(t,nf.default.dirname(i)):null}function MZ(n){return Swe.resolveModule(n)}function Mk(n,e,t){if(Array.isArray(n)){let i=0;for(let r of n){let o=Mk(r,e,t);if(o===10)return o;o>i&&(i=o)}return i}else{if(typeof n=="string")return n==="*"?5:n===t?10:0;if(n){let i=B.parse(e),{language:r,pattern:o,scheme:s}=n,a=0;if(s)if(s===i.scheme)a=5;else if(s==="*")a=3;else return 0;if(r)if(r===t)a=10;else if(r==="*")a=Math.max(a,5);else return 0;if(o){let l=Xi||oc,u=l?o.toLowerCase():o,c=l?i.fsPath.toLowerCase():i.fsPath;if(u===c||(0,RZ.default)(c,u,{dot:!0}))a=5;else return 0}return a}else return 0}}var RZ,LZ,nf,Ok,FZ,Sy,Swe,Ak,NZ=_(()=>{"use strict";RZ=x(Vn()),LZ=x(require("os")),nf=x(require("path")),Ok=x(tf());De();FZ=x(tg());_Z();$e();sc();Sy=2e3,Swe=new xy,Ak=new Map});var Ty,Twe,ky,BZ=_(()=>{"use strict";Ne();Ty=x(q());V();Twe=H()("core-keymaps"),ky=class{constructor(e){this.documents=e;this.keymaps=new Map}attach(e){this.nvim=e}async doKeymap(e,t="",i){let r=this.keymaps.get(e);if(!r)return Twe.error(`keymap for ${e} not found`),i&&this.nvim.command(`silent! unmap ${i.startsWith("{")&&i.endsWith("}")?`<${i.slice(1,-1)}>`:i}`,!0),t;let[o,s]=r,a=await Promise.resolve(o());return s&&await this.nvim.command(`silent! call repeat#set("\\(coc-${e})", -1)`),a!=null?a:t}registerKeymap(e,t,i,r={}){if(!t)throw new Error(`Invalid key ${t} of registerKeymap`);if(this.keymaps.has(t))throw new Error(`${t} already exists.`);r=Object.assign({sync:!0,cancel:!0,silent:!0,repeat:!1},r);let{nvim:o}=this;this.keymaps.set(t,[i,!!r.repeat]);let s=r.sync?"request":"notify",a=r.silent?"":"";for(let l of e)if(l=="i")o.command(`inoremap ${a} (coc-${t}) coc#_insert_key('${s}', '${t}', ${r.cancel?1:0})`,!0);else{let u=F0(l);o.command(`${l}noremap ${a} (coc-${t}) :${u}call coc#rpc#${s}('doKeymap', ['${t}'])`,!0)}return Ty.Disposable.create(()=>{this.keymaps.delete(t);for(let l of e)o.command(`${l}unmap (coc-${t})`,!0)})}registerExprKeymap(e,t,i,r=!1){let o=`${e}${global.Buffer.from(t).toString("base64")}${r?"1":"0"}`,{nvim:s}=this;return this.keymaps.set(o,[i,!1]),e=="i"?s.command(`inoremap ${r?"":""} ${t} coc#_insert_key('request', '${o}')`,!0):s.command(`${e}noremap ${r?"":""} ${t} coc#rpc#request('doKeymap', ['${o}'])`,!0),Ty.Disposable.create(()=>{this.keymaps.delete(o),s.command(`${e}unmap ${r?"":""} ${t}`,!0)})}registerLocalKeymap(e,t,i,r=!1){let o=Qo(),{nvim:s}=this,a=this.documents.bufnr;this.keymaps.set(o,[i,!1]);let l=r?"notify":"request",u=F0(e),c=t.startsWith("<")&&t.endsWith(">")?`{${t.slice(1,-1)}}`:t;if(this.nvim.hasFunction("nvim_buf_set_keymap")&&!global.hasOwnProperty("__TEST__"))s.call("nvim_buf_set_keymap",[0,e,t,`:${u}call coc#rpc#${l}('doKeymap', ['${o}', '', '${c}'])`,{silent:!0,nowait:!0}],!0);else{let h=`${e}noremap ${t} :${u}call coc#rpc#${l}('doKeymap', ['${o}', '', '${c}'])`;s.command(h,!0)}return Ty.Disposable.create(()=>{this.keymaps.delete(o),s.call("coc#compat#buf_del_keymap",[a,e,t],!0)})}}});var F1e,Ey,HZ=_(()=>{"use strict";V();F1e=H()("core-locations"),Ey=class{constructor(e,t,i){this.configurations=e;this.documents=t;this.contentProvider=i;this.disposables=[]}attach(e,t){this.nvim=e,this.env=t}async showLocations(e){let{documents:t,nvim:i,env:r,configurations:o}=this,s=await t.getQuickfixList(e);if(o.getConfiguration("coc.preferences").get("useQuickfixForLocations",!1)){let l=await i.getVar("coc_quickfix_open_command");typeof l!="string"&&(l=s.length<10?`copen ${s.length}`:"copen"),i.pauseNotification(),i.call("setqflist",[s],!0),i.command(l,!0),i.resumeNotification(!1,!0)}else await i.setVar("coc_jump_locations",s),r.locationlist?i.command("CocList --normal --auto-preview location",!0):i.call("coc#util#do_autocmd",["CocLocationsChange"],!0)}dispose(){J(this.disposables)}}});var Mc,M1e,Py,qZ=_(()=>{"use strict";ge();Mc=x(q());V();M1e=H()("core-watchers"),Py=class{constructor(){this.watchedOptions=new Set;this.disposables=[];this._onDidRuntimePathChange=new Mc.Emitter;this._onDidOptionChange=new Mc.Emitter;this.onDidRuntimePathChange=this._onDidRuntimePathChange.event;this.onDidOptionChange=this._onDidOptionChange.event}get options(){return Array.from(this.watchedOptions)}attach(e,t){this.nvim=e,this.env=t,this.watchOption("runtimepath",(i,r)=>{let o=i.split(","),a=r.split(",").filter(l=>!o.includes(l));a.length>0&&this._onDidRuntimePathChange.fire(a),this.env.runtimepath=r},this.disposables)}watchOption(e,t,i){let r=this.watchedOptions.has(e);r||(this.watchedOptions.add(e),this._onDidOptionChange.fire());let o=P.on("OptionSet",async(s,a,l)=>{s==e&&t&&await Promise.resolve(t(a,l))});i&&i.push(Mc.Disposable.create(()=>{o.dispose(),!r&&(this.watchedOptions.delete(e),this._onDidOptionChange.fire())}))}watchGlobal(e,t,i){let{nvim:r}=this;r.call("coc#_watch",e,!0);let o=P.on("GlobalChange",async(s,a,l)=>{s==e&&await Promise.resolve(t(a,l))});i&&i.push(Mc.Disposable.create(()=>{o.dispose(),r.call("coc#_unwatch",e,!0)}))}dispose(){J(this.disposables),this._onDidOptionChange.dispose(),this._onDidRuntimePathChange.dispose()}}});var rf,YZ,_y,WZ=_(()=>{"use strict";rf=x(q());ge();Ee();YZ=H()("core-editors"),_y=class{constructor(e){this.documents=e;this.disposables=[];this.editors=new Map;this._onDidChangeActiveTextEditor=new rf.Emitter;this._onDidChangeVisibleTextEditors=new rf.Emitter;this.onDidChangeActiveTextEditor=this._onDidChangeActiveTextEditor.event;this.onDidChangeVisibleTextEditors=this._onDidChangeVisibleTextEditors.event}get activeTextEditor(){return this.editors.get(this.winid)}get visibleTextEditors(){return Array.from(this.editors.values())}onChange(e){let t=`${e.winid}-${e.document.bufnr}-${e.document.uri}`;t!=this.previousId&&(this.previousId=t,this._onDidChangeActiveTextEditor.fire(e))}async attach(e){this.nvim=e;let{documents:t}=this,i=t.getDocument(t.bufnr);i&&i.winid>0&&(this.winid=i.winid,await this.createTextEditor(this.winid)),P.on("WinEnter",r=>{this.winid=r;let o=this.editors.get(r);o&&this.onChange(o)},null,this.disposables),P.on("CursorHold",async()=>{let[r,o,s]=await e.eval("[win_getid(),&buftype,coc#window#is_float(win_getid())]"),a=!1;!s&&["","acwrite"].includes(o)&&!this.editors.has(r)&&await this.createTextEditor(r)&&(a=!0),a&&this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors)},null,this.disposables),P.on("WinClosed",r=>{this.editors.has(r)&&(this.editors.delete(r),this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors))},null,this.disposables),P.on("BufWinEnter",async(r,o)=>{this.winid=o,await this.createTextEditor(o,!0)},null,this.disposables)}async createTextEditor(e,t=!1){let{documents:i,nvim:r}=this,o=await r.call("coc#util#get_editoroption",[e]);if(!o)return!1;let s=!1;if(t)for(let l of this.editors.keys())o.winids.includes(l)||(s=!0,this.editors.delete(l));let a=i.getDocument(o.bufnr);if(a){let l=this.fromOptions(o,a);return this.editors.set(e,l),e==this.winid&&this.onChange(l),this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors),YZ.debug("editor created winid & bufnr & tabnr: ",e,o.bufnr,o.tabpagenr),!0}else s&&this._onDidChangeVisibleTextEditors.fire(this.visibleTextEditors);return YZ.error(`document not found for window: ${e}`),!1}fromOptions(e,t){let{visibleRanges:i}=e,r=k.getTabId(e.tabpagenr);return{get tabpagenr(){return k.getTabNumber(r)},winid:e.winid,winnr:e.winnr,document:t,visibleRanges:i.map(o=>rf.Range.create(o[0]-1,0,o[1],0)),options:{tabSize:e.tabSize,insertSpaces:!!e.insertSpaces}}}}});function of(n){if(!(!n||!sf.default.isAbsolute(n)))return{name:sf.default.basename(n),uri:B.file(n).toString()}}var sf,ZZ,Ry,JZ=_(()=>{"use strict";sf=x(require("path")),ZZ=x(q());De();Ir();so();$e();Ry=class{constructor(e){this.configurations=e;this._onDidChangeWorkspaceFolders=new ZZ.Emitter;this.onDidChangeWorkspaceFolders=this._onDidChangeWorkspaceFolders.event;this.rootPatterns=new Map;this._workspaceFolders=[]}setWorkspaceFolders(e){if(!e||!Array.isArray(e))return;let t=e.map(i=>of(i));this._workspaceFolders=t.filter(i=>i!=null)}getWorkspaceFolder(e){if(e.scheme!=="file")return;let t=Array.from(this._workspaceFolders).map(o=>B.parse(o.uri).fsPath);t.sort((o,s)=>s.length-o.length);let i=e.fsPath,r=t.find(o=>Oe(o,i,!0));return of(r)}getRelativePath(e,t){let i,r="";if(typeof e=="string"?(i=B.file(e),r=e):typeof e<"u"&&(i=e,r=e.fsPath),!i)return r;let o=this.getWorkspaceFolder(i);if(!o)return r;typeof t>"u"&&this._workspaceFolders&&(t=this._workspaceFolders.length>1);let s=sf.default.relative(B.parse(o.uri).fsPath,i.fsPath);return s=s==""?i.fsPath:s,t&&o.name&&(s=`${o.name}/${s}`),s}get workspaceFolders(){return this._workspaceFolders}addRootPattern(e,t){let i=this.rootPatterns.get(e)||[];for(let r of t)i.includes(r)||i.push(r);this.rootPatterns.set(e,i)}resolveRoot(e,t,i,r){if(e.buftype!==""||e.schema!=="file"||!e.enabled)return null;let o=[0,1,2],s=B.parse(e.uri),a=sf.default.dirname(s.fsPath),l=this.configurations.getConfiguration("workspace",e.uri),u=l.get("ignoredFiletypes",[]),c=l.get("bottomUpFiletypes",[]),h=l.get("workspaceFolderCheckCwd",!0),d=l.get("ignoredFolders",[]),g=l.get("workspaceFolderFallbackCwd",!0);if(u!=null&&u.includes(e.filetype))return null;let f=this.getWorkspaceFolder(B.parse(e.uri));if(f)return B.parse(f.uri).fsPath;d=Array.isArray(d)?d.filter(m=>m&&m.length>0).map(m=>r(m)):[];let p=null;for(let m of o){let v=this.getRootPatterns(e,m);if(v&&v.length){let w=c.includes("*")||c.includes(e.filetype),D=fb(a,v,t,w,h,d);if(D){p=D;break}}}return g&&!p&&!d.includes(t)&&Oe(t,a,!0)&&(p=t),p&&this.addWorkspaceFolder(p,i),p}addWorkspaceFolder(e,t){let i=of(e);if(!!i)return this._workspaceFolders.findIndex(r=>r.uri==i.uri)==-1&&(this._workspaceFolders.push(i),t&&this._onDidChangeWorkspaceFolders.fire({added:[i],removed:[]})),i}renameWorkspaceFolder(e,t){let i=of(t);if(!i)return;let r=this._workspaceFolders.findIndex(s=>B.parse(s.uri).fsPath==e);if(r==-1)return;let o=this.workspaceFolders[r];this._workspaceFolders.splice(r,1,i),this._onDidChangeWorkspaceFolders.fire({removed:[o],added:[i]})}removeWorkspaceFolder(e){let t=of(e);if(!t)return;let i=this._workspaceFolders.findIndex(r=>r.uri==t.uri);i!=-1&&(this._workspaceFolders.splice(i,1),this._onDidChangeWorkspaceFolders.fire({removed:[t],added:[]}))}getRootPatterns(e,t){let{uri:i}=e;return t==0?e.getVar("root_patterns",[])||[]:t==1?this.getServerRootPatterns(e.languageId):this.configurations.getConfiguration("coc.preferences",i).get("rootPatterns",[".git",".hg",".projections.json"]).slice()}reset(){this.rootPatterns.clear(),this._workspaceFolders=[]}getServerRootPatterns(e){let t=this.configurations.getConfiguration().get("languageserver",{}),i=[];for(let r of Object.keys(t)){let o=t[r],{filetypes:s,rootPatterns:a}=o;Array.isArray(s)&&a&&s.includes(e)&&i.push(...a)}return i=i.concat(this.rootPatterns.get(e)||[]),i.length?oa(i):[]}}});var Ly,$Z=_(()=>{"use strict";ge();V();Ly=class{constructor(e,t){this._create=e;this.disposables=[];this.itemsMap=new Map;let{disposables:i}=this;for(let r of t.documents)this.create(r);t.onDidOpenTextDocument(r=>{this.create(t.getDocument(r.bufnr))},null,i),t.onDidChangeDocument(r=>{this.onChange(r)},null,i),t.onDidCloseDocument(r=>{this.delete(r.bufnr)},null,i),P.on("LinesChanged",r=>{let o=this.itemsMap.get(r);o&&typeof o.item.onTextChange=="function"&&o.item.onTextChange()},null,i)}get items(){return Array.from(this.itemsMap.values()).map(e=>e.item)}getItem(e){var i;if(typeof e=="number")return(i=this.itemsMap.get(e))==null?void 0:i.item;let t=Array.from(this.itemsMap.values()).find(r=>r.uri==e);return t?t.item:void 0}create(e){if(!e)return;let t=this.itemsMap.get(e.bufnr);t&&t.item.dispose();let i=this._create(e);i&&this.itemsMap.set(e.bufnr,{uri:e.uri,item:i})}onChange(e){let t=this.itemsMap.get(e.bufnr);t&&typeof t.item.onChange=="function"&&t.item.onChange(e)}delete(e){let t=this.itemsMap.get(e);t&&(t.item.dispose(),this.itemsMap.delete(e))}reset(){for(let e of this.itemsMap.values())e.item.dispose();this.itemsMap.clear()}dispose(){J(this.disposables);for(let e of this.itemsMap.values())e.item.dispose();this._create=void 0,this.itemsMap.clear()}}});var jn,Nk,Nc,Bk=_(()=>{"use strict";jn=x(Rn()),Nk=x(require("path")),Nc=class{constructor(e){this.filepath=e}fetch(e){let t=this.load();if(!e)return t;let i=e.split(".");for(let r of i){if(typeof t[r]>"u")return;t=t[r]}return t}exists(e){let t=this.load(),i=e.split(".");for(let r of i){if(typeof t[r]>"u")return!1;t=t[r]}return!0}delete(e){let t=this.load(),i=t,r=e.split("."),o=r.length;for(let s=0;s"u");s++){if(s==o-1){delete t[r[s]],jn.default.writeFileSync(this.filepath,JSON.stringify(i,null,2),"utf8");break}t=t[r[s]]}}push(e,t){let i=this.load()||{},r=i,o=e.split("."),s=o.length;if(r==null){let a=Nk.default.dirname(this.filepath);jn.default.mkdirpSync(a),r=i}for(let a=0;a"u"&&(r[l]={}),r=r[l]}}load(){let e=Nk.default.dirname(this.filepath),t=jn.default.statSync(e);if(!t||!t.isDirectory())return jn.default.mkdirpSync(e),jn.default.writeFileSync(this.filepath,"{}","utf8"),{};try{let i=jn.default.readFileSync(this.filepath,"utf8");return JSON.parse(i.trim())}catch{return jn.default.writeFileSync(this.filepath,"{}","utf8"),{}}}clear(){let e=jn.default.statSync(this.filepath);!e||!e.isFile()||jn.default.writeFileSync(this.filepath,"{}","utf8")}destroy(){jn.default.existsSync(this.filepath)&&jn.default.unlinkSync(this.filepath)}}});var Hk,ua,rAe,ca,Fy=_(()=>{"use strict";Hk=x(require("path")),ua=x(Rn());$e();so();rAe=H()("model-mru"),ca=class{constructor(e,t,i=5e3){this.maximum=i;this.file=Hk.default.join(t||process.env.COC_DATA_HOME,e);let r=Hk.default.dirname(this.file);ua.default.mkdirpSync(r)}async load(){try{let e=await ta(this.file,0,this.maximum);return e.length>this.maximum&&await pb(this.file,e.join(` -`)),e[e.length-1]==""&&(e=e.slice(0,-1)),oa(e)}catch{return[]}}loadSync(){if(!ua.default.existsSync(this.file))return[];try{let e=ua.default.readFileSync(this.file,"utf8");return e=e.trim(),e.length?e.trim().split(` -`):[]}catch{return[]}}async add(e){let t;try{t=ua.default.readFileSync(this.file),t[0]===239&&t[1]===187&&t[2]===191&&(t=t.slice(3)),t=Buffer.concat([Buffer.from(e,"utf8"),new Uint8Array([10]),t])}catch{t=Buffer.concat([Buffer.from(e,"utf8"),new Uint8Array([10])])}await ua.default.writeFile(this.file,t,"utf8")}async remove(e){let t=await this.load(),i=t.length;t=t.filter(r=>r!=e),t.length!=i&&await ua.default.writeFile(this.file,t.join(` -`),"utf8")}async clean(){try{await ua.default.unlink(this.file)}catch{}}}});var Iy,jy,XZ=_(()=>{"use strict";Iy=x(q());ge();V();jy=class{constructor(e,t){this.nvim=e;this.id=t;this.disposables=[];this._onExit=new Iy.Emitter;this._onStderr=new Iy.Emitter;this._onStdout=new Iy.Emitter;this.onExit=this._onExit.event;this.onStdout=this._onStdout.event;this.onStderr=this._onStderr.event;P.on("TaskExit",(i,r)=>{i==this.id&&this._onExit.fire(r)},null,this.disposables),P.on("TaskStderr",(i,r)=>{i==this.id&&this._onStderr.fire(r)},null,this.disposables),P.on("TaskStdout",(i,r)=>{i==this.id&&this._onStdout.fire(r)},null,this.disposables)}async start(e){let{nvim:t}=this;return await t.call("coc#task#start",[this.id,e])}async stop(){let{nvim:e}=this;await e.call("coc#task#stop",[this.id])}get running(){let{nvim:e}=this;return e.call("coc#task#running",[this.id])}dispose(){let{nvim:e}=this;e.call("coc#task#stop",[this.id],!0),this._onStdout.dispose(),this._onStderr.dispose(),this._onExit.dispose(),J(this.disposables)}}});var QZ,qk,ha,UZ,GZ,kwe,KZ,y,K=_(()=>{"use strict";QZ=x(Rn()),qk=x(require("os")),ha=x(require("path"));De();ET();fY();mY();vY();yb();wY();XY();nW();LW();NZ();BZ();HZ();xb();qZ();WZ();JZ();ge();$Z();Bk();Fy();XZ();V();UZ=31,GZ=H()("workspace"),kwe=["showMessage","runTerminalCommand","openTerminal","showQuickpick","menuPick","openLocalConfig","showPrompt","createStatusBarItem","createOutputChannel","showOutputChannel","requestInput","echoLines","getCursorPosition","moveTo","getOffset","getSelectedRange","selectRange","createTerminal"],KZ=class{constructor(){this.version=Sb;let e=ha.default.normalize(process.env.COC_VIMCONFIG)||ha.default.join(qk.default.homedir(),".vim"),t=ha.default.join(e,Pr);this.configurations=new Go(t,new Ob(this)),this.workspaceFolderControl=new Ry(this.configurations);let i=this.documentsManager=new Gb(this.configurations,this.workspaceFolderControl);this.contentProvider=new Nb(i),this.watchers=new Py,this.autocmds=new Mb(this.contentProvider,this.watchers),this.keymaps=new ky(i),this.locations=new Ey(this.configurations,i,this.contentProvider),this.files=new iy(i,this.configurations,this.workspaceFolderControl,this.keymaps),this.editors=new _y(i),this.onDidRuntimePathChange=this.watchers.onDidRuntimePathChange,this.onDidChangeWorkspaceFolders=this.workspaceFolderControl.onDidChangeWorkspaceFolders,this.onDidChangeConfiguration=this.configurations.onDidChange,this.onDidOpenTextDocument=i.onDidOpenTextDocument,this.onDidChangeTextDocument=i.onDidChangeDocument,this.onDidCloseTextDocument=i.onDidCloseDocument,this.onDidSaveTextDocument=i.onDidSaveTextDocument,this.onWillSaveTextDocument=i.onWillSaveTextDocument,this.onDidCreateFiles=this.files.onDidCreateFiles,this.onDidRenameFiles=this.files.onDidRenameFiles,this.onDidDeleteFiles=this.files.onDidDeleteFiles,this.onWillCreateFiles=this.files.onWillCreateFiles,this.onWillRenameFiles=this.files.onWillRenameFiles,this.onWillDeleteFiles=this.files.onWillDeleteFiles;let r=global.__TEST__?null:this.getWatchmanPath();this.fileSystemWatchers=new Yg(this.workspaceFolderControl,r)}async init(e){let{nvim:t}=this;for(let o of kwe)Object.defineProperty(this,o,{get:()=>(...s)=>{let a=` -`+Error().stack.split(` -`).slice(2,4).join(` -`);return GZ.warn(`workspace.${o} is deprecated, please use window.${o} instead.`,a),e[o].apply(e,s)}});for(let o of["onDidOpenTerminal","onDidCloseTerminal"])Object.defineProperty(this,o,{get:()=>{let s=` -`+Error().stack.split(` -`).slice(2,4).join(` -`);return GZ.warn(`workspace.${o} is deprecated, please use window.${o} instead.`,s),e[o]}});let i=this._env=await t.call("coc#util#vim_info");e.init(i),this._env.apiversion!=UZ&&t.echoError(`API version ${this._env.apiversion} is not ${UZ}, please build coc.nvim by 'yarn install' after pull source code.`),this.workspaceFolderControl.setWorkspaceFolders(this._env.workspaceFolders),this.configurations.updateUserConfig(this._env.config),this.files.attach(t,i,e),this.contentProvider.attach(t),this.keymaps.attach(t),this.autocmds.attach(t,i),this.locations.attach(t,i),this.watchers.attach(t,i),await this.attach(),await this.editors.attach(t);let r=Uo.create("watchman",t);this.fileSystemWatchers.attach(r)}get cwd(){return this.documentsManager.cwd}get env(){return this._env}get root(){return this.documentsManager.root||this.cwd}get rootPath(){return this.root}get bufnr(){return this.documentsManager.bufnr}get insertMode(){return P.insertMode}get floatSupported(){return this.env.floating||this.env.textprop}get uri(){return this.documentsManager.uri}get workspaceFolder(){return this.workspaceFolders[0]}get textDocuments(){return this.documentsManager.textDocuments}get documents(){return this.documentsManager.documents}get document(){return this.documentsManager.document}get workspaceFolders(){return this.workspaceFolderControl.workspaceFolders}get folderPaths(){return this.workspaceFolders.map(e=>B.parse(e.uri).fsPath)}get channelNames(){return Uo.names}get pluginRoot(){return ha.default.dirname(__dirname)}get isVim(){return this._env.isVim}get isNvim(){return!this._env.isVim}get completeOpt(){return this._env.completeOpt}get filetypes(){return this.documentsManager.filetypes}get languageIds(){return this.documentsManager.languageIds}createNameSpace(e){return jZ(e)}getConfigFile(e){return this.configurations.getConfigFile(e)}has(e){return IZ(this.env,e)}registerAutocmd(e){return this.autocmds.registerAutocmd(e)}watchOption(e,t,i){this.watchers.watchOption(e,t,i)}watchGlobal(e,t,i){this.watchers.watchGlobal(e,t||function(){},i)}match(e,t){return Mk(e,t.uri,t.languageId)}createFileSystemWatcher(e,t,i,r){return this.fileSystemWatchers.createFileSystemWatcher(e,t,i,r)}getWatchmanPath(){return AZ(this.configurations)}getConfiguration(e,t){return this.configurations.getConfiguration(e,t)}getDocument(e){return this.documentsManager.getDocument(e)}isAttached(e){let t=this.documentsManager.getDocument(e);return t!=null&&t.attached}getAttachedDocument(e){let t=this.getDocument(e);if(!t)throw new Error(`Buffer ${e} not created.`);if(!t.attached)throw new Error(`Buffer ${e} not attached, try :CocCommand document.checkBuffer`);return t}getQuickfixItem(e,t,i="",r){return this.documentsManager.getQuickfixItem(e,t,i,r)}createMru(e){return new ca(e)}async getQuickfixList(e){return this.documentsManager.getQuickfixList(e)}async showLocations(e){await this.locations.showLocations(e)}getLine(e,t){return this.documentsManager.getLine(e,t)}getWorkspaceFolder(e){return this.workspaceFolderControl.getWorkspaceFolder(B.parse(e))}readFile(e){return this.documentsManager.readFile(e)}async getCurrentState(){let e=await this.document,t=await Db(this.nvim);return{document:e.textDocument,position:t}}async getFormatOptions(e){return this.documentsManager.getFormatOptions(e)}resolveModule(e){return MZ(e)}async runCommand(e,t,i){return t=t||this.cwd,eo(e,{cwd:t},i)}expand(e){return this.documentsManager.expand(e)}async callAsync(e,t){return this.isNvim?await this.nvim.call(e,t):await this.nvim.callAsync("coc#util#with_callback",[e,t])}registerTextDocumentContentProvider(e,t){return this.contentProvider.registerTextDocumentContentProvider(e,t)}registerKeymap(e,t,i,r={}){return this.keymaps.registerKeymap(e,t,i,r)}registerExprKeymap(e,t,i,r=!1){return this.keymaps.registerExprKeymap(e,t,i,r)}registerLocalKeymap(e,t,i,r=!1){return this.keymaps.registerLocalKeymap(e,t,i,r)}createTask(e){return new jy(this.nvim,e)}createDatabase(e){let t;global.hasOwnProperty("__TEST__")?(t=ha.default.join(qk.default.tmpdir(),`coc-${process.pid}`),QZ.default.mkdirpSync(t)):t=ha.default.dirname(this.env.extensionRoot);let i=ha.default.join(t,e+".json");return new Nc(i)}registerBufferSync(e){return new Ly(e,this.documentsManager)}async attach(){await this.documentsManager.attach(this.nvim,this._env)}jumpTo(e,t,i){return this.files.jumpTo(e,t,i)}findUp(e){return OZ(this.nvim,this.cwd,e)}applyEdit(e){return this.files.applyEdit(e)}createFile(e,t={}){return this.files.createFile(e,t)}loadFile(e){return this.files.loadResource(e)}async loadFiles(e){return this.files.loadResources(e)}async renameFile(e,t,i={}){await this.files.renameFile(e,t,i)}async deleteFile(e,t={}){await this.files.deleteFile(e,t)}async renameCurrent(){await this.files.renameCurrent()}async openResource(e){await this.files.openResource(e)}openTextDocument(e){return this.files.openTextDocument(e)}getRelativePath(e,t){return this.workspaceFolderControl.getRelativePath(e,t)}async findFiles(e,t,i,r){return this.files.findFiles(e,t,i,r)}detach(){this.documentsManager.detach()}reset(){this.configurations.reset(),this.workspaceFolderControl.reset(),this.documentsManager.reset()}dispose(){this.watchers.dispose(),this.autocmds.dispose(),this.contentProvider.dispose(),this.documentsManager.dispose(),this.configurations.dispose()}},y=new KZ});function Yk(n,e){let{range:t,uri:i}=e;n.find(r=>r.uri==i&&Me(r.range,t))==null&&n.push(e)}var Bc,Ewe,pe,Et=_(()=>{"use strict";Bc=x(q());K();Vt();Ewe=H()("provider-manager"),pe=class{constructor(){this.providers=new Set}hasProvider(e){return this.getProvider(e)!=null}getProvider(e){let t=0,i;for(let r of this.providers){let{selector:o,priority:s}=r,a=y.match(o,e);a!=0&&(typeof s=="number"&&(a=s),!(ai.id==e);return t?t.provider:null}getProviders(e){let t=Array.from(this.providers);return t=t.filter(i=>y.match(i.selector,e)>0),t.sort((i,r)=>y.match(r.selector,e)-y.match(i.selector,e))}toLocations(e){let t=[];for(let i of e)if(!!i)if(Bc.Location.is(i))Yk(t,i);else if(Array.isArray(i)){for(let r of i)if(Bc.Location.is(r))Yk(t,r);else if(Bc.LocationLink.is(r)){let{targetUri:o,targetSelectionRange:s,targetRange:a}=r;Yk(t,Bc.Location.create(o,s||a))}}else Ewe.error("Bad definition",i);return t}}});var zZ,Ay,VZ=_(()=>{"use strict";zZ=x(q());Et();Ne();Ay=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),zZ.Disposable.create(()=>{this.providers.delete(i)})}async prepareCallHierarchy(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.prepareCallHierarchy===null?null:await Promise.resolve(o.prepareCallHierarchy(e,t,i))}async provideCallHierarchyOutgoingCalls(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideCallHierarchyOutgoingCalls===null?null:await Promise.resolve(o.provideCallHierarchyOutgoingCalls(t,i))}async provideCallHierarchyIncomingCalls(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideCallHierarchyIncomingCalls(t,i)===null?null:await Promise.resolve(o.provideCallHierarchyIncomingCalls(t,i))}}});function tJ(n,...e){return n=Object(n),e.forEach(t=>{if(t!=null){t=Object(t);for(let i in t){let r=n[i];(r===void 0||r===eJ[i]&&!Pwe.call(n,i))&&(n[i]=t[i])}}}),n}function zi(n,e){let t={};for(let i of Object.keys(n))e.includes(i)||(t[i]=n[i]);return t}var eJ,Pwe,es=_(()=>{"use strict";eJ=Object.prototype,Pwe=eJ.hasOwnProperty});var Oy,cOe,My,iJ=_(()=>{"use strict";Oy=x(q());Et();Ne();es();cOe=H()("codeActionManager"),My=class extends pe{register(e,t,i,r){let o={id:re(),selector:e,provider:t,kinds:r,clientId:i};return this.providers.add(o),Oy.Disposable.create(()=>{this.providers.delete(o)})}async provideCodeActions(e,t,i,r){let o=this.getProviders(e);if(!o.length)return null;if(i.only){let{only:a}=i;o=o.filter(l=>!(l.kinds&&!l.kinds.some(u=>a.includes(u))))}let s=[];return await Promise.all(o.map(a=>{let{provider:l,id:u}=a;return Promise.resolve(l.provideCodeActions(e,t,i,r)).then(c=>{if(!(!c||c.length==0))for(let h of c)if(Oy.Command.is(h)){let d={title:h.title,command:h,providerId:u};s.push(d)}else{if(i.only){if(!h.kind)continue;let g=!1;for(let f of i.only)if(h.kind.startsWith(f)){g=!0;break}if(!g)continue}s.findIndex(g=>g.title==h.title)==-1&&s.push(Object.assign({providerId:u},h))}})})),s}async resolveCodeAction(e,t){if(e.edit!=null)return e;let i=e.providerId;if(!i)throw new Error("provider id not found from codeAction");let r=this.getProviderById(i);return!r||typeof r.resolveCodeAction!="function"?e:await Promise.resolve(r.resolveCodeAction(zi(e,["providerId"]),t))||e}}});var nJ,Ny,rJ=_(()=>{"use strict";nJ=x(q());Et();Ne();es();Ny=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),nJ.Disposable.create(()=>{this.providers.delete(i)})}async provideCodeLenses(e,t){let i=this.getProviders(e);if(!i.length)return null;let r=await Promise.all(i.map(o=>{let{provider:s,id:a}=o;return Promise.resolve(s.provideCodeLenses(e,t)).then(l=>{if(Array.isArray(l))for(let u of l)u.source=a;return l})}));return[].concat(...r)}async resolveCodeLens(e,t){if(e.command)return e;let{source:i}=e,r=this.getProviderById(i);if(!r||typeof r.resolveCodeLens!="function")return e;let o=await Promise.resolve(r.resolveCodeLens(zi(e,["source"]),t));return Object.assign(e,o),e}}});var oJ,POe,By,sJ=_(()=>{"use strict";oJ=x(q());Et();Ne();POe=H()("definitionManager"),By=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),oJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDeclaration(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDeclaration(e,t,i))}}});var Hy,HOe,qy,aJ=_(()=>{"use strict";Hy=x(q());Et();Ne();Vt();HOe=H()("definitionManager"),qy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),Hy.Disposable.create(()=>{this.providers.delete(i)})}async getDefinitions(e,t,i){let r=this.getProviders(e);return r.length?await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideDefinition(e,t,i))})):[]}async provideDefinition(e,t,i){let r=await this.getDefinitions(e,t,i);return this.toLocations(r)}async provideDefinitionLinks(e,t,i){let r=await this.getDefinitions(e,t,i),o=[];for(let s of r)if(!!Array.isArray(s))for(let a of s)Hy.LocationLink.is(a)&&o.findIndex(u=>u.targetUri==a.targetUri&&Me(u.targetRange,a.targetRange))==-1&&o.push(a);return o}}});var lJ,Yy,uJ=_(()=>{"use strict";lJ=x(q());Et();Ne();Yy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),lJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDocumentColors(e,t){let i=this.getProvider(e);if(!i)return null;let{provider:r}=i;return await Promise.resolve(r.provideDocumentColors(e,t))}async provideColorPresentations(e,t,i){let{range:r,color:o}=e,s=this.getProvider(t);if(!s)return null;let{provider:a}=s;return await Promise.resolve(a.provideColorPresentations(o,{document:t,range:r},i))}}});var cJ,Wy,hJ=_(()=>{"use strict";cJ=x(q());Et();Ne();Wy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),cJ.Disposable.create(()=>{this.providers.delete(i)})}async provideDocumentHighlights(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDocumentHighlights(e,t,i))}}});var dJ,Zy,gJ=_(()=>{"use strict";dJ=x(q());Et();Ne();Zy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),dJ.Disposable.create(()=>{this.providers.delete(i)})}async _provideDocumentLinks(e,t,i){let{provider:r,id:o}=e,s=await Promise.resolve(r.provideDocumentLinks(t,i));return!s||!s.length?[]:(s.forEach(a=>{a.data=a.data||{},a.data.source=o}),s)}async provideDocumentLinks(e,t){let i=this.getProviders(e);if(i.length==0)return[];let r=await Promise.all(i.map(o=>this._provideDocumentLinks(o,e,t)));return[].concat(...r)}async resolveDocumentLink(e,t){let{data:i}=e;if(!i||!i.source)return null;for(let r of this.providers)if(r.id==i.source){let{provider:o}=r;return e=await Promise.resolve(o.resolveDocumentLink(e,t)),e}return null}}});var fJ,Jy,pJ=_(()=>{"use strict";fJ=x(q());Et();Ne();Jy=class extends pe{register(e,t,i){let r={id:re(),meta:i,selector:e,provider:t};return this.providers.add(r),fJ.Disposable.create(()=>{this.providers.delete(r)})}getMetaData(e){var i;let t=this.getProvider(e);return t?(i=t.provider.meta)!=null?i:{}:{}}async provideDocumentSymbols(e,t){let i=this.getProvider(e);if(!i)return null;let{provider:r}=i;return await Promise.resolve(r.provideDocumentSymbols(e,t))||[]}}});var mJ,$y,bJ=_(()=>{"use strict";mJ=x(q());Et();Ne();$y=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),mJ.Disposable.create(()=>{this.providers.delete(i)})}async provideFoldingRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideFoldingRanges(e,t,i))||[]}}});var yJ,Xy,vJ=_(()=>{"use strict";yJ=x(q());Et();Ne();Xy=class extends pe{register(e,t,i=0){let r={id:re(),selector:e,priority:i,provider:t};return this.providers.add(r),yJ.Disposable.create(()=>{this.providers.delete(r)})}handles(e){return this.getProvider(e)!=null}async provideDocumentFormattingEdits(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return await Promise.resolve(o.provideDocumentFormattingEdits(e,t,i))}}});var wJ,Uy,DJ=_(()=>{"use strict";wJ=x(q());Et();Ne();Uy=class extends pe{register(e,t,i=0){let r={id:re(),selector:e,provider:t,priority:i};return this.providers.add(r),wJ.Disposable.create(()=>{this.providers.delete(r)})}async provideDocumentRangeFormattingEdits(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let{provider:s}=o;return await Promise.resolve(s.provideDocumentRangeFormattingEdits(e,t,i,r))}}});var CJ,Gy,xJ=_(()=>{"use strict";CJ=x(q());Et();Ne();Gy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),CJ.Disposable.create(()=>{this.providers.delete(i)})}async provideHover(e,t,i){let r=this.getProviders(e);if(r.length===0)return null;let o=[];for(let s=0,a=r.length;s{"use strict";SJ=x(q());Et();Ne();Qy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),SJ.Disposable.create(()=>{this.providers.delete(i)})}async provideReferences(e,t,i){let r=this.getProviders(e);if(!r.length)return null;let o=await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideImplementation(e,t,i))}));return this.toLocations(o)}}});var kJ,dNe,Ky,EJ=_(()=>{"use strict";Ne();kJ=x(q());Et();dNe=H()("linkedEditingManager"),Ky=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),kJ.Disposable.create(()=>{this.providers.delete(i)})}async provideLinkedEditingRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideLinkedEditingRanges?await Promise.resolve(o.provideLinkedEditingRanges(e,t,i)):null}}});var PJ,vNe,zy,_J=_(()=>{"use strict";PJ=x(q());K();vNe=H()("onTypeFormatManager"),zy=class{constructor(){this.providers=new Set}register(e,t,i){let r={triggerCharacters:i,selector:e,provider:t};return this.providers.add(r),PJ.Disposable.create(()=>{this.providers.delete(r)})}hasProvider(e){for(let t of this.providers){let{selector:i}=t;if(y.match(i,e)>0)return!0}return!1}getProvider(e,t){for(let i of this.providers){let{triggerCharacters:r,selector:o}=i;if(y.match(o,e)>0&&r.includes(t))return i.provider}return null}async onCharacterType(e,t,i,r){let o=this.getProvider(t,e);if(!o)return;let s=await y.getFormatOptions(t.uri);return await Promise.resolve(o.provideOnTypeFormattingEdits(t,i,e,s,r))}}});var RJ,Vy,LJ=_(()=>{"use strict";RJ=x(q());Et();Ne();Vy=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),RJ.Disposable.create(()=>{this.providers.delete(i)})}async provideReferences(e,t,i,r){let o=this.getProviders(e);if(!o.length)return null;let s=await Promise.all(o.map(a=>{let{provider:l}=a;return Promise.resolve(l.provideReferences(e,t,i,r))}));return this.toLocations(s)}}});var FJ,ev,IJ=_(()=>{"use strict";FJ=x(q());Et();Ne();ev=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),FJ.Disposable.create(()=>{this.providers.delete(i)})}async provideRenameEdits(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let{provider:s}=o;return await Promise.resolve(s.provideRenameEdits(e,t,i,r))}async prepareRename(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;if(o.prepareRename==null)return null;let s=await Promise.resolve(o.prepareRename(e,t,i));return s==null?!1:s}}});var jJ,tv,AJ=_(()=>{"use strict";jJ=x(q());Et();Ne();tv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),jJ.Disposable.create(()=>{this.providers.delete(i)})}async provideSelectionRanges(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r,s=await Promise.resolve(o.provideSelectionRanges(e,t,i));if(!s||s.length==0)return[];for(let a=0;a{"use strict";Ne();OJ=x(q());Et();VNe=H()("semanticTokensManager"),iv=class extends pe{constructor(){super(...arguments);this.resolvedProvider=new Map}register(e,t,i,r){let o=re(),s={id:o,selector:e,legend:i,provider:t};this.providers.add(s);let a;return typeof t.onDidChangeSemanticTokens=="function"&&(a=t.onDidChangeSemanticTokens(()=>{r()})),OJ.Disposable.create(()=>{a==null||a.dispose();for(let[l,u]of this.resolvedProvider.entries())u==o&&this.resolvedProvider.delete(l);this.providers.delete(s)})}getLegend(e){let t=this.getProvider(e);if(!!t)return this.resolvedProvider.set(e.uri,t.id),t.legend}resolveProvider(e){var i;let t=this.resolvedProvider.get(e.uri);return t?this.getProviderById(t):(i=this.getProvider(e))==null?void 0:i.provider}hasSemanticTokensEdits(e){let t=this.resolveProvider(e);return t?typeof t.provideDocumentSemanticTokensEdits=="function":!1}async provideDocumentSemanticTokens(e,t){let i=this.resolveProvider(e);return!i||typeof i.provideDocumentSemanticTokens!="function"?null:await Promise.resolve(i.provideDocumentSemanticTokens(e,t))}async provideDocumentSemanticTokensEdits(e,t,i){let r=this.resolveProvider(e);return!r||typeof r.provideDocumentSemanticTokensEdits!="function"?null:await Promise.resolve(r.provideDocumentSemanticTokensEdits(e,t,i))}}});var NJ,uBe,nv,BJ=_(()=>{"use strict";Ne();NJ=x(q());Et();uBe=H()("semanticTokensRangeManager"),nv=class extends pe{register(e,t,i){let r={id:re(),selector:e,legend:i,provider:t};return this.providers.add(r),NJ.Disposable.create(()=>{this.providers.delete(r)})}getLegend(e){let t=this.getProvider(e);if(!!t)return t.legend}async provideDocumentRangeSemanticTokens(e,t,i){let r=this.getProvider(e);if(!r)return null;let{provider:o}=r;return o.provideDocumentRangeSemanticTokens===null?null:await Promise.resolve(o.provideDocumentRangeSemanticTokens(e,t,i))}}});var HJ,rv,qJ=_(()=>{"use strict";HJ=x(q());Et();Ne();rv=class extends pe{register(e,t,i){let r=i.reduce((s,a)=>s.concat(a.length==1?[a]:a.split(/\s*/g)),[]),o={id:re(),selector:e,provider:t,triggerCharacters:r};return this.providers.add(o),HJ.Disposable.create(()=>{this.providers.delete(o)})}shouldTrigger(e,t){let i=this.getProvider(e);if(!i)return!1;let{triggerCharacters:r}=i;return r&&r.indexOf(t)!=-1}async provideSignatureHelp(e,t,i,r){let o=this.getProvider(e);if(!o)return null;let s=await Promise.resolve(o.provider.provideSignatureHelp(e,t,i,r));return s&&s.signatures&&s.signatures.length?s:null}}});var YJ,ov,WJ=_(()=>{"use strict";YJ=x(q());Et();Ne();ov=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),YJ.Disposable.create(()=>{this.providers.delete(i)})}async provideTypeDefinition(e,t,i){let r=this.getProviders(e);if(!r.length)return null;let o=await Promise.all(r.map(s=>{let{provider:a}=s;return Promise.resolve(a.provideTypeDefinition(e,t,i))}));return this.toLocations(o)}}});var ZJ,sv,JJ=_(()=>{"use strict";Ne();ZJ=x(q()),sv=class{constructor(){this.providers=new Map}register(e){let t=re();return this.providers.set(t,e),ZJ.Disposable.create(()=>{this.providers.delete(t)})}async provideWorkspaceSymbols(e,t){let i=Array.from(this.providers.entries());if(!i.length)return[];let r=[];return await Promise.all(i.map(o=>{let[s,a]=o;return Promise.resolve(a.provideWorkspaceSymbols(e,t)).then(l=>{l&&r.push(...l.map(u=>Object.assign({source:s},u)))})})),r}async resolveWorkspaceSymbol(e,t){let i=this.providers.get(e.source);if(!!i)return typeof i.resolveWorkspaceSymbol!="function"?Promise.resolve(e):await Promise.resolve(i.resolveWorkspaceSymbol(e,t))}hasProvider(){return this.providers.size>0}}});var Nr,Wk,Zk,av,$J=_(()=>{"use strict";Nr=x(q());Kn();(i=>{i.Type=1,i.Parameter=2;function t(r){return r===1||r===2}i.is=t})(Wk||(Wk={}));(t=>{function n(i){return{value:i}}t.create=n;function e(i){let r=i;return Lt(r)&&(r.tooltip===void 0||Pe(r.tooltip)||Nr.MarkupContent.is(r.tooltip))&&(r.location===void 0||Nr.Location.is(r.location))&&(r.command===void 0||Nr.Command.is(r.command))}t.is=e})(Zk||(Zk={}));(t=>{function n(i,r,o){let s={position:i,label:r};return o!==void 0&&(s.kind=o),s}t.create=n;function e(i){let r=i;return Lt(r)&&Nr.Position.is(r.position)&&(Pe(r.label)||I0(r.label,Zk.is))&&(r.kind===void 0||Wk.is(r.kind))&&r.textEdits===void 0||I0(r.textEdits,Nr.TextEdit.is)&&(r.tooltip===void 0||Pe(r.tooltip)||Nr.MarkupContent.is(r.tooltip))&&(r.paddingLeft===void 0||Qn(r.paddingLeft))&&(r.paddingRight===void 0||Qn(r.paddingRight))}t.is=e})(av||(av={}))});function _we(n,e){return Ce(n.position,e.position)!==0?!1:lv(n)===lv(e)}function Rwe(n,e){return n.label.length===0||Array.isArray(n.label)&&n.label.every(t=>t.value.length===0)?(Jk.warn("INVALID inlay hint, empty label",n),!1):av.is(n)?!(e&&ht(n.position,e)!==0):(Jk.warn("INVALID inlay hint",n),!1)}function lv(n){return typeof n.label=="string"?n.label:n.label.map(e=>e.value).join(" ")}var XJ,Jk,uv,$k=_(()=>{"use strict";Ne();XJ=x(q());$J();wt();Et();Jk=H()("inlayHintManger"),uv=class extends pe{register(e,t){let i={id:re(),selector:e,provider:t};return this.providers.add(i),XJ.Disposable.create(()=>{this.providers.delete(i)})}async provideInlayHints(e,t,i){let r=this.getProviders(e);if(r.length===0)return null;let o=[],s=0;return await Promise.all(r.map(a=>{let{id:l,provider:u}=a;return Promise.resolve(u.provideInlayHints(e,t,i)).then(c=>{if(!i.isCancellationRequested){for(let h of c)!Rwe(h,t)||s>0&&o.findIndex(d=>_we(d,h))!=-1||o.push(de({providerId:l},h));s+=1}},c=>{Jk.error("Error on provideInlayHints",c)})})),o}async resolveInlayHint(e,t){let i=this.getProviderById(e.providerId);if(!i||typeof i.resolveInlayHint!="function"||e.resolved===!0)return e;let r=await Promise.resolve(i.resolveInlayHint(e,t));return t.isCancellationRequested?e:Object.assign(e,r,{resolved:!0})}}});var WBe,Xk,cv,Uk=_(()=>{"use strict";Ne();WBe=H()("model-status"),Xk=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],cv=class{constructor(e){this.nvim=e;this.items=new Map;this.shownIds=new Set;this._text="";this.interval=setInterval(()=>{this.setStatusText()},100)}dispose(){this.items.clear(),this.shownIds.clear(),clearInterval(this.interval)}createStatusBarItem(e=0,t=!1){let i=Qo(),r={text:"",priority:e,isProgress:t,show:()=>{this.shownIds.add(i),this.setStatusText()},hide:()=>{this.shownIds.delete(i),this.setStatusText()},dispose:()=>{this.shownIds.delete(i),this.items.delete(i),this.setStatusText()}};return this.items.set(i,r),r}getText(){if(this.shownIds.size==0)return"";let e=new Date,t=Math.floor(e.getMilliseconds()/100),i="",r=[];for(let[o,s]of this.items)this.shownIds.has(o)&&r.push(s);r.sort((o,s)=>o.priority-s.priority);for(let o of r)o.isProgress?i=`${i} ${Xk[t]} ${o.text}`:i=`${i} ${o.text}`;return i}setStatusText(){let e=this.getText(),{nvim:t}=this;e!=this._text&&(this._text=e,t.pauseNotification(),this.nvim.setVar("coc_status",e,!0),this.nvim.call("coc#util#do_autocmd",["CocStatusChange"],!0),t.resumeNotification(!1,!0))}}});var UJ,$Be,af,GJ=_(()=>{"use strict";UJ=require("events");Uk();$Be=H()("model-installBuffer"),af=class extends UJ.EventEmitter{constructor(e=!1,t=!1,i=void 0){super();this.isUpdate=e;this.isSync=t;this.channel=i;this.statMap=new Map;this.messagesMap=new Map;this.names=[]}setExtensions(e){this.statMap.clear(),this.names=e;for(let t of e)this.statMap.set(t,0)}addMessage(e,t,i=!1){if(i&&this.channel)return;let r=this.messagesMap.get(e)||[];this.messagesMap.set(e,r.concat(t.trim().split(/\r?\n/))),this.channel&&this.channel.appendLine(`[${e}] ${t}`)}startProgress(e){for(let t of e)this.statMap.set(t,2)}finishProgress(e,t=!0){this.channel&&(t?this.channel.appendLine(`[${e}] install succeed!`):this.channel.appendLine(`[${e}] install failed!`)),this.statMap.set(e,t?3:1)}get remains(){let e=0;for(let t of this.names){let i=this.statMap.get(t);[3,1].includes(i)||(e=e+1)}return e}getLines(){let e=[];for(let t of this.names){let i=this.statMap.get(t),r="*";switch(i){case 2:{let s=new Date,a=Math.floor(s.getMilliseconds()/100);r=Xk[a];break}case 1:r="\u2717";break;case 3:r="\u2713";break}let o=this.messagesMap.get(t)||[];e.push(`- ${r} ${t} ${o.length?o[o.length-1]:""}`)}return e}getMessages(e){if(e<=1)return[];let t=this.names[e-2];return t?this.messagesMap.get(t):[]}draw(e,t){let{remains:i}=this,o=[i==0?`${this.isUpdate?"Update":"Install"} finished`:`Installing, ${i} remaining...`,"",...this.getLines()];t.setLines(o,{start:0,end:-1,strictIndexing:!1},!0),i==0&&this.interval&&(clearInterval(this.interval),this.interval=null),process.env.VIM_NODE_RPC&&e.command("redraw",!0)}highlight(e){e.call("matchadd",["CocListFgCyan","^\\-\\s\\zs\\*"],!0),e.call("matchadd",["CocListFgGreen","^\\-\\s\\zs\u2713"],!0),e.call("matchadd",["CocListFgRed","^\\-\\s\\zs\u2717"],!0),e.call("matchadd",["CocListFgYellow","^-.\\{3\\}\\zs\\S\\+"],!0)}async show(e){let{isSync:t}=this;if(this.channel)return;e.pauseNotification(),e.command(t?"enew":"vs +enew",!0),e.call("bufnr",["%"],!0),e.command("setl buftype=nofile bufhidden=wipe noswapfile nobuflisted wrap undolevels=-1",!0),t||e.command("nnoremap q :q",!0),this.highlight(e);let i=await e.resumeNotification();this.bufnr=i[0][1];let r=e.createBuffer(this.bufnr);this.interval=setInterval(()=>{this.draw(e,r)},100)}dispose(){this.interval&&clearInterval(this.interval)}}});var zJ=b((Gk,KJ)=>{var hv=require("buffer"),ts=hv.Buffer;function QJ(n,e){for(var t in n)e[t]=n[t]}ts.from&&ts.alloc&&ts.allocUnsafe&&ts.allocUnsafeSlow?KJ.exports=hv:(QJ(hv,Gk),Gk.Buffer=Hc);function Hc(n,e,t){return ts(n,e,t)}QJ(ts,Hc);Hc.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return ts(n,e,t)};Hc.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var i=ts(n);return e!==void 0?typeof t=="string"?i.fill(e,t):i.fill(e):i.fill(0),i};Hc.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return ts(n)};Hc.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return hv.SlowBuffer(n)}});var r$=b((UBe,Qk)=>{"use strict";Qk.exports=qwe;Qk.exports.parse=Jwe;var VJ=require("path").basename,Lwe=zJ().Buffer,Fwe=/[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g,Iwe=/%[0-9A-Fa-f]{2}/,jwe=/%([0-9A-Fa-f]{2})/g,t$=/[^\x20-\x7e\xa0-\xff]/g,Awe=/\\([\u0000-\u007f])/g,Owe=/([\\"])/g,e$=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,Mwe=/^[\x20-\x7e\x80-\xff]+$/,Nwe=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,Bwe=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,Hwe=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function qwe(n,e){var t=e||{},i=t.type||"attachment",r=Ywe(n,t.fallback);return Wwe(new n$(i,r))}function Ywe(n,e){if(n!==void 0){var t={};if(typeof n!="string")throw new TypeError("filename must be a string");if(e===void 0&&(e=!0),typeof e!="string"&&typeof e!="boolean")throw new TypeError("fallback must be a string or boolean");if(typeof e=="string"&&t$.test(e))throw new TypeError("fallback must be ISO-8859-1 string");var i=VJ(n),r=Mwe.test(i),o=typeof e!="string"?e&&i$(i):VJ(e),s=typeof o=="string"&&o!==i;return(s||!r||Iwe.test(i))&&(t["filename*"]=i),(r||s)&&(t.filename=s?o:i),t}}function Wwe(n){var e=n.parameters,t=n.type;if(!t||typeof t!="string"||!Nwe.test(t))throw new TypeError("invalid type");var i=String(t).toLowerCase();if(e&&typeof e=="object")for(var r,o=Object.keys(e).sort(),s=0;s{var lf;o$.exports=function(){if(!lf){try{lf=Mt()("follow-redirects")}catch{}typeof lf!="function"&&(lf=function(){})}lf.apply(null,arguments)}});var tE=b((QBe,eE)=>{var Rl=require("url"),Kk=Rl.URL,Qwe=require("http"),Kwe=require("https"),u$=require("stream").Writable,zwe=require("assert"),c$=s$(),Ll=["abort","aborted","connect","error","socket","timeout"],Vk=Object.create(null);Ll.forEach(function(n){Vk[n]=function(e,t,i){this._redirectable.emit(n,e,t,i)}});var a$=dv("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Vwe=dv("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),eDe=dv("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),tDe=dv("ERR_STREAM_WRITE_AFTER_END","write after end");function An(n,e){u$.call(this),this._sanitizeOptions(n),this._options=n,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(i){t._processResponse(i)},this._performRequest()}An.prototype=Object.create(u$.prototype);An.prototype.abort=function(){d$(this._currentRequest),this.emit("abort")};An.prototype.write=function(n,e,t){if(this._ending)throw new tDe;if(!(typeof n=="string"||typeof n=="object"&&"length"in n))throw new TypeError("data should be a string, Buffer or Uint8Array");if(typeof e=="function"&&(t=e,e=null),n.length===0){t&&t();return}this._requestBodyLength+n.length<=this._options.maxBodyLength?(this._requestBodyLength+=n.length,this._requestBodyBuffers.push({data:n,encoding:e}),this._currentRequest.write(n,e,t)):(this.emit("error",new eDe),this.abort())};An.prototype.end=function(n,e,t){if(typeof n=="function"?(t=n,n=e=null):typeof e=="function"&&(t=e,e=null),!n)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var i=this,r=this._currentRequest;this.write(n,e,function(){i._ended=!0,r.end(null,null,t)}),this._ending=!0}};An.prototype.setHeader=function(n,e){this._options.headers[n]=e,this._currentRequest.setHeader(n,e)};An.prototype.removeHeader=function(n){delete this._options.headers[n],this._currentRequest.removeHeader(n)};An.prototype.setTimeout=function(n,e){var t=this;function i(s){s.setTimeout(n),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function r(s){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),o()},n),i(s)}function o(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",o),t.removeListener("error",o),t.removeListener("response",o),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",r)}return e&&this.on("timeout",e),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(n){An.prototype[n]=function(e,t){return this._currentRequest[n](e,t)}});["aborted","connection","socket"].forEach(function(n){Object.defineProperty(An.prototype,n,{get:function(){return this._currentRequest[n]}})});An.prototype._sanitizeOptions=function(n){if(n.headers||(n.headers={}),n.host&&(n.hostname||(n.hostname=n.host),delete n.host),!n.pathname&&n.path){var e=n.path.indexOf("?");e<0?n.pathname=n.path:(n.pathname=n.path.substring(0,e),n.search=n.path.substring(e))}};An.prototype._performRequest=function(){var n=this._options.protocol,e=this._options.nativeProtocols[n];if(!e){this.emit("error",new TypeError("Unsupported protocol "+n));return}if(this._options.agents){var t=n.substr(0,n.length-1);this._options.agent=this._options.agents[t]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);this._currentUrl=Rl.format(this._options),i._redirectable=this;for(var r=0;r=300&&e<400){if(d$(this._currentRequest),n.destroy(),++this._redirectCount>this._options.maxRedirects){this.emit("error",new Vwe);return}((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],zk(/^content-/i,this._options.headers));var i=zk(/^host$/i,this._options.headers),r=Rl.parse(this._currentUrl),o=i||r.host,s=/^\w+:/.test(t)?this._currentUrl:Rl.format(Object.assign(r,{host:o})),a;try{a=Rl.resolve(s,t)}catch(c){this.emit("error",new a$(c));return}c$("redirecting to",a),this._isRedirect=!0;var l=Rl.parse(a);if(Object.assign(this._options,l),(l.protocol!==r.protocol||!nDe(l.host,o))&&zk(/^(?:authorization|cookie)$/i,this._options.headers),typeof this._options.beforeRedirect=="function"){var u={headers:n.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(c){this.emit("error",c);return}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(c){this.emit("error",new a$(c))}}else n.responseUrl=this._currentUrl,n.redirects=this._redirects,this.emit("response",n),this._requestBodyBuffers=[]};function h$(n){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(n).forEach(function(i){var r=i+":",o=t[r]=n[i],s=e[i]=Object.create(o);function a(u,c,h){if(typeof u=="string"){var d=u;try{u=l$(new Kk(d))}catch{u=Rl.parse(d)}}else Kk&&u instanceof Kk?u=l$(u):(h=c,c=u,u={protocol:r});return typeof c=="function"&&(h=c,c=null),c=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},u,c),c.nativeProtocols=t,zwe.equal(c.protocol,r,"protocol mismatch"),c$("options",c),new An(c,h)}function l(u,c,h){var d=s.request(u,c,h);return d.end(),d}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:l,configurable:!0,enumerable:!0,writable:!0}})}),e}function iDe(){}function l$(n){var e={protocol:n.protocol,hostname:n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,hash:n.hash,search:n.search,pathname:n.pathname,path:n.pathname+n.search,href:n.href};return n.port!==""&&(e.port=Number(n.port)),e}function zk(n,e){var t;for(var i in e)n.test(i)&&(t=e[i],delete e[i]);return t===null||typeof t>"u"?void 0:String(t).trim()}function dv(n,e){function t(i){Error.captureStackTrace(this,this.constructor),i?(this.message=e+": "+i.message,this.cause=i):this.message=e}return t.prototype=new Error,t.prototype.constructor=t,t.prototype.name="Error ["+n+"]",t.prototype.code=n,t}function d$(n){for(var e=0;e0&&n[t]==="."&&n.endsWith(e)}eE.exports=h$({http:Qwe,https:Kwe});eE.exports.wrap=h$});var qc=b((KBe,f$)=>{"use strict";var g$=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);f$.exports=n=>n?Object.keys(n).map(e=>[g$.has(e)?g$.get(e):e,n[e]]).reduce((e,t)=>(e[t[0]]=t[1],e),Object.create(null)):{}});var Yc=b((zBe,x$)=>{"use strict";var rDe=require("events"),p$=require("stream"),uf=Xg(),m$=require("string_decoder").StringDecoder,is=Symbol("EOF"),cf=Symbol("maybeEmitEnd"),da=Symbol("emittedEnd"),gv=Symbol("emittingEnd"),fv=Symbol("closed"),b$=Symbol("read"),iE=Symbol("flush"),y$=Symbol("flushChunk"),bn=Symbol("encoding"),ns=Symbol("decoder"),pv=Symbol("flowing"),hf=Symbol("paused"),df=Symbol("resume"),Vi=Symbol("bufferLength"),v$=Symbol("bufferPush"),nE=Symbol("bufferShift"),Fi=Symbol("objectMode"),Ii=Symbol("destroyed"),D$=global._MP_NO_ITERATOR_SYMBOLS_!=="1",oDe=D$&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),sDe=D$&&Symbol.iterator||Symbol("iterator not implemented"),w$=n=>n==="end"||n==="finish"||n==="prefinish",aDe=n=>n instanceof ArrayBuffer||typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,lDe=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n);x$.exports=class C$ extends p${constructor(e){super();this[pv]=!1,this[hf]=!1,this.pipes=new uf,this.buffer=new uf,this[Fi]=e&&e.objectMode||!1,this[Fi]?this[bn]=null:this[bn]=e&&e.encoding||null,this[bn]==="buffer"&&(this[bn]=null),this[ns]=this[bn]?new m$(this[bn]):null,this[is]=!1,this[da]=!1,this[gv]=!1,this[fv]=!1,this.writable=!0,this.readable=!0,this[Vi]=0,this[Ii]=!1}get bufferLength(){return this[Vi]}get encoding(){return this[bn]}set encoding(e){if(this[Fi])throw new Error("cannot set encoding in objectMode");if(this[bn]&&e!==this[bn]&&(this[ns]&&this[ns].lastNeed||this[Vi]))throw new Error("cannot change encoding");this[bn]!==e&&(this[ns]=e?new m$(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[ns].write(t)))),this[bn]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Fi]}set objectMode(e){this[Fi]=this[Fi]||!!e}write(e,t,i){if(this[is])throw new Error("write after end");return this[Ii]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8"),!this[Fi]&&!Buffer.isBuffer(e)&&(lDe(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):aDe(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[Vi]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[Fi]&&!(t===this[bn]&&!this[ns].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[bn]&&(e=this[ns].write(e)),this.flowing?(this[Vi]!==0&&this[iE](!0),this.emit("data",e)):this[v$](e),this[Vi]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[Ii])return null;try{return this[Vi]===0||e===0||e>this[Vi]?null:(this[Fi]&&(e=null),this.buffer.length>1&&!this[Fi]&&(this.encoding?this.buffer=new uf([Array.from(this.buffer).join("")]):this.buffer=new uf([Buffer.concat(Array.from(this.buffer),this[Vi])])),this[b$](e||null,this.buffer.head.value))}finally{this[cf]()}}[b$](e,t){return e===t.length||e===null?this[nE]():(this.buffer.head.value=t.slice(e),t=t.slice(0,e),this[Vi]-=e),this.emit("data",t),!this.buffer.length&&!this[is]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t="utf8"),e&&this.write(e,t),i&&this.once("end",i),this[is]=!0,this.writable=!1,(this.flowing||!this[hf])&&this[cf](),this}[df](){this[Ii]||(this[hf]=!1,this[pv]=!0,this.emit("resume"),this.buffer.length?this[iE]():this[is]?this[cf]():this.emit("drain"))}resume(){return this[df]()}pause(){this[pv]=!1,this[hf]=!0}get destroyed(){return this[Ii]}get flowing(){return this[pv]}get paused(){return this[hf]}[v$](e){return this[Fi]?this[Vi]+=1:this[Vi]+=e.length,this.buffer.push(e)}[nE](){return this.buffer.length&&(this[Fi]?this[Vi]-=1:this[Vi]-=this.buffer.head.value.length),this.buffer.shift()}[iE](e){do;while(this[y$](this[nE]()));!e&&!this.buffer.length&&!this[is]&&this.emit("drain")}[y$](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[Ii])return;let i=this[da];t=t||{},e===process.stdout||e===process.stderr?t.end=!1:t.end=t.end!==!1;let r={dest:e,opts:t,ondrain:o=>this[df]()};return this.pipes.push(r),e.on("drain",r.ondrain),this[df](),i&&r.opts.end&&r.dest.end(),e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[df]():w$(e)&&this[da]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[da]}[cf](){!this[gv]&&!this[da]&&!this[Ii]&&this.buffer.length===0&&this[is]&&(this[gv]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fv]&&this.emit("close"),this[gv]=!1)}emit(e,t){if(e!=="error"&&e!=="close"&&e!==Ii&&this[Ii])return;if(e==="data"){if(!t)return;this.pipes.length&&this.pipes.forEach(r=>r.dest.write(t)===!1&&this.pause())}else if(e==="end"){if(this[da]===!0)return;this[da]=!0,this.readable=!1,this[ns]&&(t=this[ns].end(),t&&(this.pipes.forEach(r=>r.dest.write(t)),super.emit("data",t))),this.pipes.forEach(r=>{r.dest.removeListener("drain",r.ondrain),r.opts.end&&r.dest.end()})}else if(e==="close"&&(this[fv]=!0,!this[da]&&!this[Ii]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=t,arguments.length>2)for(let r=2;r{e.push(i),this[Fi]||(e.dataLength+=i.length)}),t.then(()=>e)}concat(){return this[Fi]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Fi]?Promise.reject(new Error("cannot concat in objectMode")):this[bn]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(Ii,()=>t(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>t(i))})}[oDe](){return{next:()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[is])return Promise.resolve({done:!0});let i=null,r=null,o=u=>{this.removeListener("data",s),this.removeListener("end",a),r(u)},s=u=>{this.removeListener("error",o),this.removeListener("end",a),this.pause(),i({value:u,done:!!this[is]})},a=()=>{this.removeListener("error",o),this.removeListener("data",s),i({done:!0})},l=()=>o(new Error("stream destroyed"));return new Promise((u,c)=>{r=c,i=u,this.once(Ii,l),this.once("error",o),this.once("end",a),this.once("data",s)})}}}[sDe](){return{next:()=>{let t=this.read();return{value:t,done:t===null}}}}destroy(e){return this[Ii]?(e?this.emit("error",e):this.emit(Ii),this):(this[Ii]=!0,this.buffer=new uf,this[Vi]=0,typeof this.close=="function"&&!this[fv]&&this.close(),e?this.emit("error",e):this.emit(Ii),this)}static isStream(e){return!!e&&(e instanceof C$||e instanceof p$||e instanceof rDe&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var T$=b((VBe,S$)=>{var uDe=require("zlib").constants||{ZLIB_VERNUM:4736};S$.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},uDe))});var dE=b(On=>{"use strict";var lE=require("assert"),ga=require("buffer").Buffer,P$=require("zlib"),Fl=On.constants=T$(),cDe=Yc(),k$=ga.concat,Il=Symbol("_superWrite"),ff=class extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},hDe=Symbol("opts"),gf=Symbol("flushFlag"),E$=Symbol("finishFlushFlag"),uE=Symbol("fullFlushFlag"),mt=Symbol("handle"),mv=Symbol("onError"),Wc=Symbol("sawError"),rE=Symbol("level"),oE=Symbol("strategy"),sE=Symbol("ended"),eHe=Symbol("_defaultFullFlush"),cE=class extends cDe{constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[Wc]=!1,this[sE]=!1,this[hDe]=e,this[gf]=e.flush,this[E$]=e.finishFlush;try{this[mt]=new P$[t](e)}catch(i){throw new ff(i)}this[mv]=i=>{this[Wc]||(this[Wc]=!0,this.close(),this.emit("error",i))},this[mt].on("error",i=>this[mv](new ff(i))),this.once("end",()=>this.close)}close(){this[mt]&&(this[mt].close(),this[mt]=null,this.emit("close"))}reset(){if(!this[Wc])return lE(this[mt],"zlib binding closed"),this[mt].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[uE]),this.write(Object.assign(ga.alloc(0),{[gf]:e})))}end(e,t,i){return e&&this.write(e,t),this.flush(this[E$]),this[sE]=!0,super.end(null,null,i)}get ended(){return this[sE]}write(e,t,i){if(typeof t=="function"&&(i=t,t="utf8"),typeof e=="string"&&(e=ga.from(e,t)),this[Wc])return;lE(this[mt],"zlib binding closed");let r=this[mt]._handle,o=r.close;r.close=()=>{};let s=this[mt].close;this[mt].close=()=>{},ga.concat=u=>u;let a;try{let u=typeof e[gf]=="number"?e[gf]:this[gf];a=this[mt]._processChunk(e,u),ga.concat=k$}catch(u){ga.concat=k$,this[mv](new ff(u))}finally{this[mt]&&(this[mt]._handle=r,r.close=o,this[mt].close=s,this[mt].removeAllListeners("error"))}this[mt]&&this[mt].on("error",u=>this[mv](new ff(u)));let l;if(a)if(Array.isArray(a)&&a.length>0){l=this[Il](ga.from(a[0]));for(let u=1;u{this.flush(r),o()};try{this[mt].params(e,t)}finally{this[mt].flush=i}this[mt]&&(this[rE]=e,this[oE]=t)}}}},_$=class extends fa{constructor(e){super(e,"Deflate")}},R$=class extends fa{constructor(e){super(e,"Inflate")}},aE=Symbol("_portable"),L$=class extends fa{constructor(e){super(e,"Gzip");this[aE]=e&&!!e.portable}[Il](e){return this[aE]?(this[aE]=!1,e[9]=255,super[Il](e)):super[Il](e)}},F$=class extends fa{constructor(e){super(e,"Gunzip")}},I$=class extends fa{constructor(e){super(e,"DeflateRaw")}},j$=class extends fa{constructor(e){super(e,"InflateRaw")}},A$=class extends fa{constructor(e){super(e,"Unzip")}},hE=class extends cE{constructor(e,t){e=e||{},e.flush=e.flush||Fl.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Fl.BROTLI_OPERATION_FINISH;super(e,t);this[uE]=Fl.BROTLI_OPERATION_FLUSH}},O$=class extends hE{constructor(e){super(e,"BrotliCompress")}},M$=class extends hE{constructor(e){super(e,"BrotliDecompress")}};On.Deflate=_$;On.Inflate=R$;On.Gzip=L$;On.Gunzip=F$;On.DeflateRaw=I$;On.InflateRaw=j$;On.Unzip=A$;typeof P$.BrotliCompress=="function"?(On.BrotliCompress=O$,On.BrotliDecompress=M$):On.BrotliCompress=On.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Zc=b((iHe,N$)=>{var dDe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;N$.exports=dDe!=="win32"?n=>n:n=>n&&n.replace(/\\/g,"/")});var bv=b((rHe,B$)=>{"use strict";var gDe=Yc(),gE=Zc(),fE=Symbol("slurp");B$.exports=class extends gDe{constructor(e,t,i){super();switch(this.pause(),this.extended=t,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=gE(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=gE(e.linkpath),this.uname=e.uname,this.gname=e.gname,t&&this[fE](t),i&&this[fE](i,!0)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,r=this.blockRemain;return this.remain=Math.max(0,i-t),this.blockRemain=Math.max(0,r-t),this.ignore?!0:i>=t?super.write(e):super.write(e.slice(0,i))}[fE](e,t){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(t&&i==="path")&&(this[i]=i==="path"||i==="linkpath"?gE(e[i]):e[i])}}});var pE=b(yv=>{"use strict";yv.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);yv.code=new Map(Array.from(yv.name).map(n=>[n[1],n[0]]))});var W$=b((sHe,Y$)=>{"use strict";var fDe=(n,e)=>{if(Number.isSafeInteger(n))n<0?mDe(n,e):pDe(n,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},pDe=(n,e)=>{e[0]=128;for(var t=e.length;t>1;t--)e[t-1]=n&255,n=Math.floor(n/256)},mDe=(n,e)=>{e[0]=255;var t=!1;n=n*-1;for(var i=e.length;i>1;i--){var r=n&255;n=Math.floor(n/256),t?e[i-1]=H$(r):r===0?e[i-1]=0:(t=!0,e[i-1]=q$(r))}},bDe=n=>{let e=n[0],t=e===128?vDe(n.slice(1,n.length)):e===255?yDe(n):null;if(t===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(t))throw Error("parsed number outside of javascript safe integer range");return t},yDe=n=>{for(var e=n.length,t=0,i=!1,r=e-1;r>-1;r--){var o=n[r],s;i?s=H$(o):o===0?s=o:(i=!0,s=q$(o)),s!==0&&(t-=s*Math.pow(256,e-r-1))}return t},vDe=n=>{for(var e=n.length,t=0,i=e-1;i>-1;i--){var r=n[i];r!==0&&(t+=r*Math.pow(256,e-i-1))}return t},H$=n=>(255^n)&255,q$=n=>(255^n)+1&255;Y$.exports={encode:fDe,parse:bDe}});var $c=b((aHe,$$)=>{"use strict";var mE=pE(),Jc=require("path").posix,Z$=W$(),bE=Symbol("slurp"),Mn=Symbol("type"),J$=class{constructor(e,t,i,r){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Mn]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,i,r):e&&this.set(e)}decode(e,t,i,r){if(t||(t=0),!e||!(e.length>=t+512))throw new Error("need 512 bytes for header");if(this.path=jl(e,t,100),this.mode=pa(e,t+100,8),this.uid=pa(e,t+108,8),this.gid=pa(e,t+116,8),this.size=pa(e,t+124,12),this.mtime=yE(e,t+136,12),this.cksum=pa(e,t+148,12),this[bE](i),this[bE](r,!0),this[Mn]=jl(e,t+156,1),this[Mn]===""&&(this[Mn]="0"),this[Mn]==="0"&&this.path.substr(-1)==="/"&&(this[Mn]="5"),this[Mn]==="5"&&(this.size=0),this.linkpath=jl(e,t+157,100),e.slice(t+257,t+265).toString()==="ustar\x0000")if(this.uname=jl(e,t+265,32),this.gname=jl(e,t+297,32),this.devmaj=pa(e,t+329,8),this.devmin=pa(e,t+337,8),e[t+475]!==0){let s=jl(e,t+345,155);this.path=s+"/"+this.path}else{let s=jl(e,t+345,130);s&&(this.path=s+"/"+this.path),this.atime=yE(e,t+476,12),this.ctime=yE(e,t+488,12)}let o=8*32;for(let s=t;s=t+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,r=wDe(this.path||"",i),o=r[0],s=r[1];this.needPax=r[2],this.needPax=Al(e,t,100,o)||this.needPax,this.needPax=ma(e,t+100,8,this.mode)||this.needPax,this.needPax=ma(e,t+108,8,this.uid)||this.needPax,this.needPax=ma(e,t+116,8,this.gid)||this.needPax,this.needPax=ma(e,t+124,12,this.size)||this.needPax,this.needPax=vE(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[Mn].charCodeAt(0),this.needPax=Al(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=Al(e,t+265,32,this.uname)||this.needPax,this.needPax=Al(e,t+297,32,this.gname)||this.needPax,this.needPax=ma(e,t+329,8,this.devmaj)||this.needPax,this.needPax=ma(e,t+337,8,this.devmin)||this.needPax,this.needPax=Al(e,t+345,i,s)||this.needPax,e[t+475]!==0?this.needPax=Al(e,t+345,155,s)||this.needPax:(this.needPax=Al(e,t+345,130,s)||this.needPax,this.needPax=vE(e,t+476,12,this.atime)||this.needPax,this.needPax=vE(e,t+488,12,this.ctime)||this.needPax);let a=8*32;for(let l=t;l{let i=n,r="",o,s=Jc.parse(n).root||".";if(Buffer.byteLength(i)<100)o=[i,r,!1];else{r=Jc.dirname(i),i=Jc.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(r)<=e?o=[i,r,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(r)<=e?o=[i.substr(0,100-1),r,!0]:(i=Jc.join(Jc.basename(r),i),r=Jc.dirname(r));while(r!==s&&!o);o||(o=[n.substr(0,100-1),"",!0])}return o},jl=(n,e,t)=>n.slice(e,e+t).toString("utf8").replace(/\0.*/,""),yE=(n,e,t)=>DDe(pa(n,e,t)),DDe=n=>n===null?null:new Date(n*1e3),pa=(n,e,t)=>n[e]&128?Z$.parse(n.slice(e,e+t)):xDe(n,e,t),CDe=n=>isNaN(n)?null:n,xDe=(n,e,t)=>CDe(parseInt(n.slice(e,e+t).toString("utf8").replace(/\0.*$/,"").trim(),8)),SDe={12:8589934591,8:2097151},ma=(n,e,t,i)=>i===null?!1:i>SDe[t]||i<0?(Z$.encode(i,n.slice(e,e+t)),!0):(TDe(n,e,t,i),!1),TDe=(n,e,t,i)=>n.write(kDe(i,t),e,t,"ascii"),kDe=(n,e)=>EDe(Math.floor(n).toString(8),e),EDe=(n,e)=>(n.length===e-1?n:new Array(e-n.length-1).join("0")+n+" ")+"\0",vE=(n,e,t,i)=>i===null?!1:ma(n,e,t,i.getTime()/1e3),PDe=new Array(156).join("\0"),Al=(n,e,t,i)=>i===null?!1:(n.write(i+PDe,e,t,"utf8"),i.length!==Buffer.byteLength(i)||i.length>t);$$.exports=J$});var wv=b((lHe,X$)=>{"use strict";var _De=$c(),RDe=require("path"),vv=class{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){let e=this.encodeBody();if(e==="")return null;let t=Buffer.byteLength(e),i=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(i);for(let o=0;o<512;o++)r[o]=0;new _De({path:("PaxHeader/"+RDe.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(r),r.write(e,512,t,"utf8");for(let o=t+512;o=Math.pow(10,o)&&(o+=1),o+r+i}};vv.parse=(n,e,t)=>new vv(LDe(FDe(n),e),t);var LDe=(n,e)=>e?Object.keys(n).reduce((t,i)=>(t[i]=n[i],t),e):n,FDe=n=>n.replace(/\n$/,"").split(` -`).reduce(IDe,Object.create(null)),IDe=(n,e)=>{let t=parseInt(e,10);if(t!==Buffer.byteLength(e)+1)return n;e=e.substr((t+" ").length);let i=e.split("="),r=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r)return n;let o=i.join("=");return n[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(o*1e3):/^[0-9]+$/.test(o)?+o:o,n};X$.exports=vv});var Xc=b((uHe,U$)=>{U$.exports=n=>{let e=n.length-1,t=-1;for(;e>-1&&n.charAt(e)==="/";)t=e,e--;return t===-1?n:n.slice(0,t)}});var Dv=b((cHe,G$)=>{"use strict";G$.exports=n=>class extends n{warn(e,t,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=t instanceof Error&&t.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),this.emit("warn",i.tarCode,t,i)):t instanceof Error?this.emit("error",Object.assign(t,i)):this.emit("error",Object.assign(new Error(`${e}: ${t}`),i))}}});var DE=b((hHe,Q$)=>{"use strict";var Cv=["|","<",">","?",":"],wE=Cv.map(n=>String.fromCharCode(61440+n.charCodeAt(0))),jDe=new Map(Cv.map((n,e)=>[n,wE[e]])),ADe=new Map(wE.map((n,e)=>[n,Cv[e]]));Q$.exports={encode:n=>Cv.reduce((e,t)=>e.split(t).join(jDe.get(t)),n),decode:n=>wE.reduce((e,t)=>e.split(t).join(ADe.get(t)),n)}});var CE=b((dHe,z$)=>{var{isAbsolute:ODe,parse:K$}=require("path").win32;z$.exports=n=>{let e="",t=K$(n);for(;ODe(n)||t.root;){let i=n.charAt(0)==="/"&&n.slice(0,4)!=="//?/"?"/":t.root;n=n.substr(i.length),e+=i,t=K$(n)}return[e,n]}});var eX=b((gHe,V$)=>{"use strict";V$.exports=(n,e,t)=>(n&=4095,t&&(n=(n|384)&-19),e&&(n&256&&(n|=64),n&32&&(n|=8),n&4&&(n|=1)),n)});var LE=b((mHe,pX)=>{"use strict";var aX=Yc(),lX=wv(),uX=$c(),lo=require("fs"),tX=require("path"),ao=Zc(),MDe=Xc(),cX=(n,e)=>e?(n=ao(n).replace(/^\.(\/|$)/,""),MDe(e)+"/"+n):ao(n),NDe=16*1024*1024,iX=Symbol("process"),nX=Symbol("file"),rX=Symbol("directory"),SE=Symbol("symlink"),oX=Symbol("hardlink"),pf=Symbol("header"),xv=Symbol("read"),TE=Symbol("lstat"),Sv=Symbol("onlstat"),kE=Symbol("onread"),EE=Symbol("onreadlink"),PE=Symbol("openfile"),_E=Symbol("onopenfile"),ba=Symbol("close"),Tv=Symbol("mode"),RE=Symbol("awaitDrain"),xE=Symbol("ondrain"),uo=Symbol("prefix"),sX=Symbol("hadError"),hX=Dv(),BDe=DE(),dX=CE(),gX=eX(),kv=hX(class extends aX{constructor(e,t){t=t||{};super(t);if(typeof e!="string")throw new TypeError("path is required");this.path=ao(e),this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=t.maxReadSize||NDe,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=ao(t.cwd||process.cwd()),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.prefix=t.prefix?ao(t.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(!this.preservePaths){let[r,o]=dX(this.path);r&&(this.path=o,i=r)}this.win32=!!t.win32||process.platform==="win32",this.win32&&(this.path=BDe.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=ao(t.absolute||tX.resolve(this.cwd,e)),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[Sv](this.statCache.get(this.absolute)):this[TE]()}emit(e,...t){return e==="error"&&(this[sX]=!0),super.emit(e,...t)}[TE](){lo.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[Sv](t)})}[Sv](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=qDe(e),this.emit("stat",e),this[iX]()}[iX](){switch(this.type){case"File":return this[nX]();case"Directory":return this[rX]();case"SymbolicLink":return this[SE]();default:return this.end()}}[Tv](e){return gX(e,this.type==="Directory",this.portable)}[uo](e){return cX(e,this.prefix)}[pf](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new uX({path:this[uo](this.path),linkpath:this.type==="Link"?this[uo](this.linkpath):this.linkpath,mode:this[Tv](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new lX({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[uo](this.path),linkpath:this.type==="Link"?this[uo](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[rX](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[pf](),this.end()}[SE](){lo.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[EE](t)})}[EE](e){this.linkpath=ao(e),this[pf](),this.end()}[oX](e){this.type="Link",this.linkpath=ao(tX.relative(this.cwd,e)),this.stat.size=0,this[pf](),this.end()}[nX](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0)return this[oX](t)}this.linkCache.set(e,this.absolute)}if(this[pf](),this.stat.size===0)return this.end();this[PE]()}[PE](){lo.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[_E](t)})}[_E](e){if(this.fd=e,this[sX])return this[ba]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[xv]()}[xv](){let{fd:e,buf:t,offset:i,length:r,pos:o}=this;lo.read(e,t,i,r,o,(s,a)=>{if(s)return this[ba](()=>this.emit("error",s));this[kE](a)})}[ba](e){lo.close(this.fd,e)}[kE](e){if(e<=0&&this.remain>0){let r=new Error("encountered unexpected EOF");return r.path=this.absolute,r.syscall="read",r.code="EOF",this[ba](()=>this.emit("error",r))}if(e>this.remain){let r=new Error("did not encounter expected EOF");return r.path=this.absolute,r.syscall="read",r.code="EOF",this[ba](()=>this.emit("error",r))}if(e===this.remain)for(let r=e;rthis[xE]())}[RE](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[xv]()}}),fX=class extends kv{[TE](){this[Sv](lo.lstatSync(this.absolute))}[SE](){this[EE](lo.readlinkSync(this.absolute))}[PE](){this[_E](lo.openSync(this.absolute,"r"))}[xv](){let e=!0;try{let{fd:t,buf:i,offset:r,length:o,pos:s}=this,a=lo.readSync(t,i,r,o,s);this[kE](a),e=!1}finally{if(e)try{this[ba](()=>{})}catch{}}}[RE](e){e()}[ba](e){lo.closeSync(this.fd),e()}},HDe=hX(class extends aX{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=t.prefix||null,this.path=ao(e.path),this.mode=this[Tv](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=ao(e.linkpath),typeof t.onwarn=="function"&&this.on("warn",t.onwarn);let i=!1;if(!this.preservePaths){let[r,o]=dX(this.path);r&&(this.path=o,i=r)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new uX({path:this[uo](this.path),linkpath:this.type==="Link"?this[uo](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new lX({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[uo](this.path),linkpath:this.type==="Link"?this[uo](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[uo](e){return cX(e,this.prefix)}[Tv](e){return gX(e,this.type==="Directory",this.portable)}write(e){let t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});kv.Sync=fX;kv.Tar=HDe;var qDe=n=>n.isFile()?"File":n.isDirectory()?"Directory":n.isSymbolicLink()?"SymbolicLink":"Unsupported";pX.exports=kv});var jv=b((yHe,xX)=>{"use strict";var OE=class{constructor(e,t){this.path=e||"./",this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},YDe=Yc(),WDe=dE(),ZDe=bv(),HE=LE(),JDe=HE.Sync,$De=HE.Tar,XDe=Xg(),mX=Buffer.alloc(1024),_v=Symbol("onStat"),Ev=Symbol("ended"),co=Symbol("queue"),Uc=Symbol("current"),Ol=Symbol("process"),Pv=Symbol("processing"),bX=Symbol("processJob"),ho=Symbol("jobs"),FE=Symbol("jobDone"),Rv=Symbol("addFSEntry"),yX=Symbol("addTarEntry"),ME=Symbol("stat"),NE=Symbol("readdir"),Lv=Symbol("onreaddir"),Fv=Symbol("pipe"),vX=Symbol("entry"),IE=Symbol("entryOpt"),BE=Symbol("writeEntryClass"),DX=Symbol("write"),jE=Symbol("ondrain"),Iv=require("fs"),wX=require("path"),UDe=Dv(),AE=Zc(),qE=UDe(class extends YDe{constructor(e){super(e);e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=AE(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[BE]=HE,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new WDe.Gzip(e.gzip),this.zip.on("data",t=>super.write(t)),this.zip.on("end",t=>super.end()),this.zip.on("drain",t=>this[jE]()),this.on("resume",t=>this.zip.resume())):this.on("drain",this[jE]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:t=>!0,this[co]=new XDe,this[ho]=0,this.jobs=+e.jobs||4,this[Pv]=!1,this[Ev]=!1}[DX](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[Ev]=!0,this[Ol](),this}write(e){if(this[Ev])throw new Error("write after end");return e instanceof ZDe?this[yX](e):this[Rv](e),this.flowing}[yX](e){let t=AE(wX.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new OE(e.path,t,!1);i.entry=new $De(e,this[IE](i)),i.entry.on("end",r=>this[FE](i)),this[ho]+=1,this[co].push(i)}this[Ol]()}[Rv](e){let t=AE(wX.resolve(this.cwd,e));this[co].push(new OE(e,t)),this[Ol]()}[ME](e){e.pending=!0,this[ho]+=1;let t=this.follow?"stat":"lstat";Iv[t](e.absolute,(i,r)=>{e.pending=!1,this[ho]-=1,i?this.emit("error",i):this[_v](e,r)})}[_v](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[Ol]()}[NE](e){e.pending=!0,this[ho]+=1,Iv.readdir(e.absolute,(t,i)=>{if(e.pending=!1,this[ho]-=1,t)return this.emit("error",t);this[Lv](e,i)})}[Lv](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[Ol]()}[Ol](){if(!this[Pv]){this[Pv]=!0;for(let e=this[co].head;e!==null&&this[ho]this.warn(t,i,r),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[vX](e){this[ho]+=1;try{return new this[BE](e.path,this[IE](e)).on("end",()=>this[FE](e)).on("error",t=>this.emit("error",t))}catch(t){this.emit("error",t)}}[jE](){this[Uc]&&this[Uc].entry&&this[Uc].entry.resume()}[Fv](e){e.piped=!0,e.readdir&&e.readdir.forEach(r=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[Rv](s+r)});let t=e.entry,i=this.zip;i?t.on("data",r=>{i.write(r)||t.pause()}):t.on("data",r=>{super.write(r)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),CX=class extends qE{constructor(e){super(e);this[BE]=JDe}pause(){}resume(){}[ME](e){let t=this.follow?"statSync":"lstatSync";this[_v](e,Iv[t](e.absolute))}[NE](e,t){this[Lv](e,Iv.readdirSync(e.absolute))}[Fv](e){let t=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(r=>{let o=e.path,s=o==="./"?"":o.replace(/\/*$/,"/");this[Rv](s+r)}),i?t.on("data",r=>{i.write(r)}):t.on("data",r=>{super[DX](r)})}};qE.Sync=CX;xX.exports=qE});var ih=b(bf=>{"use strict";var GDe=Yc(),QDe=require("events").EventEmitter,yn=require("fs"),ZE=yn.writev;if(!ZE){let n=process.binding("fs"),e=n.FSReqWrap||n.FSReqCallback;ZE=(t,i,r,o)=>{let s=(l,u)=>o(l,u,i),a=new e;a.oncomplete=s,n.writeBuffers(t,i,r,a)}}var eh=Symbol("_autoClose"),Br=Symbol("_close"),mf=Symbol("_ended"),nt=Symbol("_fd"),SX=Symbol("_finished"),va=Symbol("_flags"),YE=Symbol("_flush"),JE=Symbol("_handleChunk"),$E=Symbol("_makeBuf"),Bv=Symbol("_mode"),Av=Symbol("_needDrain"),zc=Symbol("_onerror"),th=Symbol("_onopen"),WE=Symbol("_onread"),Qc=Symbol("_onwrite"),wa=Symbol("_open"),rs=Symbol("_path"),Ml=Symbol("_pos"),go=Symbol("_queue"),Kc=Symbol("_read"),TX=Symbol("_readSize"),ya=Symbol("_reading"),Ov=Symbol("_remain"),kX=Symbol("_size"),Mv=Symbol("_write"),Gc=Symbol("_writing"),Nv=Symbol("_defaultFlag"),Vc=Symbol("_errored"),XE=class extends GDe{constructor(e,t){t=t||{};super(t);if(this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Vc]=!1,this[nt]=typeof t.fd=="number"?t.fd:null,this[rs]=e,this[TX]=t.readSize||16*1024*1024,this[ya]=!1,this[kX]=typeof t.size=="number"?t.size:1/0,this[Ov]=this[kX],this[eh]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[nt]=="number"?this[Kc]():this[wa]()}get fd(){return this[nt]}get path(){return this[rs]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[wa](){yn.open(this[rs],"r",(e,t)=>this[th](e,t))}[th](e,t){e?this[zc](e):(this[nt]=t,this.emit("open",t),this[Kc]())}[$E](){return Buffer.allocUnsafe(Math.min(this[TX],this[Ov]))}[Kc](){if(!this[ya]){this[ya]=!0;let e=this[$E]();if(e.length===0)return process.nextTick(()=>this[WE](null,0,e));yn.read(this[nt],e,0,e.length,null,(t,i,r)=>this[WE](t,i,r))}}[WE](e,t,i){this[ya]=!1,e?this[zc](e):this[JE](t,i)&&this[Kc]()}[Br](){if(this[eh]&&typeof this[nt]=="number"){let e=this[nt];this[nt]=null,yn.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[zc](e){this[ya]=!0,this[Br](),this.emit("error",e)}[JE](e,t){let i=!1;return this[Ov]-=e,e>0&&(i=super.write(ethis[th](e,t))}[th](e,t){this[Nv]&&this[va]==="r+"&&e&&e.code==="ENOENT"?(this[va]="w",this[wa]()):e?this[zc](e):(this[nt]=t,this.emit("open",t),this[YE]())}end(e,t){return e&&this.write(e,t),this[mf]=!0,!this[Gc]&&!this[go].length&&typeof this[nt]=="number"&&this[Qc](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[mf]?(this.emit("error",new Error("write() after end()")),!1):this[nt]===null||this[Gc]||this[go].length?(this[go].push(e),this[Av]=!0,!1):(this[Gc]=!0,this[Mv](e),!0)}[Mv](e){yn.write(this[nt],e,0,e.length,this[Ml],(t,i)=>this[Qc](t,i))}[Qc](e,t){e?this[zc](e):(this[Ml]!==null&&(this[Ml]+=t),this[go].length?this[YE]():(this[Gc]=!1,this[mf]&&!this[SX]?(this[SX]=!0,this[Br](),this.emit("finish")):this[Av]&&(this[Av]=!1,this.emit("drain"))))}[YE](){if(this[go].length===0)this[mf]&&this[Qc](null,0);else if(this[go].length===1)this[Mv](this[go].pop());else{let e=this[go];this[go]=[],ZE(this[nt],e,this[Ml],(t,i)=>this[Qc](t,i))}}[Br](){if(this[eh]&&typeof this[nt]=="number"){let e=this[nt];this[nt]=null,yn.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},PX=class extends UE{[wa](){let e;if(this[Nv]&&this[va]==="r+")try{e=yn.openSync(this[rs],this[va],this[Bv])}catch(t){if(t.code==="ENOENT")return this[va]="w",this[wa]();throw t}else e=yn.openSync(this[rs],this[va],this[Bv]);this[th](null,e)}[Br](){if(this[eh]&&typeof this[nt]=="number"){let e=this[nt];this[nt]=null,yn.closeSync(e),this.emit("close")}}[Mv](e){let t=!0;try{this[Qc](null,yn.writeSync(this[nt],e,0,e.length,this[Ml])),t=!1}finally{if(t)try{this[Br]()}catch{}}}};bf.ReadStream=XE;bf.ReadStreamSync=EX;bf.WriteStream=UE;bf.WriteStreamSync=PX});var $v=b((DHe,AX)=>{"use strict";var KDe=Dv(),zDe=$c(),VDe=require("events"),eCe=Xg(),tCe=1024*1024,iCe=bv(),_X=wv(),nCe=dE(),GE=Buffer.from([31,139]),sr=Symbol("state"),Nl=Symbol("writeEntry"),os=Symbol("readEntry"),QE=Symbol("nextEntry"),RX=Symbol("processEntry"),ar=Symbol("extendedHeader"),yf=Symbol("globalExtendedHeader"),Da=Symbol("meta"),LX=Symbol("emitMeta"),Dt=Symbol("buffer"),ss=Symbol("queue"),Bl=Symbol("ended"),FX=Symbol("emittedEnd"),Hl=Symbol("emit"),vn=Symbol("unzip"),Hv=Symbol("consumeChunk"),qv=Symbol("consumeChunkSub"),KE=Symbol("consumeBody"),IX=Symbol("consumeMeta"),jX=Symbol("consumeHeader"),Yv=Symbol("consuming"),zE=Symbol("bufferConcat"),VE=Symbol("maybeEnd"),vf=Symbol("writing"),Ca=Symbol("aborted"),Wv=Symbol("onDone"),ql=Symbol("sawValidEntry"),Zv=Symbol("sawNullBlock"),Jv=Symbol("sawEOF"),rCe=n=>!0;AX.exports=KDe(class extends VDe{constructor(e){e=e||{};super(e);this.file=e.file||"",this[ql]=null,this.on(Wv,t=>{(this[sr]==="begin"||this[ql]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(Wv,e.ondone):this.on(Wv,t=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||tCe,this.filter=typeof e.filter=="function"?e.filter:rCe,this.writable=!0,this.readable=!1,this[ss]=new eCe,this[Dt]=null,this[os]=null,this[Nl]=null,this[sr]="begin",this[Da]="",this[ar]=null,this[yf]=null,this[Bl]=!1,this[vn]=null,this[Ca]=!1,this[Zv]=!1,this[Jv]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[jX](e,t){this[ql]===null&&(this[ql]=!1);let i;try{i=new zDe(e,t,this[ar],this[yf])}catch(r){return this.warn("TAR_ENTRY_INVALID",r)}if(i.nullBlock)this[Zv]?(this[Jv]=!0,this[sr]==="begin"&&(this[sr]="header"),this[Hl]("eof")):(this[Zv]=!0,this[Hl]("nullBlock"));else if(this[Zv]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let r=i.type;if(/^(Symbolic)?Link$/.test(r)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(r)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let o=this[Nl]=new iCe(i,this[ar],this[yf]);if(!this[ql])if(o.remain){let s=()=>{o.invalid||(this[ql]=!0)};o.on("end",s)}else this[ql]=!0;o.meta?o.size>this.maxMetaEntrySize?(o.ignore=!0,this[Hl]("ignoredEntry",o),this[sr]="ignore",o.resume()):o.size>0&&(this[Da]="",o.on("data",s=>this[Da]+=s),this[sr]="meta"):(this[ar]=null,o.ignore=o.ignore||!this.filter(o.path,o),o.ignore?(this[Hl]("ignoredEntry",o),this[sr]=o.remain?"ignore":"header",o.resume()):(o.remain?this[sr]="body":(this[sr]="header",o.end()),this[os]?this[ss].push(o):(this[ss].push(o),this[QE]())))}}}[RX](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[os]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[QE]()),t=!1)):(this[os]=null,t=!1),t}[QE](){do;while(this[RX](this[ss].shift()));if(!this[ss].length){let e=this[os];!e||e.flowing||e.size===e.remain?this[vf]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[KE](e,t){let i=this[Nl],r=i.blockRemain,o=r>=e.length&&t===0?e:e.slice(t,t+r);return i.write(o),i.blockRemain||(this[sr]="header",this[Nl]=null,i.end()),o.length}[IX](e,t){let i=this[Nl],r=this[KE](e,t);return this[Nl]||this[LX](i),r}[Hl](e,t,i){!this[ss].length&&!this[os]?this.emit(e,t,i):this[ss].push([e,t,i])}[LX](e){switch(this[Hl]("meta",this[Da]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[ar]=_X.parse(this[Da],this[ar],!1);break;case"GlobalExtendedHeader":this[yf]=_X.parse(this[Da],this[yf],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[ar]=this[ar]||Object.create(null),this[ar].path=this[Da].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[ar]=this[ar]||Object.create(null),this[ar].linkpath=this[Da].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Ca]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[Ca])return;if(this[vn]===null&&e){if(this[Dt]&&(e=Buffer.concat([this[Dt],e]),this[Dt]=null),e.lengththis[Hv](o)),this[vn].on("error",o=>this.abort(o)),this[vn].on("end",o=>{this[Bl]=!0,this[Hv]()}),this[vf]=!0;let r=this[vn][i?"end":"write"](e);return this[vf]=!1,r}}this[vf]=!0,this[vn]?this[vn].write(e):this[Hv](e),this[vf]=!1;let t=this[ss].length?!1:this[os]?this[os].flowing:!0;return!t&&!this[ss].length&&this[os].once("drain",i=>this.emit("drain")),t}[zE](e){e&&!this[Ca]&&(this[Dt]=this[Dt]?Buffer.concat([this[Dt],e]):e)}[VE](){if(this[Bl]&&!this[FX]&&!this[Ca]&&!this[Yv]){this[FX]=!0;let e=this[Nl];if(e&&e.blockRemain){let t=this[Dt]?this[Dt].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[Dt]&&e.write(this[Dt]),e.end()}this[Hl](Wv)}}[Hv](e){if(this[Yv])this[zE](e);else if(!e&&!this[Dt])this[VE]();else{if(this[Yv]=!0,this[Dt]){this[zE](e);let t=this[Dt];this[Dt]=null,this[qv](t)}else this[qv](e);for(;this[Dt]&&this[Dt].length>=512&&!this[Ca]&&!this[Jv];){let t=this[Dt];this[Dt]=null,this[qv](t)}this[Yv]=!1}(!this[Dt]||this[Bl])&&this[VE]()}[qv](e){let t=0,i=e.length;for(;t+512<=i&&!this[Ca]&&!this[Jv];)switch(this[sr]){case"begin":case"header":this[jX](e,t),t+=512;break;case"ignore":case"body":t+=this[KE](e,t);break;case"meta":t+=this[IX](e,t);break;default:throw new Error("invalid state: "+this[sr])}t{"use strict";var oCe=qc(),MX=$v(),nh=require("fs"),sCe=ih(),OX=require("path"),eP=Xc();BX.exports=(n,e,t)=>{typeof n=="function"?(t=n,e=null,n={}):Array.isArray(n)&&(e=n,n={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=oCe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&lCe(i,e),i.noResume||aCe(i),i.file&&i.sync?uCe(i):i.file?cCe(i,t):NX(i)};var aCe=n=>{let e=n.onentry;n.onentry=e?t=>{e(t),t.resume()}:t=>t.resume()},lCe=(n,e)=>{let t=new Map(e.map(o=>[eP(o),!0])),i=n.filter,r=(o,s)=>{let a=s||OX.parse(o).root||".",l=o===a?!1:t.has(o)?t.get(o):r(OX.dirname(o),a);return t.set(o,l),l};n.filter=i?(o,s)=>i(o,s)&&r(eP(o)):o=>r(eP(o))},uCe=n=>{let e=NX(n),t=n.file,i=!0,r;try{let o=nh.statSync(t),s=n.maxReadSize||16*1024*1024;if(o.size{let t=new MX(n),i=n.maxReadSize||16*1024*1024,r=n.file,o=new Promise((s,a)=>{t.on("error",a),t.on("end",s),nh.stat(r,(l,u)=>{if(l)a(l);else{let c=new sCe.ReadStream(r,{readSize:i,size:u.size});c.on("error",a),c.pipe(t)}})});return e?o.then(e,e):o},NX=n=>new MX(n)});var JX=b((xHe,ZX)=>{"use strict";var hCe=qc(),Uv=jv(),HX=ih(),qX=Xv(),YX=require("path");ZX.exports=(n,e,t)=>{if(typeof e=="function"&&(t=e),Array.isArray(n)&&(e=n,n={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let i=hCe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?dCe(i,e):i.file?gCe(i,e,t):i.sync?fCe(i,e):pCe(i,e)};var dCe=(n,e)=>{let t=new Uv.Sync(n),i=new HX.WriteStreamSync(n.file,{mode:n.mode||438});t.pipe(i),WX(t,e)},gCe=(n,e,t)=>{let i=new Uv(n),r=new HX.WriteStream(n.file,{mode:n.mode||438});i.pipe(r);let o=new Promise((s,a)=>{r.on("error",a),r.on("close",s),i.on("error",a)});return tP(i,e),t?o.then(t,t):o},WX=(n,e)=>{e.forEach(t=>{t.charAt(0)==="@"?qX({file:YX.resolve(n.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>n.add(i)}):n.add(t)}),n.end()},tP=(n,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return qX({file:YX.resolve(n.cwd,t.substr(1)),noResume:!0,onentry:i=>n.add(i)}).then(i=>tP(n,e));n.add(t)}n.end()},fCe=(n,e)=>{let t=new Uv.Sync(n);return WX(t,e),t},pCe=(n,e)=>{let t=new Uv(n);return tP(t,e),t}});var iP=b((SHe,zX)=>{"use strict";var mCe=qc(),$X=jv(),Nn=require("fs"),XX=ih(),UX=Xv(),GX=require("path"),QX=$c();zX.exports=(n,e,t)=>{let i=mCe(n);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),i.sync?bCe(i,e):vCe(i,e,t)};var bCe=(n,e)=>{let t=new $X.Sync(n),i=!0,r,o;try{try{r=Nn.openSync(n.file,"r+")}catch(l){if(l.code==="ENOENT")r=Nn.openSync(n.file,"w+");else throw l}let s=Nn.fstatSync(r),a=Buffer.alloc(512);e:for(o=0;os.size)break;o+=u,n.mtimeCache&&n.mtimeCache.set(l.path,l.mtime)}i=!1,yCe(n,t,o,r,e)}finally{if(i)try{Nn.closeSync(r)}catch{}}},yCe=(n,e,t,i,r)=>{let o=new XX.WriteStreamSync(n.file,{fd:i,start:t});e.pipe(o),wCe(e,r)},vCe=(n,e,t)=>{e=Array.from(e);let i=new $X(n),r=(s,a,l)=>{let u=(f,p)=>{f?Nn.close(s,m=>l(f)):l(null,p)},c=0;if(a===0)return u(null,0);let h=0,d=Buffer.alloc(512),g=(f,p)=>{if(f)return u(f);if(h+=p,h<512&&p)return Nn.read(s,d,h,d.length-h,c+h,g);if(c===0&&d[0]===31&&d[1]===139)return u(new Error("cannot append to compressed archives"));if(h<512)return u(null,c);let m=new QX(d);if(!m.cksumValid)return u(null,c);let v=512*Math.ceil(m.size/512);if(c+v+512>a||(c+=v+512,c>=a))return u(null,c);n.mtimeCache&&n.mtimeCache.set(m.path,m.mtime),h=0,Nn.read(s,d,0,512,c,g)};Nn.read(s,d,0,512,c,g)},o=new Promise((s,a)=>{i.on("error",a);let l="r+",u=(c,h)=>{if(c&&c.code==="ENOENT"&&l==="r+")return l="w+",Nn.open(n.file,l,u);if(c)return a(c);Nn.fstat(h,(d,g)=>{if(d)return Nn.close(h,()=>a(d));r(h,g.size,(f,p)=>{if(f)return a(f);let m=new XX.WriteStream(n.file,{fd:h,start:p});i.pipe(m),m.on("error",a),m.on("close",s),KX(i,e)})})};Nn.open(n.file,l,u)});return t?o.then(t,t):o},wCe=(n,e)=>{e.forEach(t=>{t.charAt(0)==="@"?UX({file:GX.resolve(n.cwd,t.substr(1)),sync:!0,noResume:!0,onentry:i=>n.add(i)}):n.add(t)}),n.end()},KX=(n,e)=>{for(;e.length;){let t=e.shift();if(t.charAt(0)==="@")return UX({file:GX.resolve(n.cwd,t.substr(1)),noResume:!0,onentry:i=>n.add(i)}).then(i=>KX(n,e));n.add(t)}n.end()}});var eU=b((THe,VX)=>{"use strict";var DCe=qc(),CCe=iP();VX.exports=(n,e,t)=>{let i=DCe(n);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),xCe(i),CCe(i,e,t)};var xCe=n=>{let e=n.filter;n.mtimeCache||(n.mtimeCache=new Map),n.filter=e?(t,i)=>e(t,i)&&!(n.mtimeCache.get(t)>i.mtime):(t,i)=>!(n.mtimeCache.get(t)>i.mtime)}});var nU=b((kHe,iU)=>{var{promisify:tU}=require("util"),xa=require("fs"),SCe=n=>{if(!n)n={mode:511,fs:xa};else if(typeof n=="object")n=de({mode:511,fs:xa},n);else if(typeof n=="number")n={mode:n,fs:xa};else if(typeof n=="string")n={mode:parseInt(n,8),fs:xa};else throw new TypeError("invalid options argument");return n.mkdir=n.mkdir||n.fs.mkdir||xa.mkdir,n.mkdirAsync=tU(n.mkdir),n.stat=n.stat||n.fs.stat||xa.stat,n.statAsync=tU(n.stat),n.statSync=n.statSync||n.fs.statSync||xa.statSync,n.mkdirSync=n.mkdirSync||n.fs.mkdirSync||xa.mkdirSync,n};iU.exports=SCe});var oU=b((EHe,rU)=>{var TCe=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:kCe,parse:ECe}=require("path"),PCe=n=>{if(/\0/.test(n))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:n,code:"ERR_INVALID_ARG_VALUE"});if(n=kCe(n),TCe==="win32"){let e=/[*|"<>?:]/,{root:t}=ECe(n);if(e.test(n.substr(t.length)))throw Object.assign(new Error("Illegal characters in path."),{path:n,code:"EINVAL"})}return n};rU.exports=PCe});var cU=b((PHe,uU)=>{var{dirname:sU}=require("path"),aU=(n,e,t=void 0)=>t===e?Promise.resolve():n.statAsync(e).then(i=>i.isDirectory()?t:void 0,i=>i.code==="ENOENT"?aU(n,sU(e),e):void 0),lU=(n,e,t=void 0)=>{if(t!==e)try{return n.statSync(e).isDirectory()?t:void 0}catch(i){return i.code==="ENOENT"?lU(n,sU(e),e):void 0}};uU.exports={findMade:aU,findMadeSync:lU}});var oP=b((_He,dU)=>{var{dirname:hU}=require("path"),nP=(n,e,t)=>{e.recursive=!1;let i=hU(n);return i===n?e.mkdirAsync(n,e).catch(r=>{if(r.code!=="EISDIR")throw r}):e.mkdirAsync(n,e).then(()=>t||n,r=>{if(r.code==="ENOENT")return nP(i,e).then(o=>nP(n,e,o));if(r.code!=="EEXIST"&&r.code!=="EROFS")throw r;return e.statAsync(n).then(o=>{if(o.isDirectory())return t;throw r},()=>{throw r})})},rP=(n,e,t)=>{let i=hU(n);if(e.recursive=!1,i===n)try{return e.mkdirSync(n,e)}catch(r){if(r.code!=="EISDIR")throw r;return}try{return e.mkdirSync(n,e),t||n}catch(r){if(r.code==="ENOENT")return rP(n,e,rP(i,e,t));if(r.code!=="EEXIST"&&r.code!=="EROFS")throw r;try{if(!e.statSync(n).isDirectory())throw r}catch{throw r}}};dU.exports={mkdirpManual:nP,mkdirpManualSync:rP}});var pU=b((RHe,fU)=>{var{dirname:gU}=require("path"),{findMade:_Ce,findMadeSync:RCe}=cU(),{mkdirpManual:LCe,mkdirpManualSync:FCe}=oP(),ICe=(n,e)=>(e.recursive=!0,gU(n)===n?e.mkdirAsync(n,e):_Ce(e,n).then(i=>e.mkdirAsync(n,e).then(()=>i).catch(r=>{if(r.code==="ENOENT")return LCe(n,e);throw r}))),jCe=(n,e)=>{if(e.recursive=!0,gU(n)===n)return e.mkdirSync(n,e);let i=RCe(e,n);try{return e.mkdirSync(n,e),i}catch(r){if(r.code==="ENOENT")return FCe(n,e);throw r}};fU.exports={mkdirpNative:ICe,mkdirpNativeSync:jCe}});var vU=b((LHe,yU)=>{var mU=require("fs"),ACe=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,sP=ACe.replace(/^v/,"").split("."),bU=+sP[0]>10||+sP[0]==10&&+sP[1]>=12,OCe=bU?n=>n.mkdir===mU.mkdir:()=>!1,MCe=bU?n=>n.mkdirSync===mU.mkdirSync:()=>!1;yU.exports={useNative:OCe,useNativeSync:MCe}});var TU=b((FHe,SU)=>{var rh=nU(),oh=oU(),{mkdirpNative:wU,mkdirpNativeSync:DU}=pU(),{mkdirpManual:CU,mkdirpManualSync:xU}=oP(),{useNative:NCe,useNativeSync:BCe}=vU(),sh=(n,e)=>(n=oh(n),e=rh(e),NCe(e)?wU(n,e):CU(n,e)),HCe=(n,e)=>(n=oh(n),e=rh(e),BCe(e)?DU(n,e):xU(n,e));sh.sync=HCe;sh.native=(n,e)=>wU(oh(n),rh(e));sh.manual=(n,e)=>CU(oh(n),rh(e));sh.nativeSync=(n,e)=>DU(oh(n),rh(e));sh.manualSync=(n,e)=>xU(oh(n),rh(e));SU.exports=sh});var FU=b((IHe,LU)=>{"use strict";var lr=require("fs"),Yl=require("path"),qCe=lr.lchown?"lchown":"chown",YCe=lr.lchownSync?"lchownSync":"chownSync",EU=lr.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),kU=(n,e,t)=>{try{return lr[YCe](n,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},WCe=(n,e,t)=>{try{return lr.chownSync(n,e,t)}catch(i){if(i.code!=="ENOENT")throw i}},ZCe=EU?(n,e,t,i)=>r=>{!r||r.code!=="EISDIR"?i(r):lr.chown(n,e,t,i)}:(n,e,t,i)=>i,aP=EU?(n,e,t)=>{try{return kU(n,e,t)}catch(i){if(i.code!=="EISDIR")throw i;WCe(n,e,t)}}:(n,e,t)=>kU(n,e,t),JCe=process.version,PU=(n,e,t)=>lr.readdir(n,e,t),$Ce=(n,e)=>lr.readdirSync(n,e);/^v4\./.test(JCe)&&(PU=(n,e,t)=>lr.readdir(n,t));var Gv=(n,e,t,i)=>{lr[qCe](n,e,t,ZCe(n,e,t,r=>{i(r&&r.code!=="ENOENT"?r:null)}))},_U=(n,e,t,i,r)=>{if(typeof e=="string")return lr.lstat(Yl.resolve(n,e),(o,s)=>{if(o)return r(o.code!=="ENOENT"?o:null);s.name=e,_U(n,s,t,i,r)});if(e.isDirectory())lP(Yl.resolve(n,e.name),t,i,o=>{if(o)return r(o);let s=Yl.resolve(n,e.name);Gv(s,t,i,r)});else{let o=Yl.resolve(n,e.name);Gv(o,t,i,r)}},lP=(n,e,t,i)=>{PU(n,{withFileTypes:!0},(r,o)=>{if(r){if(r.code==="ENOENT")return i();if(r.code!=="ENOTDIR"&&r.code!=="ENOTSUP")return i(r)}if(r||!o.length)return Gv(n,e,t,i);let s=o.length,a=null,l=u=>{if(!a){if(u)return i(a=u);if(--s===0)return Gv(n,e,t,i)}};o.forEach(u=>_U(n,u,e,t,l))})},XCe=(n,e,t,i)=>{if(typeof e=="string")try{let r=lr.lstatSync(Yl.resolve(n,e));r.name=e,e=r}catch(r){if(r.code==="ENOENT")return;throw r}e.isDirectory()&&RU(Yl.resolve(n,e.name),t,i),aP(Yl.resolve(n,e.name),t,i)},RU=(n,e,t)=>{let i;try{i=$Ce(n,{withFileTypes:!0})}catch(r){if(r.code==="ENOENT")return;if(r.code==="ENOTDIR"||r.code==="ENOTSUP")return aP(n,e,t);throw r}return i&&i.length&&i.forEach(r=>XCe(n,r,e,t)),aP(n,e,t)};LU.exports=lP;lP.sync=RU});var OU=b((jHe,hP)=>{"use strict";var IU=TU(),ur=require("fs"),Qv=require("path"),jU=FU(),Hr=Zc(),uP=class extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t,this.symlink=e}get name(){return"SylinkError"}},cP=class extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e,this.code=t}get name(){return"CwdError"}},Kv=(n,e)=>n.get(Hr(e)),wf=(n,e,t)=>n.set(Hr(e),t),UCe=(n,e)=>{ur.stat(n,(t,i)=>{(t||!i.isDirectory())&&(t=new cP(n,t&&t.code||"ENOTDIR")),e(t)})};hP.exports=(n,e,t)=>{n=Hr(n);let i=e.umask,r=e.mode|448,o=(r&i)!==0,s=e.uid,a=e.gid,l=typeof s=="number"&&typeof a=="number"&&(s!==e.processUid||a!==e.processGid),u=e.preserve,c=e.unlink,h=e.cache,d=Hr(e.cwd),g=(m,v)=>{m?t(m):(wf(h,n,!0),v&&l?jU(v,s,a,w=>g(w)):o?ur.chmod(n,r,t):t())};if(h&&Kv(h,n)===!0)return g();if(n===d)return UCe(n,g);if(u)return IU(n,{mode:r}).then(m=>g(null,m),g);let p=Hr(Qv.relative(d,n)).split("/");zv(d,p,r,h,c,d,null,g)};var zv=(n,e,t,i,r,o,s,a)=>{if(!e.length)return a(null,s);let l=e.shift(),u=Hr(Qv.resolve(n+"/"+l));if(Kv(i,u))return zv(u,e,t,i,r,o,s,a);ur.mkdir(u,t,AU(u,e,t,i,r,o,s,a))},AU=(n,e,t,i,r,o,s,a)=>l=>{l?ur.lstat(n,(u,c)=>{if(u)u.path=u.path&&Hr(u.path),a(u);else if(c.isDirectory())zv(n,e,t,i,r,o,s,a);else if(r)ur.unlink(n,h=>{if(h)return a(h);ur.mkdir(n,t,AU(n,e,t,i,r,o,s,a))});else{if(c.isSymbolicLink())return a(new uP(n,n+"/"+e.join("/")));a(l)}}):(s=s||n,zv(n,e,t,i,r,o,s,a))},GCe=n=>{let e=!1,t="ENOTDIR";try{e=ur.statSync(n).isDirectory()}catch(i){t=i.code}finally{if(!e)throw new cP(n,t)}};hP.exports.sync=(n,e)=>{n=Hr(n);let t=e.umask,i=e.mode|448,r=(i&t)!==0,o=e.uid,s=e.gid,a=typeof o=="number"&&typeof s=="number"&&(o!==e.processUid||s!==e.processGid),l=e.preserve,u=e.unlink,c=e.cache,h=Hr(e.cwd),d=m=>{wf(c,n,!0),m&&a&&jU.sync(m,o,s),r&&ur.chmodSync(n,i)};if(c&&Kv(c,n)===!0)return d();if(n===h)return GCe(h),d();if(l)return d(IU.sync(n,i));let f=Hr(Qv.relative(h,n)).split("/"),p=null;for(let m=f.shift(),v=h;m&&(v+="/"+m);m=f.shift())if(v=Hr(Qv.resolve(v)),!Kv(c,v))try{ur.mkdirSync(v,i),p=p||v,wf(c,v,!0)}catch{let D=ur.lstatSync(v);if(D.isDirectory()){wf(c,v,!0);continue}else if(u){ur.unlinkSync(v),ur.mkdirSync(v,i),p=p||v,wf(c,v,!0);continue}else if(D.isSymbolicLink())return new uP(v,v+"/"+f.join("/"))}return d(p)}});var gP=b((AHe,MU)=>{var dP=Object.create(null),{hasOwnProperty:QCe}=Object.prototype;MU.exports=n=>(QCe.call(dP,n)||(dP[n]=n.normalize("NFKD")),dP[n])});var qU=b((OHe,HU)=>{var NU=require("assert"),KCe=gP(),zCe=Xc(),{join:BU}=require("path"),VCe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,exe=VCe==="win32";HU.exports=()=>{let n=new Map,e=new Map,t=u=>u.split("/").slice(0,-1).reduce((h,d)=>(h.length&&(d=BU(h[h.length-1],d)),h.push(d||"/"),h),[]),i=new Set,r=u=>{let c=e.get(u);if(!c)throw new Error("function does not have any path reservations");return{paths:c.paths.map(h=>n.get(h)),dirs:[...c.dirs].map(h=>n.get(h))}},o=u=>{let{paths:c,dirs:h}=r(u);return c.every(d=>d[0]===u)&&h.every(d=>d[0]instanceof Set&&d[0].has(u))},s=u=>i.has(u)||!o(u)?!1:(i.add(u),u(()=>a(u)),!0),a=u=>{if(!i.has(u))return!1;let{paths:c,dirs:h}=e.get(u),d=new Set;return c.forEach(g=>{let f=n.get(g);NU.equal(f[0],u),f.length===1?n.delete(g):(f.shift(),typeof f[0]=="function"?d.add(f[0]):f[0].forEach(p=>d.add(p)))}),h.forEach(g=>{let f=n.get(g);NU(f[0]instanceof Set),f[0].size===1&&f.length===1?n.delete(g):f[0].size===1?(f.shift(),d.add(f[0])):f[0].delete(u)}),i.delete(u),d.forEach(g=>s(g)),!0};return{check:o,reserve:(u,c)=>{u=exe?["win32 parallelization disabled"]:u.map(d=>KCe(zCe(BU(d))).toLowerCase());let h=new Set(u.map(d=>t(d)).reduce((d,g)=>d.concat(g)));return e.set(c,{dirs:h,paths:u}),u.forEach(d=>{let g=n.get(d);g?g.push(c):n.set(d,[c])}),h.forEach(d=>{let g=n.get(d);g?g[g.length-1]instanceof Set?g[g.length-1].add(c):g.push(new Set([c])):n.set(d,[new Set([c])])}),s(c)}}}});var ZU=b((MHe,WU)=>{var txe=process.env.__FAKE_PLATFORM__||process.platform,ixe=txe==="win32",nxe=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:rxe,O_TRUNC:oxe,O_WRONLY:sxe,UV_FS_O_FILEMAP:YU=0}=nxe.constants,axe=ixe&&!!YU,lxe=512*1024,uxe=YU|oxe|rxe|sxe;WU.exports=axe?n=>n"w"});var DP=b((NHe,o8)=>{"use strict";var cxe=require("assert"),hxe=$v(),Ye=require("fs"),dxe=ih(),as=require("path"),t8=OU(),JU=DE(),gxe=qU(),fxe=CE(),Bn=Zc(),pxe=Xc(),mxe=gP(),$U=Symbol("onEntry"),mP=Symbol("checkFs"),XU=Symbol("checkFs2"),tw=Symbol("pruneCache"),bP=Symbol("isReusable"),cr=Symbol("makeFs"),yP=Symbol("file"),vP=Symbol("directory"),iw=Symbol("link"),UU=Symbol("symlink"),GU=Symbol("hardlink"),QU=Symbol("unsupported"),KU=Symbol("checkPath"),Sa=Symbol("mkdir"),ji=Symbol("onError"),Vv=Symbol("pending"),zU=Symbol("pend"),ah=Symbol("unpend"),fP=Symbol("ended"),pP=Symbol("maybeClose"),wP=Symbol("skip"),Df=Symbol("doChown"),Cf=Symbol("uid"),xf=Symbol("gid"),Sf=Symbol("checkedCwd"),i8=require("crypto"),n8=ZU(),bxe=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Tf=bxe==="win32",yxe=(n,e)=>{if(!Tf)return Ye.unlink(n,e);let t=n+".DELETE."+i8.randomBytes(16).toString("hex");Ye.rename(n,t,i=>{if(i)return e(i);Ye.unlink(t,e)})},vxe=n=>{if(!Tf)return Ye.unlinkSync(n);let e=n+".DELETE."+i8.randomBytes(16).toString("hex");Ye.renameSync(n,e),Ye.unlinkSync(e)},VU=(n,e,t)=>n===n>>>0?n:e===e>>>0?e:t,e8=n=>mxe(pxe(Bn(n))).toLowerCase(),wxe=(n,e)=>{e=e8(e);for(let t of n.keys()){let i=e8(t);(i===e||i.indexOf(e+"/")===0)&&n.delete(t)}},Dxe=n=>{for(let e of n.keys())n.delete(e)},nw=class extends hxe{constructor(e){e||(e={}),e.ondone=t=>{this[fP]=!0,this[pP]()};super(e);if(this[Sf]=!1,this.reservations=gxe(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[Vv]=0,this[fP]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Tf,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=Bn(as.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",t=>this[$U](t))}warn(e,t,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,t,i)}[pP](){this[fP]&&this[Vv]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[KU](e){if(this.strip){let t=Bn(e.path).split("/");if(t.length=this.strip)e.linkpath=i.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let t=Bn(e.path),i=t.split("/");if(i.includes("..")||Tf&&/^[a-z]:\.\.$/i.test(i[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;let[r,o]=fxe(t);r&&(e.path=o,this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(as.isAbsolute(e.path)?e.absolute=Bn(as.resolve(e.path)):e.absolute=Bn(as.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:Bn(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:t}=as.win32.parse(e.absolute);e.absolute=t+JU.encode(e.absolute.substr(t.length));let{root:i}=as.win32.parse(e.path);e.path=i+JU.encode(e.path.substr(i.length))}return!0}[$U](e){if(!this[KU](e))return e.resume();switch(cxe.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[mP](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[QU](e)}}[ji](e,t){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[ah](),t.resume())}[Sa](e,t,i){t8(Bn(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},i)}[Df](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[Cf](e){return VU(this.uid,e.uid,this.processUid)}[xf](e){return VU(this.gid,e.gid,this.processGid)}[yP](e,t){let i=e.mode&4095||this.fmode,r=new dxe.WriteStream(e.absolute,{flags:n8(e.size),mode:i,autoClose:!1});r.on("error",l=>{r.fd&&Ye.close(r.fd,()=>{}),r.write=()=>!0,this[ji](l,e),t()});let o=1,s=l=>{if(l){r.fd&&Ye.close(r.fd,()=>{}),this[ji](l,e),t();return}--o===0&&Ye.close(r.fd,u=>{u?this[ji](u,e):this[ah](),t()})};r.on("finish",l=>{let u=e.absolute,c=r.fd;if(e.mtime&&!this.noMtime){o++;let h=e.atime||new Date,d=e.mtime;Ye.futimes(c,h,d,g=>g?Ye.utimes(u,h,d,f=>s(f&&g)):s())}if(this[Df](e)){o++;let h=this[Cf](e),d=this[xf](e);Ye.fchown(c,h,d,g=>g?Ye.chown(u,h,d,f=>s(f&&g)):s())}s()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>{this[ji](l,e),t()}),e.pipe(a)),a.pipe(r)}[vP](e,t){let i=e.mode&4095||this.dmode;this[Sa](e.absolute,i,r=>{if(r){this[ji](r,e),t();return}let o=1,s=a=>{--o===0&&(t(),this[ah](),e.resume())};e.mtime&&!this.noMtime&&(o++,Ye.utimes(e.absolute,e.atime||new Date,e.mtime,s)),this[Df](e)&&(o++,Ye.chown(e.absolute,this[Cf](e),this[xf](e),s)),s()})}[QU](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[UU](e,t){this[iw](e,e.linkpath,"symlink",t)}[GU](e,t){let i=Bn(as.resolve(this.cwd,e.linkpath));this[iw](e,i,"link",t)}[zU](){this[Vv]++}[ah](){this[Vv]--,this[pP]()}[wP](e){this[ah](),e.resume()}[bP](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!Tf}[mP](e){this[zU]();let t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,i=>this[XU](e,i))}[tw](e){e.type==="SymbolicLink"?Dxe(this.dirCache):e.type!=="Directory"&&wxe(this.dirCache,e.absolute)}[XU](e,t){this[tw](e);let i=a=>{this[tw](e),t(a)},r=()=>{this[Sa](this.cwd,this.dmode,a=>{if(a){this[ji](a,e),i();return}this[Sf]=!0,o()})},o=()=>{if(e.absolute!==this.cwd){let a=Bn(as.dirname(e.absolute));if(a!==this.cwd)return this[Sa](a,this.dmode,l=>{if(l){this[ji](l,e),i();return}s()})}s()},s=()=>{Ye.lstat(e.absolute,(a,l)=>{if(l&&(this.keep||this.newer&&l.mtime>e.mtime)){this[wP](e),i();return}if(a||this[bP](e,l))return this[cr](null,e,i);if(l.isDirectory()){if(e.type==="Directory"){let u=!this.noChmod&&e.mode&&(l.mode&4095)!==e.mode,c=h=>this[cr](h,e,i);return u?Ye.chmod(e.absolute,e.mode,c):c()}if(e.absolute!==this.cwd)return Ye.rmdir(e.absolute,u=>this[cr](u,e,i))}if(e.absolute===this.cwd)return this[cr](null,e,i);yxe(e.absolute,u=>this[cr](u,e,i))})};this[Sf]?o():r()}[cr](e,t,i){if(e){this[ji](e,t),i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[yP](t,i);case"Link":return this[GU](t,i);case"SymbolicLink":return this[UU](t,i);case"Directory":case"GNUDumpDir":return this[vP](t,i)}}[iw](e,t,i,r){Ye[i](t,e.absolute,o=>{o?this[ji](o,e):(this[ah](),e.resume()),r()})}},ew=n=>{try{return[null,n()]}catch(e){return[e,null]}},r8=class extends nw{[cr](e,t){return super[cr](e,t,()=>{})}[mP](e){if(this[tw](e),!this[Sf]){let o=this[Sa](this.cwd,this.dmode);if(o)return this[ji](o,e);this[Sf]=!0}if(e.absolute!==this.cwd){let o=Bn(as.dirname(e.absolute));if(o!==this.cwd){let s=this[Sa](o,this.dmode);if(s)return this[ji](s,e)}}let[t,i]=ew(()=>Ye.lstatSync(e.absolute));if(i&&(this.keep||this.newer&&i.mtime>e.mtime))return this[wP](e);if(t||this[bP](e,i))return this[cr](null,e);if(i.isDirectory()){if(e.type==="Directory"){let s=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=s?ew(()=>{Ye.chmodSync(e.absolute,e.mode)}):[];return this[cr](a,e)}let[o]=ew(()=>Ye.rmdirSync(e.absolute));this[cr](o,e)}let[r]=e.absolute===this.cwd?[]:ew(()=>vxe(e.absolute));this[cr](r,e)}[yP](e,t){let i=e.mode&4095||this.fmode,r=a=>{let l;try{Ye.closeSync(o)}catch(u){l=u}(a||l)&&this[ji](a||l,e),t()},o;try{o=Ye.openSync(e.absolute,n8(e.size),i)}catch(a){return r(a)}let s=this.transform&&this.transform(e)||e;s!==e&&(s.on("error",a=>this[ji](a,e)),e.pipe(s)),s.on("data",a=>{try{Ye.writeSync(o,a,0,a.length)}catch(l){r(l)}}),s.on("end",a=>{let l=null;if(e.mtime&&!this.noMtime){let u=e.atime||new Date,c=e.mtime;try{Ye.futimesSync(o,u,c)}catch(h){try{Ye.utimesSync(e.absolute,u,c)}catch{l=h}}}if(this[Df](e)){let u=this[Cf](e),c=this[xf](e);try{Ye.fchownSync(o,u,c)}catch(h){try{Ye.chownSync(e.absolute,u,c)}catch{l=l||h}}}r(l)})}[vP](e,t){let i=e.mode&4095||this.dmode,r=this[Sa](e.absolute,i);if(r){this[ji](r,e),t();return}if(e.mtime&&!this.noMtime)try{Ye.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[Df](e))try{Ye.chownSync(e.absolute,this[Cf](e),this[xf](e))}catch{}t(),e.resume()}[Sa](e,t){try{return t8.sync(Bn(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(i){return i}}[iw](e,t,i,r){try{Ye[i+"Sync"](t,e.absolute),r(),e.resume()}catch(o){return this[ji](o,e)}}};nw.Sync=r8;o8.exports=nw});var c8=b((BHe,u8)=>{"use strict";var Cxe=qc(),rw=DP(),a8=require("fs"),l8=ih(),s8=require("path"),CP=Xc();u8.exports=(n,e,t)=>{typeof n=="function"?(t=n,e=null,n={}):Array.isArray(n)&&(e=n,n={}),typeof e=="function"&&(t=e,e=null),e?e=Array.from(e):e=[];let i=Cxe(n);if(i.sync&&typeof t=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof t=="function")throw new TypeError("callback only supported with file option");return e.length&&xxe(i,e),i.file&&i.sync?Sxe(i):i.file?Txe(i,t):i.sync?kxe(i):Exe(i)};var xxe=(n,e)=>{let t=new Map(e.map(o=>[CP(o),!0])),i=n.filter,r=(o,s)=>{let a=s||s8.parse(o).root||".",l=o===a?!1:t.has(o)?t.get(o):r(s8.dirname(o),a);return t.set(o,l),l};n.filter=i?(o,s)=>i(o,s)&&r(CP(o)):o=>r(CP(o))},Sxe=n=>{let e=new rw.Sync(n),t=n.file,i=a8.statSync(t),r=n.maxReadSize||16*1024*1024;new l8.ReadStreamSync(t,{readSize:r,size:i.size}).pipe(e)},Txe=(n,e)=>{let t=new rw(n),i=n.maxReadSize||16*1024*1024,r=n.file,o=new Promise((s,a)=>{t.on("error",a),t.on("close",s),a8.stat(r,(l,u)=>{if(l)a(l);else{let c=new l8.ReadStream(r,{readSize:i,size:u.size});c.on("error",a),c.pipe(t)}})});return e?o.then(e,e):o},kxe=n=>new rw.Sync(n),Exe=n=>new rw(n)});var h8=b(ni=>{"use strict";ni.c=ni.create=JX();ni.r=ni.replace=iP();ni.t=ni.list=Xv();ni.u=ni.update=eU();ni.x=ni.extract=c8();ni.Pack=jv();ni.Unpack=DP();ni.Parse=$v();ni.ReadEntry=bv();ni.WriteEntry=LE();ni.Header=$c();ni.Pax=wv();ni.types=pE()});var p8=b((qHe,f8)=>{f8.exports=Ai;function Ai(n){if(!(this instanceof Ai))return new Ai(n);this.value=n}Ai.prototype.get=function(n){for(var e=this.value,t=0;t{var Pxe=p8(),_xe=require("events").EventEmitter;m8.exports=lh;function lh(n){var e=lh.saw(n,{}),t=n.call(e.handlers,e);return t!==void 0&&(e.handlers=t),e.record(),e.chain()}lh.light=function(e){var t=lh.saw(e,{}),i=e.call(t.handlers,t);return i!==void 0&&(t.handlers=i),t.chain()};lh.saw=function(n,e){var t=new _xe;return t.handlers=e,t.actions=[],t.chain=function(){var i=Pxe(t.handlers).map(function(r){if(this.isRoot)return r;var o=this.path;typeof r=="function"&&this.update(function(){return t.actions.push({path:o,args:[].slice.call(arguments)}),i})});return process.nextTick(function(){t.emit("begin"),t.next()}),i},t.pop=function(){return t.actions.shift()},t.next=function(){var i=t.pop();if(!i)t.emit("end");else if(!i.trap){var r=t.handlers;i.path.forEach(function(o){r=r[o]}),r.apply(t.handlers,i.args)}},t.nest=function(i){var r=[].slice.call(arguments,1),o=!0;if(typeof i=="boolean"){var o=i;i=r.shift()}var s=lh.saw(n,{}),a=n.call(s.handlers,s);a!==void 0&&(s.handlers=a),typeof t.step<"u"&&s.record(),i.apply(s.chain(),r),o!==!1&&s.on("end",t.next)},t.record=function(){Rxe(t)},["trap","down","jump"].forEach(function(i){t[i]=function(){throw new Error("To use the trap, down and jump features, please call record() first to start recording actions.")}}),t};function Rxe(n){n.step=0,n.pop=function(){return n.actions[n.step++]},n.trap=function(e,t){var i=Array.isArray(e)?e:[e];n.actions.push({path:i,step:n.step,cb:t,trap:!0})},n.down=function(e){var t=(Array.isArray(e)?e:[e]).join("/"),i=n.actions.slice(n.step).map(function(o){return o.trap&&o.step<=n.step?!1:o.path.join("/")==t}).indexOf(!0);i>=0?n.step+=i:n.step=n.actions.length;var r=n.actions[n.step-1];r&&r.trap?(n.step=r.step,r.cb()):n.next()},n.jump=function(e){n.step=e,n.next()}}});var v8=b((WHe,y8)=>{y8.exports=en;function en(n){if(!(this instanceof en))return new en(n);this.buffers=n||[],this.length=this.buffers.reduce(function(e,t){return e+t.length},0)}en.prototype.push=function(){for(var n=0;n=0?n:this.length-n,r=[].slice.call(arguments,2);e===void 0?e=this.length-i:e>this.length-i&&(e=this.length-i);for(var n=0;n0){var u=i-a;if(u+e0){var g=r.slice();g.unshift(h),g.push(d),t.splice.apply(t,[l,1].concat(g)),l+=g.length,r=[]}else t.splice(l,1,h,d),l+=2}else o.push(t[l].slice(u)),t[l]=t[l].slice(0,u),l++}for(r.length>0&&(t.splice.apply(t,[l,0].concat(r)),l+=r.length);o.lengththis.length&&(e=this.length);for(var i=0,r=0;r=e-n?Math.min(u+(e-n)-s,l):l;t[a].copy(o,s,u,c),s+=c-u}return o};en.prototype.pos=function(n){if(n<0||n>=this.length)throw new Error("oob");for(var e=n,t=0,i=null;;){if(i=this.buffers[t],e=this.buffers[t].length;)if(i=0,t++,t>=this.buffers.length)return-1;var l=this.buffers[t][i];if(l==n[r]){if(r==0&&(o={i:t,j:i,pos:s}),r++,r==n.length)return o.pos}else r!=0&&(t=o.i,i=o.j,s=o.pos,r=0);i++,s++}};en.prototype.toBuffer=function(){return this.slice()};en.prototype.toString=function(n,e,t){return this.slice(e,t).toString(n)}});var D8=b((ZHe,w8)=>{w8.exports=function(n){function e(i,r){var o=t.store,s=i.split(".");s.slice(0,-1).forEach(function(l){o[l]===void 0&&(o[l]={}),o=o[l]});var a=s[s.length-1];return arguments.length==1?o[a]:o[a]=r}var t={get:function(i){return e(i)},set:function(i,r){return e(i,r)},store:n||{}};return t}});var E8=b((Wl,k8)=>{var Lxe=b8(),C8=require("events").EventEmitter,Fxe=v8(),ow=D8(),Ixe=require("stream").Stream;Wl=k8.exports=function(n,e){if(Buffer.isBuffer(n))return Wl.parse(n);var t=Wl.stream();return n&&n.pipe?n.pipe(t):n&&(n.on(e||"data",function(i){t.write(i)}),n.on("end",function(){t.end()})),t};Wl.stream=function(n){if(n)return Wl.apply(null,arguments);var e=null;function t(h,d,g){e={bytes:h,skip:g,cb:function(f){e=null,d(f)}},r()}var i=null;function r(){if(!e){c&&(u=!0);return}if(typeof e=="function")e();else{var h=i+e.bytes;if(a.length>=h){var d;i==null?(d=a.splice(0,h),e.skip||(d=d.slice())):(e.skip||(d=a.slice(i,h)),i=h),e.skip?e.cb():e.cb(d)}}}function o(h){function d(){u||h.next()}var g=T8(function(f,p){return function(m){t(f,function(v){l.set(m,p(v)),d()})}});return g.tap=function(f){h.nest(f,l.store)},g.into=function(f,p){l.get(f)||l.set(f,{});var m=l;l=ow(m.get(f)),h.nest(function(){p.apply(this,arguments),this.tap(function(){l=m})},l.store)},g.flush=function(){l.store={},d()},g.loop=function(f){var p=!1;h.nest(!1,function m(){this.vars=l.store,f.call(this,function(){p=!0,d()},l.store),this.tap(function(){p?h.next():m.call(this)}.bind(this))},l.store)},g.buffer=function(f,p){typeof p=="string"&&(p=l.get(p)),t(p,function(m){l.set(f,m),d()})},g.skip=function(f){typeof f=="string"&&(f=l.get(f)),t(f,function(){d()})},g.scan=function(p,m){if(typeof m=="string")m=new Buffer(m);else if(!Buffer.isBuffer(m))throw new Error("search must be a Buffer or a string");var v=0;e=function(){var w=a.indexOf(m,i+v),D=w-i-v;w!==-1?(e=null,i!=null?(l.set(p,a.slice(i,i+v+D)),i+=v+D+m.length):(l.set(p,a.slice(0,v+D)),a.splice(0,v+D+m.length)),d(),r()):D=Math.max(a.length-m.length-i-v,0),v+=D},r()},g.peek=function(f){i=0,h.nest(function(){f.call(this,l.store),this.tap(function(){i=null})})},g}var s=Lxe.light(o);s.writable=!0;var a=Fxe();s.write=function(h){a.push(h),r()};var l=ow(),u=!1,c=!1;return s.end=function(){c=!0},s.pipe=Ixe.prototype.pipe,Object.getOwnPropertyNames(C8.prototype).forEach(function(h){s[h]=C8.prototype[h]}),s};Wl.parse=function(e){var t=T8(function(o,s){return function(a){if(i+o<=e.length){var l=e.slice(i,i+o);i+=o,r.set(a,s(l))}else r.set(a,null);return t}}),i=0,r=ow();return t.vars=r.store,t.tap=function(o){return o.call(t,r.store),t},t.into=function(o,s){r.get(o)||r.set(o,{});var a=r;return r=ow(a.get(o)),s.call(t,r.store),r=a,t},t.loop=function(o){for(var s=!1,a=function(){s=!0};s===!1;)o.call(t,a,r.store);return t},t.buffer=function(o,s){typeof s=="string"&&(s=r.get(s));var a=e.slice(i,Math.min(e.length,i+s));return i+=s,r.set(o,a),t},t.skip=function(o){return typeof o=="string"&&(o=r.get(o)),i+=o,t},t.scan=function(o,s){if(typeof s=="string")s=new Buffer(s);else if(!Buffer.isBuffer(s))throw new Error("search must be a Buffer or a string");r.set(o,null);for(var a=0;a+i<=e.length-s.length+1;a++){for(var l=0;l=e.length},t};function x8(n){for(var e=0,t=0;t{var P8=require("stream").Transform,Oxe=require("util");function Zl(n,e){if(!(this instanceof Zl))return new Zl;P8.call(this);var t=typeof n=="object"?n.pattern:n;this.pattern=Buffer.isBuffer(t)?t:Buffer.from(t),this.requiredLength=this.pattern.length,n.requiredExtraSize&&(this.requiredLength+=n.requiredExtraSize),this.data=new Buffer(""),this.bytesSoFar=0,this.matchFn=e}Oxe.inherits(Zl,P8);Zl.prototype.checkDataChunk=function(n){var e=this.data.length>=this.requiredLength;if(!!e){var t=this.data.indexOf(this.pattern,n?1:0);if(t>=0&&t+this.requiredLength>this.data.length){if(t>0){var i=this.data.slice(0,t);this.push(i),this.bytesSoFar+=t,this.data=this.data.slice(t)}return}if(t===-1){var r=this.data.length-this.requiredLength+1,i=this.data.slice(0,r);this.push(i),this.bytesSoFar+=r,this.data=this.data.slice(r);return}if(t>0){var i=this.data.slice(0,t);this.data=this.data.slice(t),this.push(i),this.bytesSoFar+=t}var o=this.matchFn?this.matchFn(this.data,this.bytesSoFar):!0;if(o){this.data=new Buffer("");return}return!0}};Zl.prototype._transform=function(n,e,t){this.data=Buffer.concat([this.data,n]);for(var i=!0;this.checkDataChunk(!i);)i=!1;t()};Zl.prototype._flush=function(n){if(this.data.length>0)for(var e=!0;this.checkDataChunk(!e);)e=!1;this.data.length>0&&(this.push(this.data),this.data=null),n()};_8.exports=Zl});var F8=b(($He,L8)=>{"use strict";var xP=require("stream"),Mxe=require("util").inherits;function kf(){if(!(this instanceof kf))return new kf;xP.PassThrough.call(this),this.path=null,this.type=null,this.isDirectory=!1}Mxe(kf,xP.PassThrough);kf.prototype.autodrain=function(){return this.pipe(new xP.Transform({transform:function(n,e,t){t()}}))};L8.exports=kf});var TP=b((XHe,j8)=>{"use strict";var Ta=E8(),SP=require("stream"),Nxe=require("util"),Bxe=require("zlib"),Hxe=R8(),I8=F8(),he={STREAM_START:0,START:1,LOCAL_FILE_HEADER:2,LOCAL_FILE_HEADER_SUFFIX:3,FILE_DATA:4,FILE_DATA_END:5,DATA_DESCRIPTOR:6,CENTRAL_DIRECTORY_FILE_HEADER:7,CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:8,CDIR64_END:9,CDIR64_END_DATA_SECTOR:10,CDIR64_LOCATOR:11,CENTRAL_DIRECTORY_END:12,CENTRAL_DIRECTORY_END_COMMENT:13,TRAILING_JUNK:14,ERROR:99},Ef=4294967296,qxe=67324752,Yxe=134695760,Wxe=33639248,Zxe=101075792,Jxe=117853008,$xe=101010256;function vi(n){if(!(this instanceof vi))return new vi(n);SP.Transform.call(this),this.options=n||{},this.data=new Buffer(""),this.state=he.STREAM_START,this.skippedBytes=0,this.parsedEntity=null,this.outStreamInfo={}}Nxe.inherits(vi,SP.Transform);vi.prototype.processDataChunk=function(n){var e;switch(this.state){case he.STREAM_START:case he.START:e=4;break;case he.LOCAL_FILE_HEADER:e=26;break;case he.LOCAL_FILE_HEADER_SUFFIX:e=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength;break;case he.DATA_DESCRIPTOR:e=12;break;case he.CENTRAL_DIRECTORY_FILE_HEADER:e=42;break;case he.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:e=this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength+this.parsedEntity.fileCommentLength;break;case he.CDIR64_END:e=52;break;case he.CDIR64_END_DATA_SECTOR:e=this.parsedEntity.centralDirectoryRecordSize-44;break;case he.CDIR64_LOCATOR:e=16;break;case he.CENTRAL_DIRECTORY_END:e=18;break;case he.CENTRAL_DIRECTORY_END_COMMENT:e=this.parsedEntity.commentLength;break;case he.FILE_DATA:return 0;case he.FILE_DATA_END:return 0;case he.TRAILING_JUNK:return this.options.debug&&console.log("found",n.length,"bytes of TRAILING_JUNK"),n.length;default:return n.length}var t=n.length;if(t>>8,(o&255)===80){s=a;break}return this.skippedBytes+=s,this.options.debug&&console.log("Skipped",this.skippedBytes,"bytes"),s}this.state=he.ERROR;var l=r?"Not a valid zip file":"Invalid signature in zip file";if(this.options.debug){var u=n.readUInt32LE(0),c;try{c=n.slice(0,4).toString()}catch{}console.log("Unexpected signature in zip file: 0x"+u.toString(16),'"'+c+'", skipped',this.skippedBytes,"bytes")}return this.emit("error",new Error(l)),n.length}return this.skippedBytes=0,e;case he.LOCAL_FILE_HEADER:return this.parsedEntity=this._readFile(n),this.state=he.LOCAL_FILE_HEADER_SUFFIX,e;case he.LOCAL_FILE_HEADER_SUFFIX:var h=new I8,d=(this.parsedEntity.flags&2048)!==0;h.path=this._decodeString(n.slice(0,this.parsedEntity.fileNameLength),d);var f=n.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),p=this._readExtraFields(f);if(p&&p.parsed&&(p.parsed.path&&!d&&(h.path=p.parsed.path),Number.isFinite(p.parsed.uncompressedSize)&&this.parsedEntity.uncompressedSize===Ef-1&&(this.parsedEntity.uncompressedSize=p.parsed.uncompressedSize),Number.isFinite(p.parsed.compressedSize)&&this.parsedEntity.compressedSize===Ef-1&&(this.parsedEntity.compressedSize=p.parsed.compressedSize)),this.parsedEntity.extra=p.parsed||{},this.options.debug){let S=Object.assign({},this.parsedEntity,{path:h.path,flags:"0x"+this.parsedEntity.flags.toString(16),extraFields:p&&p.debug});console.log("decoded LOCAL_FILE_HEADER:",JSON.stringify(S,null,2))}return this._prepareOutStream(this.parsedEntity,h),this.emit("entry",h),this.state=he.FILE_DATA,e;case he.CENTRAL_DIRECTORY_FILE_HEADER:return this.parsedEntity=this._readCentralDirectoryEntry(n),this.state=he.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX,e;case he.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX:var d=(this.parsedEntity.flags&2048)!==0,g=this._decodeString(n.slice(0,this.parsedEntity.fileNameLength),d),f=n.slice(this.parsedEntity.fileNameLength,this.parsedEntity.fileNameLength+this.parsedEntity.extraFieldLength),p=this._readExtraFields(f);p&&p.parsed&&p.parsed.path&&!d&&(g=p.parsed.path),this.parsedEntity.extra=p.parsed;var m=(this.parsedEntity.versionMadeBy&65280)>>8===3,v,w;if(m){v=this.parsedEntity.externalFileAttributes>>>16;var D=v>>>12;w=(D&10)===10}if(this.options.debug){let S=Object.assign({},this.parsedEntity,{path:g,flags:"0x"+this.parsedEntity.flags.toString(16),unixAttrs:v&&"0"+v.toString(8),isSymlink:w,extraFields:p.debug});console.log("decoded CENTRAL_DIRECTORY_FILE_HEADER:",JSON.stringify(S,null,2))}return this.state=he.START,e;case he.CDIR64_END:return this.parsedEntity=this._readEndOfCentralDirectory64(n),this.options.debug&&console.log("decoded CDIR64_END_RECORD:",this.parsedEntity),this.state=he.CDIR64_END_DATA_SECTOR,e;case he.CDIR64_END_DATA_SECTOR:return this.state=he.START,e;case he.CDIR64_LOCATOR:return this.state=he.START,e;case he.CENTRAL_DIRECTORY_END:return this.parsedEntity=this._readEndOfCentralDirectory(n),this.options.debug&&console.log("decoded CENTRAL_DIRECTORY_END:",this.parsedEntity),this.state=he.CENTRAL_DIRECTORY_END_COMMENT,e;case he.CENTRAL_DIRECTORY_END_COMMENT:return this.options.debug&&console.log("decoded CENTRAL_DIRECTORY_END_COMMENT:",n.slice(0,e).toString()),this.state=he.TRAILING_JUNK,e;case he.ERROR:return n.length;default:return console.log("didn't handle state #",this.state,"discarding"),n.length}};vi.prototype._prepareOutStream=function(n,e){var t=this,i=n.uncompressedSize===0&&/[\/\\]$/.test(e.path);e.path=e.path.replace(/^([/\\]*[.]+[/\\]+)*[/\\]*/,""),e.type=i?"Directory":"File",e.isDirectory=i;var r=!(n.flags&8);r&&(e.size=n.uncompressedSize);var o=n.versionsNeededToExtract<=45;if(this.outStreamInfo={stream:null,limit:r?n.compressedSize:-1,written:0},r)this.outStreamInfo.stream=new SP.PassThrough;else{var s=new Buffer(4);s.writeUInt32LE(Yxe,0);var a=n.extra.zip64Mode,l=a?20:12,u={pattern:s,requiredExtraSize:l},c=new Hxe(u,function(p,m){var v=t._readDataDescriptor(p,a),w=v.compressedSize===m;if(!a&&!w&&m>=Ef)for(var D=m-Ef;D>=0&&(w=v.compressedSize===D,!w);)D-=Ef;if(!!w){t.state=he.FILE_DATA_END;var S=a?24:16;return t.data.length>0?t.data=Buffer.concat([p.slice(S),t.data]):t.data=p.slice(S),!0}});this.outStreamInfo.stream=c}var h=n.flags&1||n.flags&64;if(h||!o){var d=h?"Encrypted files are not supported!":"Zip version "+Math.floor(n.versionsNeededToExtract/10)+"."+n.versionsNeededToExtract%10+" is not supported";e.skip=!0,setImmediate(()=>{e.emit("error",new Error(d))}),this.outStreamInfo.stream.pipe(new I8().autodrain());return}var g=n.compressionMethod>0;if(g){var f=Bxe.createInflateRaw();f.on("error",function(p){t.state=he.ERROR,t.emit("error",p)}),this.outStreamInfo.stream.pipe(f).pipe(e)}else this.outStreamInfo.stream.pipe(e);this._drainAllEntries&&e.autodrain()};vi.prototype._readFile=function(n){var e=Ta.parse(n).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;return e};vi.prototype._readExtraFields=function(n){var e={},t={parsed:e};this.options.debug&&(t.debug=[]);for(var i=0;i=w+4&&a&1&&(e.mtime=new Date(n.readUInt32LE(i+w)*1e3),w+=4),r.extraSize>=w+4&&a&2&&(e.atime=new Date(n.readUInt32LE(i+w)*1e3),w+=4),r.extraSize>=w+4&&a&4&&(e.ctime=new Date(n.readUInt32LE(i+w)*1e3));break;case 28789:o="Info-ZIP Unicode Path Extra Field";var l=n.readUInt8(i);if(l===1){var w=1,u=n.readUInt32LE(i+w);w+=4;var c=n.slice(i+w);e.path=c.toString()}break;case 13:case 22613:o=r.extraId===13?"PKWARE Unix":"Info-ZIP UNIX (type 1)";var w=0;if(r.extraSize>=8){var h=new Date(n.readUInt32LE(i+w)*1e3);w+=4;var d=new Date(n.readUInt32LE(i+w)*1e3);if(w+=4,e.atime=h,e.mtime=d,r.extraSize>=12){var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);w+=2,e.uid=g,e.gid=f}}break;case 30805:o="Info-ZIP UNIX (type 2)";var w=0;if(r.extraSize>=4){var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);w+=2,e.uid=g,e.gid=f}break;case 30837:o="Info-ZIP New Unix";var w=0,p=n.readUInt8(i);if(w+=1,p===1){var m=n.readUInt8(i+w);w+=1,m<=6&&(e.uid=n.readUIntLE(i+w,m)),w+=m;var v=n.readUInt8(i+w);w+=1,v<=6&&(e.gid=n.readUIntLE(i+w,v))}break;case 30062:o="ASi Unix";var w=0;if(r.extraSize>=14){var D=n.readUInt32LE(i+w);w+=4;var S=n.readUInt16LE(i+w);w+=2;var L=n.readUInt32LE(i+w);w+=4;var g=n.readUInt16LE(i+w);w+=2;var f=n.readUInt16LE(i+w);if(w+=2,e.mode=S,e.uid=g,e.gid=f,r.extraSize>14){var j=i+w,I=i+r.extraSize-14,W=this._decodeString(n.slice(j,I));e.symlink=W}}break}this.options.debug&&t.debug.push({extraId:"0x"+r.extraId.toString(16),description:o,data:n.slice(i,i+r.extraSize).inspect()}),i+=r.extraSize}return t};vi.prototype._readDataDescriptor=function(n,e){if(e){var t=Ta.parse(n).word32lu("dataDescriptorSignature").word32lu("crc32").word64lu("compressedSize").word64lu("uncompressedSize").vars;return t}var t=Ta.parse(n).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;return t};vi.prototype._readCentralDirectoryEntry=function(n){var e=Ta.parse(n).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return e};vi.prototype._readEndOfCentralDirectory64=function(n){var e=Ta.parse(n).word64lu("centralDirectoryRecordSize").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskNumberWithCentralDirectoryStart").word64lu("centralDirectoryEntries").word64lu("totalCentralDirectoryEntries").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;return e};vi.prototype._readEndOfCentralDirectory=function(n){var e=Ta.parse(n).word16lu("diskNumber").word16lu("diskStart").word16lu("centralDirectoryEntries").word16lu("totalCentralDirectoryEntries").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return e};var Xxe="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ";vi.prototype._decodeString=function(n,e){if(e)return n.toString("utf8");if(this.options.decodeString)return this.options.decodeString(n);let t="";for(var i=0;i0&&(this.data=this.data.slice(t),this.data.length!==0););if(this.state===he.FILE_DATA){if(this.outStreamInfo.limit>=0){var i=this.outStreamInfo.limit-this.outStreamInfo.written,r;i{if(this.state===he.FILE_DATA_END)return this.state=he.START,o.end(e);e()})}return}e()};vi.prototype.drainAll=function(){this._drainAllEntries=!0};vi.prototype._transform=function(n,e,t){var i=this;i.data.length>0?i.data=Buffer.concat([i.data,n]):i.data=n;var r=i.data.length,o=function(){if(i.data.length>0&&i.data.length0){e._parseOrOutput("buffer",function(){if(e.data.length>0)return setImmediate(function(){e._flush(n)});n()});return}if(e.state===he.FILE_DATA)return n(new Error("Stream finished in an invalid state, uncompression failed"));setImmediate(n)};j8.exports=vi});var O8=b((UHe,A8)=>{var Pf=require("stream").Transform,Uxe=require("util"),Gxe=TP();function ka(n){if(!(this instanceof ka))return new ka(n);var e=n||{};Pf.call(this,{readableObjectMode:!0}),this.opts=n||{},this.unzipStream=new Gxe(this.opts);var t=this;this.unzipStream.on("entry",function(i){t.push(i)}),this.unzipStream.on("error",function(i){t.emit("error",i)})}Uxe.inherits(ka,Pf);ka.prototype._transform=function(n,e,t){this.unzipStream.write(n,e,t)};ka.prototype._flush=function(n){var e=this;this.unzipStream.end(function(){process.nextTick(function(){e.emit("close")}),n()})};ka.prototype.on=function(n,e){return n==="entry"?Pf.prototype.on.call(this,"data",e):Pf.prototype.on.call(this,n,e)};ka.prototype.drainAll=function(){return this.unzipStream.drainAll(),this.pipe(new Pf({objectMode:!0,transform:function(n,e,t){t()}}))};A8.exports=ka});var H8=b((GHe,B8)=>{var _f=require("path"),M8=require("fs"),N8=parseInt("0777",8);B8.exports=uh.mkdirp=uh.mkdirP=uh;function uh(n,e,t,i){typeof e=="function"?(t=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var r=e.mode,o=e.fs||M8;r===void 0&&(r=N8),i||(i=null);var s=t||function(){};n=_f.resolve(n),o.mkdir(n,r,function(a){if(!a)return i=i||n,s(null,i);switch(a.code){case"ENOENT":if(_f.dirname(n)===n)return s(a);uh(_f.dirname(n),e,function(l,u){l?s(l,u):uh(n,e,s,u)});break;default:o.stat(n,function(l,u){l||!u.isDirectory()?s(a,i):s(null,i)});break}})}uh.sync=function n(e,t,i){(!t||typeof t!="object")&&(t={mode:t});var r=t.mode,o=t.fs||M8;r===void 0&&(r=N8),i||(i=null),e=_f.resolve(e);try{o.mkdirSync(e,r),i=i||e}catch(a){switch(a.code){case"ENOENT":i=n(_f.dirname(e),t,i),n(e,t,i);break;default:var s;try{s=o.statSync(e)}catch{throw a}if(!s.isDirectory())throw a;break}}return i}});var Z8=b((QHe,W8)=>{var Qxe=require("fs"),q8=require("path"),Kxe=require("util"),zxe=H8(),Y8=require("stream").Transform,Vxe=TP();function Ea(n){if(!(this instanceof Ea))return new Ea(n);Y8.call(this),this.opts=n||{},this.unzipStream=new Vxe(this.opts),this.unfinishedEntries=0,this.afterFlushWait=!1,this.createdDirectories={};var e=this;this.unzipStream.on("entry",this._processEntry.bind(this)),this.unzipStream.on("error",function(t){e.emit("error",t)})}Kxe.inherits(Ea,Y8);Ea.prototype._transform=function(n,e,t){this.unzipStream.write(n,e,t)};Ea.prototype._flush=function(n){var e=this,t=function(){process.nextTick(function(){e.emit("close")}),n()};this.unzipStream.end(function(){if(e.unfinishedEntries>0)return e.afterFlushWait=!0,e.on("await-finished",t);t()})};Ea.prototype._processEntry=function(n){var e=this,t=q8.join(this.opts.path,n.path),i=n.isDirectory?t:q8.dirname(t);this.unfinishedEntries++;var r=function(){var o=Qxe.createWriteStream(t);o.on("close",function(){e.unfinishedEntries--,e._notifyAwaiter()}),o.on("error",function(s){e.emit("error",s)}),n.pipe(o)};if(this.createdDirectories[i]||i===".")return r();zxe(i,function(o){if(o)return e.emit("error",o);if(e.createdDirectories[i]=!0,n.isDirectory){e.unfinishedEntries--,e._notifyAwaiter();return}r()})};Ea.prototype._notifyAwaiter=function(){this.afterFlushWait&&this.unfinishedEntries===0&&(this.emit("await-finished"),this.afterFlushWait=!1)};W8.exports=Ea});var J8=b(kP=>{"use strict";kP.Parse=O8();kP.Extract=Z8()});var $8=b(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});function eSe(n,e,{signal:t}={}){return new Promise((i,r)=>{function o(){t==null||t.removeEventListener("abort",o),n.removeListener(e,s),n.removeListener("error",a)}function s(...l){o(),i(l)}function a(l){o(),r(l)}t==null||t.addEventListener("abort",o),n.on(e,s),n.on("error",a)})}EP.default=eSe});var X8=b(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});function tSe(n){return function(e,t){return new Promise((i,r)=>{n.call(this,e,t,(o,s)=>{o?r(o):i(s)})})}}PP.default=tSe});var LP=b((RP,G8)=>{"use strict";var U8=RP&&RP.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},iSe=require("events"),nSe=U8(Mt()),rSe=U8(X8()),Rf=nSe.default("agent-base");function oSe(n){return Boolean(n)&&typeof n.addRequest=="function"}function _P(){let{stack:n}=new Error;return typeof n!="string"?!1:n.split(` -`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function sw(n,e){return new sw.Agent(n,e)}(function(n){class e extends iSe.EventEmitter{constructor(i,r){super();let o=r;typeof i=="function"?this.callback=i:i&&(o=i),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:_P()?443:80}set defaultPort(i){this.explicitDefaultPort=i}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:_P()?"https:":"http:"}set protocol(i){this.explicitProtocol=i}callback(i,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(i,r){let o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=_P()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,i._last=!0,i.shouldKeepAlive=!1;let s=!1,a=null,l=o.timeout||this.timeout,u=g=>{i._hadError||(i.emit("error",g),i._hadError=!0)},c=()=>{a=null,s=!0;let g=new Error(`A "socket" was not created for HTTP request before ${l}ms`);g.code="ETIMEOUT",u(g)},h=g=>{s||(a!==null&&(clearTimeout(a),a=null),u(g))},d=g=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),oSe(g)){Rf("Callback returned another Agent instance %o",g.constructor.name),g.addRequest(i,o);return}if(g){g.once("free",()=>{this.freeSocket(g,o)}),i.onSocket(g);return}let f=new Error(`no Duplex stream was returned to agent-base for \`${i.method} ${i.path}\``);u(f)};if(typeof this.callback!="function"){u(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Rf("Converting legacy callback function to promise"),this.promisifiedCallback=rSe.default(this.callback)):this.promisifiedCallback=this.callback),typeof l=="number"&&l>0&&(a=setTimeout(c,l)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{Rf("Resolving socket for %o request: %o",o.protocol,`${i.method} ${i.path}`),Promise.resolve(this.promisifiedCallback(i,o)).then(d,h)}catch(g){Promise.reject(g).catch(h)}}freeSocket(i,r){Rf("Freeing socket %o %o",i.constructor.name,r),i.destroy()}destroy(){Rf("Destroying agent %o",this.constructor.name)}}n.Agent=e,n.prototype=n.Agent.prototype})(sw||(sw={}));G8.exports=sw});var K8=b(Jl=>{"use strict";var sSe=Jl&&Jl.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(h){s(h)}}function l(c){try{u(i.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},Lf=Jl&&Jl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jl,"__esModule",{value:!0});var aSe=Lf(require("net")),lSe=Lf(require("tls")),FP=Lf(require("url")),uSe=Lf(Mt()),cSe=Lf($8()),hSe=LP(),Pa=(0,uSe.default)("http-proxy-agent");function dSe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}var Q8=class extends hSe.Agent{constructor(e){let t;if(typeof e=="string"?t=FP.default.parse(e):t=e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Pa("Creating new HttpProxyAgent instance: %o",t);super(t);let i=Object.assign({},t);this.secureProxy=t.secureProxy||dSe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,t){return sSe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:r}=this,o=FP.default.parse(e.path);o.protocol||(o.protocol="http:"),o.hostname||(o.hostname=t.hostname||t.host||null),o.port==null&&typeof t.port&&(o.port=String(t.port)),o.port==="80"&&(o.port=""),e.path=FP.default.format(o),i.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(i.auth).toString("base64")}`);let s;if(r?(Pa("Creating `tls.Socket`: %o",i),s=lSe.default.connect(i)):(Pa("Creating `net.Socket`: %o",i),s=aSe.default.connect(i)),e._header){let a,l;Pa("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(Pa("Patching connection write() output buffer with updated header"),a=e.output[0],l=a.indexOf(`\r -\r -`)+4,e.output[0]=e._header+a.substring(l),Pa("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(Pa("Patching connection write() output buffer with updated header"),a=e.outputData[0].data,l=a.indexOf(`\r -\r -`)+4,e.outputData[0].data=e._header+a.substring(l),Pa("Output buffer: %o",e.outputData[0].data))}return yield(0,cSe.default)(s,"connect"),s})}};Jl.default=Q8});var V8=b((AP,z8)=>{"use strict";var gSe=AP&&AP.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},IP=gSe(K8());function jP(n){return new IP.default(n)}(function(n){n.HttpProxyAgent=IP.default,n.prototype=IP.default.prototype})(jP||(jP={}));z8.exports=jP});var eG=b(If=>{"use strict";var fSe=If&&If.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(If,"__esModule",{value:!0});var pSe=fSe(Mt()),Ff=pSe.default("https-proxy-agent:parse-proxy-response");function mSe(n){return new Promise((e,t)=>{let i=0,r=[];function o(){let h=n.read();h?c(h):n.once("readable",o)}function s(){n.removeListener("end",l),n.removeListener("error",u),n.removeListener("close",a),n.removeListener("readable",o)}function a(h){Ff("onclose had error %o",h)}function l(){Ff("onend")}function u(h){s(),Ff("onerror %o",h),t(h)}function c(h){r.push(h),i+=h.length;let d=Buffer.concat(r,i);if(d.indexOf(`\r -\r -`)===-1){Ff("have not received end of HTTP headers yet..."),o();return}let f=d.toString("ascii",0,d.indexOf(`\r -`)),p=+f.split(" ")[1];Ff("got proxy server response: %o",f),e({statusCode:p,buffered:d})}n.on("error",u),n.on("close",a),n.on("end",l),o()})}If.default=mSe});var rG=b($l=>{"use strict";var bSe=$l&&$l.__awaiter||function(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(c){try{u(i.next(c))}catch(h){s(h)}}function l(c){try{u(i.throw(c))}catch(h){s(h)}}function u(c){c.done?o(c.value):r(c.value).then(a,l)}u((i=i.apply(n,e||[])).next())})},ch=$l&&$l.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($l,"__esModule",{value:!0});var tG=ch(require("net")),iG=ch(require("tls")),ySe=ch(require("url")),vSe=ch(require("assert")),wSe=ch(Mt()),DSe=LP(),CSe=ch(eG()),jf=wSe.default("https-proxy-agent:agent"),nG=class extends DSe.Agent{constructor(e){let t;if(typeof e=="string"?t=ySe.default.parse(e):t=e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");jf("creating new HttpsProxyAgent instance: %o",t);super(t);let i=Object.assign({},t);this.secureProxy=t.secureProxy||TSe(i.protocol),i.host=i.hostname||i.host,typeof i.port=="string"&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in i)&&(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,t){return bSe(this,void 0,void 0,function*(){let{proxy:i,secureProxy:r}=this,o;r?(jf("Creating `tls.Socket`: %o",i),o=iG.default.connect(i)):(jf("Creating `net.Socket`: %o",i),o=tG.default.connect(i));let s=Object.assign({},i.headers),l=`CONNECT ${`${t.host}:${t.port}`} HTTP/1.1\r -`;i.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(i.auth).toString("base64")}`);let{host:u,port:c,secureEndpoint:h}=t;SSe(c,h)||(u+=`:${c}`),s.Host=u,s.Connection="close";for(let m of Object.keys(s))l+=`${m}: ${s[m]}\r -`;let d=CSe.default(o);o.write(`${l}\r -`);let{statusCode:g,buffered:f}=yield d;if(g===200){if(e.once("socket",xSe),t.secureEndpoint){let m=t.servername||t.host;if(!m)throw new Error('Could not determine "servername"');return jf("Upgrading socket connection to TLS"),iG.default.connect(Object.assign(Object.assign({},kSe(t,"host","hostname","path","port")),{socket:o,servername:m}))}return o}o.destroy();let p=new tG.default.Socket;return p.readable=!0,e.once("socket",m=>{jf("replaying proxy buffer for failed request"),vSe.default(m.listenerCount("data")>0),m.push(f),m.push(null)}),p})}};$l.default=nG;function xSe(n){n.resume()}function SSe(n,e){return Boolean(!e&&n===80||e&&n===443)}function TSe(n){return typeof n=="string"?/^https:?$/i.test(n):!1}function kSe(n,...e){let t={},i;for(i in n)e.includes(i)||(t[i]=n[i]);return t}});var sG=b((NP,oG)=>{"use strict";var ESe=NP&&NP.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},OP=ESe(rG());function MP(n){return new OP.default(n)}(function(n){n.HttpsProxyAgent=OP.default,n.prototype=OP.default.prototype})(MP||(MP={}));oG.exports=MP});var lG=b((nqe,aG)=>{"use strict";var PSe=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];aG.exports=(n,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let t=new Set(Object.keys(n).concat(PSe)),i={};for(let r of t)r in e||(i[r]={get(){let o=n[r];return typeof o=="function"?o.bind(n):o},set(o){n[r]=o},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),n.once("aborted",()=>{e.destroy(),e.emit("aborted")}),n.once("close",()=>{n.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var cG=b((rqe,uG)=>{"use strict";var{Transform:_Se,PassThrough:RSe}=require("stream"),BP=require("zlib"),LSe=lG();uG.exports=n=>{let e=(n.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return n;let t=e==="br";if(t&&typeof BP.createBrotliDecompress!="function")return n.destroy(new Error("Brotli is not supported on Node.js < 12")),n;let i=!0,r=new _Se({transform(a,l,u){i=!1,u(null,a)},flush(a){a()}}),o=new RSe({autoDestroy:!1,destroy(a,l){n.destroy(),l(a)}}),s=t?BP.createBrotliDecompress():BP.createUnzip();return s.once("error",a=>{if(i&&!n.readable){o.end();return}o.destroy(a)}),LSe(n,o),n.pipe(r).pipe(s).pipe(o),o}});function FSe(n){let e;n.protocol==="http:"?e=process.env.HTTP_PROXY||process.env.http_proxy||null:n.protocol==="https:"&&(e=process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy||null);let t=process.env.NO_PROXY||process.env.no_proxy;if(t==="*")e=null;else if(t){let i=n.hostname.replace(/^\.*/,".").toLowerCase(),r=n.port||n.protocol.startsWith("https")?"443":"80",o=t.split(",");for(let s=0,a=o.length;s{if(i){let u=i.onCancellationRequested(()=>{u.dispose(),l.destroy(new Error("request aborted"))})}let a,l=r.request(t,u=>{let c=u;if(u.statusCode>=200&&u.statusCode<300||u.statusCode===1223){let h=u.headers||{},d=[],g=h["content-type"]||"";c=(0,pG.default)(u),c.on("data",f=>{d.push(f)}),c.on("end",()=>{a&&clearTimeout(a);let f=Buffer.concat(d);if(!t.buffer&&(g.startsWith("application/json")||g.startsWith("text/"))){let p=g.match(/charset=(\S+)/),m=p?p[1]:"utf8",v=f.toString(m);if(!g.includes("application/json"))o(v);else try{let w=JSON.parse(v);o(w)}catch(w){s(new Error(`Parse response error: ${w}`))}}else o(f)}),c.on("error",f=>{s(new Error(`Unable to connect ${n}: ${f.message}`))})}else s(new Error(`Bad response from ${n}: ${u.statusCode}`))});l.on("error",u=>{t.agent&&u.code=="ECONNRESET"?a=setTimeout(()=>{s(u)},500):s(u)}),l.on("timeout",()=>{l.destroy(new Error(`Request timeout after ${t.timeout}ms`))}),e&&(typeof e=="string"||Buffer.isBuffer(e)?l.write(e):l.write(JSON.stringify(e))),t.timeout&&l.setTimeout(t.timeout),l.end()})}function ASe(n){return n===null?"null":n===void 0?"undefined":typeof n=="string"?"string":Buffer.isBuffer(n)?"buffer":Array.isArray(n)||Lt(n)?"object":"unknown"}function hh(n,e={},t){let i=qP(n,e);return jSe(n,e.data,i,t).catch(r=>{if(mG.error(`Fetch error for ${n}:`,i,r),i.agent&&i.agent.proxy){let{proxy:o}=i.agent;throw new Error(`Request failed using proxy ${o.host}: ${r.message}`)}else throw r})}var aw,HP,hG,dG,gG,fG,pG,mG,lw=_(()=>{"use strict";aw=x(tE()),HP=require("url"),hG=x(require("fs"));Kn();K();dG=require("querystring"),gG=x(V8()),fG=x(sG()),pG=x(cG()),mG=H()("model-fetch")});function Of(n,e,t){let{dest:i,onProgress:r,extract:o}=e;if(!i||!Af.default.isAbsolute(i))throw new Error("Expect absolute file path for dest option.");let s;try{s=uw.default.statSync(i)}catch{uw.default.mkdirpSync(i)}if(s&&!s.isDirectory())throw new Error(`${i} exists, but not directory!`);let a=n.startsWith("https")?cw.https:cw.http,l=qP(n,e),u=Af.default.extname(n);return new Promise((c,h)=>{if(t){let f=t.onCancellationRequested(()=>{f.dispose(),g.destroy(new Error("request aborted"))})}let d,g=a.request(l,f=>{var p,m;if(f.statusCode>=200&&f.statusCode<300||f.statusCode===1223){let v=f.headers||{},w=v["content-disposition"];if(!u&&w){let j=bG.default.parse(w);(p=j.parameters)!=null&&p.filename&&(u=Af.default.extname(j.parameters.filename))}if(o===!0)if(u===".zip"||v["content-type"]=="application/zip")o="unzip";else if(u==".tgz")o="untar";else{h(new Error(`Unable to extract for ${n}`));return}let D=Number(v["content-length"]),S=0;isNaN(D)||f.on("data",j=>{S+=j.length;let I=(S/D*100).toFixed(1);r?r(I):YP.info(`Download ${n} progress ${I}%`)}),f.on("error",j=>{h(new Error(`Unable to connect ${n}: ${j.message}`))}),f.on("data",()=>{d&&(clearTimeout(d),d=void 0)}),f.on("end",()=>{YP.info("Download completed:",n)});let L;o==="untar"?L=f.pipe(yG.default.x({strip:(m=e.strip)!=null?m:1,C:i})):o==="unzip"?L=f.pipe(vG.default.Extract({path:i})):(i=Af.default.join(i,`${Qo()}${u}`),L=f.pipe(uw.default.createWriteStream(i))),L.on("finish",()=>{YP.info(`Downloaded ${n} => ${i}`),setTimeout(()=>{c(i)},100)}),L.on("error",h)}else h(new Error(`Invalid response from ${n}: ${f.statusCode}`))});g.on("error",f=>{l.agent&&f.code=="ECONNRESET"?d=setTimeout(()=>{h(f)},500):h(f)}),g.on("timeout",()=>{g.destroy(new Error(`request timeout after ${e.timeout}ms`))}),e.timeout&&g.setTimeout(e.timeout),g.end()})}var bG,cw,uw,Af,yG,vG,YP,WP=_(()=>{"use strict";bG=x(r$()),cw=x(tE()),uw=x(Rn()),Af=x(require("path")),yG=x(h8()),vG=x(J8());Ne();lw();YP=H()("model-download")});function MSe(n="coc.nvim"){let e="https://registry.npmjs.org/",t=Hn.default.join(OSe,".npmrc");if($t.default.existsSync(t))try{let i=$t.default.readFileSync(t,"utf8"),r={};for(let o of i.split(/\r?\n/))if(o.indexOf("=")>-1){let[s,a,l]=o.match(/^(.*?)=(.*)$/);r[a]=l}r[`${n}:registry`]?e=r[`${n}:registry`]:r.registry&&(e=r.registry)}catch(i){ZP.error("Error on read .npmrc:",i)}return e.endsWith("/")?e:e+"/"}function NSe(n){let e=Hn.default.basename(n);return e==="npm"||e==="npm.CMD"}function BSe(n){let e=Hn.default.basename(n);return["yarn","yarn.CMD","yarnpkg","yarnpkg.CMD"].includes(e)}function HSe(n,e){let t=["install","--ignore-scripts","--no-lockfile","--production"];return e.startsWith("https://github.com")&&(t=["install"]),NSe(n)&&(t.push("--legacy-peer-deps"),t.push("--no-global")),BSe(n)&&t.push("--ignore-engines"),t}function qSe(n){let e;try{e=JSON.parse(n).dependencies||{}}catch{e={}}return zi(e,["coc.nvim","esbuild","webpack","@types/node"])}function wG(n){return!!($t.default.existsSync(n)&&$t.default.lstatSync(n).isSymbolicLink())}function gw(n,e){return t=>new SG(e,n,t)}var DG,CG,$t,dw,Hn,xG,hw,ZP,OSe,SG,TG=_(()=>{"use strict";DG=require("child_process"),CG=require("events"),$t=x(Rn());Tg();dw=x(require("os")),Hn=x(require("path")),xG=x(require("readline")),hw=x(tf());$e();es();K();WP();lw();ZP=H()("model-installer"),OSe=global.__TEST__?dw.default.tmpdir():dw.default.homedir();SG=class extends CG.EventEmitter{constructor(e,t,i){super();this.root=e;this.npm=t;this.def=i;if($t.default.existsSync(e)||$t.default.mkdirpSync(e),/^https?:/.test(i))this.url=i;else{let r=i.match(/(.+)@([^/]+)$/);r?(this.name=r[1],this.version=r[2]):this.name=i}}get info(){return{name:this.name,version:this.version}}async install(){this.log(`Using npm from: ${this.npm}`);let e=await this.getInfo();ZP.info(`Fetched info of ${this.def}`,e);let{name:t}=e,i=e["engines.coc"]?e["engines.coc"].replace(/^\^/,">="):"";if(i&&!hw.default.satisfies(y.version,i))throw new Error(`${t} ${e.version} requires coc.nvim >= ${i}, please update coc.nvim.`);return await this.doInstall(e),t}async update(e){this.url=e;let t=Hn.default.join(this.root,this.name);if(wG(t)){this.log("Skipped update for symbol link");return}let i;if($t.default.existsSync(Hn.default.join(t,"package.json"))){let a=await $t.default.readFile(Hn.default.join(t,"package.json"),"utf8");i=JSON.parse(a).version}this.log(`Using npm from: ${this.npm}`);let r=await this.getInfo();if(i&&r.version&&hw.default.gte(i,r.version)){this.log(`Current version ${i} is up to date.`);return}let o=r["engines.coc"]?r["engines.coc"].replace(/^\^/,">="):"";if(o&&!hw.default.satisfies(y.version,o))throw new Error(`${r.version} requires coc.nvim ${o}, please update coc.nvim.`);await this.doInstall(r);let s=Hn.default.join(this.root,r.name,"package.json");return this.log(`Updated to v${r.version}`),Hn.default.dirname(s)}async doInstall(e){let t=Hn.default.join(this.root,e.name);if(wG(t))return!1;let i=await $t.default.mkdtemp(Hn.default.join(dw.default.tmpdir(),`${e.name.replace("/","-")}-`)),r=e["dist.tarball"];this.log(`Downloading from ${r}`),await Of(r,{dest:i,onProgress:d=>this.log(`Download progress ${d}%`,!0),extract:"untar"}),this.log(`Extension download at ${i}`);let o=await $t.default.readFile(Hn.default.join(i,"package.json"),"utf8"),s=qSe(o);Object.keys(s).length&&await new Promise((g,f)=>{let p=HSe(this.npm,r);this.log(`Installing dependencies by: ${this.npm} ${p.join(" ")}.`);let m=(0,DG.spawn)(this.npm,p,{cwd:i});xG.default.createInterface({input:m.stdout}).on("line",D=>{this.log(`[npm] ${D}`,!0)}),m.stderr.setEncoding("utf8"),m.stdout.setEncoding("utf8"),m.on("error",f);let w="";m.stderr.on("data",D=>{w+=D}),m.on("exit",D=>{if(D){w&&this.log(w),f(new Error(`${this.npm} install exited with ${D}`));return}g()})});let a=Hn.default.resolve(this.root,global.__TEST__?"":"..","package.json"),l=[];$t.default.existsSync(a)||$t.default.writeFileSync(a,"{}");let u=kc($t.default.readFileSync(a,"utf8"),l,{allowTrailingComma:!0});if(l&&l.length>0)throw new Error(`Error on load ${a}`);u.dependencies=u.dependencies||{},this.url?u.dependencies[e.name]=this.url:u.dependencies[e.name]=">="+e.version;let c={dependencies:{}};Object.keys(u.dependencies).sort().forEach(d=>{c.dependencies[d]=u.dependencies[d]});let h=await qt(t);return h&&(h.isDirectory()?$t.default.removeSync(t):$t.default.unlinkSync(t)),await $t.default.move(i,t,{overwrite:!0}),await $t.default.writeFile(a,JSON.stringify(c,null,2),{encoding:"utf8"}),$t.default.existsSync(i)&&$t.default.rmdirSync(i),this.log(`Update package.json at ${a}`),this.log(`Installed extension ${this.name}@${e.version} at ${t}`),!0}async getInfo(){if(this.url)return await this.getInfoFromUri();let e=MSe();this.log(`Get info from ${e}`);let t=await hh(e+this.name,{timeout:1e4,buffer:!0}),i=JSON.parse(t.toString());this.version||(this.version=i["dist-tags"].latest);let r=i.versions[this.version];if(!r)throw new Error(`${this.def} doesn't exists in ${e}.`);let o=r.engines&&r.engines.coc;if(!o)throw new Error(`${this.def} is not valid coc extension, "engines" field with coc property required.`);return{"dist.tarball":r.dist.tarball,"engines.coc":o,version:r.version,name:i.name}}async getInfoFromUri(){let{url:e}=this;if(!e.startsWith("https://github.com"))throw new Error(`"${e}" is not supported, coc.nvim support github.com only`);e=e.replace(/\/$/,"");let t="master";if(e.includes("@")){let s=e.indexOf("@");t=e.substr(s+1),e=e.substring(0,s)}let i=e.replace("github.com","raw.githubusercontent.com")+`/${t}/package.json`;this.log(`Get info from ${i}`);let r=await hh(i,{timeout:1e4}),o=typeof r=="string"?JSON.parse(r):r;return this.name=o.name,{"dist.tarball":`${e}/archive/${t}.tar.gz`,"engines.coc":o.engines?o.engines.coc:null,name:o.name,version:o.version}}log(e,t=!1){ZP.info(e),this.emit("message",e,t)}}});var dh,YSe,fw,kG=_(()=>{"use strict";dh=x(require("fs"));Vt();YSe=H()("model-memos"),fw=class{constructor(e){this.filepath=e;dh.default.existsSync(e)||dh.default.writeFileSync(e,"{}","utf8")}fetchContent(e,t){try{let i=dh.default.readFileSync(this.filepath,"utf8"),o=JSON.parse(i)[e];return o?o[t]:void 0}catch{return}}async update(e,t,i){let{filepath:r}=this;try{let o=dh.default.readFileSync(r,"utf8"),s=o?JSON.parse(o):{};s[e]=s[e]||{},i!==void 0?s[e][t]=_r(i):delete s[e][t],o=JSON.stringify(s,null,2),dh.default.writeFileSync(r,o,"utf8")}catch(o){YSe.error("Error on update memos:",o)}}createMemento(e){return{get:(t,i)=>{let r=this.fetchContent(e,t);return r===void 0?i:r},update:async(t,i)=>{await this.update(e,t,i)}}}}});var pw,EG=_(()=>{"use strict";De();ck();pw=class{constructor(e,t){if(typeof e!="string"&&(!e||!B.isUri(e)&&typeof e.uri!="string"))throw lk("base");if(typeof t!="string")throw lk("pattern");typeof e=="string"?this.baseUri=B.file(e):B.isUri(e)?this.baseUri=e:this.baseUri=B.parse(e.uri),this.pattern=t}toJSON(){return{pattern:this.pattern,baseUri:this.baseUri.toJSON()}}}});var _G=b((_qe,PG)=>{"use strict";PG.exports=q()});function RG(n,e){if(!n.killed)if(WSe)try{let t={stdio:["pipe","pipe","ignore"]};return e&&(t.cwd=e),Mf.execFileSync("taskkill",["/T","/F","/PID",n.pid.toString()],t),!0}catch{return!1}else if(JSe||ZSe)try{let t=(0,mw.join)($Se,"bin/terminateProcess.sh");return!Mf.spawnSync(t,[n.pid.toString()]).error}catch{return!1}else return n.kill("SIGKILL"),!0}var Mf,mw,WSe,ZSe,JSe,$Se,LG=_(()=>{"use strict";Mf=x(require("child_process")),mw=require("path"),WSe=process.platform==="win32",ZSe=process.platform==="darwin",JSe=process.platform==="linux",$Se=(0,mw.dirname)(__dirname)});function XSe(n){return typeof n!="number"?!1:n>=0&&n<=100}var FG,Yqe,Nf,JP=_(()=>{"use strict";FG=x(q());V();Ee();K();Yqe=H()("language-client-progressPart"),Nf=class{constructor(e,t,i,r){this.id=e;this.token=i;this.disposables=[];this._cancelled=!1;this._percent=0;this._started=!1;!y.env.dialog||this.disposables.push(t.onProgress(FG.WorkDoneProgress.type,this.token,o=>{switch(o.kind){case"begin":this.begin(o);break;case"report":this.report(o);break;case"end":this.done(o.message),r&&r(this);break}}))}begin(e){this._started||(this._started=!0,k.withProgress({source:`language-client-${this.id}`,cancellable:e.cancellable,title:e.title},(t,i)=>(this.progress=t,this.report(e),new Promise(r=>{e.cancellable&&i.onCancellationRequested(()=>{this.cancel(),r()}),this._resolve=r}))).catch(t=>{k.showErrorMessage(t.message)}).finally(()=>{this._resolve=void 0,this.progress=void 0}))}report(e){if(!this.progress)return;let t={};e.message&&(t.message=e.message),XSe(e.percentage)&&(t.increment=e.percentage-this._percent,this._percent=e.percentage),Object.keys(t).length>0&&this.progress.report(t)}cancel(){this._cancelled||(this._cancelled=!0,J(this.disposables))}done(e){if(this.progress){let t={};e&&(t.message=e),this._percent>0&&(t.increment=100-this._percent),this.progress.report(t)}setTimeout(()=>{this._resolve&&this._resolve()},300),this.cancel()}}});var $P,XP,IG=_(()=>{"use strict";$P=x(q()),XP=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(i=>{this.onSuccess=i}).then(()=>{this.completionPromise=void 0,this.onSuccess=void 0;let i=this.task();return this.task=void 0,i})),(t>=0||this.timeout===void 0)&&(this.timeout=(0,$P.RAL)().timer.setTimeout(()=>{this.timeout=void 0,this.onSuccess(void 0)},t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return this.timeout!==void 0}cancel(){this.cancelTimeout(),this.completionPromise=void 0}dispose(){this.cancelTimeout()}cancelTimeout(){this.timeout!==void 0&&((0,$P.RAL)().timer.clearTimeout(this.timeout),this.timeout=void 0)}}});function jG(n){return{uri:n.uri,languageId:n.languageId,version:n.version,text:n.getText()}}function AG(n){return{textDocument:{uri:n.uri}}}function OG(n){return{textDocument:{uri:n.uri,version:n.version},contentChanges:[{text:n.getText()}]}}function UP(n){return{textDocument:bw(n.document),reason:n.reason}}function bw(n){return{uri:n.uri,version:n.version}}function MG(n,e){let t={textDocument:bw(n)};return e&&(t.text=n.getText()),t}function Bf(n){return n.toString()}function NG(n,e,t){return{textDocument:{uri:n.uri},position:e,context:zi(t,["option"])}}function wn(n,e){return{textDocument:{uri:n.uri},position:e}}function BG(n,e,t){return{textDocument:Xl(n),position:e,context:t}}function Xl(n){return{uri:n.uri}}function HG(n,e,t){return{textDocument:{uri:n.uri},position:e,context:{includeDeclaration:t.includeDeclaration}}}function qG(n){return{textDocument:{uri:n.uri}}}function YG(n){return{textDocument:{uri:n.uri}}}var _a=_(()=>{"use strict";es()});function We(){return re()}var yw=_(()=>{"use strict";Ne()});function USe(n,e,t,i,r){let o=new ZG,s=(0,C.createProtocolConnection)(n,e,o,r),a=[];return s.onError(u=>{t(u[0],u[1],u[2])},null,a),s.onClose(i,null,a),{listen:()=>s.listen(),unlisten:()=>{J(a)},sendRequest:(u,...c)=>s.sendRequest(Pe(u)?u:u.method,...c),onRequest:(u,c)=>s.onRequest(Pe(u)?u:u.method,c),sendNotification:(u,c)=>s.sendNotification(Pe(u)?u:u.method,c),onNotification:(u,c)=>s.onNotification(Pe(u)?u:u.method,c),onProgress:s.onProgress,sendProgress:s.sendProgress,trace:(u,c,h)=>{let d={sendNotification:!1,traceFormat:C.TraceFormat.Text};h===void 0?s.trace(u,c,d):(Qn(h),s.trace(u,c,h))},initialize:u=>s.sendRequest(C.InitializeRequest.type,u),shutdown:()=>s.sendRequest(C.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(C.ExitNotification.type),onLogMessage:u=>s.onNotification(C.LogMessageNotification.type,u),onShowMessage:u=>s.onNotification(C.ShowMessageNotification.type,u),onTelemetry:u=>s.onNotification(C.TelemetryEventNotification.type,u),didChangeConfiguration:u=>s.sendNotification(C.DidChangeConfigurationNotification.type,u),didChangeWatchedFiles:u=>s.sendNotification(C.DidChangeWatchedFilesNotification.type,u),didOpenTextDocument:u=>s.sendNotification(C.DidOpenTextDocumentNotification.type,u),didChangeTextDocument:u=>s.sendNotification(C.DidChangeTextDocumentNotification.type,u),didCloseTextDocument:u=>s.sendNotification(C.DidCloseTextDocumentNotification.type,u),didSaveTextDocument:u=>s.sendNotification(C.DidSaveTextDocumentNotification.type,u),onDiagnostics:u=>s.onNotification(C.PublishDiagnosticsNotification.type,u),end:()=>s.end(),dispose:()=>s.dispose()}}function U(n,e){return n[e]===void 0&&(n[e]={}),n[e]}var QP,C,WG,fo,ZG,VP,e_,t_,JG,vw,ww,Dw,$G,GSe,XG,KP,po,UG,GG,QG,KG,zG,VG,e6,Be,t6,i6,n6,r6,o6,s6,a6,l6,u6,c6,h6,d6,g6,f6,p6,m6,b6,y6,gh,zP,i_,Dn=_(()=>{"use strict";QP=x(require("path")),C=x(q());De();wi();Se();$e();Kn();es();jb();Ee();K();mo();JP();IG();WG=x(require("os"));_a();yw();wt();V();fo=H()("language-client-client"),ZG=class{error(e){fo.error(e)}warn(e){fo.warn(e)}info(e){fo.info(e)}log(e){fo.log(e)}},VP=class{error(e){}warn(e){}info(e){}log(e){}};e_=(t=>(t[t.Continue=1]="Continue",t[t.Shutdown=2]="Shutdown",t))(e_||{}),t_=(t=>(t[t.DoNotRestart=1]="DoNotRestart",t[t.Restart=2]="Restart",t))(t_||{}),JG=class{constructor(e,t){this.name=e;this.maxRestartCount=t;this.restarts=[]}error(e,t,i){return i&&i<=3?1:2}closed(){return this.restarts.push(Date.now()),this.restarts.length(r[r.Info=1]="Info",r[r.Warn=2]="Warn",r[r.Error=3]="Error",r[r.Never=4]="Never",r))(vw||{}),ww=(i=>(i[i.Stopped=1]="Stopped",i[i.Running=2]="Running",i[i.Starting=3]="Starting",i))(ww||{}),Dw=(s=>(s[s.Initial=0]="Initial",s[s.Starting=1]="Starting",s[s.StartFailed=2]="StartFailed",s[s.Running=3]="Running",s[s.Stopping=4]="Stopping",s[s.Stopped=5]="Stopped",s))(Dw||{}),$G=[C.SymbolKind.File,C.SymbolKind.Module,C.SymbolKind.Namespace,C.SymbolKind.Package,C.SymbolKind.Class,C.SymbolKind.Method,C.SymbolKind.Property,C.SymbolKind.Field,C.SymbolKind.Constructor,C.SymbolKind.Enum,C.SymbolKind.Interface,C.SymbolKind.Function,C.SymbolKind.Variable,C.SymbolKind.Constant,C.SymbolKind.String,C.SymbolKind.Number,C.SymbolKind.Boolean,C.SymbolKind.Array,C.SymbolKind.Object,C.SymbolKind.Key,C.SymbolKind.Null,C.SymbolKind.EnumMember,C.SymbolKind.Struct,C.SymbolKind.Event,C.SymbolKind.Operator,C.SymbolKind.TypeParameter],GSe=[C.CompletionItemKind.Text,C.CompletionItemKind.Method,C.CompletionItemKind.Function,C.CompletionItemKind.Constructor,C.CompletionItemKind.Field,C.CompletionItemKind.Variable,C.CompletionItemKind.Class,C.CompletionItemKind.Interface,C.CompletionItemKind.Module,C.CompletionItemKind.Property,C.CompletionItemKind.Unit,C.CompletionItemKind.Value,C.CompletionItemKind.Enum,C.CompletionItemKind.Keyword,C.CompletionItemKind.Snippet,C.CompletionItemKind.Color,C.CompletionItemKind.File,C.CompletionItemKind.Reference,C.CompletionItemKind.Folder,C.CompletionItemKind.EnumMember,C.CompletionItemKind.Constant,C.CompletionItemKind.Struct,C.CompletionItemKind.Event,C.CompletionItemKind.Operator,C.CompletionItemKind.TypeParameter],XG=[C.SymbolTag.Deprecated];(e=>{function n(t){let i=t;return i&&Gs(i.register)&&Gs(i.unregister)&&Gs(i.dispose)&&i.registrationType!==void 0}e.is=n})(KP||(KP={}));po=class{constructor(e,t,i,r,o,s){this._client=e;this._event=t;this._type=i;this._middleware=r;this._createParams=o;this._selectorFilter=s;this._selectors=new Map}static textDocumentFilter(e,t){for(let i of e)if(y.match(i,t)>0)return!0;return!1}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))&&(this._middleware?this._middleware(e,t=>this._client.sendNotification(this._type,this._createParams(t))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._selectors.values())if(y.match(t,e))return{send:i=>{this.callback(i)}}}},UG=class extends po{constructor(e,t){super(e,y.onDidOpenTextDocument,C.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,i=>({textDocument:jG(i)}),po.textDocumentFilter);this._syncedDocuments=t}get registrationType(){return C.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:We(),registerOptions:{documentSelector:t}})}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;let t=e.registerOptions.documentSelector;y.textDocuments.forEach(i=>{let r=i.uri.toString();if(!this._syncedDocuments.has(r)&&y.match(t,i)>0){let o=this._client.clientOptions.middleware,s=a=>{this._client.sendNotification(this._type,this._createParams(a))};o.didOpen?o.didOpen(i,s):s(i),this._syncedDocuments.set(r,i)}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}},GG=class extends po{constructor(e,t){super(e,y.onDidCloseTextDocument,C.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,i=>AG(i),po.textDocumentFilter);this._syncedDocuments=t}get registrationType(){return C.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.openClose&&this.register({id:We(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let i=this._selectors.values();this._syncedDocuments.forEach(r=>{if(y.match(t,r)>0&&!this._selectorFilter(i,r)){let o=this._client.clientOptions.middleware,s=a=>{this._client.sendNotification(this._type,this._createParams(a))};this._syncedDocuments.delete(r.uri.toString()),o.didClose?o.didClose(r,s):s(r)}})}},QG=class{constructor(e){this._client=e;this._changeData=new Map}get registrationType(){return C.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.change!==void 0&&i.change!==C.TextDocumentSyncKind.None&&this.register({id:We(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:i.change})})}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=y.onDidChangeTextDocument(t=>{this.callback({textDocument:t.textDocument,contentChanges:t.contentChanges.slice()})},this)),this._changeData.set(e.id,{documentSelector:e.registerOptions.documentSelector,syncKind:e.registerOptions.syncKind}))}callback(e){if(e.contentChanges.length===0)return;let t=y.getDocument(e.textDocument.uri);if(!t)return;let{textDocument:i}=t;for(let r of this._changeData.values())if(y.match(r.documentSelector,i)>0){let o=this._client.clientOptions.middleware;if(r.syncKind===C.TextDocumentSyncKind.Incremental){let s=a=>{this._client.sendNotification(C.DidChangeTextDocumentNotification.type,zi(a,["bufnr","original","originalLines"]))};o.didChange?o.didChange(e,s):s(e)}else if(r.syncKind===C.TextDocumentSyncKind.Full){let s=()=>{this._client.sendNotification(C.DidChangeTextDocumentNotification.type,OG(i))};o.didChange?o.didChange(e,s):s(e)}}}unregister(e){this._changeData.delete(e),this._changeData.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(let t of this._changeData.values())if(y.match(t.documentSelector,e))return{send:i=>{this.callback(i)}}}},KG=class extends po{constructor(e){super(e,y.onWillSaveTextDocument,C.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,t=>UP(t),(t,i)=>po.textDocumentFilter(t,i.document))}get registrationType(){return C.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"synchronization");t.willSave=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSave&&this.register({id:We(),registerOptions:{documentSelector:t}})}},zG=class{constructor(e){this._client=e;this._selectors=new Map}get registrationType(){return C.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"synchronization");t.willSaveWaitUntil=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;t&&i&&i.willSaveWaitUntil&&this.register({id:We(),registerOptions:{documentSelector:t}})}register(e){!e.registerOptions.documentSelector||(this._listener||(this._listener=y.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,e.registerOptions.documentSelector))}callback(e){if(po.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,i=r=>this._client.sendRequest(C.WillSaveTextDocumentWaitUntilRequest.type,UP(r)).then(o=>o||[],o=>(k.showMessage(`Error on willSaveWaitUntil: ${o}`,"error"),fo.error(o),[]));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,i):i(e))}}unregister(e){this._selectors.delete(e),this._selectors.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}},VG=class extends po{constructor(e){super(e,y.onDidSaveTextDocument,C.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,t=>MG(t,this._includeText),po.textDocumentFilter);this._includeText=!1}get registrationType(){return C.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){U(U(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let i=e.resolvedTextDocumentSync;if(t&&i&&i.save){let r=typeof i.save=="boolean"?{includeText:!1}:{includeText:!!i.save.includeText};this.register({id:We(),registerOptions:Object.assign({},{documentSelector:t},r)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}},e6=class{constructor(e,t){this._notifyFileEvent=t;this._watchers=new Map}get registrationType(){return C.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){U(U(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;let t=[];for(let i of e.registerOptions.watchers){if(!Pe(i.globPattern))continue;let r=!0,o=!0,s=!0;i.kind!=null&&(r=(i.kind&C.WatchKind.Create)!==0,o=(i.kind&C.WatchKind.Change)!=0,s=(i.kind&C.WatchKind.Delete)!=0);let a=y.createFileSystemWatcher(i.globPattern,!r,!o,!s);this.hookListeners(a,r,o,s,t),t.push(a)}this._watchers.set(e.id,t)}registerRaw(e,t){let i=[];for(let r of t)i.push(r),this.hookListeners(r,!0,!0,!0,i);this._watchers.set(e,i)}hookListeners(e,t,i,r,o){t&&e.onDidCreate(s=>this._notifyFileEvent({uri:Bf(s),type:C.FileChangeType.Created}),null,o),i&&e.onDidChange(s=>this._notifyFileEvent({uri:Bf(s),type:C.FileChangeType.Changed}),null,o),r&&e.onDidDelete(s=>this._notifyFileEvent({uri:Bf(s),type:C.FileChangeType.Deleted}),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let i of t)i.dispose()}dispose(){this._watchers.forEach(e=>{for(let t of e)t.dispose()}),this._watchers.clear()}},Be=class{constructor(e,t){this._client=e;this._registrationType=t;this._registrations=new Map}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getRegistration(e,t){if(t){if(C.TextDocumentRegistrationOptions.is(t)){let i=C.StaticRegistrationOptions.hasId(t)?t.id:We(),r=t.documentSelector||e;if(r)return[i,Object.assign({},t,{documentSelector:r})]}else if(Qn(t)&&t===!0||C.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];let i=Qn(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[We(),i]}}else return[void 0,void 0];return[void 0,void 0]}getRegistrationOptions(e,t){if(!(!e||!t))return Qn(t)&&t===!0?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(let t of this._registrations.values()){let i=t.data.registerOptions.documentSelector;if(i!==null&&y.match(i,e)>0)return t.provider}}getAllProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}},t6=class{constructor(e,t){this._client=e;this._registrationType=t;this._registrations=new Map}get registrationType(){return this._registrationType}register(e){let t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);t&&t.disposable.dispose()}dispose(){this._registrations.forEach(e=>{e.disposable.dispose()}),this._registrations.clear()}getProviders(){let e=[];for(let t of this._registrations.values())e.push(t.provider);return e}},i6=class extends Be{constructor(e){super(e,C.CompletionRequest.type)}fillClientCapabilities(e){let t=this._client.clientOptions.disableSnippetCompletion!==!0,i=U(U(e,"textDocument"),"completion");i.dynamicRegistration=!0,i.contextSupport=!0,i.completionItem={snippetSupport:t,commitCharactersSupport:!0,documentationFormat:this._client.supportedMarkupKind,deprecatedSupport:!0,preselectSupport:!0,insertReplaceSupport:!0,tagSupport:{valueSet:[C.CompletionItemTag.Deprecated]},resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[C.InsertTextMode.asIs,C.InsertTextMode.adjustIndentation]}},i.completionItemKind={valueSet:GSe},i.insertTextMode=C.InsertTextMode.adjustIndentation}initialize(e,t){this.index=0;let i=this.getRegistrationOptions(t,e.completionProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t=e.triggerCharacters||[],i=e.allCommitCharacters||[],r=e.priority,o={provideCompletionItems:(l,u,c,h)=>{let d=this._client,g=this._client.clientOptions.middleware,f=(p,m,v,w)=>d.sendRequest(C.CompletionRequest.type,NG(p,m,v),w).then(D=>D!=null?D:[],D=>d.handleFailedRequest(C.CompletionRequest.type,w,D,[]));return g.provideCompletionItem?g.provideCompletionItem(l,u,h,c,f):f(l,u,h,c)},resolveCompletionItem:e.resolveProvider?(l,u)=>{let c=this._client,h=this._client.clientOptions.middleware,d=(g,f)=>c.sendRequest(C.CompletionResolveRequest.type,g,f).then(p=>p,p=>c.handleFailedRequest(C.CompletionResolveRequest.type,f,p,g));return h.resolveCompletionItem?h.resolveCompletionItem(l,u,d):d(l,u)}:void 0},s=this._client.id+(this.index?"-"+this.index:"");rt.removeSource(s);let a=O.registerCompletionItemProvider(s,"LS",e.documentSelector||this._client.clientOptions.documentSelector,o,t,r,i);return this.index=this.index+1,[a,o]}},n6=class extends Be{constructor(e){super(e,C.HoverRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=this._client.supportedMarkupKind}initialize(e,t){let i=this.getRegistrationOptions(t,e.hoverProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideHover:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(C.HoverRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(C.HoverRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideHover?l.provideHover(i,r,o,a):a(i,r,o)}};return[O.registerHoverProvider(e.documentSelector,t),t]}},r6=class extends Be{constructor(e){super(e,C.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.contextSupport=!0,t.signatureInformation={documentationFormat:this._client.supportedMarkupKind,activeParameterSupport:!0,parameterInformation:{labelOffsetSupport:!0}}}initialize(e,t){let i=this.getRegistrationOptions(t,e.signatureHelpProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideSignatureHelp:(o,s,a,l)=>{let u=this._client,c=(d,g,f,p)=>u.sendRequest(C.SignatureHelpRequest.type,BG(d,g,f),p).then(m=>m,m=>u.handleFailedRequest(C.SignatureHelpRequest.type,p,m,null)),h=u.clientOptions.middleware;return h.provideSignatureHelp?h.provideSignatureHelp(o,s,l,a,c):c(o,s,l,a)}},i=e.triggerCharacters||[];return[O.registerSignatureHelpProvider(e.documentSelector,t,i),t]}},o6=class extends Be{constructor(e){super(e,C.DefinitionRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"definition");t.dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.definitionProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDefinition:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(C.DefinitionRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(C.DefinitionRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDefinition?l.provideDefinition(i,r,o,a):a(i,r,o)}};return[O.registerDefinitionProvider(e.documentSelector,t),t]}},s6=class extends Be{constructor(e){super(e,C.ReferencesRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.referencesProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideReferences:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>a.sendRequest(C.ReferencesRequest.type,HG(c,h,d),g).then(f=>f,f=>a.handleFailedRequest(C.ReferencesRequest.type,g,f,null)),u=a.clientOptions.middleware;return u.provideReferences?u.provideReferences(i,r,o,s,l):l(i,r,o,s)}};return[O.registerReferencesProvider(e.documentSelector,t),t]}},a6=class extends Be{constructor(e){super(e,C.DocumentHighlightRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentHighlightProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentHighlights:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(C.DocumentHighlightRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(C.DocumentHighlightRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDocumentHighlights?l.provideDocumentHighlights(i,r,o,a):a(i,r,o)}};return[O.registerDocumentHighlightProvider(e.documentSelector,t),t]}},l6=class extends Be{constructor(e){super(e,C.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:$G},t.hierarchicalDocumentSymbolSupport=!0,t.tagSupport={valueSet:XG},t.labelSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentSymbolProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentSymbols:(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(C.DocumentSymbolRequest.type,qG(u),c).then(h=>{if(h!==null){if(h.length===0)return[];{let d=h[0];return C.DocumentSymbol.is(d),h}}},h=>s.handleFailedRequest(C.DocumentSymbolRequest.type,c,h,null)),l=s.clientOptions.middleware;return l.provideDocumentSymbols?l.provideDocumentSymbols(r,o,a):a(r,o)}},i=e.label?{label:e.label}:void 0;return[O.registerDocumentSymbolProvider(e.documentSelector,t,i),t]}},u6=class extends t6{constructor(e){super(e,C.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=U(U(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:$G},t.tagSupport={valueSet:XG}}initialize(e){!e.workspaceSymbolProvider||this.register({id:We(),registerOptions:e.workspaceSymbolProvider===!0?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){let t={provideWorkspaceSymbols:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(C.WorkspaceSymbolRequest.type,{query:l},u).then(c=>c,c=>o.handleFailedRequest(C.WorkspaceSymbolRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideWorkspaceSymbols?a.provideWorkspaceSymbols(i,r,s):s(i,r)}};return[O.registerWorkspaceSymbolProvider(t),t]}},c6=class extends Be{constructor(e){super(e,C.CodeActionRequest.type);this.disposables=[]}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.honorsChangeAnnotations=!1,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[C.CodeActionKind.Empty,C.CodeActionKind.QuickFix,C.CodeActionKind.Refactor,C.CodeActionKind.RefactorExtract,C.CodeActionKind.RefactorInline,C.CodeActionKind.RefactorRewrite,C.CodeActionKind.Source,C.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){let i=this.getRegistrationOptions(t,e.codeActionProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t=r=>{if(oe.has(r))return;let o=this._client,s=(l,u)=>{let c={command:l,arguments:u};return o.sendRequest(C.ExecuteCommandRequest.type,c).then(void 0,h=>{throw o.handleFailedRequest(C.ExecuteCommandRequest.type,void 0,h,void 0),h})},a=o.clientOptions.middleware;this.disposables.push(oe.registerCommand(r,(...l)=>a.executeCommand?a.executeCommand(r,l,s):s(r,l),null,!0))},i={provideCodeActions:(r,o,s,a)=>{let l=this._client,u=(h,d,g,f)=>{let p={textDocument:{uri:h.uri},range:d,context:g};return l.sendRequest(C.CodeActionRequest.type,p,f).then(m=>{if(m!==null)return m.forEach(v=>{var D;let w=C.Command.is(v)?v.command:(D=v.command)==null?void 0:D.command;w&&!oe.has(w)&&t(w)}),m},m=>l.handleFailedRequest(C.CodeActionRequest.type,f,m,null))},c=l.clientOptions.middleware;return c.provideCodeActions?c.provideCodeActions(r,o,s,a,u):u(r,o,s,a)},resolveCodeAction:e.resolveProvider?(r,o)=>{let s=this._client,a=this._client.clientOptions.middleware,l=(u,c)=>s.sendRequest(C.CodeActionResolveRequest.type,u,c).then(h=>h,h=>s.handleFailedRequest(C.CodeActionResolveRequest.type,c,h,u));return a.resolveCodeAction?a.resolveCodeAction(r,o,l):l(r,o)}:void 0};return[O.registerCodeActionProvider(e.documentSelector,i,this._client.id,e.codeActionKinds),i]}dispose(){this.disposables.forEach(e=>{e.dispose()}),this.disposables=[],super.dispose()}},h6=class extends Be{constructor(e){super(e,C.CodeLensRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"codeLens").dynamicRegistration=!0,U(U(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(C.CodeLensRefreshRequest.type,async()=>{for(let o of this.getAllProviders())o.onDidChangeCodeLensEmitter.fire()});let r=this.getRegistrationOptions(t,e.codeLensProvider);!r||this.register({id:We(),registerOptions:r})}registerLanguageProvider(e){let t=new C.Emitter,i={onDidChangeCodeLenses:t.event,provideCodeLenses:(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(C.CodeLensRequest.type,YG(u),c).then(h=>h,h=>s.handleFailedRequest(C.CodeLensRequest.type,c,h,null)),l=s.clientOptions.middleware;return l.provideCodeLenses?l.provideCodeLenses(r,o,a):a(r,o)},resolveCodeLens:e.resolveProvider?(r,o)=>{let s=this._client,a=(u,c)=>s.sendRequest(C.CodeLensResolveRequest.type,u,c).then(h=>h,h=>s.handleFailedRequest(C.CodeLensResolveRequest.type,c,h,u)),l=s.clientOptions.middleware;return l.resolveCodeLens?l.resolveCodeLens(r,o,a):a(r,o)}:void 0};return[O.registerCodeLensProvider(e.documentSelector,i),{provider:i,onDidChangeCodeLensEmitter:t}]}},d6=class extends Be{constructor(e){super(e,C.DocumentFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentFormattingProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentFormattingEdits:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri},options:c};return s.sendRequest(C.DocumentFormattingRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(C.DocumentFormattingRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideDocumentFormattingEdits?l.provideDocumentFormattingEdits(i,r,o,a):a(i,r,o)}};return[O.registerDocumentFormatProvider(e.documentSelector,t,this._client.clientOptions.formatterPriority),t]}},g6=class extends Be{constructor(e){super(e,C.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentRangeFormattingEdits:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>{let f={textDocument:{uri:c.uri},range:h,options:d};return a.sendRequest(C.DocumentRangeFormattingRequest.type,f,g).then(p=>p,p=>a.handleFailedRequest(C.DocumentRangeFormattingRequest.type,g,p,null))},u=a.clientOptions.middleware;return u.provideDocumentRangeFormattingEdits?u.provideDocumentRangeFormattingEdits(i,r,o,s,l):l(i,r,o,s)}};return[O.registerDocumentRangeFormatProvider(e.documentSelector,t),t]}},f6=class extends Be{constructor(e){super(e,C.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideOnTypeFormattingEdits:(o,s,a,l,u)=>{let c=this._client,h=(g,f,p,m,v)=>{let w={textDocument:bw(g),position:f,ch:p,options:m};return c.sendRequest(C.DocumentOnTypeFormattingRequest.type,w,v).then(D=>D,D=>c.handleFailedRequest(C.DocumentOnTypeFormattingRequest.type,v,D,null))},d=c.clientOptions.middleware;return d.provideOnTypeFormattingEdits?d.provideOnTypeFormattingEdits(o,s,a,l,u,h):h(o,s,a,l,u)}},i=e.moreTriggerCharacter||[],r=[e.firstTriggerCharacter,...i];return[O.registerOnTypeFormattingEditProvider(e.documentSelector,t,r),t]}},p6=class extends Be{constructor(e){super(e,C.RenameRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.renameProvider);!i||(Qn(e.renameProvider)&&(i.prepareProvider=!1),this.register({id:We(),registerOptions:i}))}registerLanguageProvider(e){let t={provideRenameEdits:(i,r,o,s)=>{let a=this._client,l=(c,h,d,g)=>{let f={textDocument:{uri:c.uri},position:h,newName:d};return a.sendRequest(C.RenameRequest.type,f,g).then(p=>p,p=>a.handleFailedRequest(C.RenameRequest.type,g,p,null))},u=a.clientOptions.middleware;return u.provideRenameEdits?u.provideRenameEdits(i,r,o,s,l):l(i,r,o,s)},prepareRename:e.prepareProvider?(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:Xl(u),position:c};return s.sendRequest(C.PrepareRenameRequest.type,d,h).then(g=>C.Range.is(g)?g:this.isDefaultBehavior(g)?g.defaultBehavior===!0?null:Promise.reject(new Error("The element can't be renamed.")):g&&C.Range.is(g.range)?{range:g.range,placeholder:g.placeholder}:Promise.reject(new Error("The element can't be renamed.")),g=>s.handleFailedRequest(C.PrepareRenameRequest.type,h,g,void 0))},l=s.clientOptions.middleware;return l.prepareRename?l.prepareRename(i,r,o,a):a(i,r,o)}:void 0};return[O.registerRenameProvider(e.documentSelector,t),t]}isDefaultBehavior(e){let t=e;return t&&Qn(t.defaultBehavior)}},m6=class extends Be{constructor(e){super(e,C.DocumentLinkRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){let i=this.getRegistrationOptions(t,e.documentLinkProvider);!i||this.register({id:We(),registerOptions:i})}registerLanguageProvider(e){let t={provideDocumentLinks:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(C.DocumentLinkRequest.type,{textDocument:{uri:l.uri}},u).then(c=>c,c=>o.handleFailedRequest(C.DocumentLinkRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideDocumentLinks?a.provideDocumentLinks(i,r,s):s(i,r)},resolveDocumentLink:e.resolveProvider?(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(C.DocumentLinkResolveRequest.type,l,u).then(c=>c,c=>o.handleFailedRequest(C.DocumentLinkResolveRequest.type,u,c,l)),a=o.clientOptions.middleware;return a.resolveDocumentLink?a.resolveDocumentLink(i,r,s):s(i,r)}:void 0};return[O.registerDocumentLinkProvider(e.documentSelector,t),t]}},b6=class{constructor(e){this._client=e;this._listeners=new Map}get registrationType(){return C.DidChangeConfigurationNotification.type}fillClientCapabilities(e){U(U(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){var t;let e=(t=this._client.clientOptions.synchronize)==null?void 0:t.configurationSection;e!==void 0&&this.register({id:We(),registerOptions:{section:e}})}register(e){let{section:t}=e.registerOptions,i=y.onDidChangeConfiguration(r=>{this.onDidChangeConfiguration(e.registerOptions.section,r)});this._listeners.set(e.id,i),t!=null&&this.onDidChangeConfiguration(t,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let i=typeof e=="string"&&e.startsWith("languageserver."),r;if(Pe(e)?r=[e]:r=e,r!=null&&t!=null&&!r.some(l=>t.affectsConfiguration(l)))return;let o=a=>{if(a==null){this._client.sendNotification(C.DidChangeConfigurationNotification.type,{settings:null});return}this._client.sendNotification(C.DidChangeConfigurationNotification.type,{settings:i?this.getConfiguredSettings(a[0]):this.extractSettingsInformation(a)})},s=this.getMiddleware();s?s(r,o):o(r)}getConfiguredSettings(e){let t=9,i=y.getConfiguration(e.slice(0,-t));return aY(i.get("settings",{}))}extractSettingsInformation(e){function t(r,o){let s=r;for(let a=0;a=0?a=y.getConfiguration(o.substr(0,s)).get(o.substr(s+1)):a=y.getConfiguration(o),a){let l=e[r].split(".");t(i,l)[l[l.length-1]]=a}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;if(e.workspace&&e.workspace.didChangeConfiguration)return e.workspace.didChangeConfiguration}},y6=class{constructor(e){this._client=e;this._commands=new Map}get registrationType(){return C.ExecuteCommandRequest.type}fillClientCapabilities(e){U(U(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){!e.executeCommandProvider||this.register({id:We(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){let t=this._client,i=t.clientOptions.middleware,r=(o,s)=>{let a={command:o,arguments:s};return t.sendRequest(C.ExecuteCommandRequest.type,a).then(void 0,l=>{throw t.handleFailedRequest(C.ExecuteCommandRequest.type,void 0,l,void 0),l})};if(e.registerOptions.commands){let o=[];for(let s of e.registerOptions.commands)o.push(oe.registerCommand(s,(...a)=>i.executeCommand?i.executeCommand(s,a,r):r(s,a),null,!0));this._commands.set(e.id,o)}}unregister(e){let t=this._commands.get(e);t&&t.forEach(i=>i.dispose())}dispose(){this._commands.forEach(e=>{e.forEach(t=>t.dispose())}),this._commands.clear()}};(e=>{function n(t){return t&&C.MessageReader.is(t.reader)&&C.MessageWriter.is(t.writer)}e.is=n})(gh||(gh={}));zP=class{constructor(e,t){this._resolve=e;this._reject=t;this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}},i_=class{constructor(e,t,i){this._features=[];this._dynamicFeatures=new Map;var l;this._id=e,this._name=t,i.outputChannel?this._outputChannel=i.outputChannel:this._outputChannel=void 0;let r=!1;(y.getConfiguration("suggest").get("snippetsSupport",!0)===!1||i.disableSnippetCompletion)&&(r=!0);let s={isTrusted:!1,supportHtml:!1};i.markdown!=null&&(s.isTrusted=i.markdown.isTrusted===!0,s.supportHtml=i.markdown.supportHtml===!0),this._clientOptions={disableSnippetCompletion:r,disableDynamicRegister:i.disableDynamicRegister,disabledFeatures:i.disabledFeatures||[],formatterPriority:i.formatterPriority,ignoredRootPaths:i.ignoredRootPaths,documentSelector:i.documentSelector||[],synchronize:i.synchronize||{},diagnosticCollectionName:i.diagnosticCollectionName,outputChannelName:i.outputChannelName||this._id,revealOutputChannelOn:i.revealOutputChannelOn||4,stdioEncoding:i.stdioEncoding||"utf8",initializationOptions:i.initializationOptions,initializationFailedHandler:i.initializationFailedHandler,progressOnInitialization:!!i.progressOnInitialization,errorHandler:i.errorHandler||this.createDefaultErrorHandler((l=i.connectionOptions)==null?void 0:l.maxRestartCount),middleware:i.middleware||{},workspaceFolder:i.workspaceFolder,connectionOptions:i.connectionOptions,markdown:s};for(let u of["disableCompletion","disableWorkspaceFolders","disableDiagnostics"])if(typeof i[u]=="boolean"){let c=` -`+Error().stack.split(` -`).slice(2,4).join(` -`);if(fo.warn(`${u} in the client options is deprecated. use disabledFeatures instead.`,c),this.warn(`${u} in the client options is deprecated. use disabledFeatures instead.`,c),i[u]===!0){let h=u.slice(7);this._clientOptions.disabledFeatures.push(h[0].toLowerCase()+h.slice(1))}}this.state=0,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new XP(250),this._onReady=new Promise((u,c)=>{this._onReadyCallbacks=new zP(u,c)}),this._onStop=void 0,this._stateChangeEmitter=new C.Emitter,this._trace=C.Trace.Off,this._tracer={log:(u,c)=>{Pe(u)?this.logTrace(u,c):this.logObjectTrace(u)}},this._syncedDocuments=new Map;let a=y.getConfiguration("coc.preferences");this._markdownSupport=a.get("enableMarkdown",!0),this.registerBuiltinFeatures()}get supportedMarkupKind(){return this._markdownSupport?[C.MarkupKind.Markdown,C.MarkupKind.PlainText]:[C.MarkupKind.PlainText]}get state(){return this._state}get id(){return this._id}get name(){return this._name}set state(e){let t=this.getPublicState();this._state=e;let i=this.getPublicState();i!==t&&this._stateChangeEmitter.fire({oldState:t,newState:i})}getPublicState(){return this.state===3?2:this.state===1?3:1}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.sendRequest(e,...t)}catch(i){throw this.error(`Sending request ${Pe(e)?e:e.method} failed.`,i),i}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onRequest(e,t)}catch(i){throw this.error(`Registering request handler ${Pe(e)?e:e.method} failed.`,i),i}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.sendNotification(e,t)}catch(i){throw this.error(`Sending notification ${Pe(e)?e:e.method} failed.`,i),i}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{return this._resolvedConnection.onNotification(e,t)}catch(i){throw this.error(`Registering notification handler ${Pe(e)?e:e.method} failed.`,i),i}}onProgress(e,t,i){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{if(e==C.WorkDoneProgress.type){let r=this._clientOptions.middleware.handleWorkDoneProgress;if(r!==void 0)return this._resolvedConnection.onProgress(e,t,o=>{r(t,o,()=>i(o))})}return this._resolvedConnection.onProgress(e,t,i)}catch(r){throw this.error(`Registering progress handler for token ${t} failed.`,r),r}}sendProgress(e,t,i){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.sendProgress(e,t,i)}catch(r){throw this.error(`Sending progress for token ${t} failed.`,r),r}}get clientOptions(){return this._clientOptions}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){if(!this._outputChannel){let{outputChannelName:e}=this._clientOptions;this._outputChannel=k.createOutputChannel(e||this._name)}return this._outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(e){return new JG(this._id,e!=null?e:4)}set trace(e){this._trace=e,this.onReady().then(()=>{this.resolveConnection().then(t=>{t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})})},()=>{})}logObjectTrace(e){e.isLSPMessage&&e.type?this.outputChannel.append(`[LSP - ${new Date().toLocaleTimeString()}] `):this.outputChannel.append(`[Trace - ${new Date().toLocaleTimeString()}] `),e&&this.outputChannel.appendLine(`${JSON.stringify(e)}`)}data2String(e){if(e instanceof C.ResponseError){let t=e;return` Message: ${t.message} - Code: ${t.code} ${t.data?` -`+t.data.toString():""}`}return e instanceof Error?Pe(e.stack)?e.stack:e.message:Pe(e)?e:e.toString()}_appendOutput(e,t,i){let r=3;switch(e){case"Info":r=1;break;case"Warn":r=2;break}this.outputChannel.appendLine(`[${e} - ${new Date().toLocaleTimeString()}] ${t}`);let o;i&&(o=this.data2String(i),this.outputChannel.appendLine(o)),this._clientOptions.revealOutputChannelOn<=r&&this.outputChannel.show(!0)}info(e,t){this._appendOutput("Info",e,t)}warn(e,t){this._appendOutput("Warn",e,t)}error(e,t){this._appendOutput("Error",e,t)}logTrace(e,t){this.outputChannel.appendLine(`[Trace - ${new Date().toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t))}needsStart(){return this.state===0||this.state===4||this.state===5}needsStop(){return this.state===1||this.state===3}onReady(){return this._onReady}get started(){return this.state!=0}isConnectionActive(){return this.state===3&&!!this._resolvedConnection}start(){if(this._rootPath=this.resolveRootPath(),this._rootPath===!1)return this.warn("Required root pattern not resolved, server won't start."),C.Disposable.create(()=>{});if(this._onReadyCallbacks.isUsed&&(this._onReady=new Promise((e,t)=>{this._onReadyCallbacks=new zP(e,t)})),this._listeners=[],this._providers=[],!this._diagnostics){let e=this._clientOptions,t=e.diagnosticCollectionName?e.diagnosticCollectionName:this._id;e.disabledFeatures.includes("diagnostics")||(this._diagnostics=O.createDiagnosticCollection(t))}return this.state=1,this.resolveConnection().then(e=>(e.onLogMessage(t=>{let i;switch(t.type){case C.MessageType.Error:i="error",this.error(t.message);break;case C.MessageType.Warning:i="warning",this.warn(t.message);break;case C.MessageType.Info:i="info",this.info(t.message);break;default:i="log",this.outputChannel.appendLine(t.message)}if(global.hasOwnProperty("__TEST__")){console.log(`[${i}] ${t.message}`);return}}),e.onShowMessage(t=>{switch(t.type){case C.MessageType.Error:k.showErrorMessage(t.message);break;case C.MessageType.Warning:k.showWarningMessage(t.message);break;case C.MessageType.Info:k.showInformationMessage(t.message);break;default:k.showInformationMessage(t.message)}}),e.onRequest(C.ShowMessageRequest.type,t=>{let i;switch(t.type){case C.MessageType.Error:i=k.showErrorMessage.bind(k);break;case C.MessageType.Warning:i=k.showWarningMessage.bind(k);break;case C.MessageType.Info:i=k.showInformationMessage.bind(k);break;default:i=k.showInformationMessage.bind(k)}let r=t.actions||[];return i(t.message,...r).then(o=>o==null?null:o)}),e.onRequest(C.ShowDocumentRequest.type,async t=>{var o;let i=async s=>{try{if(s.external===!0||/^https?:\/\//.test(s.uri))return await y.openResource(s.uri),{success:!0};{let{selection:a,takeFocus:l}=s;return l===!1?await y.loadFile(s.uri):(await y.jumpTo(s.uri,a==null?void 0:a.start),Ce(a.start,a.end)!=0&&await k.selectRange(a)),{success:!0}}}catch{return{success:!0}}},r=(o=this._clientOptions.middleware.window)==null?void 0:o.showDocument;return r!==void 0?r(t,i):i(t)}),e.onTelemetry(t=>{}),e.listen(),this.initialize(e))).then(void 0,e=>{this.state=2,this._onReadyCallbacks.reject(e),this.error("Starting client failed ",e)}),C.Disposable.create(()=>{this.needsStop()&&this.stop()})}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}resolveRootPath(){if(this._clientOptions.workspaceFolder)return B.parse(this._clientOptions.workspaceFolder.uri).fsPath;let{ignoredRootPaths:e}=this._clientOptions,t=y.getConfiguration(this.id),i=t.get("rootPatterns",[]),r=t.get("requireRootPattern",!1),o;if(i&&i.length){let a=y.getDocument(y.bufnr);if(a&&a.schema=="file"){let l=QP.default.dirname(B.parse(a.uri).fsPath);o=fb(l,i,y.cwd)}}if(r&&!o)return!1;let s=o||y.rootPath||y.cwd;return ii(s,WG.default.homedir())||Array.isArray(e)&&e.some(a=>ii(s,a))?(this.warn(`Ignored rootPath ${s} of client "${this._id}"`),null):s}initialize(e){let{initializationOptions:t,progressOnInitialization:i}=this._clientOptions;this.refreshTrace(e,!1);let r=this._rootPath,o={processId:process.pid,rootPath:r||null,rootUri:r?Bf(B.file(r)):null,capabilities:this.computeClientCapabilities(),initializationOptions:Gs(t)?t():t,trace:C.Trace.toString(this._trace),workspaceFolders:null,locale:this.getLocale(),clientInfo:{name:"coc.nvim",version:y.version}};if(this.fillInitializeParams(o),i){let s=We();o.workDoneToken=s;let a=new Nf(this._id,e,s);return a.begin({title:`Initializing ${this.id}`,kind:"begin"}),this.doInitialize(e,o).then(l=>(a.done(),l),l=>{throw a.cancel(),l})}else return this.doInitialize(e,o)}doInitialize(e,t){return e.initialize(t).then(i=>{this._resolvedConnection=e,this._initializeResult=i,this.state=3;let r;return eb(i.capabilities.textDocumentSync)?i.capabilities.textDocumentSync===C.TextDocumentSyncKind.None?r={openClose:!1,change:C.TextDocumentSyncKind.None,save:void 0}:r={openClose:!0,change:i.capabilities.textDocumentSync,save:{includeText:!1}}:i.capabilities.textDocumentSync!=null&&i.capabilities.textDocumentSync!==void 0&&(r=i.capabilities.textDocumentSync),this._capabilities=Object.assign({},i.capabilities,{resolvedTextDocumentSync:r}),e.onDiagnostics(o=>this.handleDiagnostics(o)),e.onRequest(C.RegistrationRequest.type,o=>this.handleRegistrationRequest(o)),e.onRequest("client/registerFeature",o=>this.handleRegistrationRequest(o)),e.onRequest(C.UnregistrationRequest.type,o=>this.handleUnregistrationRequest(o)),e.onRequest("client/unregisterFeature",o=>this.handleUnregistrationRequest(o)),e.onRequest(C.ApplyWorkspaceEditRequest.type,o=>this.handleApplyWorkspaceEdit(o)),e.sendNotification(C.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),i}).then(void 0,i=>{throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(i)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(i)):i instanceof C.ResponseError&&i.data&&i.data.retry?k.showPrompt(i.message+" Retry?").then(r=>{r?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(i))}):(i&&i.message&&k.showMessage(i.message,"error"),this.error("Server initialization failed.",i),this.stop(),this._onReadyCallbacks.reject(i)),i})}stop(){if(this._initializeResult=void 0,!this._connectionPromise)return this.state=5,Promise.resolve();if(this.state===4&&this._onStop)return this._onStop;this.state=4,this.cleanUp();let e=this.resolveConnection().then(t=>{let i=!1,r=setTimeout(()=>{i=!0,t.end(),t.dispose()},2e3);return t.shutdown().then(()=>(clearTimeout(r),t.exit(),t),o=>{if(!i)throw t.end(),t.dispose(),o})});return(this._onStop=e.then(t=>{t&&t.unlisten()},t=>{throw fo.error("Stopping server failed:",t),this.error("Stopping server failed",t),t})).finally(()=>{this.state=5,this.cleanUpChannel(),this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0})}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach(i=>i.dispose()),this._listeners=void 0),this._providers&&(this._providers.forEach(i=>i.dispose()),this._providers=void 0);for(let i of this._features.values())typeof i.dispose=="function"?i.dispose():fo.error("Feature can't be disposed",i);this._syncedDocuments&&this._syncedDocuments.clear(),e&&this.cleanUpChannel(),this._diagnostics&&(t?(this._diagnostics.dispose(),this._diagnostics=void 0):this._diagnostics.clear())}cleanUpChannel(){this._outputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){var o;let t=this;function i(s){t._fileEvents.push(s),t._fileEventDelayer.trigger(()=>{t.onReady().then(()=>{t.resolveConnection().then(a=>{t.isConnectionActive()&&a.didChangeWatchedFiles({changes:t._fileEvents}),t._fileEvents=[]})},a=>{t.error("Notify file events failed.",a)})})}let r=(o=this.clientOptions.middleware)==null?void 0:o.workspace;r!=null&&r.didChangeWatchedFile?r.didChangeWatchedFile(e,i):i(e)}handleDiagnostics(e){if(!this._diagnostics)return;let{uri:t,diagnostics:i,version:r}=e;if(typeof r=="number"){let s=y.getDocument(t);if(!s||s.version!=r)return}let o=this.clientOptions.middleware.handleDiagnostics;o?o(t,i,(s,a)=>this.setDiagnostics(s,a)):this.setDiagnostics(t,i)}setDiagnostics(e,t){var r;if(!this._diagnostics)return;if(y.getConfiguration("diagnostic").get("separateRelatedInformationAsDiagnostics")&&t.length>0){let o=new Map;o.set(e,t);for(let s of t){if((r=s.relatedInformation)!=null&&r.length){let a=`${s.message} - -Related diagnostics: -`;for(let l of s.relatedInformation){let u=QP.default.basename(B.parse(l.location.uri).fsPath),c=l.location.range.start.line;a=`${a} -${u}(line ${c+1}): ${l.message}`;let h=o.get(l.location.uri)||[];h.push(C.Diagnostic.create(l.location.range,l.message,C.DiagnosticSeverity.Hint,s.code,s.source)),o.set(l.location.uri,h)}s.message=a}this._diagnostics.set(Array.from(o))}}else this._diagnostics.set(e,t)}createConnection(){let e=(i,r,o)=>{fo.error("connection error:",i,r),this.handleConnectionError(i,r,o)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then(i=>USe(i.reader,i.writer,e,t,this._clientOptions.connectionOptions))}handleConnectionClosed(){if(this.state===5){fo.debug(`client ${this._id} normal close`);return}try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch{}let e=1;if(this.state!==4)try{e=this._clientOptions.errorHandler.closed()}catch{}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===1?(this.error("Connection to server got closed. Server will not be restarted."),this.state===1?(this._onReadyCallbacks.reject(new Error("Connection to server got closed. Server will not be restarted.")),this.state=2):this.state=5,this.cleanUp(!1,!0)):e===2&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!0),this.state=0,this.start())}restart(){this.cleanUp(!0,!1),this.start()}handleConnectionError(e,t,i){this._clientOptions.errorHandler.error(e,t,i)===2&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){y.onDidChangeConfiguration(t=>{t.affectsConfiguration(this._id)&&this.refreshTrace(e,!0)},null,this._listeners)}refreshTrace(e,t=!1){let i=y.getConfiguration(this._id),r=C.Trace.Off,o=C.TraceFormat.Text;if(i){let s=i.get("trace.server","off");typeof s=="string"?r=C.Trace.fromString(s):(r=C.Trace.fromString(i.get("trace.server.verbosity","off")),o=C.TraceFormat.fromString(i.get("trace.server.format","text")))}t&&this._trace==r&&this._traceFormat==o||(this._trace=r,this._traceFormat=o,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}))}hookFileEvents(e){let t=this._clientOptions.synchronize.fileEvents;if(!t)return;let i;Array.isArray(t)?i=t:i=[t],i&&this._dynamicFeatures.get(C.DidChangeWatchedFilesNotification.type.method).registerRaw(We(),i)}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),KP.is(e)){let t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}registerBuiltinFeatures(){let{disabledFeatures:e}=this._clientOptions;e.includes("configuration")||this.registerFeature(new b6(this)),this.registerFeature(new UG(this,this._syncedDocuments)),this.registerFeature(new QG(this)),this.registerFeature(new GG(this,this._syncedDocuments)),e.includes("willSave")||this.registerFeature(new KG(this)),e.includes("willSaveWaitUntil")||this.registerFeature(new zG(this)),e.includes("didSave")||this.registerFeature(new VG(this)),e.includes("fileSystemWatcher")||this.registerFeature(new e6(this,t=>this.notifyFileEvent(t))),e.includes("completion")||this.registerFeature(new i6(this)),e.includes("hover")||this.registerFeature(new n6(this)),e.includes("signatureHelp")||this.registerFeature(new r6(this)),e.includes("references")||this.registerFeature(new s6(this)),e.includes("definition")||this.registerFeature(new o6(this)),e.includes("documentHighlight")||this.registerFeature(new a6(this)),e.includes("documentSymbol")||this.registerFeature(new l6(this)),e.includes("codeAction")||this.registerFeature(new c6(this)),e.includes("workspaceSymbol")||this.registerFeature(new u6(this)),e.includes("codeLens")||this.registerFeature(new h6(this)),e.includes("documentFormatting")||this.registerFeature(new d6(this)),e.includes("documentRangeFormatting")||this.registerFeature(new g6(this)),e.includes("documentOnTypeFormatting")||this.registerFeature(new f6(this)),e.includes("rename")||this.registerFeature(new p6(this)),e.includes("documentLink")||this.registerFeature(new m6(this)),e.includes("executeCommand")||this.registerFeature(new y6(this))}fillInitializeParams(e){for(let t of this._features)Gs(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};U(e,"workspace").applyEdit=!0;let t=U(U(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[C.ResourceOperationKind.Create,C.ResourceOperationKind.Rename,C.ResourceOperationKind.Delete],t.failureHandling=C.FailureHandlingKind.Undo,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!1};let i=U(U(e,"textDocument"),"publishDiagnostics");i.relatedInformation=!0,i.versionSupport=!0,i.tagSupport={valueSet:[C.DiagnosticTag.Unnecessary,C.DiagnosticTag.Deprecated]},i.codeDescriptionSupport=!0,i.dataSupport=!0;let r=U(e,"window"),o=U(r,"showMessage");o.messageActionItem={additionalPropertiesSupport:!0};let s=U(r,"showDocument");s.support=!0;let a=U(e,"general");a.regularExpressions={engine:"ECMAScript",version:"ES2020"},a.markdown={parser:"marked",version:"4.0.10"};for(let l of this._features)l.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let i of this._features)i.initialize(this._capabilities,t)}handleRegistrationRequest(e){return this.clientOptions.disableDynamicRegister?Promise.resolve():new Promise((t,i)=>{for(let r of e.registrations){let o=this._dynamicFeatures.get(r.method);if(!o){i(new Error(`No feature implementation for ${r.method} found. Registration failed.`));return}let s=r.registerOptions||{};s.documentSelector=s.documentSelector||this._clientOptions.documentSelector;let a={id:r.id,registerOptions:s};try{o.register(a)}catch(l){i(l);return}}t()})}handleUnregistrationRequest(e){return new Promise((t,i)=>{for(let r of e.unregisterations){let o=this._dynamicFeatures.get(r.method);if(!o){i(new Error(`No feature implementation for ${r.method} found. Unregistration failed.`));return}o.unregister(r.id)}t()})}handleApplyWorkspaceEdit(e){let t=e.edit,i=new Map;y.textDocuments.forEach(o=>i.set(o.uri.toString(),o));let r=!1;if(t.documentChanges){for(let o of t.documentChanges)if(C.TextDocumentEdit.is(o)&&o.textDocument.version&&o.textDocument.version>=0){let s=i.get(o.textDocument.uri);if(s&&s.version!==o.textDocument.version){r=!0;break}}}return r?Promise.resolve({applied:!1}):y.applyEdit(e.edit).then(o=>({applied:o}))}getLocale(){let e=process.env.LANG;return e?e.split(".")[0]:"en"}handleFailedRequest(e,t,i,r){if(i instanceof C.ResponseError){if(i.code===C.LSPErrorCodes.RequestCancelled){if(t!==void 0&&t.isCancellationRequested)return r}else if(i.code===C.LSPErrorCodes.ContentModified)return r}this.error(`Request ${e.method} failed.`,i)}logFailedRequest(e,t){t instanceof C.ResponseError&&t.code===C.LSPErrorCodes.RequestCancelled||this.error(`Request ${e.method} failed.`,t)}}});var Ul,n_,v6=_(()=>{"use strict";Ul=x(q());Se();Dn();"use strict";n_=class extends Be{constructor(e){super(e,Ul.DocumentColorRequest.type)}fillClientCapabilities(e){U(U(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.colorProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideColorPresentations:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={color:u,textDocument:{uri:c.document.uri},range:c.range};return s.sendRequest(Ul.ColorPresentationRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(Ul.ColorPresentationRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideColorPresentations?l.provideColorPresentations(i,r,o,a):a(i,r,o)},provideDocumentColors:(i,r)=>{let o=this._client,s=(l,u)=>{let c={textDocument:{uri:l.uri}};return o.sendRequest(Ul.DocumentColorRequest.type,c,u).then(h=>h,h=>o.handleFailedRequest(Ul.ColorPresentationRequest.type,u,h,null))},a=o.clientOptions.middleware;return a.provideDocumentColors?a.provideDocumentColors(i,r,s):s(i,r)}};return[O.registerDocumentColorProvider(e.documentSelector,t),t]}}});function qf(n){if(n){if(Array.isArray(n))return n.map(qf);if(typeof n=="object"){let e=Object.create(null);for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=qf(n[t]));return e}}return n}var w6,UWe,r_,D6=_(()=>{"use strict";w6=x(q());K();UWe=H()("languageclient-configuration"),r_=class{constructor(e){this._client=e;var i;let t=(i=this._client.clientOptions.synchronize)==null?void 0:i.configurationSection;typeof t=="string"&&t.startsWith("languageserver.")&&(this.languageserverSection=t)}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(w6.ConfigurationRequest.type,(t,i)=>{let r=s=>{let a=[];for(let l of s.items)a.push(this.getConfiguration(l.scopeUri,l.section));return a},o=e.clientOptions.middleware.workspace;return o&&o.configuration?o.configuration(t,i,r):r(t,i)})}getConfiguration(e,t){let i=null;if(t){this.languageserverSection&&(t=`${this.languageserverSection}.${t}`);let r=t.lastIndexOf(".");if(r===-1)i=qf(y.getConfiguration(void 0,e).get(t));else{let o=y.getConfiguration(t.substr(0,r),e);o&&(i=qf(o.get(t.substr(r+1))))}}else{let r=y.getConfiguration(this.languageserverSection,e);i={};for(let o of Object.keys(r))r.has(o)&&(i[o]=qf(r.get(o)))}return i}dispose(){}}});var Cw,o_,C6=_(()=>{"use strict";Cw=x(q());Se();Dn();_a();"use strict";o_=class extends Be{constructor(e){super(e,Cw.DeclarationRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"declaration");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.declarationProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideDeclaration:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(Cw.DeclarationRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(Cw.DeclarationRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideDeclaration?l.provideDeclaration(i,r,o,a):a(i,r,o)}};return[O.registerDeclarationProvider(e.documentSelector,t),t]}}});var xw,s_,x6=_(()=>{"use strict";xw=x(q());Se();Dn();"use strict";s_=class extends Be{constructor(e){super(e,xw.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.foldingRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideFoldingRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri}};return s.sendRequest(xw.FoldingRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(xw.FoldingRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideFoldingRanges?l.provideFoldingRanges(i,r,o,a):a(i,r,o)}};return[O.registerFoldingRangeProvider(e.documentSelector,t),t]}}});var Sw,a_,S6=_(()=>{"use strict";Sw=x(q());Se();Dn();_a();a_=class extends Be{constructor(e){super(e,Sw.ImplementationRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"implementation");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.implementationProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideImplementation:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(Sw.ImplementationRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(Sw.ImplementationRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideImplementation?l.provideImplementation(i,r,o,a):a(i,r,o)}};return[O.registerImplementationProvider(e.documentSelector,t),t]}}});var T6,l_,k6=_(()=>{"use strict";T6=x(q());Dn();JP();"use strict";l_=class{constructor(e){this._client=e;this.activeParts=new Set}fillClientCapabilities(e){U(e,"window").workDoneProgress=!0}initialize(){let e=this._client,t=r=>{this.activeParts.delete(r)},i=r=>{this.activeParts.add(new Nf(this._client.id,this._client,r.token,t))};e.onRequest(T6.WorkDoneProgressCreateRequest.type,i)}dispose(){for(let e of this.activeParts)e.done();this.activeParts.clear()}}});var Tw,u_,E6=_(()=>{"use strict";Tw=x(q());Se();Dn();_a();u_=class extends Be{constructor(e){super(e,Tw.TypeDefinitionRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.typeDefinitionProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideTypeDefinition:(i,r,o)=>{let s=this._client,a=(u,c,h)=>s.sendRequest(Tw.TypeDefinitionRequest.type,wn(u,c),h).then(d=>d,d=>s.handleFailedRequest(Tw.TypeDefinitionRequest.type,h,d,null)),l=s.clientOptions.middleware;return l.provideTypeDefinition?l.provideTypeDefinition(i,r,o,a):a(i,r,o)}};return[O.registerTypeDefinitionProvider(e.documentSelector,t),t]}}});function c_(n,e){if(n!==void 0)return n[e]}function P6(n,e){return n.filter(t=>!e.includes(t))}var Yf,bZe,h_,_6=_(()=>{"use strict";Yf=x(q());De();$e();K();yw();"use strict";bZe=H()("language-client-workspaceFolder");h_=class{constructor(e){this._client=e;this._listeners=new Map}get registrationType(){return Yf.DidChangeWorkspaceFoldersNotification.type}getValidWorkspaceFolders(){let{workspaceFolders:e}=y;if(!e||e.length==0)return;let{ignoredRootPaths:t}=this._client.clientOptions;Array.isArray(t)||(t=[]);let i=e.filter(r=>{let o=B.parse(r.uri).fsPath;return t.every(s=>!ii(s,o))});return i.length?i:void 0}asProtocol(e){return e==null?null:{uri:e.uri,name:e.name}}fillInitializeParams(e){let t=this.getValidWorkspaceFolders();this._initialFolders=t,t==null?(this._client.warn("No valid workspaceFolder exists"),e.workspaceFolders=null):e.workspaceFolders=t.map(i=>this.asProtocol(i))}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(Yf.WorkspaceFoldersRequest.type,o=>{let s=()=>{let l=this.getValidWorkspaceFolders();return l===void 0?null:l.map(c=>this.asProtocol(c))},a=t.clientOptions.middleware.workspace;return a&&a.workspaceFolders?a.workspaceFolders(o,s):s(o)});let i=c_(c_(c_(e,"workspace"),"workspaceFolders"),"changeNotifications"),r;typeof i=="string"?r=i:i===!0&&(r=We()),r&&this.register({id:r,registerOptions:void 0})}doSendEvent(e,t){let i={event:{added:e.map(r=>this.asProtocol(r)),removed:t.map(r=>this.asProtocol(r))}};this._client.sendNotification(Yf.DidChangeWorkspaceFoldersNotification.type,i)}sendInitialEvent(e){if(this._initialFolders&&e){let t=P6(this._initialFolders,e),i=P6(e,this._initialFolders);(i.length>0||t.length>0)&&this.doSendEvent(i,t)}else this._initialFolders?this.doSendEvent([],this._initialFolders):e&&this.doSendEvent(e,[])}register(e){let t=e.id,i=this._client,r=y.onDidChangeWorkspaceFolders(s=>{let a=u=>{this.doSendEvent(u.added,u.removed)},l=i.clientOptions.middleware.workspace;l&&l.didChangeWorkspaceFolders?l.didChangeWorkspaceFolders(s,a):a(s)});this._listeners.set(t,r);let o=this.getValidWorkspaceFolders();this.sendInitialEvent(o)}unregister(e){let t=this._listeners.get(e);t!==void 0&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}}});var kw,d_,R6=_(()=>{"use strict";kw=x(q());Se();Dn();"use strict";d_=class extends Be{constructor(e){super(e,kw.SelectionRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"selectionRange");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.selectionRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideSelectionRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d={textDocument:{uri:u.uri},positions:c};return s.sendRequest(kw.SelectionRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(kw.SelectionRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideSelectionRanges?l.provideSelectionRanges(i,r,o,a):a(i,r,o)}};return[O.registerSelectionRangeProvider(e.documentSelector,t),t]}}});var bo,g_,L6=_(()=>{"use strict";bo=x(q());Se();Dn();_a();"use strict";g_=class extends Be{constructor(e){super(e,bo.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){let i=U(U(e,"textDocument"),"callHierarchy");i.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.callHierarchyProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={prepareCallHierarchy:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d=wn(u,c);return s.sendRequest(bo.CallHierarchyPrepareRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(bo.CallHierarchyPrepareRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.prepareCallHierarchy?l.prepareCallHierarchy(i,r,o,a):a(i,r,o)},provideCallHierarchyIncomingCalls:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(bo.CallHierarchyIncomingCallsRequest.type,{item:l},u).then(c=>c,c=>o.handleFailedRequest(bo.CallHierarchyIncomingCallsRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideCallHierarchyIncomingCalls?a.provideCallHierarchyIncomingCalls(i,r,s):s(i,r)},provideCallHierarchyOutgoingCalls:(i,r)=>{let o=this._client,s=(l,u)=>o.sendRequest(bo.CallHierarchyOutgoingCallsRequest.type,{item:l},u).then(c=>c,c=>o.handleFailedRequest(bo.CallHierarchyOutgoingCallsRequest.type,u,c,null)),a=o.clientOptions.middleware;return a.provideCallHierarchyOutgoingCalls?a.provideCallHierarchyOutgoingCalls(i,r,s):s(i,r)}};return[O.registerCallHierarchyProvider(e.documentSelector,t),t]}}});var le,gJe,f_,F6=_(()=>{"use strict";le=x(q());Se();Kn();Dn();_a();"use strict";gJe=H()("languageclient-semanticTokens"),f_=class extends Be{constructor(e){super(e,le.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[le.SemanticTokenTypes.namespace,le.SemanticTokenTypes.type,le.SemanticTokenTypes.class,le.SemanticTokenTypes.enum,le.SemanticTokenTypes.interface,le.SemanticTokenTypes.struct,le.SemanticTokenTypes.typeParameter,le.SemanticTokenTypes.parameter,le.SemanticTokenTypes.variable,le.SemanticTokenTypes.property,le.SemanticTokenTypes.enumMember,le.SemanticTokenTypes.event,le.SemanticTokenTypes.function,le.SemanticTokenTypes.method,le.SemanticTokenTypes.macro,le.SemanticTokenTypes.keyword,le.SemanticTokenTypes.modifier,le.SemanticTokenTypes.comment,le.SemanticTokenTypes.string,le.SemanticTokenTypes.number,le.SemanticTokenTypes.regexp,le.SemanticTokenTypes.operator],t.tokenModifiers=[le.SemanticTokenModifiers.declaration,le.SemanticTokenModifiers.definition,le.SemanticTokenModifiers.readonly,le.SemanticTokenModifiers.static,le.SemanticTokenModifiers.deprecated,le.SemanticTokenModifiers.abstract,le.SemanticTokenModifiers.async,le.SemanticTokenModifiers.modification,le.SemanticTokenModifiers.documentation,le.SemanticTokenModifiers.defaultLibrary],t.formats=[le.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,U(U(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(le.SemanticTokensRefreshRequest.type,async()=>{for(let s of this.getAllProviders())s.onDidChangeSemanticTokensEmitter.fire()});let[r,o]=this.getRegistration(t,e.semanticTokensProvider);!r||!o||this.register({id:r,registerOptions:o})}registerLanguageProvider(e){let t=Qn(e.full)?e.full:e.full!==void 0,i=e.full!==void 0&&typeof e.full!="boolean"&&e.full.delta===!0,r=new le.Emitter,o=t?{onDidChangeSemanticTokens:r.event,provideDocumentSemanticTokens:(u,c)=>{let h=this._client,d=h.clientOptions.middleware,g=(f,p)=>{let m={textDocument:Xl(f)};return h.sendRequest(le.SemanticTokensRequest.type,m,p).then(v=>v,v=>h.handleFailedRequest(le.SemanticTokensRequest.type,p,v,null))};return d.provideDocumentSemanticTokens?d.provideDocumentSemanticTokens(u,c,g):g(u,c)},provideDocumentSemanticTokensEdits:i?(u,c,h)=>{let d=this._client,g=d.clientOptions.middleware,f=(p,m,v)=>{let w={textDocument:Xl(p),previousResultId:m};return d.sendRequest(le.SemanticTokensDeltaRequest.type,w,v).then(D=>D,D=>d.handleFailedRequest(le.SemanticTokensDeltaRequest.type,v,D,null))};return g.provideDocumentSemanticTokensEdits?g.provideDocumentSemanticTokensEdits(u,c,h,f):f(u,c,h)}:void 0}:void 0,a=e.range===!0?{provideDocumentRangeSemanticTokens:(u,c,h)=>{let d=this._client,g=d.clientOptions.middleware,f=(p,m,v)=>{let w={textDocument:Xl(p),range:m};return d.sendRequest(le.SemanticTokensRangeRequest.type,w,v).then(D=>D,D=>d.handleFailedRequest(le.SemanticTokensRangeRequest.type,v,D,null))};return g.provideDocumentRangeSemanticTokens?g.provideDocumentRangeSemanticTokens(u,c,h,f):f(u,c,h)}}:void 0,l=[];return o!==void 0&&l.push(O.registerDocumentSemanticTokensProvider(e.documentSelector,o,e.legend)),a!==void 0&&l.push(O.registerDocumentRangeSemanticTokensProvider(e.documentSelector,a,e.legend)),[le.Disposable.create(()=>l.forEach(u=>u.dispose())),{range:a,full:o,onDidChangeSemanticTokensEmitter:r}]}}});var Ew,EJe,p_,I6=_(()=>{"use strict";Ew=x(q());Se();Dn();_a();EJe=H()("languageclient-linkedEditingRange"),p_=class extends Be{constructor(e){super(e,Ew.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){let t=U(U(e,"textDocument"),"linkedEditingRange");t.dynamicRegistration=!0}initialize(e,t){let[i,r]=this.getRegistration(t,e.linkedEditingRangeProvider);!i||!r||this.register({id:i,registerOptions:r})}registerLanguageProvider(e){let t={provideLinkedEditingRanges:(i,r,o)=>{let s=this._client,a=(u,c,h)=>{let d=wn(u,c);return s.sendRequest(Ew.LinkedEditingRangeRequest.type,d,h).then(g=>g,g=>s.handleFailedRequest(Ew.LinkedEditingRangeRequest.type,h,g,null))},l=s.clientOptions.middleware;return l.provideLinkedEditingRange?l.provideLinkedEditingRange(i,r,o,a):a(i,r,o)}};return[O.registerLinkedEditingRangeProvider(e.documentSelector,t),t]}}});function QSe(n,e){return n[e]}function j6(n,e,t){n[e]=t}function Pw(n){return{files:n.files.map(e=>({uri:e.toString()}))}}function O6(n){return{files:n.files.map(e=>({oldUri:e.oldUri.toString(),newUri:e.newUri.toString()}))}}var A6,Oi,r$e,Gl,_w,m_,b_,y_,Rw,v_,w_,D_,M6=_(()=>{"use strict";A6=x(Vn()),Oi=x(q());Ir();$e();K();Dn();yw();r$e=H()("language-client-fileOperations");Gl=class{constructor(e,t,i,r,o){this._filters=new Map;this._client=e,this._event=t,this._registrationType=i,this._clientCapability=r,this._serverCapability=o}get registrationType(){return this._registrationType}fillClientCapabilities(e){let t=U(U(e,"workspace"),"fileOperations");j6(t,"dynamicRegistration",!0),j6(t,this._clientCapability,!0)}initialize(e){var r;let t=(r=e.workspace)==null?void 0:r.fileOperations,i=t!==void 0?QSe(t,this._serverCapability):void 0;if((i==null?void 0:i.filters)!==void 0)try{this.register({id:We(),registerOptions:{filters:i.filters}})}catch(o){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${o}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));let t=e.registerOptions.filters.map(i=>{let r=new A6.Minimatch(i.pattern.glob,Gl.asMinimatchOptions(i.pattern.options));if(!r.makeRe())throw new Error(`Invalid pattern ${i.pattern.glob}!`);return{scheme:i.scheme,matcher:r,kind:i.pattern.matches}});this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),this._filters.size===0&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}async filter(e,t){let i=await Promise.all(e.files.map(async o=>{let s=t(o),a=s.fsPath.replace(/\\/g,"/");for(let l of this._filters.values())for(let u of l)if(!(u.scheme!==void 0&&u.scheme!==s.scheme)){if(u.matcher.match(a)){if(u.kind===void 0)return!0;let c=await Gl.getFileType(s);if(c===void 0)return this._client.error(`Failed to determine file type for ${s.toString()}.`),!0;if(c===1&&u.kind===Oi.FileOperationPatternKind.file||c===2&&u.kind===Oi.FileOperationPatternKind.folder)return!0}else if(u.kind===Oi.FileOperationPatternKind.folder&&await Gl.getFileType(s)===2&&u.matcher.match(`${a}/`))return!0}return!1})),r=e.files.filter((o,s)=>i[s]);return Ba(de({},e),{files:r})}static async getFileType(e){try{let t=await qt(e.fsPath);return t.isFile()?1:t.isDirectory()?2:t.isSymbolicLink()?64:0}catch{return}}static asMinimatchOptions(e){if(e!==void 0&&e.ignoreCase===!0)return{nocase:!0}}},_w=class extends Gl{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o);this._notificationType=i,this._accessUri=s,this._createParams=a}async send(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let i=async r=>{this._client.sendNotification(this._notificationType,this._createParams(r))};this.doSend(t,i)}}},m_=class extends _w{constructor(e){super(e,y.onDidCreateFiles,Oi.DidCreateFilesNotification.type,"didCreate","didCreate",t=>t,t=>Pw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didCreateFiles?i.didCreateFiles(e,t):t(e)}},b_=class extends _w{constructor(e){super(e,y.onDidRenameFiles,Oi.DidRenameFilesNotification.type,"didRename","didRename",t=>t.oldUri,t=>O6(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didRenameFiles?i.didRenameFiles(e,t):t(e)}},y_=class extends _w{constructor(e){super(e,y.onDidDeleteFiles,Oi.DidDeleteFilesNotification.type,"didDelete","didDelete",t=>t,t=>Pw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.didDeleteFiles?i.didDeleteFiles(e,t):t(e)}},Rw=class extends Gl{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o);this._requestType=i,this._accessUri=s,this._createParams=a}async send(e){let t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){let t=await this.filter(e,this._accessUri);if(t.files.length){let i=r=>this._client.sendRequest(this._requestType,this._createParams(r));return this.doSend(t,i)}else return}},v_=class extends Rw{constructor(e){super(e,y.onWillCreateFiles,Oi.WillCreateFilesRequest.type,"willCreate","willCreate",t=>t,t=>Pw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willCreateFiles?i.willCreateFiles(e,t):t(e)}},w_=class extends Rw{constructor(e){super(e,y.onWillRenameFiles,Oi.WillRenameFilesRequest.type,"willRename","willRename",t=>t.oldUri,t=>O6(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willRenameFiles?i.willRenameFiles(e,t):t(e)}},D_=class extends Rw{constructor(e){super(e,y.onWillDeleteFiles,Oi.WillDeleteFilesRequest.type,"willDelete","willDelete",t=>t,t=>Pw(t))}doSend(e,t){var r;let i=(r=this._client.clientOptions.middleware)==null?void 0:r.workspace;return i!=null&&i.willDeleteFiles?i.willDeleteFiles(e,t):t(e)}}});var ls,Lw,fh,gt,T$e,C_,x_,Fw,ph,S_,T_,k_,Wf,E_,KSe,P_=_(()=>{"use strict";ls=x(require("child_process")),Lw=x(require("fs")),fh=x(require("path")),gt=x(_G());Ir();V();Kn();LG();K();Dn();v6();D6();C6();x6();S6();k6();E6();_6();R6();L6();F6();I6();M6();Dn();T$e=ls.default.ChildProcess,C_=H()("language-client-index");(e=>{function n(t){return Pe(t.command)}e.is=n})(x_||(x_={}));Fw=(r=>(r[r.stdio=0]="stdio",r[r.ipc=1]="ipc",r[r.pipe=2]="pipe",r[r.socket=3]="socket",r))(Fw||{});(e=>{function n(t){let i=t;return i&&i.kind===3&&eb(i.port)}e.isSocket=n})(ph||(ph={}));(e=>{function n(t){return Pe(t.module)}e.is=n})(S_||(S_={}));(e=>{function n(t){let i=t;return i&&i.writer!==void 0&&i.reader!==void 0}e.is=n})(T_||(T_={}));(e=>{function n(t){let i=t;return i&&i.process!==void 0&&typeof i.detached=="boolean"}e.is=n})(k_||(k_={}));Wf=class extends i_{constructor(e,t,i,r,o){let s,a,l,u,c;Pe(t)?(s=e,a=t,l=i,u=r,c=!!o):(s=e.toLowerCase(),a=e,l=t,u=i,c=r),c===void 0&&(c=!1);super(s,a,u);this._serverOptions=l,this._forceDebug=c,this.registerProposedFeatures()}stop(){return super.stop().then(()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,(this._isDetached===void 0||!this._isDetached)&&this.checkProcessDied(e),this._isDetached=void 0}})}get serviceState(){let e=this._state;switch(e){case 0:return 0;case 3:return 3;case 2:return 2;case 1:return 1;case 5:return 5;case 4:return 4;default:return C_.error(`Unknown state: ${e}`),5}}static stateName(e){switch(e){case 0:return"Initial";case 3:return"Running";case 2:return"StartFailed";case 1:return"Starting";case 5:return"Stopped";case 4:return"Stopping";default:return"Unknown"}}checkProcessDied(e){!e||global.__TEST__||setTimeout(()=>{try{process.kill(e.pid,0),RG(e)}catch{}},2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}createMessageTransports(e){function t(c,h){if(!c&&!h)return;let d=Object.create(null);return Object.keys(process.env).forEach(g=>d[g]=process.env[g]),c&&Object.keys(c).forEach(g=>d[g]=c[g]),d}let i=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],r=["--debug","--debug-brk","--inspect","--inspect-brk"];function o(){let c=process.execArgv;return c?c.some(h=>i.some(d=>h.startsWith(d))||r.some(d=>h===d)):!1}function s(c){if(c.stdin===null||c.stdout===null||c.stderr===null)throw new Error("Process created without stdio streams")}let a=this._serverOptions;if(Gs(a))return a().then(c=>{if(gh.is(c))return this._isDetached=!!c.detached,c;if(T_.is(c))return this._isDetached=!!c.detached,{reader:new gt.StreamMessageReader(c.reader),writer:new gt.StreamMessageWriter(c.writer)};{let h;return k_.is(c)?(h=c.process,this._isDetached=c.detached):(h=c,this._isDetached=!1),h.stderr.on("data",d=>this.outputChannel.append(Pe(d)?d:d.toString(e))),{reader:new gt.StreamMessageReader(h.stdout),writer:new gt.StreamMessageWriter(h.stdin)}}});let l,u=a;return u.run||u.debug?typeof v8debug=="object"||this._forceDebug||o()?l=u.debug:l=u.run:l=a,this._getServerWorkingDir(l.options).then(c=>{if(S_.is(l)&&l.module){let h=l,d=h.transport||0;if(h.runtime){let g=[],f=h.options||Object.create(null);f.execArgv&&f.execArgv.forEach(w=>g.push(w)),g.push(h.module),h.args&&h.args.forEach(w=>g.push(w));let p=Object.create(null);p.cwd=c,p.env=t(f.env,!1);let m=this._getRuntimePath(h.runtime,c),v;if(d===1?(p.stdio=[null,null,null,"ipc"],g.push("--node-ipc")):d===0?g.push("--stdio"):d===2?(v=(0,gt.generateRandomPipeName)(),g.push(`--pipe=${v}`)):ph.isSocket(d)&&g.push(`--socket=${d.port}`),g.push(`--clientProcessId=${process.pid.toString()}`),d===1||d===0){let w=ls.default.spawn(m,g,p);return!w||!w.pid?Promise.reject(`Launching server using runtime ${m} failed.`):(this._serverProcess=w,w.stderr.on("data",D=>this.outputChannel.append(Pe(D)?D:D.toString(e))),d===1?(w.stdout.on("data",D=>this.outputChannel.append(Pe(D)?D:D.toString(e))),Promise.resolve({reader:new gt.IPCMessageReader(w),writer:new gt.IPCMessageWriter(w)})):Promise.resolve({reader:new gt.StreamMessageReader(w.stdout),writer:new gt.StreamMessageWriter(w.stdin)}))}else{if(d===2)return(0,gt.createClientPipeTransport)(v).then(w=>{let D=ls.default.spawn(m,g,p);return!D||!D.pid?Promise.reject(`Launching server using runtime ${m} failed.`):(this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),w.onConnected().then(S=>({reader:S[0],writer:S[1]})))});if(ph.isSocket(d))return(0,gt.createClientSocketTransport)(d.port).then(w=>{let D=ls.default.spawn(m,g,p);return!D||!D.pid?Promise.reject(`Launching server using runtime ${m} failed.`):(this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),w.onConnected().then(S=>({reader:S[0],writer:S[1]})))})}}else{let g;return new Promise((f,p)=>{let m=h.args&&h.args.slice()||[];d===1?m.push("--node-ipc"):d===0?m.push("--stdio"):d===2?(g=(0,gt.generateRandomPipeName)(),m.push(`--pipe=${g}`)):ph.isSocket(d)&&m.push(`--socket=${d.port}`),m.push(`--clientProcessId=${process.pid.toString()}`);let v=h.options||Object.create(null);if(v.env=t(v.env,!0),v.execArgv=v.execArgv||[],v.cwd=c,v.silent=!0,d===1||d===0){let w=ls.default.fork(h.module,m||[],v);s(w),this._serverProcess=w,w.stderr.on("data",D=>this.outputChannel.append(Pe(D)?D:D.toString(e))),d===1?(w.stdout.on("data",D=>this.outputChannel.append(Pe(D)?D:D.toString(e))),f({reader:new gt.IPCMessageReader(this._serverProcess),writer:new gt.IPCMessageWriter(this._serverProcess)})):f({reader:new gt.StreamMessageReader(w.stdout),writer:new gt.StreamMessageWriter(w.stdin)})}else d===2?(0,gt.createClientPipeTransport)(g).then(w=>{let D=ls.default.fork(h.module,m||[],v);s(D),this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),w.onConnected().then(S=>{f({reader:S[0],writer:S[1]})})}):ph.isSocket(d)&&(0,gt.createClientSocketTransport)(d.port).then(w=>{let D=ls.default.fork(h.module,m||[],v);s(D),this._serverProcess=D,D.stderr.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),D.stdout.on("data",S=>this.outputChannel.append(Pe(S)?S:S.toString(e))),w.onConnected().then(S=>{f({reader:S[0],writer:S[1]})})})})}}else if(x_.is(l)&&l.command){let h=l,d=h.args||[],g=Object.assign({},h.options);g.env=g.env?Object.assign({},process.env,g.env):process.env,g.cwd=g.cwd||c;let f=y.expand(l.command),p=ls.default.spawn(f,d,g);return p.on("error",m=>{this.error(m.message),C_.error(m)}),!p||!p.pid?Promise.reject(`Launching server "${this.id}" using command ${h.command} failed.`):(C_.info(`Language server "${this.id}" started with ${p.pid}`),p.on("exit",m=>{m!=0&&this.error(`${h.command} exited with code: ${m}`)}),p.stderr.on("data",m=>this.outputChannel.append(Pe(m)?m:m.toString(e))),this._serverProcess=p,this._isDetached=!!g.detached,Promise.resolve({reader:new gt.StreamMessageReader(p.stdout),writer:new gt.StreamMessageWriter(p.stdin)}))}return Promise.reject(`Unsupported server configuration ${JSON.stringify(a,null,2)}`)})}_getRuntimePath(e,t){if(fh.default.isAbsolute(e))return e;let i=this._mainGetRootPath();if(i!==void 0){let r=fh.default.join(i,e);if(Lw.default.existsSync(r))return r}if(t!==void 0){let r=fh.default.join(t,e);if(Lw.default.existsSync(r))return r}return e}_mainGetRootPath(){let e=y.workspaceFolders;return!e||e.length===0?void 0:e[0].uri}registerProposedFeatures(){this.registerFeatures(KSe.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures();let{disabledFeatures:e}=this.clientOptions;e.includes("pullConfiguration")||this.registerFeature(new r_(this)),e.includes("typeDefinition")||this.registerFeature(new u_(this)),e.includes("implementation")||this.registerFeature(new a_(this)),e.includes("declaration")||this.registerFeature(new o_(this)),e.includes("colorProvider")||this.registerFeature(new n_(this)),e.includes("foldingRange")||this.registerFeature(new s_(this)),e.includes("selectionRange")||this.registerFeature(new d_(this)),e.includes("callHierarchy")||this.registerFeature(new g_(this)),e.includes("progress")||this.registerFeature(new l_(this)),e.includes("linkedEditing")||this.registerFeature(new p_(this)),e.includes("fileEvents")||(this.registerFeature(new m_(this)),this.registerFeature(new b_(this)),this.registerFeature(new y_(this)),this.registerFeature(new v_(this)),this.registerFeature(new w_(this)),this.registerFeature(new D_(this))),e.includes("semanticTokens")||this.registerFeature(new f_(this)),e.includes("workspaceFolders")||this.registerFeature(new h_(this))}_getServerWorkingDir(e){let t=e&&e.cwd;return t&&!fh.default.isAbsolute(t)&&(t=fh.default.join(y.cwd,t)),t||(t=y.cwd),t?new Promise(i=>{Lw.default.lstat(t,(r,o)=>{i(!r&&o.isDirectory()?t:void 0)})}):Promise.resolve(void 0)}appendOutput(e,t){let i=Pe(e)?e:e.toString(t);this.outputChannel.append(i.endsWith(` -`)?i:i+` -`)}},E_=class{constructor(e,t){this._client=e;this._setting=t;this._listeners=[]}start(){return y.onDidChangeConfiguration(e=>{e.affectsConfiguration(this._setting)&&this.onDidChangeConfiguration()},null,this._listeners),this.onDidChangeConfiguration(),{dispose:()=>{J(this._listeners),this._client.needsStop()&&this._client.stop()}}}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,i=e>=0?this._setting.substr(e+1):void 0,r=i?y.getConfiguration(t).get(i,!0):y.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}},KSe={createAll:n=>[]}});function zSe(n){switch(n){case 0:return"init";case 3:return"running";case 1:return"starting";case 2:return"startFailed";case 4:return"stopping";case 5:return"stopped";default:return"unknown"}}function VSe(n){let e=n.map(t=>typeof t=="string"?t:t.language);return e=e.filter(t=>typeof t=="string"),Array.from(new Set(e))}function e0e(n,e,t){let{command:i,module:r,port:o,args:s,filetypes:a}=t;if(s=s||[],!a)return k.showMessage(`Wrong configuration of LS "${e}", filetypes not found`,"error"),null;if(!i&&!r&&!o)return k.showMessage(`Wrong configuration of LS "${e}", no command or module specified.`,"error"),null;let l;if(r){if(r=y.expand(r),!H6.default.existsSync(r))return k.showMessage(`Module file "${r}" not found for LS "${e}"`,"error"),null;l={module:r,runtime:t.runtime||process.execPath,args:s,transport:i0e(t),options:n0e(t)}}else i?l={command:i,args:s,options:r0e(t)}:o&&(l=()=>new Promise((g,f)=>{let p=new q6.default.Socket,m=t.host||"127.0.0.1";Ql.info(`languageserver "${n}" connecting to ${m}:${o}`),p.connect(o,m,()=>{g({reader:p,writer:p})}),p.on("error",v=>{f(new Error(`Connection error for ${n}: ${v.message}`))})}));let u=Array.from(t.disabledFeatures||[]);for(let g of["disableWorkspaceFolders","disableCompletion","disableDiagnostics"])if(t[g]===!0){let f=g.slice(7);u.push(f[0].toLowerCase()+f.slice(1))}let c=!!t.disableSnippetCompletion;return[{ignoredRootPaths:(t.ignoredRootPaths||[]).map(g=>y.expand(g)),disableSnippetCompletion:c,disableDynamicRegister:!!t.disableDynamicRegister,disabledFeatures:u,formatterPriority:t.formatterPriority||0,documentSelector:W6(t.filetypes,t.additionalSchemes),revealOutputChannelOn:t0e(t.revealOutputChannelOn),synchronize:{configurationSection:`${n}.settings`},diagnosticCollectionName:e,outputChannelName:n,stdioEncoding:t.stdioEncoding||"utf8",progressOnInitialization:t.progressOnInitialization===!0,initializationOptions:t.initializationOptions||{}},l]}function t0e(n){switch(n){case"info":return 1;case"warn":return 2;case"error":return 3;case"never":return 4;default:return 4}}function W6(n,e){let t=[],i=["file","untitled"].concat(e||[]);return n?(n.forEach(r=>{t.push(...i.map(o=>({language:r,scheme:o})))}),t):i.map(r=>({scheme:r}))}function i0e(n){let{transport:e,transportPort:t}=n;return!e||e=="ipc"?1:e=="stdio"?0:e=="pipe"?2:{kind:3,port:t}}function n0e(n){return{cwd:n.cwd,execArgv:n.execArgv||[],env:n.env||void 0}}function r0e(n){return{cwd:n.cwd,detached:!!n.detached,shell:!!n.shell,env:n.env||void 0}}function N6(n){switch(n){case 2:return"running";case 3:return"starting";case 1:return"stopped";default:return"unknown"}}var B6,H6,q6,mh,Ql,Y6,Mi,Zf=_(()=>{"use strict";B6=require("events"),H6=x(require("fs")),q6=x(require("net")),mh=x(q());P_();Ir();V();Ee();K();Ql=H()("services");Y6=class extends B6.EventEmitter{constructor(){super(...arguments);this.registered=new Map;this.disposables=[]}init(){y.onDidOpenTextDocument(e=>{this.start(e)},null,this.disposables),y.onDidChangeConfiguration(e=>{e.affectsConfiguration("languageserver")&&this.createCustomServices()},null,this.disposables),this.createCustomServices()}dispose(){this.removeAllListeners(),J(this.disposables);for(let e of this.registered.values())e.dispose()}regist(e){let{id:t}=e;if(t||Ql.error("invalid service configuration. ",e.name),!this.registered.get(t))return this.registered.set(t,e),Ql.info(`registered service "${t}"`),this.shouldStart(e)&&e.start(),e.state==3&&this.emit("ready",t),e.onServiceReady(()=>{Ql.info(`service ${t} started`),this.emit("ready",t)},null,this.disposables),mh.Disposable.create(()=>{e.stop(),e.dispose(),this.registered.delete(t)})}getService(e){let t=this.registered.get(e);return t||(t=this.registered.get(`languageserver.${e}`)),t}shouldStart(e){if(e.state!=0)return!1;let t=e.selector;for(let i of y.documents)if(y.match(t,i.textDocument))return!0;return!1}start(e){let t=this.getServices(e);for(let i of t)i.state==0&&i.start()}getServices(e){let t=[];for(let i of this.registered.values())y.match(i.selector,e)>0&&t.push(i);return t}stop(e){let t=this.registered.get(e);if(!t){k.showMessage(`Service ${e} not found`,"error");return}return Promise.resolve(t.stop())}stopAll(){for(let e of this.registered.values())e.stop()}async toggle(e){let t=this.registered.get(e);if(!t){k.showMessage(`Service ${e} not found`,"error");return}let{state:i}=t;try{i==3?await Promise.resolve(t.stop()):i==0?await t.start():i==5&&await t.restart()}catch(r){k.showMessage(`Service error: ${r}`,"error")}}getServiceStats(){let e=[];for(let[t,i]of this.registered)e.push({id:t,languageIds:VSe(i.selector),state:zSe(i.state)});return e}createCustomServices(){let e=y.getConfiguration().get("languageserver",{});for(let t of Object.keys(e)){let i=e[t];!this.validServerConfig(t,i)||this.registLanguageClient(t,i)}}validServerConfig(e,t){let i=[];return t.module!=null&&typeof t.module!="string"&&i.push(`"module" field of languageserver ${e} should be string`),t.command!=null&&typeof t.command!="string"&&i.push(`"command" field of languageserver ${e} should be string`),t.transport!=null&&typeof t.transport!="string"&&i.push(`"transport" field of languageserver ${e} should be string`),t.transportPort!=null&&typeof t.transportPort!="number"&&i.push(`"transportPort" field of languageserver ${e} should be string`),(!Array.isArray(t.filetypes)||!t.filetypes.every(r=>typeof r=="string"))&&i.push(`"filetypes" field of languageserver ${e} should be array of string`),t.additionalSchemes&&(!Array.isArray(t.additionalSchemes)||t.additionalSchemes.some(r=>typeof r!="string"))&&i.push(`"additionalSchemes" field of languageserver ${e} should be array of string`),i.length?(k.showMessage(i.join(` -`),"error"),!1):!0}waitClient(e){let t=this.getService(e);return t&&t.state==3?Promise.resolve():t?new Promise(i=>{t.onServiceReady(()=>{i()})}):new Promise(i=>{let r=o=>{(o==e||o==`languageserver.${e}`)&&(this.off("ready",r),i())};this.on("ready",r)})}async registNotification(e,t){await this.waitClient(e);let i=this.getService(e);if(!i.client){k.showMessage(`Not a language client: ${e}`,"error");return}i.client.onNotification(t,async o=>{y.nvim.call("coc#do_notify",[e,t,o],!0)})}async sendNotification(e,t,i){if(!t)throw new Error("method required for ontification");let r=this.getService(e);if(!r||!r.client)throw new Error(`Language server ${e} not found`);if(r.state==1&&await r.client.onReady(),r.state!=3)throw new Error(`Language server ${e} not running`);await Promise.resolve(r.client.sendNotification(t,i))}async sendRequest(e,t,i,r){if(!t)throw new Error("method required for sendRequest");let o=this.getService(e);if(o||await vt(100),o=this.getService(e),!o||!o.client)throw new Error(`Language server ${e} not found`);if(o.state==1&&await o.client.onReady(),o.state!=3)throw new Error(`Language server ${e} not running`);return r||(r=new mh.CancellationTokenSource().token),await Promise.resolve(o.client.sendRequest(t,i,r))}registLanguageClient(e,t){let i=typeof e=="string"?`languageserver.${e}`:e.id,r=[],o=new mh.Emitter,s=typeof e=="string"?null:e;if(this.registered.has(i))return;let a=!1,l={id:i,client:s,name:typeof e=="string"?e:e.name,selector:typeof e=="string"?W6(t.filetypes,t.additionalSchemes):e.clientOptions.documentSelector,state:0,onServiceReady:o.event,start:()=>{if(l.state==1||l.state==3||s&&!s.needsStart())return;if(a&&s)return s.restart(),Promise.resolve();if(!a){if(typeof e=="string"&&!s){let c=y.getConfiguration().get("languageserver",{})[e];if(!c||c.enable===!1)return;let h=e0e(i,e,c);if(!h)return;s=new Wf(i,e,h[1],h[0]),l.selector=h[0].documentSelector,l.client=s}s.onDidChangeState(c=>{let{oldState:h,newState:d}=c;d==3?l.state=1:d==2?l.state=3:d==1&&(l.state=5);let g=N6(h),f=N6(d);Ql.info(`${s.name} state change: ${g} => ${f}`)},null,r),a=!0}l.state=1,Ql.debug(`starting service: ${i}`);let u=s.start();return r.push(u),new Promise(c=>{s.onReady().then(()=>{o.fire(void 0),c()},h=>{k.showMessage(`Server ${i} failed to start: ${h}`,"error"),Ql.error(`Server ${i} failed to start:`,h),l.state=2,c()})})},dispose:async()=>{o.dispose(),J(r)},stop:async()=>{!s||!s.needsStop()||await Promise.resolve(s.stop())},restart:async()=>{s?(l.state=1,s.restart()):await l.start()}};return this.regist(l)}};Mi=new Y6});var Z6,Kl,bh,Iw=_(()=>{"use strict";K();Ee();Z6=require("events"),Kl=["","","","","","","","","","","","","","","","","","","","<2-LeftMouse>","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],bh=class extends Z6.EventEmitter{constructor(){super();this.configuration=y.getConfiguration("list"),this.disposable=y.onDidChangeConfiguration(e=>{e.affectsConfiguration("list")&&(this.configuration=y.getConfiguration("list"),this.emit("change"))})}get(e,t){return this.configuration.get(e,t)}get previousKey(){return this.fixKey(this.configuration.get("previousKeymap",""))}get nextKey(){return this.fixKey(this.configuration.get("nextKeymap",""))}dispose(){this.disposable.dispose(),this.removeAllListeners()}fixKey(e){if(Kl.includes(e))return e;let t=Kl.find(i=>i.toLowerCase()==e.toLowerCase());return t||(k.showMessage(`Configured key "${e}" not supported.`,"error"),null)}}});var z$e,jw,J6=_(()=>{"use strict";Ee();Iw();z$e=H()("list-mappings"),jw=class{constructor(e,t,i){this.manager=e;this.nvim=t;this.config=i;this.insertMappings=new Map;this.normalMappings=new Map;this.userInsertMappings=new Map;this.userNormalMappings=new Map;this.actions=new Map;let{prompt:r}=e;this.addAction("do:switch",async()=>{await e.switchMatcher()}),this.addAction("do:selectall",async()=>{var o;await((o=e.session)==null?void 0:o.ui.selectAll())}),this.addAction("do:help",async()=>{var o;await((o=e.session)==null?void 0:o.showHelp())}),this.addAction("do:refresh",async()=>{var o;await((o=e.session)==null?void 0:o.reloadItems())}),this.addAction("do:exit",async()=>{await e.cancel()}),this.addAction("do:stop",()=>{e.stop()}),this.addAction("do:cancel",async()=>{await e.cancel(!1)}),this.addAction("do:toggle",async()=>{var o;await((o=e.session)==null?void 0:o.ui.toggleSelection())}),this.addAction("do:jumpback",()=>{var o;(o=e.session)==null||o.jumpBack()}),this.addAction("do:previous",async()=>{await e.normal("k")}),this.addAction("do:next",async()=>{await e.normal("j")}),this.addAction("do:defaultaction",async()=>{await e.doAction()}),this.addAction("do:chooseaction",async()=>{await e.chooseAction()}),this.addAction("do:togglemode",()=>{e.toggleMode()}),this.addAction("do:previewtoggle",async()=>{await e.togglePreview()}),this.addAction("do:previewup",()=>{this.scrollPreview("up")}),this.addAction("do:previewdown",()=>{this.scrollPreview("down")}),this.addAction("do:command",async()=>{await e.cancel(!1),await t.eval('feedkeys(":")')}),this.addAction("prompt:previous",()=>{var o;(o=e.session)==null||o.history.previous()}),this.addAction("prompt:next",()=>{var o;(o=e.session)==null||o.history.next()}),this.addAction("prompt:start",()=>{r.moveToStart()}),this.addAction("prompt:end",()=>{r.moveToEnd()}),this.addAction("prompt:left",()=>{r.moveLeft()}),this.addAction("prompt:right",()=>{r.moveRight()}),this.addAction("prompt:deleteforward",()=>{r.onBackspace()}),this.addAction("prompt:deletebackward",()=>{r.removeNext()}),this.addAction("prompt:removetail",()=>{r.removeTail()}),this.addAction("prompt:removeahead",()=>{r.removeAhead()}),this.addAction("prompt:removeword",()=>{r.removeWord()}),this.addAction("prompt:insertregister",()=>{r.insertRegister()}),this.addAction("prompt:paste",async()=>{await r.paste()}),this.addAction("eval",async o=>{await r.eval(o)}),this.addAction("command",async o=>{await e.command(o)}),this.addAction("action",async o=>{await e.doAction(o)}),this.addAction("feedkeys",async o=>{await e.feedkeys(o)}),this.addAction("normal",async o=>{await e.normal(o,!1)}),this.addAction("normal!",async o=>{await e.normal(o,!0)}),this.addAction("call",async o=>{await e.call(o)}),this.addAction("expr",async o=>{let s=await e.call(o);s&&await e.doAction(s)}),this.addKeyMapping("insert","","do:switch"),this.addKeyMapping("insert","","prompt:next"),this.addKeyMapping("insert","","prompt:previous"),this.addKeyMapping("insert","","prompt:paste"),this.addKeyMapping("insert",["",""],"do:defaultaction"),this.addKeyMapping("insert",["",""," "],"do:chooseaction"),this.addKeyMapping("insert","","do:togglemode"),this.addKeyMapping("insert","","do:stop"),this.addKeyMapping("insert","","do:refresh"),this.addKeyMapping("insert","","prompt:left"),this.addKeyMapping("insert","","prompt:right"),this.addKeyMapping("insert",["",""],"prompt:end"),this.addKeyMapping("insert",["",""],"prompt:start"),this.addKeyMapping("insert",["","",""],"prompt:deleteforward"),this.addKeyMapping("insert","","prompt:removeword"),this.addKeyMapping("insert","","prompt:removeahead"),this.addKeyMapping("insert","","prompt:insertregister"),this.addKeyMapping("normal","t","action:tabe"),this.addKeyMapping("normal","s","action:split"),this.addKeyMapping("normal","d","action:drop"),this.addKeyMapping("normal",["","","\r"],"do:defaultaction"),this.addKeyMapping("normal","","do:selectall"),this.addKeyMapping("normal"," ","do:toggle"),this.addKeyMapping("normal","p","do:previewtoggle"),this.addKeyMapping("normal",[""," ",""],"do:chooseaction"),this.addKeyMapping("normal","","do:stop"),this.addKeyMapping("normal","","do:refresh"),this.addKeyMapping("normal","","do:jumpback"),this.addKeyMapping("normal","","do:previewdown"),this.addKeyMapping("normal","","do:previewup"),this.addKeyMapping("normal",["i","I","o","O","a","A"],"do:togglemode"),this.addKeyMapping("normal","?","do:help"),this.addKeyMapping("normal",":","do:command"),this.createMappings(),i.on("change",()=>{this.createMappings()})}createMappings(){let e=this.config.get("insertMappings",{});this.userInsertMappings=this.fixUserMappings(e,"list.insertMappings");let t=this.config.get("normalMappings",{});this.userNormalMappings=this.fixUserMappings(t,"list.normalMappings")}hasUserMapping(e,t){return(e=="insert"?this.userInsertMappings:this.userNormalMappings).has(t)}isValidAction(e){if(this.actions.has(e))return!0;let[t,i]=e.split(":",2);return!(!i||!this.actions.has(t))}fixUserMappings(e,t){let i=new Map;for(let[r,o]of Object.entries(e)){if(!this.isValidAction(o)){k.showMessage(`Invalid configuration - unable to support action "${o}" in "${t}"`,"warning");continue}if(r.length==1)i.set(r,o);else if(r.startsWith("<")&&r.endsWith(">"))if(r.toLowerCase()=="")i.set(" ",o);else if(r.toLowerCase()=="")i.set("",o);else if(Kl.includes(r))i.set(r,o);else{let s=!1;for(let a=0;athis.doAction(e);let[t,i]=e.split(":",2);if(!i||!this.actions.has(t))throw new Error(`Invalid action ${e}`);return()=>this.doAction(t,i)}async doAction(e,t){let i=this.actions.get(e);if(!i)throw new Error(`Action ${e} doesn't exist`);await Promise.resolve(i(t))}scrollPreview(e){let{nvim:t}=this;t.pauseNotification(),t.call("coc#list#scroll_preview",[e],!0),t.command("redraw",!0),t.resumeNotification(!1,!0)}}});var $6,tXe,Aw,X6=_(()=>{"use strict";$6=x(q()),tXe=H()("list-prompt"),Aw=class{constructor(e,t){this.nvim=e;this.config=t;this.cusorIndex=0;this._input="";this._mode="insert";this.interactive=!1;this.requestInput=!1;this._onDidChangeInput=new $6.Emitter;this.onDidChangeInput=this._onDidChangeInput.event}get input(){return this._input}set input(e){this._input!=e&&(this.cusorIndex=e.length,this._input=e,this.drawPrompt(),this._onDidChangeInput.fire(this._input))}get mode(){return this._mode}set mode(e){e!=this._mode&&(this._mode=e,this.drawPrompt())}set matcher(e){this._matcher=e,this.drawPrompt()}start(e){e&&(this.interactive=e.interactive,this.cusorIndex=e.input.length,this._input=e.input,this._mode=e.mode,this._matcher=e.interactive?"":e.matcher),this.nvim.call("coc#prompt#start_prompt",["list"],!0),this.drawPrompt()}cancel(){let{nvim:e}=this;e.call("coc#prompt#stop_prompt",["list"],!0)}reset(){this._input="",this.cusorIndex=0}drawPrompt(){let e=this.config.get("indicator",">"),{cusorIndex:t,interactive:i,input:r,_matcher:o}=this,s=['echo ""'];if(this.mode=="insert")if(i?s.push("echohl MoreMsg | echon 'INTERACTIVE ' | echohl None"):o&&s.push(`echohl MoreMsg | echon '${o.toUpperCase()} ' | echohl None`),s.push(`echohl Special | echon '${e} ' | echohl None`),t==r.length)s.push(`echon '${r.replace(/'/g,"''")}'`),s.push("echohl Cursor | echon ' ' | echohl None");else{let l=r.slice(0,t);l&&s.push(`echon '${l.replace(/'/g,"''")}'`),s.push(`echohl Cursor | echon '${r[t].replace(/'/,"''")}' | echohl None`);let u=r.slice(t+1);s.push(`echon '${u.replace(/'/g,"''")}'`)}else s.push('echohl MoreMsg | echo "" | echohl None');s.push("redraw");let a=s.join("|");this.nvim.command(a,!0)}moveLeft(){this.cusorIndex!=0&&(this.cusorIndex=this.cusorIndex-1,this.drawPrompt())}moveRight(){this.cusorIndex!=this._input.length&&(this.cusorIndex=this.cusorIndex+1,this.drawPrompt())}moveToEnd(){this.cusorIndex!=this._input.length&&(this.cusorIndex=this._input.length,this.drawPrompt())}moveToStart(){this.cusorIndex!=0&&(this.cusorIndex=0,this.drawPrompt())}onBackspace(){let{cusorIndex:e,input:t}=this;if(e==0)return;let i=t.slice(0,e),r=t.slice(e);this.cusorIndex=e-1,this._input=`${i.slice(0,i.length-1)}${r}`,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}removeNext(){let{cusorIndex:e,input:t}=this;if(e==t.length-1)return;let i=t.slice(0,e),r=t.slice(e+1);this._input=`${i}${r}`,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}removeWord(){let{cusorIndex:e,input:t}=this;if(e==0)return;let i=t.slice(0,e),r=t.slice(e),o=i.replace(/[\w$]+([^\w$]+)?$/,"");this.cusorIndex=e-(i.length-o.length),this._input=`${o}${r}`,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}removeTail(){let{cusorIndex:e,input:t}=this;if(e==t.length)return;let i=t.slice(0,e);this._input=i,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}removeAhead(){let{cusorIndex:e,input:t}=this;if(e==0)return;let i=t.slice(e);this.cusorIndex=0,this._input=i,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}async acceptCharacter(e){if(this.requestInput){if(this.requestInput=!1,/^[0-9a-z"%#*+/:\-.]$/.test(e)){let t=await this.nvim.call("getreg",e);t=t.replace(/\n/g," "),this.addText(t)}}else this.addText(e)}insertRegister(){this.requestInput=!0}async paste(){let e=await this.nvim.eval("@*");e=e.replace(/\n/g,""),e&&this.addText(e)}async eval(e){let t=await this.nvim.call("eval",[e]);t=t.replace(/\n/g,""),this.addText(t)}addText(e){let{cusorIndex:t,input:i}=this;this.cusorIndex=t+e.length;let r=i.slice(0,t),o=i.slice(t);this._input=`${r}${e}${o}`,this.drawPrompt(),this._onDidChangeInput.fire(this._input)}}});function Cn(n){let e=[];for(let t=0,i=n.length;t=97&&n<=122||n>=65&&n<=90}function Ow(n,e,t=!1){return!!(n==e||n>=97&&n<=122&&e+32===n||t&&n<=90&&n+32===e)}function Jf(n,e){let t=n.charCodeAt(0),i=e.charCodeAt(0);return t===i||t>=97&&t<=122&&i+32===t}function yo(n,e){let t=n.length;if(n.length>e.length)return!1;let i=0;for(let r=0;r=97&&s<=122&&o+32===s){i=i+1;continue}}return i===t}var us=_(()=>{"use strict"});var sXe,Mw,G6=_(()=>{"use strict";us();K();sXe=H()("list-history"),Mw=class{constructor(e,t){this.prompt=e;this.name=t;this.index=-1;this.loaded=[];this.current=[];this.db=y.createDatabase(`list-${t}-history`),this.key=Buffer.from(y.cwd).toString("base64")}filter(){let{input:e}=this.prompt;if(e==this.curr)return;this.historyInput="";let t=Cn(e);this.current=this.loaded.filter(i=>yo(t,i)),this.index=-1}get curr(){return this.index==-1?null:this.current[this.index]}load(e){let{db:t}=this;e=e||"";let i=t.fetch(this.key);!i||!Array.isArray(i)?this.loaded=[]:this.loaded=i,this.index=-1,this.current=this.loaded.filter(r=>r.startsWith(e))}add(){let{loaded:e,db:t,prompt:i}=this,{input:r}=i;if(!r||r.length<2||r==this.historyInput)return;let o=e.indexOf(r);o!=-1&&e.splice(o,1),e.push(r),e.length>200&&(e=e.slice(-200)),t.push(this.key,e)}previous(){let{current:e,index:t}=this;!e||!e.length||(t<=0?this.index=e.length-1:this.index=t-1,this.historyInput=this.prompt.input=e[this.index]||"")}next(){let{current:e,index:t}=this;!e||!e.length||(t==e.length-1?this.index=0:this.index=t+1,this.historyInput=this.prompt.input=e[this.index]||"")}}});var Q6,yh,fXe,Nw,K6=_(()=>{"use strict";Q6=x(Ei()),yh=x(q());ge();V();no();K();fXe=H()("list-ui"),Nw=class{constructor(e,t,i,r){this.nvim=e;this.name=t;this.listOptions=i;this.config=r;this.newTab=!1;this.reversed=!1;this.currIndex=0;this.items=[];this.disposables=[];this.selected=new Set;this.mutex=new ei;this._onDidChangeLine=new yh.Emitter;this._onDidOpen=new yh.Emitter;this._onDidClose=new yh.Emitter;this._onDidLineChange=new yh.Emitter;this._onDoubleClick=new yh.Emitter;this.onDidChangeLine=this._onDidChangeLine.event;this.onDidLineChange=this._onDidLineChange.event;this.onDidOpen=this._onDidOpen.event;this.onDidClose=this._onDidClose.event;this.onDidDoubleClick=this._onDoubleClick.event;this.signOffset=r.get("signOffset"),this.newTab=i.position=="tab",this.reversed=i.reverse===!0,P.on("BufWinLeave",async s=>{s!=this.bufnr||this.window==null||(this.window=null,this._onDidClose.fire(s))},null,this.disposables),P.on("CursorMoved",async(s,a)=>{if(s!=this.bufnr)return;let l=this.lnumToIndex(a[0]);this.onLineChange(l)},null,this.disposables);let o=(0,Q6.default)(async s=>{if(s!=this.bufnr)return;let[a,l,u]=await e.eval('[win_getid(),line("w0"),line("w$")]');if(u<300||a!=this.winid)return;let c=u-l+1,h=this.lnumToIndex(l),d=this.lnumToIndex(l+c*2);e.pauseNotification(),this.doHighlight(h,d),e.command("redraw",!0),e.resumeNotification(!1,!0)},global.hasOwnProperty("__TEST__")?20:100);this.disposables.push({dispose:()=>{o.clear()}}),P.on("CursorMoved",o,null,this.disposables)}lnumToIndex(e){let{reversed:t,length:i}=this;return t?Math.max(0,i-e):e-1}indexToLnum(e){let{reversed:t,length:i}=this;return t?Math.max(Math.min(i,i-e),1):Math.min(e+1,i)}get bufnr(){var e;return(e=this.buffer)==null?void 0:e.id}get winid(){var e;return(e=this.window)==null?void 0:e.id}get limitLines(){return this.config.get("limitLines",1/0)}onLineChange(e){this.currIndex!=e&&(this.currIndex=e,this._onDidChangeLine.fire(e))}set index(e){if(e<0||e>=this.items.length)return;let{nvim:t}=this,i=this.indexToLnum(e);t.pauseNotification(),this.setCursor(i),t.command("redraw",!0),t.resumeNotification(!1,!0)}get index(){return this.currIndex}getItem(e){return this.items[e]}get item(){let{window:e}=this;return e?e.cursor.then(t=>(this.currIndex=this.lnumToIndex(t[0]),this.items[this.currIndex])):Promise.resolve(null)}async echoMessage(e){let{items:t}=this,r=`[${t.indexOf(e)+1}/${t.length}] ${e.label||""}`;this.nvim.callTimer("coc#ui#echo_lines",[[r]],!0)}updateItem(e,t,i){if(!this.buffer||t>=this.length)return;let r=this.items[t];if(Object.assign(r,e,{resolved:!0}),!i)return;let{nvim:o}=this,s=this.indexToLnum(t);o.pauseNotification(),this.buffer.setOption("modifiable",!0,!0),o.call("setbufline",[this.bufnr,s,r.label],!0),this.doHighlight(t,t+1),this.buffer.setOption("modifiable",!1,!0),o.resumeNotification(!0,!0)}async getItems(){if(this.length==0||!this.window)return[];let e=await this.nvim.call("mode");if(e=="v"||e=="V"){let[r,o]=await this.getSelectedRange(),s=[];for(let a=r;a<=o;a++){let l=this.lnumToIndex(a),u=this.items[l];u&&s.push(u)}return s}let{selectedItems:t}=this;if(t.length)return t;let i=await this.item;return i==null?[]:[i]}async onMouse(e){let{nvim:t,window:i}=this;if(!i)return;let[r,o,s]=await t.eval("[v:mouse_winid,v:mouse_lnum,v:mouse_col]");if(e=="mouseDown"){this.mouseDown={winid:r,lnum:o,col:s,current:r==i.id};return}let a=r==i.id;if(a&&e=="doubleClick"&&(this.setCursor(o),this._onDoubleClick.fire()),a&&e=="mouseDrag"){if(!this.mouseDown)return;await this.selectLines(this.mouseDown.lnum,o)}else if(a&&e=="mouseUp"){if(!this.mouseDown)return;this.mouseDown.lnum==o?(this.setCursor(o),t.command("redraw",!0)):await this.selectLines(this.mouseDown.lnum,o)}else!a&&e=="mouseUp"&&(t.pauseNotification(),t.call("win_gotoid",r,!0),t.call("cursor",[o,s],!0),t.command("redraw",!0),t.resumeNotification(!1,!0))}async resume(){var r;let{items:e,selected:t,nvim:i}=this;if(await this.drawItems(e,this.height,!0),!(!t.size||!this.buffer)){i.pauseNotification();for(let o of t)(r=this.buffer)==null||r.placeSign({lnum:o,id:this.signOffset+o,name:"CocSelected",group:"coc-list"});i.command("redraw",!0),i.resumeNotification(!1,!0)}}async toggleSelection(){let{nvim:e,reversed:t}=this;await e.call("win_gotoid",[this.winid]);let i=await e.call("line","."),r=await e.call("mode");if(r=="v"||r=="V"){let[o,s]=await this.getSelectedRange();o>s&&([o,s]=[s,o]);for(let l=o;l<=s;l++)this.toggleLine(l);this.setCursor(s),e.command("redraw",!0),await e.resumeNotification();return}e.pauseNotification(),this.toggleLine(i),this.setCursor(t?i-1:i+1),e.command("redraw",!0),await e.resumeNotification()}toggleLine(e){let{selected:t,buffer:i,signOffset:r}=this;t.has(e)?(t.delete(e),i.unplaceSign({id:r+e,group:"coc-list"})):(t.add(e),i.placeSign({lnum:e,id:r+e,name:"CocSelected",group:"coc-list"}))}async selectLines(e,t){let{nvim:i,signOffset:r,buffer:o,length:s}=this;this.clearSelection();let{selected:a}=this;i.pauseNotification(),e>t&&([e,t]=[t,e]);for(let u=e;u<=t&&!(u>s);u++)a.add(u),o.placeSign({lnum:u,id:r+u,name:"CocSelected",group:"coc-list"});this.setCursor(t),i.command("redraw",!0),await i.resumeNotification()}async selectAll(){let{length:e}=this;e>0&&await this.selectLines(1,e)}clearSelection(){let{selected:e,buffer:t}=this;e.size>0&&(t==null||t.unplaceSign({group:"coc-list"}),this.selected.clear())}get ready(){return this.window?Promise.resolve():new Promise(e=>{let t=this.onDidLineChange(()=>{t.dispose(),e()})})}async drawItems(e,t,i=!1){let{nvim:r,name:o,listOptions:s}=this;await this.mutex.use(async()=>{if(this.items=e.length>this.limitLines?e.slice(0,this.limitLines):e,!this.window){let{position:c,numberSelect:h}=s,[d,g,f]=await r.call("coc#list#create",[c,t,o,h]);this.tabnr=f,this.height=t,this.buffer=r.createBuffer(d);let p=this.window=r.createWindow(g),m=this.config.get("statusLineSegments");m&&p.setOption("statusline",m.join(" "),!0),this._onDidOpen.fire(this.bufnr)}let a=[],l=0;this.items.forEach((c,h)=>{a.push(c.label),!i&&l==0&&c.preselect&&(l=h)});let u=i?this.currIndex:l;this.setLines(a,0,u),this._onDidLineChange.fire()})}async appendItems(e){!this.window||e.length===0||await this.mutex.use(async()=>{let t=this.items.length,i=this.limitLines-t;if(i>0){let r=io.label),r.length,this.currIndex)}})}setLines(e,t,i){let{nvim:r,buffer:o,window:s,reversed:a,newTab:l}=this;if(!(!o||!s)){if(r.pauseNotification(),t||(r.call("coc#compat#clear_matches",[s.id],!0),e.length||(e=["No results, press ? on normal mode to get help."],r.call("coc#compat#matchaddpos",["Comment",[[1]],99,s.id],!0))),o.setOption("modifiable",!0,!0),a){let u=e.reverse();t?r.call("coc#compat#prepend_lines",[o.id,u],!0):o.setLines(u,{start:0,end:-1,strictIndexing:!1},!0)}else o.setLines(e,{start:t?-1:0,end:-1,strictIndexing:!1},!0);if(o.setOption("modifiable",!1,!0),a&&!l){let u=this.config.get("height",10);r.call("coc#window#set_height",[s.id,Math.max(Math.min(u,this.length),1)],!0)}if(i>this.items.length-1&&(i=0),i==0)if(t==0)this.doHighlight(0,299);else{let u=this.length-t-1;u<300&&this.doHighlight(u,Math.min(299,this.length-1))}else{let u=l?y.env.lines:this.height;this.doHighlight(Math.max(0,i-u),Math.min(i+u+1,this.length-1))}if(!t){this.currIndex=i;let u=this.indexToLnum(i);s.setCursor([u,0],!0),r.call("coc#list#select",[o.id,u],!0)}a&&r.command("normal! zb",!0),r.command("redraws",!0),r.resumeNotification(!0,!0)}}restoreWindow(){if(this.newTab)return;let{winid:e,height:t}=this;e&&t&&this.nvim.call("coc#window#set_height",[e,t],!0)}get length(){return this.items.length}get selectedItems(){let{selected:e,items:t}=this,i=[];for(let r of e){let o=this.lnumToIndex(r);t[r-1]&&i.push(t[o])}return i}doHighlight(e,t){let{items:i,reversed:r,length:o,buffer:s}=this;if(!s)return;let a=[],l=u=>{let c=this.indexToLnum(u)-1,{ansiHighlights:h,highlights:d}=i[u];if(h)for(let g of h){let{span:f,hlGroup:p}=g;a.push({hlGroup:p,lnum:c,colStart:f[0],colEnd:f[1]})}if(d&&Array.isArray(d.spans)){let{spans:g,hlGroup:f}=d;for(let p of g)f=f!=null?f:"CocListSearch",a.push({hlGroup:f,lnum:c,colStart:p[0],colEnd:p[1]})}};if(r)for(let u=Math.min(t,o-1);u>=e;u--)l(u);else for(let u=e;u<=Math.min(t,o-1);u++)l(u);e=this.indexToLnum(e)-1,t=this.indexToLnum(t)-1,e>t&&([e,t]=[t,e]),a.length!=0&&s.updateHighlights("list",a,{start:e,end:t+1,priority:99})}setCursor(e,t=0){var s;let{items:i}=this,r=i.length==0?1:i.length;if(e>r)return;let o=this.lnumToIndex(e);this.onLineChange(o),(s=this.window)==null||s.setCursor([e,t],!0),this.nvim.call("coc#list#select",[this.bufnr,e],!0)}moveUp(){let{index:e,reversed:t}=this;this.index=t?e+1:e-1}moveDown(){let{index:e,reversed:t}=this;this.index=t?e-1:e+1}async getSelectedRange(){let{nvim:e}=this;await e.call("coc#prompt#stop_prompt",["list"]),await e.eval('feedkeys("\\", "in")');let[,t]=await e.call("getpos","'<"),[,i]=await e.call("getpos","'>");return this.nvim.call("coc#prompt#start_prompt",["list"],!0),[t,i]}reset(){this.window&&(this.window=null,this.buffer=null,this.tabnr=void 0)}dispose(){J(this.disposables),this.nvim.call("coc#window#close",[this.winid||-1],!0),this.window=null,this.buffer=null,this.items=[],this._onDidChangeLine.dispose(),this._onDidOpen.dispose(),this._onDidClose.dispose(),this._onDidLineChange.dispose(),this._onDoubleClick.dispose()}}});async function Bw(n,e,t,i){if(n.length===0)return;let r=new V6,o=n.length;function s(l){let u=[];r.start();for(let c=l;c{setImmediate(()=>{l(s(a))})})}var z6,V6,e4=_(()=>{z6=15,V6=class{constructor(e=z6){this.yieldAfter=Math.max(e,z6),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){let e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=this.total*2;break}}return!1}}});function g0e(n){return n.toLowerCase()===n}function f0e(n){return n.toUpperCase()===n}function p0e(n){let e=n.length,t=new Array(e),i="/";for(let r=0;r1024)return vh;let r=new Array(t),o=new Array(t);return i4(n,e,r,o),o[t-1][i-1]}function n4(n){let e=[];for(let t=0;t1024)return r;let o=new Array(t),s=new Array(t);i4(n,e,o,s);let a=!1;for(let l=t-1,u=i-1;l>=0;l--)for(;u>=0;u--)if(o[l][u]!==vh&&(a||o[l][u]===s[l][u])){a=l&&u&&s[l][u]===o[l-1][u-1]+t4,r[l]=u--;break}return r}function Dh(n,e){n=n.toLowerCase(),e=e.toLowerCase();let t=n.length;for(let i=0,r=0;i{"use strict";vh=-1/0,o0e=1/0,s0e=-.005,a0e=-.005,l0e=-.01,t4=1,u0e=.9,c0e=.8,h0e=.7,d0e=.6});function r4(n,e,t=""){if(!n)return{score:0};if(!e)return{score:1};let i=[],r=Cn(e),o=t?n.indexOf(t):-1,s=o!=-1&&yo(r,t),a=0,l=e[0],u=0,c=n[0];if(s){if(t.startsWith(l))a=a+2,u=o+1,i.push(o);else if(t[0].toLowerCase()==l)a=a+1.5,u=o+1,i.push(o);else for(let h=1;he.score&&(e=n[t]);return e}var __,s4=_(()=>{"use strict";__=require("path");us()});function Hw(n){return n.filterText!=null?FY(n.filterText,n.label):n.label}function y0e(n){let e=[],t=0,i=0,r="";for(;io.replace(/\\\s/g," ").trim()).filter(o=>o.length>0)}function l4(n,e){let t=[];if(e&&e.length){let i=e.shift(),r=e.shift(),o=i;for(;r;){if(r==o+1){o=r,r=e.shift();continue}t.push([Ae(n,i),Ae(n,o)+1]),i=r,o=i,r=e.shift()}t.push([Ae(n,i),Ae(n,o)+1])}return{spans:t}}function R_(n,e){let t=Hw(e),i=r4(t,n);return i!=null&&i.score?l4(t,i.matches):{spans:[]}}var Ra,a4,b0e,qw,u4=_(()=>{"use strict";Ra=x(q());fc();e4();UT();$f();no();s4();_e();a4=H()("list-worker"),b0e="\x1B",qw=class{constructor(e,t,i,r,o){this.nvim=e;this.list=t;this.prompt=i;this.listOptions=r;this.config=o;this._loading=!1;this._finished=!1;this.mutex=new ei;this.totalItems=[];this._onDidChangeItems=new Ra.Emitter;this._onDidChangeLoading=new Ra.Emitter;this.onDidChangeItems=this._onDidChangeItems.event;this.onDidChangeLoading=this._onDidChangeLoading.event}set loading(e){this._loading!=e&&(this._loading=e,this._onDidChangeLoading.fire(e))}get isLoading(){return this._loading}async loadItems(e,t=!1){this.cancelFilter(),this.filteredCount=0,this._finished=!1;let{list:i,listOptions:r}=this;this.loading=!0;let{interactive:o}=r;this.tokenSource=new Ra.CancellationTokenSource;let s=this.tokenSource.token,a=await i.loadItems(e,s);if(!s.isCancellationRequested)if(a=a!=null?a:[],Array.isArray(a)){this.tokenSource=null,this.totalItems=a,this.loading=!1,this._finished=!0;let l;if(o)l=this.convertToHighlightItems(a),this._onDidChangeItems.fire({items:l,reload:t,finished:!0});else{let u=this.filterTokenSource=new Ra.CancellationTokenSource;await this.mutex.use(async()=>{let c=u.token;c.isCancellationRequested||await this.filterItems(a,{reload:t},c)})}}else{let l=a,u=this.totalItems=[],c=0,h=e.input,d=!1;this.filterTokenSource=new Ra.CancellationTokenSource;let g=async w=>{d=!0,await this.mutex.use(async()=>{var j;if(this.input!=h&&(h=this.input,c=(j=this.filteredCount)!=null?j:0),c>=u.length)return;let S=c>0,L=u.slice(c);if(c=u.length,o){let I=this.convertToHighlightItems(L);this._onDidChangeItems.fire({items:I,append:S,reload:t,finished:w})}else{let I=this.filterTokenSource;I&&!I.token.isCancellationRequested&&await this.filterItems(L,{append:S,reload:t},I.token)}}),d=!1},f=Promise.resolve(),p=setInterval(()=>{d||(f=g())},50);l.on("data",w=>{s.isCancellationRequested||u.push(w)});let m=()=>{l!=null&&(this.tokenSource=null,l=null,this.loading=!1,this._finished=!0,v.dispose(),clearInterval(p),f.then(()=>{if(!s.isCancellationRequested){if(u.length==0){this._onDidChangeItems.fire({items:[],append:!1,reload:t,finished:!0});return}return g(!0)}}).catch(w=>{a4.error("Error on filter",w)}))},v=s.onCancellationRequested(()=>{l==null||l.dispose(),m()});l.on("error",async w=>{l!=null&&(l=null,this.tokenSource=null,this.loading=!1,v.dispose(),clearInterval(p),this.nvim.call("coc#prompt#stop_prompt",["list"],!0),this.nvim.echoError(`Task error: ${w.toString()}`),a4.error("Task error:",w))}),l.on("end",m)}}async drawItems(){let{totalItems:e}=this;if(e.length===0)return;this.cancelFilter();let t=this.filterTokenSource=new Ra.CancellationTokenSource,i=t.token;await this.mutex.use(async()=>{if(i.isCancellationRequested)return;let{totalItems:r}=this;this.filteredCount=r.length,await this.filterItems(r,{},t.token)})}cancelFilter(){this.filterTokenSource&&(this.filterTokenSource.cancel(),this.filterTokenSource=null)}stop(){this.cancelFilter(),this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=null),this.loading=!1}get length(){return this.totalItems.length}get input(){return this.prompt.input}convertToHighlightItems(e){var r;let t=(r=this.input)!=null?r:"";return e.map(o=>{this.convertItemLabel(o);let s=t.length>0?R_(t,o):void 0;return Object.assign({},o,{highlights:s})})}async filterItemsByInclude(e,t,i,r){let{ignorecase:o}=this.listOptions;o&&(e=e.map(s=>s.toLowerCase())),await Bw(t,s=>{this.convertItemLabel(s);let a=[],l=Hw(s),u=!0;for(let c of e){let h=o?l.toLowerCase().indexOf(c):l.indexOf(c);if(h==-1){u=!1;break}a.push([Ae(l,h),Ae(l,h+G(c))])}return u?{highlights:{spans:a}}:!1},r,i)}async filterItemsByRegex(e,t,i,r){let{ignorecase:o}=this.listOptions,s=o?"iu":"u",a=e.reduce((l,u)=>{try{l.push(new RegExp(u,s))}catch{}return l},[]);await Bw(t,l=>{this.convertItemLabel(l);let u=[],c=Hw(l),h=!0;for(let d of a){let g=c.match(d);if(g==null){h=!1;break}u.push([Ae(c,g.index),Ae(c,g.index+G(g[0]))])}return h?{highlights:{spans:u}}:!1},r,i)}async filterItemsByFuzzyMatch(e,t,i,r){let{sort:o}=this.listOptions,s=0;await Bw(t,a=>{this.convertItemLabel(a);let l=a.filterText||a.label,u=0,c=[],h=Hw(a),d=!0;for(let g of e){if(!Dh(g,l)){d=!1;break}c.push(...zl(g,h)),o&&(u+=wh(g,l))}return s=s+1,d?{sortText:typeof a.sortText=="string"?a.sortText:String.fromCharCode(s),score:u,highlights:l4(h,c)}:!1},(a,l)=>{r(a,l,o)},i)}async filterItems(e,t,i){let{input:r}=this;if(r.length===0){let l=e.map(u=>this.convertItemLabel(u));this._onDidChangeItems.fire(de({items:l,finished:this._finished},t));return}let o=this.config.extendedSearchMode?y0e(r):[r],s=!1,a=(l,u,c)=>{if(u=u&&this._finished,i.isCancellationRequested||!u&&l.length==0)return;c&&l.sort((d,g)=>d.score!=g.score?g.score-d.score:d.sortText>g.sortText?1:-1);let h=t.append===!0||s;s=!0,this._onDidChangeItems.fire({items:l,append:h,reload:t.reload,finished:u})};switch(this.listOptions.matcher){case"strict":await this.filterItemsByInclude(o,e,i,a);break;case"regex":await this.filterItemsByRegex(o,e,i,a);break;default:await this.filterItemsByFuzzyMatch(o,e,i,a)}}convertItemLabel(e){let{label:t,converted:i}=e;if(i)return e;if(t.includes(` -`)&&(t=e.label=t.replace(/\r?\n/g," ")),t.includes(b0e)){let{line:r,highlights:o}=gc(t);e.label=r,Array.isArray(e.ansiHighlights)||(e.ansiHighlights=o)}return e.converted=!0,e}dispose(){this.stop()}}});var L_,c4,v0e,NXe,Yw,h4=_(()=>{"use strict";L_=x(Ei()),c4=x(q());vo();ra();V();Ee();K();G6();K6();u4();v0e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],NXe=H()("list-session"),Yw=class{constructor(e,t,i,r,o=[],s){this.nvim=e;this.prompt=t;this.list=i;this.listOptions=r;this.listArgs=o;this.config=s;this.loadingFrame="";this.hidden=!1;this.disposables=[];this.args=[];this.ui=new Nw(e,i.name,r,s),this.history=new Mw(t,i.name),this.worker=new qw(e,i,t,r,{interactiveDebounceTime:s.get("interactiveDebounceTime",100),extendedSearchMode:s.get("extendedSearchMode",!0)}),this.interactiveDebounceTime=s.get("interactiveDebounceTime",100);let a=(0,L_.default)(async()=>{let[d,g,f]=await e.eval('[coc#list#has_preview(),win_getid(),line(".")]');if(d&&g==this.winid){let p=this.ui.lnumToIndex(f);await this.doPreview(p)}},50);this.disposables.push({dispose:()=>{a.clear()}}),this.ui.onDidChangeLine(a,null,this.disposables),this.ui.onDidChangeLine(this.resolveItem,this,this.disposables),this.ui.onDidLineChange(this.resolveItem,this,this.disposables);let l=(0,L_.default)(async()=>{this.updateStatus();let{autoPreview:d}=this.listOptions;if(!d){let[g,f]=await e.eval("[coc#list#has_preview(),mode()]");if(!g||f!="n")return}await this.doAction("preview")},50);this.disposables.push({dispose:()=>{l.clear()}}),this.ui.onDidLineChange(l,null,this.disposables),this.ui.onDidOpen(async()=>{typeof this.list.doHighlight=="function"&&this.list.doHighlight(),y.isVim&&this.prompt.drawPrompt(),this.listOptions.first&&await this.doAction()},null,this.disposables),this.ui.onDidClose(async()=>{await this.hide()},null,this.disposables),this.ui.onDidDoubleClick(async()=>{await this.doAction()},null,this.disposables),this.worker.onDidChangeItems(async({items:d,reload:g,append:f,finished:p})=>{if(!this.hidden)if(f)await this.ui.appendItems(d);else{let m=this.config.get("height",10);p&&!r.interactive&&r.input.length==0&&(m=Math.min(d.length,m)),await this.ui.drawItems(d,Math.max(1,m),g)}},null,this.disposables);let u=0,c,h;this.disposables.push(c4.Disposable.create(()=>{c&&clearTimeout(c),h&&clearInterval(h)})),this.worker.onDidChangeLoading(d=>{this.hidden||(c&&clearTimeout(c),d?(u=Date.now(),h=setInterval(()=>{let g=Math.floor((Date.now()-u)%1e3/100);this.loadingFrame=v0e[g],this.updateStatus()},100)):c=setTimeout(()=>{this.loadingFrame="",h&&clearInterval(h),h=null,this.updateStatus()},Math.max(0,200-(Date.now()-u))))},null,this.disposables)}async start(e){this.args=e,this.cwd=y.cwd,this.hidden=!1;let{listOptions:t,listArgs:i}=this,r=await this.nvim.eval('[win_getid(),bufnr("%"),winheight("%")]');this.listArgs=i,this.history.load(t.input||""),this.window=this.nvim.createWindow(r[0]),this.buffer=this.nvim.createBuffer(r[1]),this.savedHeight=r[2],await this.worker.loadItems(this.context)}async reloadItems(){!this.ui.winid||await this.worker.loadItems(this.context,!0)}async call(e){var o,s;await this.nvim.call("coc#prompt#stop_prompt",["list"]);let t=await this.ui.getItems(),i={name:this.name,args:this.listArgs,input:this.prompt.input,winid:(o=this.window)==null?void 0:o.id,bufnr:(s=this.buffer)==null?void 0:s.id,targets:t},r=await this.nvim.call(e,[i]);return this.prompt.start(),r}async chooseAction(){let{nvim:e,defaultAction:t}=this,{actions:i}=this.list,r=i.map(h=>h.name),o=r.indexOf(t.name);o!=-1&&(r.splice(o,1),r.unshift(t.name));let s=new Set,a=[],l=[],u=y.env.dialog&&this.config.get("menuAction",!1);for(let h of r){let d=0;for(let g of h){if(!s.has(g)){s.add(g),a.push(`${h.slice(0,d)}&${h.slice(d)}`);break}d++}d==h.length&&l.push(h)}l.length&&!u&&(r=r.filter(h=>!l.includes(h)));let c;u?(e.call("coc#prompt#stop_prompt",["list"],!0),c=await k.showMenuPicker(r,{title:"Choose action",shortcuts:!0}),c=c+1,y.isVim&&await vt(10),this.prompt.start()):(await e.call("coc#prompt#stop_prompt",["list"]),c=await e.call("confirm",["Choose action:",a.join(` -`)]),await vt(10),this.prompt.start()),c&&await this.doAction(r[c-1])}async doAction(e){let{list:t}=this,i;if(e!=null){if(i=t.actions.find(o=>o.name==e),!i){k.showErrorMessage(`Action ${e} not found`);return}}else i=this.defaultAction;let r;if(e=="preview"){let o=await this.ui.item;r=o?[o]:[]}else r=await this.ui.getItems();r.length&&await this.doItemAction(r,i)}async doPreview(e){let t=this.ui.getItem(e),i=this.list.actions.find(r=>r.name=="preview");!t||!i||await this.doItemAction([t],i)}async first(){await this.doDefaultAction(0)}async last(){await this.doDefaultAction(this.ui.length-1)}async previous(){await this.doDefaultAction(this.ui.index-1)}async next(){await this.doDefaultAction(this.ui.index+1)}async doDefaultAction(e){let{ui:t}=this,i=t.getItem(e);!i||(t.index=e,await this.doItemAction([i],this.defaultAction),await t.echoMessage(i))}get name(){return this.list.name}get winid(){return this.ui.winid}get length(){return this.ui.length}get defaultAction(){let{defaultAction:e,actions:t,name:i}=this.list,r=y.getConfiguration(`list.source.${i}`),o;if(r.defaultAction&&(o=t.find(s=>s.name==r.defaultAction)),o||(o=t.find(s=>s.name==e)),o||(o=t[0]),!o)throw new Error(`default action "${e}" not found`);return o}async hide(e=!1){if(this.hidden)return;let{nvim:t,timer:i,window:r}=this,{winid:o,tabnr:s}=this.ui;i&&clearTimeout(i),this.worker.stop(),this.history.add(),this.ui.reset(),this.hidden=!0;let{isVim:a}=y;if(t.pauseNotification(),a||t.call("coc#prompt#stop_prompt",["list"],!0),s&&t.call("coc#list#close_preview",[s],!0),r&&t.call("win_gotoid",[r.id],!0),o&&t.call("coc#window#close",[o],!0),r&&this.savedHeight&&this.listOptions.position!=="tab"&&t.call("coc#window#set_height",[r.id,this.savedHeight],!0),e)return t.resumeNotification(!1,!0);await t.resumeNotification(!1),a&&(await vt(10),t.call("feedkeys",["\x1B","int"],!0),t.command("redraw",!0))}toggleMode(){let e=this.prompt.mode=="normal"?"insert":"normal";this.prompt.mode=e,this.listOptions.mode=e,this.updateStatus()}stop(){this.worker.stop()}async resolveItem(){let e=this.ui.index,t=this.ui.getItem(e);if(!t||t.resolved)return;let{list:i}=this;if(typeof i.resolveItem=="function"){let r=t.label,o=await Promise.resolve(i.resolveItem(t));if(o&&e==this.ui.index){let s=R_(this.prompt.input,o);this.ui.updateItem(Object.assign({highlights:s},o),e,r!=o.label)}}}async showHelp(){await this.hide();let{list:e,nvim:t}=this;if(!e)return;t.pauseNotification(),t.command("tabe +setl\\ previewwindow [LIST HELP]",!0),t.command("setl nobuflisted noswapfile buftype=nofile bufhidden=wipe",!0),await t.resumeNotification();let i=e.options&&e.options.length,r=await t.buffer,o=new Ri;if(o.addLine("NAME","Label"),o.addLine(` ${e.name} - ${e.description||""} -`),o.addLine("SYNOPSIS","Label"),o.addLine(` :CocList [LIST OPTIONS] ${e.name}${i?" [ARGUMENTS]":""} -`),e.detail){o.addLine("DESCRIPTION","Label");let a=e.detail.split(` -`).map(l=>" "+l);o.addLine(a.join(` -`)+` -`)}if(i){o.addLine("ARGUMENTS","Label"),o.addLine("");for(let a of e.options)o.addLine(a.name,"Special"),o.addLine(` ${a.description}`),o.addLine("");o.addLine("")}let s=y.getConfiguration(`list.source.${e.name}`);if(Object.keys(s).length){o.addLine("CONFIGURATIONS","Label"),o.addLine("");let a={};ve.all.forEach(l=>{let{packageJSON:u}=l,{contributes:c}=u;if(!c)return;let{configuration:h}=c;if(h){let{properties:d}=h;if(d)for(let g of Object.keys(d))a[g]=d[g]}});for(let l of Object.keys(s)){let u=s[l],c=`list.source.${e.name}.${l}`,h=a[c]&&a[c].description?a[c].description:l;o.addLine(` "${c}"`,"MoreMsg"),o.addText(` - ${h}, current value: `),o.addText(JSON.stringify(u),"Special")}o.addLine("")}o.addLine("ACTIONS","Label"),o.addLine(` ${e.actions.map(a=>a.name).join(", ")}`),o.addLine(""),o.addLine("see ':h coc-list-options' for available list options.","Comment"),t.pauseNotification(),o.render(r,0,-1),t.command("setl nomod",!0),t.command("setl nomodifiable",!0),t.command("normal! gg",!0),t.command("nnoremap q :bd!",!0),await t.resumeNotification()}async switchMatcher(){let{matcher:e,interactive:t}=this.listOptions;if(t)return;let i=["fuzzy","strict","regex"],r=i.indexOf(e)+1;r>=i.length&&(r=0),this.listOptions.matcher=i[r],this.prompt.matcher=i[r],await this.worker.drawItems()}updateStatus(){let{ui:e,list:t,nvim:i}=this;if(!e.bufnr)return;let r=i.createBuffer(e.bufnr),o={mode:this.prompt.mode.toUpperCase(),args:this.args.join(" "),name:t.name,cwd:this.cwd,loading:this.loadingFrame,total:this.worker.length};r.setVar("list_status",o,!0),i.command("redraws",!0)}get context(){let{winid:e}=this.ui;return{options:this.listOptions,args:this.listArgs,input:this.prompt.input,cwd:y.cwd,window:this.window,buffer:this.buffer,listWindow:e?this.nvim.createWindow(e):void 0}}onMouseEvent(e){switch(e){case"":return this.ui.onMouse("mouseDown");case"":return this.ui.onMouse("mouseDrag");case"":return this.ui.onMouse("mouseUp");case"<2-LeftMouse>":return this.ui.onMouse("doubleClick")}}async doNumberSelect(e){if(!this.listOptions.numberSelect)return!1;let t=e.charCodeAt(0);if(t>=48&&t<=57){let i=Number(e);if(i==0&&(i=10),this.ui.length>=i)return this.nvim.pauseNotification(),this.ui.setCursor(i),await this.nvim.resumeNotification(),await this.doAction(),!0}return!1}jumpBack(){let{window:e,nvim:t}=this;e&&(t.pauseNotification(),t.call("coc#prompt#stop_prompt",["list"],!0),this.nvim.call("win_gotoid",[e.id],!0),t.resumeNotification(!1,!0))}async resume(){this.winid&&await this.hide();let e=await this.nvim.eval('[win_getid(),bufnr("%"),winheight("%")]');this.hidden=!1,this.window=this.nvim.createWindow(e[0]),this.buffer=this.nvim.createBuffer(e[1]),this.savedHeight=e[2],this.prompt.start(),await this.ui.resume(),this.listOptions.autoPreview&&await this.doAction("preview")}async doItemAction(e,t){let{noQuit:i,position:r}=this.listOptions,{nvim:o}=this,s=t.persist===!0||t.name=="preview";r==="tab"&&t.tabPersist&&(s=!0);let a=this.winid&&(s||i);try{if(a?s||(o.pauseNotification(),o.call("coc#prompt#stop_prompt",["list"],!0),o.call("win_gotoid",[this.context.window.id],!0),await o.resumeNotification()):await this.hide(),t.multiple)await Promise.resolve(t.execute(e,this.context));else if(t.parallel)await Promise.all(e.map(l=>Promise.resolve(t.execute(l,this.context))));else for(let l of e)await Promise.resolve(t.execute(l,this.context));a&&this.ui.restoreWindow(),t.reload&&a?await this.reloadItems():a&&this.nvim.command("redraw",!0)}catch(l){this.nvim.echoError(l)}}onInputChange(){this.timer&&clearTimeout(this.timer),this.listOptions.input=this.prompt.input,this.listOptions.interactive?(this.worker.stop(),this.timer=setTimeout(async()=>{await this.worker.loadItems(this.context)},this.interactiveDebounceTime)):this.worker.drawItems()}dispose(){this.hide(!0),J(this.disposables),this.worker.dispose(),this.ui.dispose()}}});var d4,g4,f4,w0e,Ww,p4=_(()=>{"use strict";d4=require("child_process"),g4=require("events"),f4=x(require("readline"));V();K();w0e=H()("list-commandTask"),Ww=class extends g4.EventEmitter{constructor(e){super();this.opt=e;this.disposables=[];this.start()}start(){let{cmd:e,args:t,cwd:i,onLine:r}=this.opt,o=(0,d4.spawn)(e,t,{cwd:i||y.cwd,windowsHide:!0});this.disposables.push({dispose:()=>{o.kill()}}),o.on("error",a=>{this.emit("error",a.message)}),o.stderr.on("data",a=>{w0e.error(`[${e} Error]`,a.toString("utf8"))});let s=f4.default.createInterface(o.stdout);s.on("line",a=>{let l=r(a);l&&this.emit("data",l)}),s.on("close",()=>{this.emit("end")})}dispose(){J(this.disposables)}}});function D0e(n){switch(n){case"latex":return"tex";default:return n}}var m4,F_,b4,xn,VXe,Xt,wo=_(()=>{"use strict";m4=x(require("fs")),F_=x(require("path")),b4=x(require("readline")),xn=x(q());De();V();$e();wt();K();p4();Iw();VXe=H()("list-basic"),Xt=class{constructor(e){this.nvim=e;this.defaultAction="open";this.actions=[];this.options=[];this.disposables=[];this.config=new bh}get alignColumns(){return this.config.get("alignColumns",!1)}get hlGroup(){return this.config.get("previewHighlightGroup","Search")}get previewHeight(){return this.config.get("maxPreviewHeight",12)}get splitRight(){return this.config.get("previewSplitRight",!1)}get toplineStyle(){return this.config.get("previewToplineStyle","offset")}get toplineOffset(){return this.config.get("previewToplineOffset",3)}parseArguments(e){if(!this.optionMap){this.optionMap=new Map;for(let i of this.options){let r=i.name.split(/,\s*/g).map(s=>s.replace(/\s+.*/g,"")),o=i.key?i.key:r[r.length-1].replace(/^-/,"");for(let s of r)this.optionMap.set(s,{name:o,hasValue:i.hasValue})}}let t={};for(let i=0;i{let r=await this.convertLocation(t.location);await this.previewLocation(r,i)}});let{nvim:e}=this;this.createAction({name:"quickfix",multiple:!0,execute:async t=>{let i=await Promise.all(t.map(o=>this.convertLocation(o.location).then(s=>y.getQuickfixItem(s))));await e.call("setqflist",[i]);let r=await e.getVar("coc_quickfix_open_command");e.command(typeof r=="string"?r:"copen",!0)}});for(let t of["open","tabe","drop","vsplit","split"])this.createAction({name:t,execute:async(i,r)=>{await this.jumpTo(i.location,t=="open"?null:t,r)},tabPersist:t==="open"})}async convertLocation(e){if(typeof e=="string")return xn.Location.create(e,xn.Range.create(0,0,0,0));if(xn.Location.is(e))return e;let t=B.parse(e.uri);if(t.scheme!="file")return xn.Location.create(e.uri,xn.Range.create(0,0,0,0));let i=b4.default.createInterface({input:m4.default.createReadStream(t.fsPath,{encoding:"utf8"})}),r=e.line,o=0,s=!1,a=await new Promise(l=>{i.on("line",u=>{if(!s){if(u.includes(r)){i.removeAllListeners(),i.close(),s=!0,l(u);return}o=o+1}}),i.on("error",u=>{this.nvim.errWriteLine(`Read ${t.fsPath} error: ${u.message}`),l(null)})});if(a!=null){let l=e.text?a.indexOf(e.text):0;l==0&&(l=a.match(/^\s*/)[0].length);let u=xn.Position.create(o,l+(e.text?e.text.length:0));return xn.Location.create(e.uri,xn.Range.create(xn.Position.create(o,l),u))}return xn.Location.create(e.uri,xn.Range.create(0,0,0,0))}async jumpTo(e,t,i){if(t==null&&i&&i.options.position==="tab"&&(t="tabe"),typeof e=="string"){await y.jumpTo(e,null,t);return}let{range:r,uri:o}=await this.convertLocation(e),s=r.start;s.line==0&&s.character==0&&Ce(s,r.end)==0&&(s=null),await y.jumpTo(o,s,t)}createAction(e){let{name:t}=e,i=this.actions.findIndex(r=>r.name==t);i!==-1&&this.actions.splice(i,1),this.actions.push(e)}async previewLocation(e,t){if(!t.listWindow)return;let{nvim:i}=this,{uri:r,range:o}=e,s=y.getDocument(e.uri),a=B.parse(r),l=[];if(s)l=s.getLines();else if(a.scheme=="file")try{l=(await vc(a.fsPath,"utf8")).split(/\r?\n/)}catch(c){`${a.fsPath}`,c.toString()}let u={winid:t.window.id,range:Tt(o)?null:o,lnum:o.start.line+1,name:a.scheme=="file"?a.fsPath:r,filetype:D0e(s?s.languageId:this.getLanguageId(a.fsPath)),position:t.options.position,maxHeight:this.previewHeight,splitRight:this.splitRight,hlGroup:this.hlGroup,scheme:a.scheme,toplineStyle:this.toplineStyle,toplineOffset:this.toplineOffset};await i.call("coc#list#preview",[l,u])}async preview(e,t){let{nvim:i}=this,{bufname:r,filetype:o,range:s,lines:a,lnum:l}=e,u={winid:t.window.id,lnum:s?s.start.line+1:l||1,filetype:o||"txt",position:t.options.position,maxHeight:this.previewHeight,splitRight:this.splitRight,hlGroup:this.hlGroup,toplineStyle:this.toplineStyle,toplineOffset:this.toplineOffset};r&&(u.name=r),s&&(u.range=s),await i.call("coc#list#preview",[a,u]),i.command("redraw",!0)}doHighlight(){}dispose(){J(this.disposables)}getLanguageId(e){let t=F_.default.extname(e);if(!t)return"";for(let i of y.documents){let r=B.parse(i.uri).fsPath;if(F_.default.extname(r)==t)return i.languageId}return""}}});function Sn(n,e){if(e.length===0)return[];let t=[];if(n){let i=Array(Math.min(...e.map(r=>r.label.length))).fill(0);for(let r of e)for(let o=0;oBa(de({},r),{label:r.label.map((o,s)=>o.padEnd(i[s])).join(" ")}))}else t=e.map(i=>Ba(de({},i),{label:i.label.join(" ")}));return t}function y4(n,e){var t;if(n==="hidden")return"";if(n==="full")return e;if(n==="short"){let i=e.split(Zw.default.sep);return i.length<2?e:[...i.slice(0,i.length-2).filter(o=>o.length>0).map(o=>o[0]),i[i.length-1]].join(Zw.default.sep)}else{let i=e.split(Zw.default.sep);return(t=i[i.length-1])!=null?t:""}}var Zw,La=_(()=>{"use strict";Zw=x(require("path"))});function C0e(n,e){let t=n.indexOf(e);return t==-1?-1:n.length-t}var Jw,v4=_(()=>{"use strict";wi();K();wo();La();Jw=class extends Xt{constructor(e){super(e);this.defaultAction="run";this.description="registered commands of coc.nvim";this.name="commands";this.mru=y.createMru("commands"),this.addAction("run",async t=>{await oe.fireCommand(t.data.cmd)}),this.addAction("append",async t=>{let{cmd:i}=t.data;await e.feedKeys(`:CocCommand ${i} `,"n",!1)})}async loadItems(e){let t=[],i=await this.mru.load(),{commandList:r,onCommandList:o,titles:s}=oe,a=r.map(l=>l.id).concat(o);for(let l of[...new Set(a)])t.push({label:[l,...s.get(l)?[s.get(l)]:[]],filterText:l,data:{cmd:l,score:C0e(i,l)}});return t.sort((l,u)=>u.data.score-l.data.score),Sn(this.alignColumns,t)}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocCommandsTitle /\\t.*$/ contained containedin=CocCommandsLine",!0),e.command("highlight default link CocCommandsTitle Comment",!0),e.resumeNotification(!1,!0)}}});var Xf,pUe,Do,Uf=_(()=>{"use strict";Kr();Xf=x(require("path"));wo();K();wi();De();$e();_e();pUe=H()("list-location"),Do=class extends Xt{constructor(e){super(e);this.defaultAction="open";this.description="show locations saved by g:coc_jump_locations variable";this.name="location";this.createAction({name:"refactor",multiple:!0,execute:async t=>{let i=t.map(r=>r.location);await oe.executeCommand("workspace.refactor",i)}}),this.addLocationActions()}async loadItems(e,t){let i=await this.nvim.getVar("coc_jump_locations");if(t.isCancellationRequested)return[];i=i||[],i.forEach(a=>{if(!a.uri){let l=Xf.default.isAbsolute(a.filename)?a.filename:Xf.default.join(e.cwd,a.filename);a.uri=B.file(l).toString()}if(!a.bufnr&&y.getDocument(a.uri)!=null&&(a.bufnr=y.getDocument(a.uri).bufnr),a.range)a.lnum=a.lnum||a.range.start.line+1,a.col=a.col||a.range.start.character+1;else{let{lnum:l,col:u}=a;a.range=He.create(l-1,u-1,l-1,u-1)}});let r=e.buffer.id,o=i.every(a=>a.bufnr&&r&&a.bufnr==r);return i.map(a=>{let l=o?"":a.filename,u=`${l}${a.text.trim()}`;Xf.default.isAbsolute(l)&&(l=Oe(e.cwd,l)?Xf.default.relative(e.cwd,l):l);let c=`${l} |${a.type?a.type+" ":""}${a.lnum} col ${a.col}| `,h;if(a.range&&a.range.start.line==a.range.end.line){let g=G(c)+G(a.text.slice(0,a.range.start.character)),f=G(c)+G(a.text.slice(0,a.range.end.character));h={hlGroup:"Search",span:[g,f]}}return{label:c+a.text,location:cn.create(a.uri,a.range),filterText:u,ansiHighlights:h?[h]:void 0}})}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocLocationName /\\v^[^|]+/ contained containedin=CocLocationLine",!0),e.command("syntax match CocLocationPosition /\\v\\|\\w*\\s?\\d+\\scol\\s\\d+\\|/ contained containedin=CocLocationLine",!0),e.command("syntax match CocLocationError /Error/ contained containedin=CocLocationPosition",!0),e.command("syntax match CocLocationWarning /Warning/ contained containedin=CocLocationPosition",!0),e.command("highlight default link CocLocationName Directory",!0),e.command("highlight default link CocLocationPosition LineNr",!0),e.command("highlight default link CocLocationError Error",!0),e.command("highlight default link CocLocationWarning WarningMsg",!0),e.resumeNotification(!1,!0)}}});var w4,xUe,$w,D4=_(()=>{"use strict";w4=x(require("path"));Vl();$e();La();Uf();xUe=H()("list-symbols"),$w=class extends Do{constructor(e,t){super(e);this.defaultAction="open";this.description="diagnostics of current workspace";this.name="diagnostics";It.onDidRefresh(async()=>{let i=t.getSession("diagnostics");i&&await i.reloadItems()},null,this.disposables)}async loadItems(e){let t=await It.getDiagnosticList(),{cwd:i}=e,r=this.getConfig(),o=r.get("includeCode",!0),s=r.get("pathFormat","full"),a=t.map(l=>{let u=Oe(i,l.file)?w4.default.relative(i,l.file):l.file,c=y4(s,u),h=s!=="hidden"?[`${c}:${l.lnum}`]:[],d=o?[`[${l.source}${l.code?"":"]"}`,l.code?`${l.code}]`:""]:[];return{label:[...h,...d,l.severity,l.message],location:l.location}});return Sn(this.alignColumns,a)}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocDiagnosticsFile /\\v^\\s*\\S+/ contained containedin=CocDiagnosticsLine",!0),e.command("syntax match CocDiagnosticsError /\\tError\\s*\\t/ contained containedin=CocDiagnosticsLine",!0),e.command("syntax match CocDiagnosticsWarning /\\tWarning\\s*\\t/ contained containedin=CocDiagnosticsLine",!0),e.command("syntax match CocDiagnosticsInfo /\\tInformation\\s*\\t/ contained containedin=CocDiagnosticsLine",!0),e.command("syntax match CocDiagnosticsHint /\\tHint\\s*\\t/ contained containedin=CocDiagnosticsLine",!0),e.command("highlight default link CocDiagnosticsFile Comment",!0),e.command("highlight default link CocDiagnosticsError CocErrorSign",!0),e.command("highlight default link CocDiagnosticsWarning CocWarningSign",!0),e.command("highlight default link CocDiagnosticsInfo CocInfoSign",!0),e.command("highlight default link CocDiagnosticsHint CocHintSign",!0),e.resumeNotification(!1,!0)}}});function S0e(n){switch(n){case"unknown":return 2;case"activated":return 1;case"disabled":return-1;default:return 0}}var Ch,C4,Xw,x0e,Uw,x4=_(()=>{"use strict";Ch=x(Rn()),C4=x(require("os")),Xw=x(require("path"));De();vo();V();K();Ee();wo();La();x0e=H()("list-extensions"),Uw=class extends Xt{constructor(e){super(e);this.defaultAction="toggle";this.description="manage coc extensions";this.name="extensions";this.addAction("toggle",async t=>{let{id:i,state:r}=t.data;r!="disabled"&&(r=="activated"?await ve.deactivate(i):await ve.activate(i),await vt(100))},{persist:!0,reload:!0,parallel:!0}),this.addAction("configuration",async t=>{let{root:i}=t.data,r=Xw.default.join(i,"package.json");if(Ch.default.existsSync(r)){let s=Ch.default.readFileSync(r,"utf8").split(/\r?\n/).findIndex(a=>a.includes('"contributes"'));await y.jumpTo(B.file(r).toString(),{line:s==-1?0:s,character:0})}}),this.addAction("open",async t=>{let{root:i}=t.data;y.env.isiTerm?e.call("coc#ui#iterm_open",[i],!0):e.call("coc#ui#open_url",[i],!0)}),this.addAction("disable",async t=>{let{id:i,state:r}=t.data;r!=="disabled"&&await ve.toggleExtension(i)},{persist:!0,reload:!0,parallel:!0}),this.addAction("enable",async t=>{let{id:i,state:r}=t.data;r=="disabled"&&await ve.toggleExtension(i)},{persist:!0,reload:!0,parallel:!0}),this.addAction("lock",async t=>{let{id:i}=t.data;await ve.lockExtension(i)},{persist:!0,reload:!0}),this.addAction("help",async t=>{let{root:i}=t.data,o=(await Ch.default.readdir(i)).find(s=>/^readme/i.test(s));o&&await y.callAsync("coc#util#jump",["edit",Xw.default.join(i,o)])}),this.addAction("reload",async t=>{let{id:i}=t.data;await ve.reloadExtension(i)},{persist:!0,reload:!0}),this.addAction("fix",async t=>{let{root:i,isLocal:r}=t.data,{npm:o}=ve;if(r){k.showMessage("Can't fix for local extension.","warning");return}if(!o)return;let s=Xw.default.join(i,"node_modules");Ch.default.existsSync(s)&&Ch.default.removeSync(s);let a=await k.createTerminal({cwd:i});!await a.show(!1)||(y.nvim.command("startinsert",!0),a.sendText(`${o} install --production --ignore-scripts --no-lockfile`,!0))}),this.addMultipleAction("uninstall",async t=>{let i=[];for(let r of t)r.data.isLocal||i.push(r.data.id);ve.uninstallExtension(i).catch(r=>{x0e.error(r)})})}async loadItems(e){let t=[],i=await ve.getExtensionStates(),r=await ve.getLockedList();for(let o of i){let s="+";o.state=="disabled"?s="-":o.state=="activated"?s="*":o.state=="unknown"&&(s="?");let a=await this.nvim.call("resolve",o.root),l=r.includes(o.id);t.push({label:[`${s} ${o.id}${l?" \uE0A2":""}`,...o.isLocal?["[RTP]"]:[],o.version,a.replace(C4.default.homedir(),"~")],filterText:o.id,data:{id:o.id,root:a,state:o.state,isLocal:o.isLocal,priority:S0e(o.state)}})}return t.sort((o,s)=>o.data.priority!=s.data.priority?s.data.priority-o.data.priority:s.data.id-o.data.id?1:-1),Sn(this.alignColumns,t)}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocExtensionsActivited /\\v^\\*/ contained containedin=CocExtensionsLine",!0),e.command("syntax match CocExtensionsLoaded /\\v^\\+/ contained containedin=CocExtensionsLine",!0),e.command("syntax match CocExtensionsDisabled /\\v^-/ contained containedin=CocExtensionsLine",!0),e.command("syntax match CocExtensionsName /\\v%3c\\S+/ contained containedin=CocExtensionsLine",!0),e.command("syntax match CocExtensionsRoot /\\v\\t[^\\t]*$/ contained containedin=CocExtensionsLine",!0),e.command("syntax match CocExtensionsLocal /\\v\\[RTP\\]/ contained containedin=CocExtensionsLine",!0),e.command("highlight default link CocExtensionsActivited Special",!0),e.command("highlight default link CocExtensionsLoaded Normal",!0),e.command("highlight default link CocExtensionsDisabled Comment",!0),e.command("highlight default link CocExtensionsName String",!0),e.command("highlight default link CocExtensionsLocal MoreMsg",!0),e.command("highlight default link CocExtensionsRoot Comment",!0),e.resumeNotification(!1,!0)}}});var S4,T4,Gw,k4=_(()=>{"use strict";S4=x(require("path"));De();T4=x(Rn());$e();K();Ee();wo();Gw=class extends Xt{constructor(e){super(e);this.defaultAction="edit";this.description="list of current workspace folders";this.name="folders";this.addAction("edit",async t=>{let i=await e.call("input",["Folder: ",t.label,"dir"]),r=await qt(i);if(!r||!r.isDirectory()){k.showMessage(`invalid path: ${i}`,"error");return}y.workspaceFolderControl.renameWorkspaceFolder(t.label,i)}),this.addAction("delete",async t=>{y.workspaceFolderControl.removeWorkspaceFolder(t.label)},{reload:!0,persist:!0}),this.addAction("newfile",async(t,i)=>{let r=await k.requestInput("File name",t.label+"/");if(!r)return;let o=S4.default.dirname(r),s=await qt(o);(!s||!s.isDirectory())&&T4.default.mkdirpSync(o),await y.createFile(r,{overwrite:!1,ignoreIfExists:!0}),await this.jumpTo(B.file(r).toString(),null,i)})}async loadItems(e){return y.folderPaths.map(t=>({label:t}))}}});function E4(n){if(!n.startsWith("file:"))return n;let e=B.parse(n).fsPath;return Oe(y.cwd,e)?P4.default.relative(y.cwd,e):e}var P4,Qw,_4=_(()=>{"use strict";Se();K();P4=x(require("path"));wo();Kr();De();$e();Qw=class extends Xt{constructor(e){super(e);this.defaultAction="open";this.description="links of current buffer";this.name="links";this.addAction("open",async t=>{let{target:i}=t.data;B.parse(i).scheme.startsWith("http")?await e.call("coc#ui#open_url",i):await y.jumpTo(i)}),this.addAction("jump",async t=>{let{location:i}=t.data;await y.jumpTo(i.uri,i.range.start)})}async loadItems(e,t){let i=await e.window.buffer,r=y.getDocument(i.id);if(!r)return null;let o=[],s=await O.getDocumentLinks(r.textDocument,t);if(t.isCancellationRequested)return null;if(s==null)throw new Error("Links provider not found.");let a=[];for(let l of s)l.target?o.push({label:E4(l.target),data:{target:l.target,location:cn.create(r.uri,l.range)}}):(l=await O.resolveDocumentLink(l,t),l.target&&o.push({label:E4(l.target),data:{target:l.target,location:cn.create(r.uri,l.range)}}),a.push(l));return o}}});function T0e(n,e){let t=n.indexOf(e);return t==-1?-1:n.length-t}var Kw,R4=_(()=>{"use strict";wo();Fy();La();Kw=class extends Xt{constructor(e,t){super(e);this.listMap=t;this.name="lists";this.defaultAction="open";this.description="registered lists of coc.nvim";this.mru=new ca("lists");this.addAction("open",async i=>{let{name:r}=i.data;await this.mru.add(r),e.command(`CocList ${r}`,!0)})}async loadItems(e){let t=[],i=await this.mru.load();for(let r of this.listMap.values())r.name!="lists"&&t.push({label:[r.name,...r.description?[r.description]:[]],data:{name:r.name,interactive:r.interactive,score:T0e(i,r.name)}});return t.sort((r,o)=>o.data.score-r.data.score),Sn(this.alignColumns,t)}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocListsDesc /\\t.*$/ contained containedin=CocListsLine",!0),e.command("highlight default link CocListsDesc Comment",!0),e.resumeNotification(!1,!0)}}});function Co(n){switch(n){case ft.SymbolKind.File:return"File";case ft.SymbolKind.Module:return"Module";case ft.SymbolKind.Namespace:return"Namespace";case ft.SymbolKind.Package:return"Package";case ft.SymbolKind.Class:return"Class";case ft.SymbolKind.Method:return"Method";case ft.SymbolKind.Property:return"Property";case ft.SymbolKind.Field:return"Field";case ft.SymbolKind.Constructor:return"Constructor";case ft.SymbolKind.Enum:return"Enum";case ft.SymbolKind.Interface:return"Interface";case ft.SymbolKind.Function:return"Function";case ft.SymbolKind.Variable:return"Variable";case ft.SymbolKind.Constant:return"Constant";case ft.SymbolKind.String:return"String";case ft.SymbolKind.Number:return"Number";case ft.SymbolKind.Boolean:return"Boolean";case ft.SymbolKind.Array:return"Array";case ft.SymbolKind.Object:return"Object";case ft.SymbolKind.Key:return"Key";case ft.SymbolKind.Null:return"Null";case ft.SymbolKind.EnumMember:return"EnumMember";case ft.SymbolKind.Struct:return"Struct";case ft.SymbolKind.Event:return"Event";case ft.SymbolKind.Operator:return"Operator";case ft.SymbolKind.TypeParameter:return"TypeParameter";default:return"Unknown"}}var ft,Gf=_(()=>{"use strict";ft=x(q())});function L4(n,e){return`${n.name}${e?` ${e}`:""}`}function k0e(n,e){let t=n.selectionRange,i=e.selectionRange;return t.start.line!=i.start.line?t.start.line-i.start.line:t.start.character-i.start.character}var F4,I4,d8e,zw,j4=_(()=>{"use strict";F4=x(require("path"));Kr();De();I4=x(tg());Se();V();$e();K();Uf();Gf();La();d8e=H()("list-symbols");zw=class extends Do{constructor(){super(...arguments);this.description="symbols of current document";this.name="outline";this.options=[{name:"-k, -kind KIND",hasValue:!0,description:"filter symbol by kind"}]}async loadItems(e,t){let i=await e.window.buffer,r=y.getDocument(i.id);if(!r)return null;let s=this.getConfig().get("ctagsFilestypes",[]),a,l=this.parseArguments(e.args);if(s.includes(r.filetype)||(a=await O.getDocumentSymbol(r.textDocument,t)),t.isCancellationRequested)return[];if(!a)return await this.loadCtagsSymbols(r);if(a.length==0)return[];let u=l.kind?l.kind.toLowerCase():null,c=[];if(!a[0].hasOwnProperty("location")){let d=function(g,f=0){g.sort(k0e);for(let p of g){let m=Co(p.kind),v=cn.create(r.uri,p.selectionRange);c.push({label:[`${"| ".repeat(f)}${p.name}`,`[${m}]`,`${p.range.start.line+1}`],filterText:L4(p,l.kind==""?m:null),location:v,data:{kind:m}}),p.children&&p.children.length&&d(p.children,f+1)}};d(a),u&&(c=c.filter(g=>g.data.kind.toLowerCase().indexOf(u)==0))}else{a.sort((d,g)=>{let f=d.location.range.start,p=g.location.range.start,m=f.line-p.line;return m==0?f.character-p.character:m});for(let d of a){let g=Co(d.kind);d.name.endsWith(") callback")||u&&!g.toLowerCase().startsWith(u)||(d.location.uri===void 0&&(d.location.uri=r.uri),c.push({label:[d.name,`[${g}]`,`${d.location.range.start.line+1}`],filterText:L4(d,l.kind==""?g:null),location:d.location}))}}return Sn(this.alignColumns,c)}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocOutlineName /\\v\\s?[^\\t]+\\s/ contained containedin=CocOutlineLine",!0),e.command("syntax match CocOutlineIndentLine /\\v\\|/ contained containedin=CocOutlineLine,CocOutlineName",!0),e.command("syntax match CocOutlineKind /\\[\\w\\+\\]/ contained containedin=CocOutlineLine",!0),e.command("syntax match CocOutlineLine /\\d\\+$/ contained containedin=CocOutlineLine",!0),e.command("highlight default link CocOutlineName Normal",!0),e.command("highlight default link CocOutlineIndentLine Comment",!0),e.command("highlight default link CocOutlineKind Typedef",!0),e.command("highlight default link CocOutlineLine Comment",!0),e.resumeNotification(!1,!0)}async loadCtagsSymbols(e){if(!I4.default.sync("ctags",{nothrow:!0}))return[];let t=B.parse(e.uri),i=F4.default.extname(t.fsPath),r="",s=`${await this.nvim.call("tempname")}.${i}`,a=await this.nvim.call("fnameescape",s);await pb(a,e.getDocumentContent());try{r=await eo(`ctags -f - --excmd=number --language-force=${e.filetype} ${a}`)}catch{}if(r.trim().length||(r=await eo(`ctags -f - --excmd=number ${a}`)),r=r.trim(),!r)return[];let l=r.split(/\r?\n/),u=[];for(let c of l){let h=c.split(" ");if(h.length<4)continue;let d=Number(h[2].replace(/;"$/,"")),g=e.getline(d-1);if(!g)continue;let f=g.indexOf(h[0]),p=f==-1?0:f,m=He.create(d-1,p,d-1,p+h[0].length);u.push({label:`${h[0]} [${h[3]}] ${d}`,filterText:h[0],location:cn.create(e.uri,m),data:{line:d}})}return u.sort((c,h)=>c.data.line-h.data.line),u}}});var Vw,A4=_(()=>{"use strict";Zf();wo();V();La();Vw=class extends Xt{constructor(e){super(e);this.defaultAction="toggle";this.description="registered services of coc.nvim";this.name="services";this.addAction("toggle",async t=>{let{id:i}=t.data;await Mi.toggle(i),await vt(100)},{persist:!0,reload:!0})}async loadItems(e){let t=Mi.getServiceStats();return t.sort((i,r)=>i.id>r.id?-1:1),Sn(this.alignColumns,t.map(i=>({label:[i.state=="running"?"*":" ",i.id,`[${i.state}]`,i.languageIds.join(", ")],data:{id:i.id}})))}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocServicesPrefix /\\v^./ contained containedin=CocServicesLine",!0),e.command("syntax match CocServicesName /\\v%3c\\S+/ contained containedin=CocServicesLine",!0),e.command("syntax match CocServicesStat /\\v\\t\\[\\w+\\]/ contained containedin=CocServicesLine",!0),e.command("syntax match CocServicesLanguages /\\v(\\])@<=.*$/ contained containedin=CocServicesLine",!0),e.command("highlight default link CocServicesPrefix Special",!0),e.command("highlight default link CocServicesName Type",!0),e.command("highlight default link CocServicesStat Statement",!0),e.command("highlight default link CocServicesLanguages Comment",!0),e.resumeNotification(!1,!0)}}});function eD(n,e){return n.length>e?n.slice(0,e-1)+".":n+" ".repeat(e-n.length)}var x8e,tD,O4=_(()=>{"use strict";Kr();De();mo();wo();x8e=H()("list-sources"),tD=class extends Xt{constructor(e){super(e);this.defaultAction="toggle";this.description="registered completion sources";this.name="sources";this.addAction("toggle",async t=>{let{name:i}=t.data;rt.toggleSource(i)},{persist:!0,reload:!0}),this.addAction("refresh",async t=>{let{name:i}=t.data;await rt.refresh(i)},{persist:!0,reload:!0}),this.addAction("open",async(t,i)=>{let{location:r}=t;r&&await this.jumpTo(r,null,i)})}async loadItems(e){let t=rt.sourceStats();return t.sort((i,r)=>i.type!=r.type?i.typer.name?-1:1),t.map(i=>{let r=i.disabled?" ":"*",o;return i.filepath&&(o=cn.create(B.file(i.filepath).toString(),He.create(0,0,0,0))),{label:`${r} ${eD(i.name,22)} ${eD("["+i.shortcut+"]",10)} ${eD(i.triggerCharacters.join(""),10)} ${eD(i.priority.toString(),3)} ${i.filetypes.join(",")}`,location:o,data:{name:i.name}}})}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocSourcesPrefix /\\v^./ contained containedin=CocSourcesLine",!0),e.command("syntax match CocSourcesName /\\v%3c\\S+/ contained containedin=CocSourcesLine",!0),e.command("syntax match CocSourcesType /\\v%25v.*%36v/ contained containedin=CocSourcesLine",!0),e.command("syntax match CocSourcesPriority /\\v%46v.*%50v/ contained containedin=CocSourcesLine",!0),e.command("syntax match CocSourcesFileTypes /\\v\\S+$/ contained containedin=CocSourcesLine",!0),e.command("highlight default link CocSourcesPrefix Special",!0),e.command("highlight default link CocSourcesName Type",!0),e.command("highlight default link CocSourcesPriority Number",!0),e.command("highlight default link CocSourcesFileTypes Comment",!0),e.command("highlight default link CocSourcesType Statement",!0),e.resumeNotification(!1,!0)}}});var I_,M4,N4,A8e,iD,B4=_(()=>{"use strict";I_=x(require("path")),M4=x(Vn());De();Se();K();Uf();Gf();$e();$f();N4=x(q());La();A8e=H()("list-symbols"),iD=class extends Do{constructor(){super(...arguments);this.interactive=!0;this.description="search workspace symbols";this.detail="Symbols list is provided by server, it works on interactive mode only.";this.name="symbols";this.options=[{name:"-k, -kind KIND",description:"Filter symbols by kind.",hasValue:!0}]}async loadItems(e,t){let{input:i}=e;this.cwd=e.cwd;let r=this.parseArguments(e.args),o=r.kind?r.kind.toLowerCase():"";if(!e.options.interactive)throw new Error("Symbols only works on interactive mode");let s=await O.getWorkspaceSymbols(i,t);if(!s)throw new Error("No workspace symbols provider registered");let l=this.getConfig().get("excludes",[]),u=[];for(let c of s){let h=Co(c.kind);if(o&&h.toLowerCase()!=o)continue;let d=B.parse(c.location.uri).fsPath;Oe(y.cwd,d)&&(d=I_.default.relative(y.cwd,d)),!l.some(g=>(0,M4.default)(d,g))&&u.push({label:[c.name,`[${h}]`,d],filterText:`${c.name}`,location:c.location,data:{original:c,kind:c.kind,file:d,score:wh(i,c.name)}})}return u.sort((c,h)=>c.data.score!=h.data.score?h.data.score-c.data.score:c.data.kind!=h.data.kind?c.data.kind-h.data.kind:c.data.file.length-h.data.file.length),Sn(this.alignColumns,u)}async resolveItem(e){let t=e.data.original;if(!t)return null;let i=new N4.CancellationTokenSource,r=await O.resolveWorkspaceSymbol(t,i.token);if(!r)return null;let o=Co(r.kind),s=B.parse(r.location.uri).fsPath;return Oe(this.cwd,s)&&(s=I_.default.relative(this.cwd,s)),{label:`${t.name} [${o}] ${s}`,filterText:`${t.name}`,location:t.location}}doHighlight(){let{nvim:e}=this;e.pauseNotification(),e.command("syntax match CocSymbolsName /\\v^\\s*\\S+/ contained containedin=CocSymbolsLine",!0),e.command("syntax match CocSymbolsKind /\\[\\w\\+\\]\\s*\\t/ contained containedin=CocSymbolsLine",!0),e.command("syntax match CocSymbolsFile /\\S\\+$/ contained containedin=CocSymbolsLine",!0),e.command("highlight default link CocSymbolsName Normal",!0),e.command("highlight default link CocSymbolsKind Typedef",!0),e.command("highlight default link CocSymbolsFile Comment",!0),e.resumeNotification(!1,!0)}}});var q4,nD,Y4,E0e,H4,W4,Di,rD=_(()=>{"use strict";q4=x(Ei()),nD=x(q());ge();vo();V();K();Ee();Iw();J6();X6();h4();v4();D4();x4();k4();_4();R4();Uf();j4();A4();O4();B4();Y4=x(cg()),E0e=H()("list-manager"),H4=["","","","<2-LeftMouse>"],W4=class{constructor(){this.plugTs=0;this.sessionsMap=new Map;this.disposables=[];this.listMap=new Map}init(e){this.nvim=e,this.config=new bh,this.prompt=new Aw(e,this.config),this.mappings=new jw(this,e,this.config);let t=this.config.get("selectedSignText","*");e.command(`sign define CocSelected text=${t} texthl=CocSelectedText linehl=CocSelectedLine`,!0),P.on("InputChar",this.onInputChar,this,this.disposables);let i=(0,q4.default)(async()=>{await this.getCurrentSession()&&this.prompt.drawPrompt()},100);P.on("FocusGained",i,null,this.disposables),P.on("WinEnter",o=>{let s=this.getSessionByWinid(o);s&&this.prompt.start(s.listOptions)},null,this.disposables);let r;P.on("WinLeave",o=>{r&&clearTimeout(r),this.getSessionByWinid(o)&&setTimeout(()=>{this.prompt.cancel()},y.isVim?50:0)},null,this.disposables),this.disposables.push({dispose:()=>{i.clear()}}),this.prompt.onDidChangeInput(()=>{let{session:o}=this;!o||(o.onInputChange(),o.history.filter())}),this.registerList(new Qw(e)),this.registerList(new Do(e)),this.registerList(new iD(e)),this.registerList(new zw(e)),this.registerList(new Jw(e)),this.registerList(new Uw(e)),this.registerList(new $w(e,this)),this.registerList(new tD(e)),this.registerList(new Vw(e)),this.registerList(new Kw(e,this.listMap)),this.registerList(new Gw(e))}async start(e){let t=this.parseArgs(e);if(!t)return;let{name:i}=t.list,r=this.sessionsMap.get(i);r&&r.dispose(),this.prompt.start(t.options);let o=new Yw(this.nvim,this.prompt,t.list,t.options,t.listArgs,this.config);this.sessionsMap.set(i,o),this.lastSession=o;try{await o.start(e)}catch(s){this.nvim.call("coc#prompt#stop_prompt",["list"],!0);let a=s instanceof Error?s.message:s.toString();k.showMessage(`Error on "CocList ${i}": ${a}`,"error"),E0e.error(s)}}getSessionByWinid(e){for(let t of this.sessionsMap.values())if(t&&t.winid==e)return this.lastSession=t,t;return null}async getCurrentSession(){let{id:e}=await this.nvim.window;for(let t of this.sessionsMap.values())if(t&&t.winid==e)return this.lastSession=t,t;return null}async resume(e){var t;if(!e)await((t=this.session)==null?void 0:t.resume());else{let i=this.sessionsMap.get(e);if(!i){k.showMessage(`Can't find exists ${e} list`);return}await i.resume()}}async doAction(e){let t=this.lastSession;!t||await t.doAction(e)}async first(e){let t=this.getSession(e);t&&await t.first()}async last(e){let t=this.getSession(e);t&&await t.last()}async previous(e){let t=this.getSession(e);t&&await t.previous()}async next(e){let t=this.getSession(e);t&&await t.next()}getSession(e){return e?this.sessionsMap.get(e):this.session}async cancel(e=!0){this.prompt.cancel(),!!e&&this.session&&await this.session.hide()}reset(){this.prompt.cancel(),this.lastSession=void 0;for(let e of this.sessionsMap.values())e.dispose();this.sessionsMap.clear(),this.nvim.call("coc#prompt#stop_prompt",["list"],!0)}async switchMatcher(){var e;await((e=this.session)==null?void 0:e.switchMatcher())}async togglePreview(){let{nvim:e}=this,t=await e.call("coc#list#get_preview",[0]);t!=-1?(await e.call("coc#window#close",[t]),await e.command("redraw")):await this.doAction("preview")}async chooseAction(){let{lastSession:e}=this;e&&await e.chooseAction()}parseArgs(e){let t=[],i=!1,r=!1,o=!1,s=!1,a=!1,l=!1,u,c="",h="fuzzy",d="bottom",g=[],f=[];for(let v of e)if(!u&&v.startsWith("-"))f.push(v);else if(u)g.push(v);else{if(!/^\w+$/.test(v))return k.showMessage(`Invalid list option: "${v}"`,"error"),null;u=v}u=u||"lists";let p=y.getConfiguration(`list.source.${u}`);!f.length&&!g.length&&(f=p.get("defaultOptions",[])),g.length||(g=p.get("defaultArgs",[]));for(let v of f)if(v.startsWith("--input"))c=v.slice(8);else if(v=="--number-select"||v=="-N")o=!0;else if(v=="--auto-preview"||v=="-A")r=!0;else if(v=="--regex"||v=="-R")h="regex";else if(v=="--strict"||v=="-S")h="strict";else if(v=="--interactive"||v=="-I")i=!0;else if(v=="--top")d="top";else if(v=="--tab")d="tab";else if(v=="--ignore-case"||v=="--normal"||v=="--no-sort")t.push(v.slice(2));else if(v=="--first")a=!0;else if(v=="--reverse")l=!0;else if(v=="--no-quit")s=!0;else return k.showMessage(`Invalid option "${v}" of list`,"error"),null;let m=this.listMap.get(u);return m?i&&!m.interactive?(k.showMessage(`Interactive mode of "${u}" list not supported`,"error"),null):{list:m,listArgs:g,options:{numberSelect:o,autoPreview:r,reverse:l,noQuit:s,first:a,input:c,interactive:i,matcher:h,position:d,ignorecase:!!t.includes("ignore-case"),mode:t.includes("normal")?"normal":"insert",sort:!t.includes("no-sort")}}:(k.showMessage(`List ${u} not found`,"error"),null)}async onInputChar(e,t,i){if(e!="list")return;let{mode:r}=this.prompt,o=Date.now();if(t==""||this.plugTs&&o-this.plugTs<20){this.plugTs=o;return}if(!!t){if(t==""){await this.cancel();return}r=="insert"?await this.onInsertInput(t,i):await this.onNormalInput(t,i)}}async onInsertInput(e,t){let{session:i}=this;if(!i)return;if(H4.includes(e)){await this.onMouseEvent(e);return}if(!(await i.doNumberSelect(e)||await this.mappings.doInsertKeymap(e)||t)){if(e.startsWith("<")&&e.endsWith(">")){await this.feedkeys(e,!1);return}for(let s of e){let a=s.codePointAt(0);if(a==65533||a<32||a>=127&&a<=159)return;await this.prompt.acceptCharacter(s)}}}async onNormalInput(e,t){if(H4.includes(e)){await this.onMouseEvent(e);return}await this.mappings.doNormalKeymap(e)||await this.feedkeys(e)}onMouseEvent(e){if(this.session)return this.session.onMouseEvent(e)}async feedkeys(e,t=!0){let{nvim:i}=this;e=e.startsWith("<")&&e.endsWith(">")?`\\${e}`:e,await i.call("coc#prompt#stop_prompt",["list"]),await i.call("eval",[`feedkeys("${e}", "${t?"i":"in"}")`]),this.prompt.start()}async command(e){let{nvim:t}=this;await t.call("coc#prompt#stop_prompt",["list"]),await t.command(e),this.prompt.start()}async normal(e,t=!0){let{nvim:i}=this;await i.call("coc#prompt#stop_prompt",["list"]),await i.command(`normal${t?"!":""} ${e}`),this.prompt.start()}async call(e){if(this.session)return await this.session.call(e)}get session(){return this.lastSession}registerList(e){let{name:t}=e,i=this.listMap.get(t);return this.listMap.has(t)&&(i&&(typeof i.dispose=="function"&&i.dispose(),this.listMap.delete(t)),k.showMessage(`list "${t}" recreated.`)),this.listMap.set(t,e),ve.addSchemeProperty(`list.source.${t}.defaultAction`,{type:"string",default:null,description:`Default action of "${t}" list.`}),ve.addSchemeProperty(`list.source.${t}.defaultOptions`,{type:"array",default:e.interactive?["--interactive"]:[],description:`Default list options of "${t}" list, only used when both list option and argument are empty.`,uniqueItems:!0,items:{type:"string",enum:["--top","--normal","--no-sort","--input","--tab","--strict","--regex","--ignore-case","--number-select","--interactive","--auto-preview","--first","--no-quit"]}}),ve.addSchemeProperty(`list.source.${t}.defaultArgs`,{type:"array",default:[],description:`Default argument list of "${t}" list, only used when list argument is empty.`,uniqueItems:!0,items:{type:"string"}}),nD.Disposable.create(()=>{typeof e.dispose=="function"&&e.dispose(),this.listMap.delete(t)})}get names(){return Array.from(this.listMap.keys())}get descriptions(){let e={};for(let t of this.listMap.keys()){let i=this.listMap.get(t);e[t]=i.description}return e}async loadItems(e){let t=[e],i=this.parseArgs(t);if(!i)return;let{list:r,options:o,listArgs:s}=i,l=new nD.CancellationTokenSource().token,u=await this.nvim.eval('[win_getid(),bufnr("%")]'),c=await r.loadItems({options:o,args:s,input:"",cwd:y.cwd,window:this.nvim.createWindow(u[0]),buffer:this.nvim.createBuffer(u[1]),listWindow:null},l);if(!c||Array.isArray(c))return c;let h=c;return await new Promise((g,f)=>{let p=[];h.on("data",m=>{m.label=(0,Y4.default)(m.label),p.push(m)}),h.on("end",()=>{g(p)}),h.on("error",m=>{f(m)})})}toggleMode(){let e=this.lastSession;e&&e.toggleMode()}get isActivated(){var e;return((e=this.session)==null?void 0:e.winid)!=null}stop(){let e=this.lastSession;e&&e.stop()}dispose(){for(let e of this.sessionsMap.values())e.dispose();this.sessionsMap.clear(),this.config&&this.config.dispose(),this.lastSession=void 0,J(this.disposables)}},Di=new W4});var J4=b((rGe,Z4)=>{Z4.exports=["\0","","","","","","","\x07","\b"," ",` -`,"\v","\f","\r","","","","","","","","","","","","","","\x1B","","","",""," ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","\x7F","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""," ","!","C/","PS","$?","Y=","|","SS",'"',"(c)","a","<<","!","","(r)","-","deg","+-","2","3","'","u","P","*",",","1","o",">>","1/4","1/2","3/4","?","A","A","A","A","A","A","AE","C","E","E","E","E","I","I","I","I","D","N","O","O","O","O","O","x","O","U","U","U","U","U","Th","ss","a","a","a","a","a","a","ae","c","e","e","e","e","i","i","i","i","d","n","o","o","o","o","o","/","o","u","u","u","u","y","th","y"]});var X4=b((oGe,$4)=>{$4.exports=["A","a","A","a","A","a","C","c","C","c","C","c","C","c","D","d","D","d","E","e","E","e","E","e","E","e","E","e","G","g","G","g","G","g","G","g","H","h","H","h","I","i","I","i","I","i","I","i","I","i","IJ","","J","j","K","k","k","L","l","L","l","L","l","L","l","L","l","N","n","N","n","N","n","'n","ng","NG","O","o","O","o","O","o","OE","oe","R","r","R","r","R","r","S","s","S","s","S","s","S","s","T","t","T","t","T","t","U","u","U","u","U","u","U","u","U","u","U","u","W","w","Y","y","Y","Z","z","Z","z","Z","z","s","b","B","B","b","6","6","O","C","c","D","D","D","d","d","3","@","E","F","f","G","G","hv","I","I","K","k","l","l","W","N","n","O","O","o","OI","oi","P","p","YR","2","2","SH","sh","t","T","t","T","U","u","Y","V","Y","y","Z","z","ZH","ZH","zh","zh","2","5","5","ts","w","|","||","|=","!","DZ","Dz","dz","LJ","Lj","lj","NJ","Nj","nj","A","a","I","i","O","o","U","u","U","u","U","u","U","u","U","u","@","A","a","A","a","AE","ae","G","g","G","g","K","k","O","o","O","o","ZH","zh","j","DZ","D","dz","G","g","HV","W","N","n","A","a","AE","ae","O","o"]});var G4=b((sGe,U4)=>{U4.exports=["A","a","A","a","E","e","E","e","I","i","I","i","O","o","O","o","R","r","R","r","U","u","U","u","S","s","T","t","Y","y","H","h","[?]","[?]","OU","ou","Z","z","A","a","E","e","O","o","O","o","O","o","O","o","Y","y","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","a","a","a","b","o","c","d","d","e","@","@","e","e","e","e","j","g","g","g","g","u","Y","h","h","i","i","I","l","l","l","lZ","W","W","m","n","n","n","o","OE","O","F","R","R","R","R","r","r","R","R","R","s","S","j","S","S","t","t","U","U","v","^","W","Y","Y","z","z","Z","Z","?","?","?","C","@","B","E","G","H","j","k","L","q","?","?","dz","dZ","dz","ts","tS","tC","fN","ls","lz","WW","]]","[?]","[?]","k","h","j","r","r","r","r","w","y","'",'"',"`","'","`","`","'","?","?","<",">","^","V","^","V","'","-","/","\\",",","_","\\","/",":",".","`","'","^","V","+","-","V",".","@",",","~",'"',"R","X","G","l","s","x","?","","","","","","","","V","=",'"',"[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var K4=b((aGe,Q4)=>{Q4.exports=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","'",",","[?]","[?]","[?]","[?]","","[?]","[?]","[?]","?","[?]","[?]","[?]","[?]","[?]","","","A",";","E","E","I","[?]","O","[?]","U","O","I","A","B","G","D","E","Z","E","Th","I","K","L","M","N","Ks","O","P","R","[?]","S","T","U","Ph","Kh","Ps","O","I","U","a","e","e","i","u","a","b","g","d","e","z","e","th","i","k","l","m","n","x","o","p","r","s","s","t","u","ph","kh","ps","o","i","u","o","u","o","[?]","b","th","U","U","U","ph","p","&","[?]","[?]","St","st","W","w","Q","q","Sp","sp","Sh","sh","F","f","Kh","kh","H","h","G","g","CH","ch","Ti","ti","k","r","c","j","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var V4=b((lGe,z4)=>{z4.exports=["Ie","Io","Dj","Gj","Ie","Dz","I","Yi","J","Lj","Nj","Tsh","Kj","I","U","Dzh","A","B","V","G","D","Ie","Zh","Z","I","I","K","L","M","N","O","P","R","S","T","U","F","Kh","Ts","Ch","Sh","Shch","","Y","'","E","Iu","Ia","a","b","v","gh","d","ie","zh","z","i","i","k","l","m","n","o","p","r","s","t","u","f","kh","ts","ch","sh","shch","","y","'","e","iu","ia","ie","io","dj","gj","ie","dz","i","yi","j","lj","nj","tsh","kj","i","u","dzh","O","o","E","e","Ie","ie","E","e","Ie","ie","O","o","Io","io","Ks","ks","Ps","ps","F","f","Y","y","Y","y","u","u","O","o","O","o","Ot","ot","Q","q","*1000*","","","","","[?]","*100.000*","*1.000.000*","[?]","[?]",'"','"',"R'","r'","G'","g'","G'","g'","G'","g'","Zh'","zh'","Z'","z'","K'","k'","K'","k'","K'","k'","K'","k'","N'","n'","Ng","ng","P'","p'","Kh","kh","S'","s'","T'","t'","U","u","U'","u'","Kh'","kh'","Tts","tts","Ch'","ch'","Ch'","ch'","H","h","Ch","ch","Ch'","ch'","`","Zh","zh","K'","k'","[?]","[?]","N'","n'","[?]","[?]","Ch","ch","[?]","[?]","[?]","a","a","A","a","Ae","ae","Ie","ie","@","@","@","@","Zh","zh","Z","z","Dz","dz","I","i","I","i","O","o","O","o","O","o","E","e","U","u","U","u","U","u","Ch","ch","[?]","[?]","Y","y","[?]","[?]","[?]","[?]","[?]"]});var tQ=b((uGe,eQ)=>{eQ.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","A","B","G","D","E","Z","E","E","T`","Zh","I","L","Kh","Ts","K","H","Dz","Gh","Ch","M","Y","N","Sh","O","Ch`","P","J","Rh","S","V","T","R","Ts`","W","P`","K`","O","F","[?]","[?]","<","'","/","!",",","?",".","[?]","a","b","g","d","e","z","e","e","t`","zh","i","l","kh","ts","k","h","dz","gh","ch","m","y","n","sh","o","ch`","p","j","rh","s","v","t","r","ts`","w","p`","k`","o","f","ew","[?]",".","-","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","[?]","","","","","","","","","","","","","","@","e","a","o","i","e","e","a","a","o","[?]","u","'","","","","","","",":","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","b","g","d","h","v","z","kh","t","y","k","k","l","m","m","n","n","s","`","p","p","ts","ts","q","r","sh","t","[?]","[?]","[?]","[?]","[?]","V","oy","i","'",'"',"[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var nQ=b((cGe,iQ)=>{iQ.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]",",","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]",";","[?]","[?]","[?]","?","[?]","","a","'","w'","","y'","","b","@","t","th","j","H","kh","d","dh","r","z","s","sh","S","D","T","Z","aa","G","[?]","[?]","[?]","[?]","[?]","","f","q","k","l","m","n","h","w","~","y","an","un","in","a","u","i","W","","","'","'","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","%",".",",","*","[?]","[?]","","'","'","'","","'","'w","'u","'y","tt","tth","b","t","T","p","th","bh","'h","H","ny","dy","H","ch","cch","dd","D","D","Dt","dh","ddh","d","D","D","rr","R","R","R","R","R","R","j","R","S","S","S","S","S","T","GH","F","F","F","v","f","ph","Q","Q","kh","k","K","K","ng","K","g","G","N","G","G","G","L","L","L","L","N","N","N","N","N","h","Ch","hy","h","H","@","W","oe","oe","u","yu","yu","W","v","y","Y","Y","W","","","y","y'",".","ae","","","","","","","","@","#","","","","","","","","","","","^","","","","","[?]","[?]","0","1","2","3","4","5","6","7","8","9","Sh","D","Gh","&","+m"]});var oQ=b((hGe,rQ)=>{rQ.exports=["//","/",",","!","!","-",",",",",";","?","~","{","}","*","[?]","","'","","b","g","g","d","d","h","w","z","H","t","t","y","yh","k","l","m","n","s","s","`","p","p","S","q","r","sh","t","[?]","[?]","[?]","a","a","a","A","A","A","e","e","e","E","i","i","u","u","u","o","","`","'","","","X","Q","@","@","|","+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","h","sh","n","r","b","L","k","'","v","m","f","dh","th","l","g","ny","s","d","z","t","y","p","j","ch","tt","hh","kh","th","z","sh","s","d","t","z","`","gh","q","w","a","aa","i","ee","u","oo","e","ey","o","oa","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var aQ=b((dGe,sQ)=>{sQ.exports=["[?]","N","N","H","[?]","a","aa","i","ii","u","uu","R","L","eN","e","e","ai","oN","o","o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","nnn","p","ph","b","bh","m","y","r","rr","l","l","lll","v","sh","ss","s","h","[?]","[?]","'","'","aa","i","ii","u","uu","R","RR","eN","e","e","ai","oN","o","o","au","","[?]","[?]","AUM","'","'","`","'","[?]","[?]","[?]","q","khh","ghh","z","dddh","rh","f","yy","RR","LL","L","LL"," / "," // ","0","1","2","3","4","5","6","7","8","9",".","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","N","N","H","[?]","a","aa","i","ii","u","uu","R","RR","[?]","[?]","e","ai","[?]","[?]","o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","y","r","[?]","l","[?]","[?]","[?]","sh","ss","s","h","[?]","[?]","'","[?]","aa","i","ii","u","uu","R","RR","[?]","[?]","e","ai","[?]","[?]","o","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","[?]","[?]","[?]","[?]","rr","rh","[?]","yy","RR","LL","L","LL","[?]","[?]","0","1","2","3","4","5","6","7","8","9","r'","r`","Rs","Rs","1/","2/","3/","4/"," 1 - 1/","/16","","[?]","[?]","[?]","[?]"]});var uQ=b((gGe,lQ)=>{lQ.exports=["[?]","[?]","N","[?]","[?]","a","aa","i","ii","u","uu","[?]","[?]","[?]","[?]","ee","ai","[?]","[?]","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bb","m","y","r","[?]","l","ll","[?]","v","sh","[?]","s","h","[?]","[?]","'","[?]","aa","i","ii","u","uu","[?]","[?]","[?]","[?]","ee","ai","[?]","[?]","oo","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","khh","ghh","z","rr","[?]","f","[?]","[?]","[?]","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","N","H","","","G.E.O.","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","N","N","H","[?]","a","aa","i","ii","u","uu","R","[?]","eN","[?]","e","ai","oN","[?]","o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","ya","r","[?]","l","ll","[?]","v","sh","ss","s","h","[?]","[?]","'","'","aa","i","ii","u","uu","R","RR","eN","[?]","e","ai","oN","[?]","o","au","","[?]","[?]","AUM","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","RR","[?]","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var hQ=b((fGe,cQ)=>{cQ.exports=["[?]","N","N","H","[?]","a","aa","i","ii","u","uu","R","L","[?]","[?]","e","ai","[?]","[?]","o","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","y","r","[?]","l","ll","[?]","","sh","ss","s","h","[?]","[?]","'","'","aa","i","ii","u","uu","R","[?]","[?]","[?]","e","ai","[?]","[?]","o","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","+","[?]","[?]","[?]","[?]","rr","rh","[?]","yy","RR","LL","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","N","H","[?]","a","aa","i","ii","u","uu","[?]","[?]","[?]","e","ee","ai","[?]","o","oo","au","k","[?]","[?]","[?]","ng","c","[?]","j","[?]","ny","tt","[?]","[?]","[?]","nn","t","[?]","[?]","[?]","n","nnn","p","[?]","[?]","[?]","m","y","r","rr","l","ll","lll","v","[?]","ss","s","h","[?]","[?]","[?]","[?]","aa","i","ii","u","uu","[?]","[?]","[?]","e","ee","ai","[?]","o","oo","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","+10+","+100+","+1000+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var gQ=b((pGe,dQ)=>{dQ.exports=["[?]","N","N","H","[?]","a","aa","i","ii","u","uu","R","L","[?]","e","ee","ai","[?]","o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","y","r","rr","l","ll","[?]","v","sh","ss","s","h","[?]","[?]","[?]","[?]","aa","i","ii","u","uu","R","RR","[?]","e","ee","ai","[?]","o","oo","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","RR","LL","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","N","H","[?]","a","aa","i","ii","u","uu","R","L","[?]","e","ee","ai","[?]","o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","y","r","rr","l","ll","[?]","v","sh","ss","s","h","[?]","[?]","[?]","[?]","aa","i","ii","u","uu","R","RR","[?]","e","ee","ai","[?]","o","oo","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","lll","[?]","RR","LL","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var pQ=b((mGe,fQ)=>{fQ.exports=["[?]","[?]","N","H","[?]","a","aa","i","ii","u","uu","R","L","[?]","e","ee","ai","[?]","o","oo","au","k","kh","g","gh","ng","c","ch","j","jh","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","[?]","p","ph","b","bh","m","y","r","rr","l","ll","lll","v","sh","ss","s","h","[?]","[?]","[?]","[?]","aa","i","ii","u","uu","R","[?]","[?]","e","ee","ai","","o","oo","au","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","RR","LL","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","N","H","[?]","a","aa","ae","aae","i","ii","u","uu","R","RR","L","LL","e","ee","ai","o","oo","au","[?]","[?]","[?]","k","kh","g","gh","ng","nng","c","ch","j","jh","ny","jny","nyj","tt","tth","dd","ddh","nn","nndd","t","th","d","dh","n","[?]","nd","p","ph","b","bh","m","mb","y","r","[?]","l","[?]","[?]","v","sh","ss","s","h","ll","f","[?]","[?]","[?]","","[?]","[?]","[?]","[?]","aa","ae","aae","i","ii","u","[?]","uu","[?]","R","e","ee","ai","o","oo","au","L","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","RR","LL"," . ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var bQ=b((bGe,mQ)=>{mQ.exports=["[?]","k","kh","kh","kh","kh","kh","ng","cch","ch","ch","ch","ch","y","d","t","th","th","th","n","d","t","th","th","th","n","b","p","ph","f","ph","f","ph","m","y","r","R","l","L","w","s","s","s","h","l","`","h","~","a","a","aa","am","i","ii","ue","uue","u","uu","'","[?]","[?]","[?]","[?]","Bh.","e","ae","o","ai","ai","ao","+","","","","","","","M",""," * ","0","1","2","3","4","5","6","7","8","9"," // "," /// ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","k","kh","[?]","kh","[?]","[?]","ng","ch","[?]","s","[?]","[?]","ny","[?]","[?]","[?]","[?]","[?]","[?]","d","h","th","th","[?]","n","b","p","ph","f","ph","f","[?]","m","y","r","[?]","l","[?]","w","[?]","[?]","s","h","[?]","`","","~","a","","aa","am","i","ii","y","yy","u","uu","[?]","o","l","ny","[?]","[?]","e","ei","o","ay","ai","[?]","+","[?]","","","","","","M","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","hn","hm","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var vQ=b((yGe,yQ)=>{yQ.exports=["AUM","","","","","","",""," // "," * ","","-"," / "," / "," // "," -/ "," +/ "," X/ "," /XX/ "," /X/ ",", ","","","","","","","","","","","","0","1","2","3","4","5","6","7","8","9",".5","1.5","2.5","3.5","4.5","5.5","6.5","7.5","8.5","-.5","+","*","^","_","","~","[?]","]","[[","]]","","","k","kh","g","gh","ng","c","ch","j","[?]","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","ts","tsh","dz","dzh","w","zh","z","'","y","r","l","sh","ssh","s","h","a","kss","r","[?]","[?]","[?]","[?]","[?]","[?]","aa","i","ii","u","uu","R","RR","L","LL","e","ee","o","oo","M","H","i","ii","","","","","","","","","","","[?]","[?]","[?]","[?]","k","kh","g","gh","ng","c","ch","j","[?]","ny","tt","tth","dd","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","ts","tsh","dz","dzh","w","zh","z","'","y","r","l","sh","ss","s","h","a","kss","w","y","r","[?]","X"," :X: "," /O/ "," /o/ "," \\o\\ "," (O) ","","","","","","","","","","[?]","[?]","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var DQ=b((vGe,wQ)=>{wQ.exports=["k","kh","g","gh","ng","c","ch","j","jh","ny","nny","tt","tth","dd","ddh","nn","tt","th","d","dh","n","p","ph","b","bh","m","y","r","l","w","s","h","ll","a","[?]","i","ii","u","uu","e","[?]","o","au","[?]","aa","i","ii","u","uu","e","ai","[?]","[?]","[?]","N","'",":","","[?]","[?]","[?]","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9"," / "," // ","n*","r*","l*","e*","sh","ss","R","RR","L","LL","R","RR","L","LL","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","A","B","G","D","E","V","Z","T`","I","K","L","M","N","O","P","Zh","R","S","T","U","P`","K`","G'","Q","Sh","Ch`","C`","Z'","C","Ch","X","J","H","E","Y","W","Xh","OE","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","a","b","g","d","e","v","z","t`","i","k","l","m","n","o","p","zh","r","s","t","u","p`","k`","g'","q","sh","ch`","c`","z'","c","ch","x","j","h","e","y","w","xh","oe","f","[?]","[?]","[?]","[?]"," // ","[?]","[?]","[?]"]});var xQ=b((wGe,CQ)=>{CQ.exports=["g","gg","n","d","dd","r","m","b","bb","s","ss","","j","jj","c","k","t","p","h","ng","nn","nd","nb","dg","rn","rr","rh","rN","mb","mN","bg","bn","","bs","bsg","bst","bsb","bss","bsj","bj","bc","bt","bp","bN","bbN","sg","sn","sd","sr","sm","sb","sbg","sss","s","sj","sc","sk","st","sp","sh","","","","","Z","g","d","m","b","s","Z","","j","c","t","p","N","j","","","","","ck","ch","","","pb","pN","hh","Q","[?]","[?]","[?]","[?]","[?]","","","a","ae","ya","yae","eo","e","yeo","ye","o","wa","wae","oe","yo","u","weo","we","wi","yu","eu","yi","i","a-o","a-u","ya-o","ya-yo","eo-o","eo-u","eo-eu","yeo-o","yeo-u","o-eo","o-e","o-ye","o-o","o-u","yo-ya","yo-yae","yo-yeo","yo-o","yo-i","u-a","u-ae","u-eo-eu","u-ye","u-u","yu-a","yu-eo","yu-e","yu-yeo","yu-ye","yu-u","yu-i","eu-u","eu-eu","yi-u","i-a","i-ya","i-o","i-u","i-eu","i-U","U","U-eo","U-u","U-i","UU","[?]","[?]","[?]","[?]","[?]","g","gg","gs","n","nj","nh","d","l","lg","lm","lb","ls","lt","lp","lh","m","b","bs","s","ss","ng","j","c","k","t","p","h","gl","gsg","ng","nd","ns","nZ","nt","dg","tl","lgs","ln","ld","lth","ll","lmg","lms","lbs","lbh","rNp","lss","lZ","lk","lQ","mg","ml","mb","ms","mss","mZ","mc","mh","mN","bl","bp","ph","pN","sg","sd","sl","sb","Z","g","ss","","kh","N","Ns","NZ","pb","pN","hn","hl","hm","hb","Q","[?]","[?]","[?]","[?]","[?]"]});var TQ=b((DGe,SQ)=>{SQ.exports=["ha","hu","hi","haa","hee","he","ho","[?]","la","lu","li","laa","lee","le","lo","lwa","hha","hhu","hhi","hhaa","hhee","hhe","hho","hhwa","ma","mu","mi","maa","mee","me","mo","mwa","sza","szu","szi","szaa","szee","sze","szo","szwa","ra","ru","ri","raa","ree","re","ro","rwa","sa","su","si","saa","see","se","so","swa","sha","shu","shi","shaa","shee","she","sho","shwa","qa","qu","qi","qaa","qee","qe","qo","[?]","qwa","[?]","qwi","qwaa","qwee","qwe","[?]","[?]","qha","qhu","qhi","qhaa","qhee","qhe","qho","[?]","qhwa","[?]","qhwi","qhwaa","qhwee","qhwe","[?]","[?]","ba","bu","bi","baa","bee","be","bo","bwa","va","vu","vi","vaa","vee","ve","vo","vwa","ta","tu","ti","taa","tee","te","to","twa","ca","cu","ci","caa","cee","ce","co","cwa","xa","xu","xi","xaa","xee","xe","xo","[?]","xwa","[?]","xwi","xwaa","xwee","xwe","[?]","[?]","na","nu","ni","naa","nee","ne","no","nwa","nya","nyu","nyi","nyaa","nyee","nye","nyo","nywa","'a","'u","[?]","'aa","'ee","'e","'o","'wa","ka","ku","ki","kaa","kee","ke","ko","[?]","kwa","[?]","kwi","kwaa","kwee","kwe","[?]","[?]","kxa","kxu","kxi","kxaa","kxee","kxe","kxo","[?]","kxwa","[?]","kxwi","kxwaa","kxwee","kxwe","[?]","[?]","wa","wu","wi","waa","wee","we","wo","[?]","`a","`u","`i","`aa","`ee","`e","`o","[?]","za","zu","zi","zaa","zee","ze","zo","zwa","zha","zhu","zhi","zhaa","zhee","zhe","zho","zhwa","ya","yu","yi","yaa","yee","ye","yo","[?]","da","du","di","daa","dee","de","do","dwa","dda","ddu","ddi","ddaa","ddee","dde","ddo","ddwa"]});var EQ=b((CGe,kQ)=>{kQ.exports=["ja","ju","ji","jaa","jee","je","jo","jwa","ga","gu","gi","gaa","gee","ge","go","[?]","gwa","[?]","gwi","gwaa","gwee","gwe","[?]","[?]","gga","ggu","ggi","ggaa","ggee","gge","ggo","[?]","tha","thu","thi","thaa","thee","the","tho","thwa","cha","chu","chi","chaa","chee","che","cho","chwa","pha","phu","phi","phaa","phee","phe","pho","phwa","tsa","tsu","tsi","tsaa","tsee","tse","tso","tswa","tza","tzu","tzi","tzaa","tzee","tze","tzo","[?]","fa","fu","fi","faa","fee","fe","fo","fwa","pa","pu","pi","paa","pee","pe","po","pwa","rya","mya","fya","[?]","[?]","[?]","[?]","[?]","[?]"," ",".",",",";",":",":: ","?","//","1","2","3","4","5","6","7","8","9","10+","20+","30+","40+","50+","60+","70+","80+","90+","100+","10,000+","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","a","e","i","o","u","v","ga","ka","ge","gi","go","gu","gv","ha","he","hi","ho","hu","hv","la","le","li","lo","lu","lv","ma","me","mi","mo","mu","na","hna","nah","ne","ni","no","nu","nv","qua","que","qui","quo","quu","quv","sa","s","se","si","so","su","sv","da","ta","de","te","di","ti","do","du","dv","dla","tla","tle","tli","tlo","tlu","tlv","tsa","tse","tsi","tso","tsu","tsv","wa","we","wi","wo","wu","wv","ya","ye","yi","yo","yu","yv","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var _Q=b((xGe,PQ)=>{PQ.exports=["[?]","e","aai","i","ii","o","oo","oo","ee","i","a","aa","we","we","wi","wi","wii","wii","wo","wo","woo","woo","woo","wa","wa","waa","waa","waa","ai","w","'","t","k","sh","s","n","w","n","[?]","w","c","?","l","en","in","on","an","pe","paai","pi","pii","po","poo","poo","hee","hi","pa","paa","pwe","pwe","pwi","pwi","pwii","pwii","pwo","pwo","pwoo","pwoo","pwa","pwa","pwaa","pwaa","pwaa","p","p","h","te","taai","ti","tii","to","too","too","dee","di","ta","taa","twe","twe","twi","twi","twii","twii","two","two","twoo","twoo","twa","twa","twaa","twaa","twaa","t","tte","tti","tto","tta","ke","kaai","ki","kii","ko","koo","koo","ka","kaa","kwe","kwe","kwi","kwi","kwii","kwii","kwo","kwo","kwoo","kwoo","kwa","kwa","kwaa","kwaa","kwaa","k","kw","keh","kih","koh","kah","ce","caai","ci","cii","co","coo","coo","ca","caa","cwe","cwe","cwi","cwi","cwii","cwii","cwo","cwo","cwoo","cwoo","cwa","cwa","cwaa","cwaa","cwaa","c","th","me","maai","mi","mii","mo","moo","moo","ma","maa","mwe","mwe","mwi","mwi","mwii","mwii","mwo","mwo","mwoo","mwoo","mwa","mwa","mwaa","mwaa","mwaa","m","m","mh","m","m","ne","naai","ni","nii","no","noo","noo","na","naa","nwe","nwe","nwa","nwa","nwaa","nwaa","nwaa","n","ng","nh","le","laai","li","lii","lo","loo","loo","la","laa","lwe","lwe","lwi","lwi","lwii","lwii","lwo","lwo","lwoo","lwoo","lwa","lwa","lwaa","lwaa","l","l","l","se","saai","si","sii","so","soo","soo","sa","saa","swe","swe","swi","swi","swii","swii","swo","swo","swoo","swoo"]});var LQ=b((SGe,RQ)=>{RQ.exports=["swa","swa","swaa","swaa","swaa","s","s","sw","s","sk","skw","sW","spwa","stwa","skwa","scwa","she","shi","shii","sho","shoo","sha","shaa","shwe","shwe","shwi","shwi","shwii","shwii","shwo","shwo","shwoo","shwoo","shwa","shwa","shwaa","shwaa","sh","ye","yaai","yi","yii","yo","yoo","yoo","ya","yaa","ywe","ywe","ywi","ywi","ywii","ywii","ywo","ywo","ywoo","ywoo","ywa","ywa","ywaa","ywaa","ywaa","y","y","y","yi","re","re","le","raai","ri","rii","ro","roo","lo","ra","raa","la","rwaa","rwaa","r","r","r","fe","faai","fi","fii","fo","foo","fa","faa","fwaa","fwaa","f","the","the","thi","thi","thii","thii","tho","thoo","tha","thaa","thwaa","thwaa","th","tthe","tthi","ttho","ttha","tth","tye","tyi","tyo","tya","he","hi","hii","ho","hoo","ha","haa","h","h","hk","qaai","qi","qii","qo","qoo","qa","qaa","q","tlhe","tlhi","tlho","tlha","re","ri","ro","ra","ngaai","ngi","ngii","ngo","ngoo","nga","ngaa","ng","nng","she","shi","sho","sha","the","thi","tho","tha","th","lhi","lhii","lho","lhoo","lha","lhaa","lh","the","thi","thii","tho","thoo","tha","thaa","th","b","e","i","o","a","we","wi","wo","wa","ne","ni","no","na","ke","ki","ko","ka","he","hi","ho","ha","ghu","gho","ghe","ghee","ghi","gha","ru","ro","re","ree","ri","ra","wu","wo","we","wee","wi","wa","hwu","hwo","hwe","hwee","hwi","hwa","thu","tho","the","thee","thi","tha","ttu","tto","tte","ttee","tti","tta","pu","po","pe","pee","pi","pa","p","gu","go","ge","gee","gi","ga","khu","kho","khe","khee","khi","kha","kku","kko","kke","kkee","kki"]});var IQ=b((TGe,FQ)=>{FQ.exports=["kka","kk","nu","no","ne","nee","ni","na","mu","mo","me","mee","mi","ma","yu","yo","ye","yee","yi","ya","ju","ju","jo","je","jee","ji","ji","ja","jju","jjo","jje","jjee","jji","jja","lu","lo","le","lee","li","la","dlu","dlo","dle","dlee","dli","dla","lhu","lho","lhe","lhee","lhi","lha","tlhu","tlho","tlhe","tlhee","tlhi","tlha","tlu","tlo","tle","tlee","tli","tla","zu","zo","ze","zee","zi","za","z","z","dzu","dzo","dze","dzee","dzi","dza","su","so","se","see","si","sa","shu","sho","she","shee","shi","sha","sh","tsu","tso","tse","tsee","tsi","tsa","chu","cho","che","chee","chi","cha","ttsu","ttso","ttse","ttsee","ttsi","ttsa","X",".","qai","ngai","nngi","nngii","nngo","nngoo","nnga","nngaa","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"," ","b","l","f","s","n","h","d","t","c","q","m","g","ng","z","r","a","o","u","e","i","ch","th","ph","p","x","p","<",">","[?]","[?]","[?]","f","v","u","yr","y","w","th","th","a","o","ac","ae","o","o","o","oe","on","r","k","c","k","g","ng","g","g","w","h","h","h","h","n","n","n","i","e","j","g","ae","a","eo","p","z","s","s","s","c","z","t","t","d","b","b","p","p","e","m","m","m","l","l","ng","ng","d","o","ear","ior","qu","qu","qu","s","yr","yr","yr","q","x",".",":","+","17","18","19","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var AQ=b((kGe,jQ)=>{jQ.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","k","kh","g","gh","ng","c","ch","j","jh","ny","t","tth","d","ddh","nn","t","th","d","dh","n","p","ph","b","bh","m","y","r","l","v","sh","ss","s","h","l","q","a","aa","i","ii","u","uk","uu","uuv","ry","ryy","ly","lyy","e","ai","oo","oo","au","a","aa","aa","i","ii","y","yy","u","uu","ua","oe","ya","ie","e","ae","ai","oo","au","M","H","a`","","","","r","","!","","","","","","."," // ",":","+","++"," * "," /// ","KR","'","[?]","[?]","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var MQ=b((EGe,OQ)=>{OQ.exports=[" @ "," ... ",", ",". ",": "," // ","","-",", ",". ","","","","","","[?]","0","1","2","3","4","5","6","7","8","9","[?]","[?]","[?]","[?]","[?]","[?]","a","e","i","o","u","O","U","ee","n","ng","b","p","q","g","m","l","s","sh","t","d","ch","j","y","r","w","f","k","kha","ts","z","h","zr","lh","zh","ch","-","e","i","o","u","O","U","ng","b","p","q","g","m","t","d","ch","j","ts","y","w","k","g","h","jy","ny","dz","e","i","iy","U","u","ng","k","g","h","p","sh","t","d","j","f","g","h","ts","z","r","ch","zh","i","k","r","f","zh","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","H","X","W","M"," 3 "," 333 ","a","i","k","ng","c","tt","tth","dd","nn","t","d","p","ph","ss","zh","z","a","t","zh","gh","ng","c","jh","tta","ddh","t","dh","ss","cy","zh","z","u","y","bh","'","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var BQ=b((PGe,NQ)=>{NQ.exports=["A","a","B","b","B","b","B","b","C","c","D","d","D","d","D","d","D","d","D","d","E","e","E","e","E","e","E","e","E","e","F","f","G","g","H","h","H","h","H","h","H","h","H","h","I","i","I","i","K","k","K","k","K","k","L","l","L","l","L","l","L","l","M","m","M","m","M","m","N","n","N","n","N","n","N","n","O","o","O","o","O","o","O","o","P","p","P","p","R","r","R","r","R","r","R","r","S","s","S","s","S","s","S","s","S","s","T","t","T","t","T","t","T","t","U","u","U","u","U","u","U","u","U","u","V","v","V","v","W","w","W","w","W","w","W","w","W","w","X","x","X","x","Y","y","Z","z","Z","z","Z","z","h","t","w","y","a","S","[?]","[?]","[?]","[?]","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","A","a","E","e","E","e","E","e","E","e","E","e","E","e","E","e","E","e","I","i","I","i","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","O","o","U","u","U","u","U","u","U","u","U","u","U","u","U","u","Y","y","Y","y","Y","y","Y","y","[?]","[?]","[?]","[?]","[?]"]});var qQ=b((_Ge,HQ)=>{HQ.exports=["a","a","a","a","a","a","a","a","A","A","A","A","A","A","A","A","e","e","e","e","e","e","[?]","[?]","E","E","E","E","E","E","[?]","[?]","e","e","e","e","e","e","e","e","E","E","E","E","E","E","E","E","i","i","i","i","i","i","i","i","I","I","I","I","I","I","I","I","o","o","o","o","o","o","[?]","[?]","O","O","O","O","O","O","[?]","[?]","u","u","u","u","u","u","u","u","[?]","U","[?]","U","[?]","U","[?]","U","o","o","o","o","o","o","o","o","O","O","O","O","O","O","O","O","a","a","e","e","e","e","i","i","o","o","u","u","o","o","[?]","[?]","a","a","a","a","a","a","a","a","A","A","A","A","A","A","A","A","e","e","e","e","e","e","e","e","E","E","E","E","E","E","E","E","o","o","o","o","o","o","o","o","O","O","O","O","O","O","O","O","a","a","a","a","a","[?]","a","a","A","A","A","A","A","'","i","'","~",'"~',"e","e","e","[?]","e","e","E","E","E","E","E","'`","''","'~","i","i","i","i","[?]","[?]","i","i","I","I","I","I","[?]","`'","`'","`~","u","u","u","u","R","R","u","u","U","U","U","U","R",'"`',`"'`,"`","[?]","[?]","o","o","o","[?]","o","o","O","O","O","O","O","'","`"]});var WQ=b((RGe,YQ)=>{YQ.exports=[" "," "," "," "," "," "," "," "," "," "," "," ","","","","","-","-","-","-","--","--","||","_","'","'",",","'",'"','"',",,",'"',"+","++","*","*>",".","..","...",".",` -`,` - -`,"","","","",""," ","%0","%00","'","''","'''","`","``","```","^","<",">","*","!!","!?","-","_","-","^","***","--","/","-[","]-","[?]","?!","!?","7","PP","(]","[)","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","0","","","","4","5","6","7","8","9","+","-","=","(",")","n","0","1","2","3","4","5","6","7","8","9","+","-","=","(",")","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","ECU","CL","Cr","FF","L","mil","N","Pts","Rs","W","NS","D","EU","K","T","Dr","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var JQ=b((LGe,ZQ)=>{ZQ.exports=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"," 1/3 "," 2/3 "," 1/5 "," 2/5 "," 3/5 "," 4/5 "," 1/6 "," 5/6 "," 1/8 "," 3/8 "," 5/8 "," 7/8 "," 1/","I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","L","C","D","M","i","ii","iii","iv","v","vi","vii","viii","ix","x","xi","xii","l","c","d","m","(D","D)","((|))",")","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","-","|","-","|","-","|","\\","/","\\","/","-","-","~","~","-","|","-","|","-","-","-","|","-","|","|","-","-","-","-","-","-","|","|","|","|","|","|","|","^","V","\\","=","V","^","-","-","|","|","-","-","|","|","=","|","=","=","|","=","|","=","=","=","=","=","=","|","=","|","=","|","\\","/","\\","/","=","=","~","~","|","|","-","|","-","|","-","-","-","|","-","|","|","|","|","|","|","|","-","\\","\\","|","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var XQ=b((FGe,$Q)=>{$Q.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var GQ=b((IGe,UQ)=>{UQ.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var KQ=b((jGe,QQ)=>{QQ.exports=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var VQ=b((AGe,zQ)=>{zQ.exports=["-","-","|","|","-","-","|","|","-","-","|","|","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","-","-","|","|","-","|","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","+","/","\\","X","-","|","-","|","-","|","-","|","-","|","-","|","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","-","|","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","^","^","^","^",">",">",">",">",">",">","V","V","V","V","<","<","<","<","<","<","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","#","#","#","#","#","^","^","^","O","#","#","#","#","#","#","#","#","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var tK=b((OGe,eK)=>{eK.exports=["","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var nK=b((MGe,iK)=>{iK.exports=["[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var oK=b((NGe,rK)=>{rK.exports=[" ","a","1","b","'","k","2","l","@","c","i","f","/","m","s","p",'"',"e","3","h","9","o","6","r","^","d","j","g",">","n","t","q",",","*","5","<","-","u","8","v",".","%","[","$","+","x","!","&",";",":","4","\\","0","z","7","(","_","?","w","]","#","y",")","=","[d7]","[d17]","[d27]","[d127]","[d37]","[d137]","[d237]","[d1237]","[d47]","[d147]","[d247]","[d1247]","[d347]","[d1347]","[d2347]","[d12347]","[d57]","[d157]","[d257]","[d1257]","[d357]","[d1357]","[d2357]","[d12357]","[d457]","[d1457]","[d2457]","[d12457]","[d3457]","[d13457]","[d23457]","[d123457]","[d67]","[d167]","[d267]","[d1267]","[d367]","[d1367]","[d2367]","[d12367]","[d467]","[d1467]","[d2467]","[d12467]","[d3467]","[d13467]","[d23467]","[d123467]","[d567]","[d1567]","[d2567]","[d12567]","[d3567]","[d13567]","[d23567]","[d123567]","[d4567]","[d14567]","[d24567]","[d124567]","[d34567]","[d134567]","[d234567]","[d1234567]","[d8]","[d18]","[d28]","[d128]","[d38]","[d138]","[d238]","[d1238]","[d48]","[d148]","[d248]","[d1248]","[d348]","[d1348]","[d2348]","[d12348]","[d58]","[d158]","[d258]","[d1258]","[d358]","[d1358]","[d2358]","[d12358]","[d458]","[d1458]","[d2458]","[d12458]","[d3458]","[d13458]","[d23458]","[d123458]","[d68]","[d168]","[d268]","[d1268]","[d368]","[d1368]","[d2368]","[d12368]","[d468]","[d1468]","[d2468]","[d12468]","[d3468]","[d13468]","[d23468]","[d123468]","[d568]","[d1568]","[d2568]","[d12568]","[d3568]","[d13568]","[d23568]","[d123568]","[d4568]","[d14568]","[d24568]","[d124568]","[d34568]","[d134568]","[d234568]","[d1234568]","[d78]","[d178]","[d278]","[d1278]","[d378]","[d1378]","[d2378]","[d12378]","[d478]","[d1478]","[d2478]","[d12478]","[d3478]","[d13478]","[d23478]","[d123478]","[d578]","[d1578]","[d2578]","[d12578]","[d3578]","[d13578]","[d23578]","[d123578]","[d4578]","[d14578]","[d24578]","[d124578]","[d34578]","[d134578]","[d234578]","[d1234578]","[d678]","[d1678]","[d2678]","[d12678]","[d3678]","[d13678]","[d23678]","[d123678]","[d4678]","[d14678]","[d24678]","[d124678]","[d34678]","[d134678]","[d234678]","[d1234678]","[d5678]","[d15678]","[d25678]","[d125678]","[d35678]","[d135678]","[d235678]","[d1235678]","[d45678]","[d145678]","[d245678]","[d1245678]","[d345678]","[d1345678]","[d2345678]","[d12345678]"]});var aK=b((BGe,sK)=>{sK.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?]","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var uK=b((HGe,lK)=>{lK.exports=["[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?]","[?]","[?]"]});var hK=b((qGe,cK)=>{cK.exports=[" ",", ",". ",'"',"[JIS]",'"',"/","0","<","> ","<<",">> ","[","] ","{","} ","[(",")] ","@","X ","[","] ","[[","]] ","((",")) ","[[","]] ","~ ","``","''",",,","@","1","2","3","4","5","6","7","8","9","","","","","","","~","+","+","+","+","","@"," // ","+10+","+20+","+30+","[?]","[?]","[?]","","","[?]","a","a","i","i","u","u","e","e","o","o","ka","ga","ki","gi","ku","gu","ke","ge","ko","go","sa","za","si","zi","su","zu","se","ze","so","zo","ta","da","ti","di","tu","tu","du","te","de","to","do","na","ni","nu","ne","no","ha","ba","pa","hi","bi","pi","hu","bu","pu","he","be","pe","ho","bo","po","ma","mi","mu","me","mo","ya","ya","yu","yu","yo","yo","ra","ri","ru","re","ro","wa","wa","wi","we","wo","n","vu","[?]","[?]","[?]","[?]","","","","",'"','"',"[?]","[?]","a","a","i","i","u","u","e","e","o","o","ka","ga","ki","gi","ku","gu","ke","ge","ko","go","sa","za","si","zi","su","zu","se","ze","so","zo","ta","da","ti","di","tu","tu","du","te","de","to","do","na","ni","nu","ne","no","ha","ba","pa","hi","bi","pi","hu","bu","pu","he","be","pe","ho","bo","po","ma","mi","mu","me","mo","ya","ya","yu","yu","yo","yo","ra","ri","ru","re","ro","wa","wa","wi","we","wo","n","vu","ka","ke","va","vi","ve","vo","","",'"','"']});var gK=b((YGe,dK)=>{dK.exports=["[?]","[?]","[?]","[?]","[?]","B","P","M","F","D","T","N","L","G","K","H","J","Q","X","ZH","CH","SH","R","Z","C","S","A","O","E","EH","AI","EI","AU","OU","AN","EN","ANG","ENG","ER","I","U","IU","V","NG","GN","[?]","[?]","[?]","[?]","g","gg","gs","n","nj","nh","d","dd","r","lg","lm","lb","ls","lt","lp","rh","m","b","bb","bs","s","ss","","j","jj","c","k","t","p","h","a","ae","ya","yae","eo","e","yeo","ye","o","wa","wae","oe","yo","u","weo","we","wi","yu","eu","yi","i","","nn","nd","ns","nZ","lgs","ld","lbs","lZ","lQ","mb","ms","mZ","mN","bg","","bsg","bst","bj","bt","bN","bbN","sg","sn","sd","sb","sj","Z","","N","Ns","NZ","pN","hh","Q","yo-ya","yo-yae","yo-i","yu-yeo","yu-ye","yu-i","U","U-i","[?]","","","","","","","","","","","","","","","","","BU","ZI","JI","GU","EE","ENN","OO","ONN","IR","ANN","INN","UNN","IM","NGG","AINN","AUNN","AM","OM","ONG","INNN","P","T","K","H","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var pK=b((WGe,fK)=>{fK.exports=["(g)","(n)","(d)","(r)","(m)","(b)","(s)","()","(j)","(c)","(k)","(t)","(p)","(h)","(ga)","(na)","(da)","(ra)","(ma)","(ba)","(sa)","(a)","(ja)","(ca)","(ka)","(ta)","(pa)","(ha)","(ju)","[?]","[?]","[?]","(1) ","(2) ","(3) ","(4) ","(5) ","(6) ","(7) ","(8) ","(9) ","(10) ","(Yue) ","(Huo) ","(Shui) ","(Mu) ","(Jin) ","(Tu) ","(Ri) ","(Zhu) ","(You) ","(She) ","(Ming) ","(Te) ","(Cai) ","(Zhu) ","(Lao) ","(Dai) ","(Hu) ","(Xue) ","(Jian) ","(Qi) ","(Zi) ","(Xie) ","(Ji) ","(Xiu) ","<<",">>","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","(g)","(n)","(d)","(r)","(m)","(b)","(s)","()","(j)","(c)","(k)","(t)","(p)","(h)","(ga)","(na)","(da)","(ra)","(ma)","(ba)","(sa)","(a)","(ja)","(ca)","(ka)","(ta)","(pa)","(ha)","[?]","[?]","[?]","KIS ","(1) ","(2) ","(3) ","(4) ","(5) ","(6) ","(7) ","(8) ","(9) ","(10) ","(Yue) ","(Huo) ","(Shui) ","(Mu) ","(Jin) ","(Tu) ","(Ri) ","(Zhu) ","(You) ","(She) ","(Ming) ","(Te) ","(Cai) ","(Zhu) ","(Lao) ","(Mi) ","(Nan) ","(Nu) ","(Shi) ","(You) ","(Yin) ","(Zhu) ","(Xiang) ","(Xiu) ","(Xie) ","(Zheng) ","(Shang) ","(Zhong) ","(Xia) ","(Zuo) ","(You) ","(Yi) ","(Zong) ","(Xue) ","(Jian) ","(Qi) ","(Zi) ","(Xie) ","(Ye) ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","1M","2M","3M","4M","5M","6M","7M","8M","9M","10M","11M","12M","[?]","[?]","[?]","[?]","a","i","u","u","o","ka","ki","ku","ke","ko","sa","si","su","se","so","ta","ti","tu","te","to","na","ni","nu","ne","no","ha","hi","hu","he","ho","ma","mi","mu","me","mo","ya","yu","yo","ra","ri","ru","re","ro","wa","wi","we","wo"]});var bK=b((ZGe,mK)=>{mK.exports=["apartment","alpha","ampere","are","inning","inch","won","escudo","acre","ounce","ohm","kai-ri","carat","calorie","gallon","gamma","giga","guinea","curie","guilder","kilo","kilogram","kilometer","kilowatt","gram","gram ton","cruzeiro","krone","case","koruna","co-op","cycle","centime","shilling","centi","cent","dozen","desi","dollar","ton","nano","knot","heights","percent","parts","barrel","piaster","picul","pico","building","farad","feet","bushel","franc","hectare","peso","pfennig","hertz","pence","page","beta","point","volt","hon","pound","hall","horn","micro","mile","mach","mark","mansion","micron","milli","millibar","mega","megaton","meter","yard","yard","yuan","liter","lira","rupee","ruble","rem","roentgen","watt","0h","1h","2h","3h","4h","5h","6h","7h","8h","9h","10h","11h","12h","13h","14h","15h","16h","17h","18h","19h","20h","21h","22h","23h","24h","HPA","da","AU","bar","oV","pc","[?]","[?]","[?]","[?]","Heisei","Syouwa","Taisyou","Meiji","Inc.","pA","nA","microamp","mA","kA","kB","MB","GB","cal","kcal","pF","nF","microFarad","microgram","mg","kg","Hz","kHz","MHz","GHz","THz","microliter","ml","dl","kl","fm","nm","micrometer","mm","cm","km","mm^2","cm^2","m^2","km^2","mm^4","cm^3","m^3","km^3","m/s","m/s^2","Pa","kPa","MPa","GPa","rad","rad/s","rad/s^2","ps","ns","microsecond","ms","pV","nV","microvolt","mV","kV","MV","pW","nW","microwatt","mW","kW","MW","kOhm","MOhm","a.m.","Bq","cc","cd","C/kg","Co.","dB","Gy","ha","HP","in","K.K.","KM","kt","lm","ln","log","lx","mb","mil","mol","pH","p.m.","PPM","PR","sr","Sv","Wb","[?]","[?]","1d","2d","3d","4d","5d","6d","7d","8d","9d","10d","11d","12d","13d","14d","15d","16d","17d","18d","19d","20d","21d","22d","23d","24d","25d","26d","27d","28d","29d","30d","31d"]});var vK=b((JGe,yK)=>{yK.exports=["[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?] ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var DK=b(($Ge,wK)=>{wK.exports=["Yi ","Ding ","Kao ","Qi ","Shang ","Xia ","[?] ","Mo ","Zhang ","San ","Shang ","Xia ","Ji ","Bu ","Yu ","Mian ","Gai ","Chou ","Chou ","Zhuan ","Qie ","Pi ","Shi ","Shi ","Qiu ","Bing ","Ye ","Cong ","Dong ","Si ","Cheng ","Diu ","Qiu ","Liang ","Diu ","You ","Liang ","Yan ","Bing ","Sang ","Gun ","Jiu ","Ge ","Ya ","Qiang ","Zhong ","Ji ","Jie ","Feng ","Guan ","Chuan ","Chan ","Lin ","Zhuo ","Zhu ","Ha ","Wan ","Dan ","Wei ","Zhu ","Jing ","Li ","Ju ","Pie ","Fu ","Yi ","Yi ","Nai ","Shime ","Jiu ","Jiu ","Zhe ","Yao ","Yi ","[?] ","Zhi ","Wu ","Zha ","Hu ","Fa ","Le ","Zhong ","Ping ","Pang ","Qiao ","Hu ","Guai ","Cheng ","Cheng ","Yi ","Yin ","[?] ","Mie ","Jiu ","Qi ","Ye ","Xi ","Xiang ","Gai ","Diu ","Hal ","[?] ","Shu ","Twul ","Shi ","Ji ","Nang ","Jia ","Kel ","Shi ","[?] ","Ol ","Mai ","Luan ","Cal ","Ru ","Xue ","Yan ","Fu ","Sha ","Na ","Gan ","Sol ","El ","Cwul ","[?] ","Gan ","Chi ","Gui ","Gan ","Luan ","Lin ","Yi ","Jue ","Liao ","Ma ","Yu ","Zheng ","Shi ","Shi ","Er ","Chu ","Yu ","Yu ","Yu ","Yun ","Hu ","Qi ","Wu ","Jing ","Si ","Sui ","Gen ","Gen ","Ya ","Xie ","Ya ","Qi ","Ya ","Ji ","Tou ","Wang ","Kang ","Ta ","Jiao ","Hai ","Yi ","Chan ","Heng ","Mu ","[?] ","Xiang ","Jing ","Ting ","Liang ","Xiang ","Jing ","Ye ","Qin ","Bo ","You ","Xie ","Dan ","Lian ","Duo ","Wei ","Ren ","Ren ","Ji ","La ","Wang ","Yi ","Shi ","Ren ","Le ","Ding ","Ze ","Jin ","Pu ","Chou ","Ba ","Zhang ","Jin ","Jie ","Bing ","Reng ","Cong ","Fo ","San ","Lun ","Sya ","Cang ","Zi ","Shi ","Ta ","Zhang ","Fu ","Xian ","Xian ","Tuo ","Hong ","Tong ","Ren ","Qian ","Gan ","Yi ","Di ","Dai ","Ling ","Yi ","Chao ","Chang ","Sa ","[?] ","Yi ","Mu ","Men ","Ren ","Jia ","Chao ","Yang ","Qian ","Zhong ","Pi ","Wan ","Wu ","Jian ","Jie ","Yao ","Feng ","Cang ","Ren ","Wang ","Fen ","Di ","Fang "]});var xK=b((XGe,CK)=>{CK.exports=["Zhong ","Qi ","Pei ","Yu ","Diao ","Dun ","Wen ","Yi ","Xin ","Kang ","Yi ","Ji ","Ai ","Wu ","Ji ","Fu ","Fa ","Xiu ","Jin ","Bei ","Dan ","Fu ","Tang ","Zhong ","You ","Huo ","Hui ","Yu ","Cui ","Chuan ","San ","Wei ","Chuan ","Che ","Ya ","Xian ","Shang ","Chang ","Lun ","Cang ","Xun ","Xin ","Wei ","Zhu ","[?] ","Xuan ","Nu ","Bo ","Gu ","Ni ","Ni ","Xie ","Ban ","Xu ","Ling ","Zhou ","Shen ","Qu ","Si ","Beng ","Si ","Jia ","Pi ","Yi ","Si ","Ai ","Zheng ","Dian ","Han ","Mai ","Dan ","Zhu ","Bu ","Qu ","Bi ","Shao ","Ci ","Wei ","Di ","Zhu ","Zuo ","You ","Yang ","Ti ","Zhan ","He ","Bi ","Tuo ","She ","Yu ","Yi ","Fo ","Zuo ","Kou ","Ning ","Tong ","Ni ","Xuan ","Qu ","Yong ","Wa ","Qian ","[?] ","Ka ","[?] ","Pei ","Huai ","He ","Lao ","Xiang ","Ge ","Yang ","Bai ","Fa ","Ming ","Jia ","Er ","Bing ","Ji ","Hen ","Huo ","Gui ","Quan ","Tiao ","Jiao ","Ci ","Yi ","Shi ","Xing ","Shen ","Tuo ","Kan ","Zhi ","Gai ","Lai ","Yi ","Chi ","Kua ","Guang ","Li ","Yin ","Shi ","Mi ","Zhu ","Xu ","You ","An ","Lu ","Mou ","Er ","Lun ","Tong ","Cha ","Chi ","Xun ","Gong ","Zhou ","Yi ","Ru ","Jian ","Xia ","Jia ","Zai ","Lu ","Ko ","Jiao ","Zhen ","Ce ","Qiao ","Kuai ","Chai ","Ning ","Nong ","Jin ","Wu ","Hou ","Jiong ","Cheng ","Zhen ","Zuo ","Chou ","Qin ","Lu ","Ju ","Shu ","Ting ","Shen ","Tuo ","Bo ","Nan ","Hao ","Bian ","Tui ","Yu ","Xi ","Cu ","E ","Qiu ","Xu ","Kuang ","Ku ","Wu ","Jun ","Yi ","Fu ","Lang ","Zu ","Qiao ","Li ","Yong ","Hun ","Jing ","Xian ","San ","Pai ","Su ","Fu ","Xi ","Li ","Fu ","Ping ","Bao ","Yu ","Si ","Xia ","Xin ","Xiu ","Yu ","Ti ","Che ","Chou ","[?] ","Yan ","Lia ","Li ","Lai ","[?] ","Jian ","Xiu ","Fu ","He ","Ju ","Xiao ","Pai ","Jian ","Biao ","Chu ","Fei ","Feng ","Ya ","An ","Bei ","Yu ","Xin ","Bi ","Jian "]});var TK=b((UGe,SK)=>{SK.exports=["Chang ","Chi ","Bing ","Zan ","Yao ","Cui ","Lia ","Wan ","Lai ","Cang ","Zong ","Ge ","Guan ","Bei ","Tian ","Shu ","Shu ","Men ","Dao ","Tan ","Jue ","Chui ","Xing ","Peng ","Tang ","Hou ","Yi ","Qi ","Ti ","Gan ","Jing ","Jie ","Sui ","Chang ","Jie ","Fang ","Zhi ","Kong ","Juan ","Zong ","Ju ","Qian ","Ni ","Lun ","Zhuo ","Wei ","Luo ","Song ","Leng ","Hun ","Dong ","Zi ","Ben ","Wu ","Ju ","Nai ","Cai ","Jian ","Zhai ","Ye ","Zhi ","Sha ","Qing ","[?] ","Ying ","Cheng ","Jian ","Yan ","Nuan ","Zhong ","Chun ","Jia ","Jie ","Wei ","Yu ","Bing ","Ruo ","Ti ","Wei ","Pian ","Yan ","Feng ","Tang ","Wo ","E ","Xie ","Che ","Sheng ","Kan ","Di ","Zuo ","Cha ","Ting ","Bei ","Ye ","Huang ","Yao ","Zhan ","Chou ","Yan ","You ","Jian ","Xu ","Zha ","Ci ","Fu ","Bi ","Zhi ","Zong ","Mian ","Ji ","Yi ","Xie ","Xun ","Si ","Duan ","Ce ","Zhen ","Ou ","Tou ","Tou ","Bei ","Za ","Lu ","Jie ","Wei ","Fen ","Chang ","Gui ","Sou ","Zhi ","Su ","Xia ","Fu ","Yuan ","Rong ","Li ","Ru ","Yun ","Gou ","Ma ","Bang ","Dian ","Tang ","Hao ","Jie ","Xi ","Shan ","Qian ","Jue ","Cang ","Chu ","San ","Bei ","Xiao ","Yong ","Yao ","Tan ","Suo ","Yang ","Fa ","Bing ","Jia ","Dai ","Zai ","Tang ","[?] ","Bin ","Chu ","Nuo ","Can ","Lei ","Cui ","Yong ","Zao ","Zong ","Peng ","Song ","Ao ","Chuan ","Yu ","Zhai ","Cou ","Shang ","Qiang ","Jing ","Chi ","Sha ","Han ","Zhang ","Qing ","Yan ","Di ","Xi ","Lu ","Bei ","Piao ","Jin ","Lian ","Lu ","Man ","Qian ","Xian ","Tan ","Ying ","Dong ","Zhuan ","Xiang ","Shan ","Qiao ","Jiong ","Tui ","Zun ","Pu ","Xi ","Lao ","Chang ","Guang ","Liao ","Qi ","Deng ","Chan ","Wei ","Ji ","Fan ","Hui ","Chuan ","Jian ","Dan ","Jiao ","Jiu ","Seng ","Fen ","Xian ","Jue ","E ","Jiao ","Jian ","Tong ","Lin ","Bo ","Gu ","[?] ","Su ","Xian ","Jiang ","Min ","Ye ","Jin ","Jia ","Qiao ","Pi ","Feng ","Zhou ","Ai ","Sai "]});var EK=b((GGe,kK)=>{kK.exports=["Yi ","Jun ","Nong ","Chan ","Yi ","Dang ","Jing ","Xuan ","Kuai ","Jian ","Chu ","Dan ","Jiao ","Sha ","Zai ","[?] ","Bin ","An ","Ru ","Tai ","Chou ","Chai ","Lan ","Ni ","Jin ","Qian ","Meng ","Wu ","Ning ","Qiong ","Ni ","Chang ","Lie ","Lei ","Lu ","Kuang ","Bao ","Du ","Biao ","Zan ","Zhi ","Si ","You ","Hao ","Chen ","Chen ","Li ","Teng ","Wei ","Long ","Chu ","Chan ","Rang ","Shu ","Hui ","Li ","Luo ","Zan ","Nuo ","Tang ","Yan ","Lei ","Nang ","Er ","Wu ","Yun ","Zan ","Yuan ","Xiong ","Chong ","Zhao ","Xiong ","Xian ","Guang ","Dui ","Ke ","Dui ","Mian ","Tu ","Chang ","Er ","Dui ","Er ","Xin ","Tu ","Si ","Yan ","Yan ","Shi ","Shi ","Dang ","Qian ","Dou ","Fen ","Mao ","Shen ","Dou ","Bai ","Jing ","Li ","Huang ","Ru ","Wang ","Nei ","Quan ","Liang ","Yu ","Ba ","Gong ","Liu ","Xi ","[?] ","Lan ","Gong ","Tian ","Guan ","Xing ","Bing ","Qi ","Ju ","Dian ","Zi ","Ppwun ","Yang ","Jian ","Shou ","Ji ","Yi ","Ji ","Chan ","Jiong ","Mao ","Ran ","Nei ","Yuan ","Mao ","Gang ","Ran ","Ce ","Jiong ","Ce ","Zai ","Gua ","Jiong ","Mao ","Zhou ","Mou ","Gou ","Xu ","Mian ","Mi ","Rong ","Yin ","Xie ","Kan ","Jun ","Nong ","Yi ","Mi ","Shi ","Guan ","Meng ","Zhong ","Ju ","Yuan ","Ming ","Kou ","Lam ","Fu ","Xie ","Mi ","Bing ","Dong ","Tai ","Gang ","Feng ","Bing ","Hu ","Chong ","Jue ","Hu ","Kuang ","Ye ","Leng ","Pan ","Fu ","Min ","Dong ","Xian ","Lie ","Xia ","Jian ","Jing ","Shu ","Mei ","Tu ","Qi ","Gu ","Zhun ","Song ","Jing ","Liang ","Qing ","Diao ","Ling ","Dong ","Gan ","Jian ","Yin ","Cou ","Yi ","Li ","Cang ","Ming ","Zhuen ","Cui ","Si ","Duo ","Jin ","Lin ","Lin ","Ning ","Xi ","Du ","Ji ","Fan ","Fan ","Fan ","Feng ","Ju ","Chu ","Tako ","Feng ","Mok ","Ci ","Fu ","Feng ","Ping ","Feng ","Kai ","Huang ","Kai ","Gan ","Deng ","Ping ","Qu ","Xiong ","Kuai ","Tu ","Ao ","Chu ","Ji ","Dang ","Han ","Han ","Zao "]});var _K=b((QGe,PK)=>{PK.exports=["Dao ","Diao ","Dao ","Ren ","Ren ","Chuang ","Fen ","Qie ","Yi ","Ji ","Kan ","Qian ","Cun ","Chu ","Wen ","Ji ","Dan ","Xing ","Hua ","Wan ","Jue ","Li ","Yue ","Lie ","Liu ","Ze ","Gang ","Chuang ","Fu ","Chu ","Qu ","Ju ","Shan ","Min ","Ling ","Zhong ","Pan ","Bie ","Jie ","Jie ","Bao ","Li ","Shan ","Bie ","Chan ","Jing ","Gua ","Gen ","Dao ","Chuang ","Kui ","Ku ","Duo ","Er ","Zhi ","Shua ","Quan ","Cha ","Ci ","Ke ","Jie ","Gui ","Ci ","Gui ","Kai ","Duo ","Ji ","Ti ","Jing ","Lou ","Gen ","Ze ","Yuan ","Cuo ","Xue ","Ke ","La ","Qian ","Cha ","Chuang ","Gua ","Jian ","Cuo ","Li ","Ti ","Fei ","Pou ","Chan ","Qi ","Chuang ","Zi ","Gang ","Wan ","Bo ","Ji ","Duo ","Qing ","Yan ","Zhuo ","Jian ","Ji ","Bo ","Yan ","Ju ","Huo ","Sheng ","Jian ","Duo ","Duan ","Wu ","Gua ","Fu ","Sheng ","Jian ","Ge ","Zha ","Kai ","Chuang ","Juan ","Chan ","Tuan ","Lu ","Li ","Fou ","Shan ","Piao ","Kou ","Jiao ","Gua ","Qiao ","Jue ","Hua ","Zha ","Zhuo ","Lian ","Ju ","Pi ","Liu ","Gui ","Jiao ","Gui ","Jian ","Jian ","Tang ","Huo ","Ji ","Jian ","Yi ","Jian ","Zhi ","Chan ","Cuan ","Mo ","Li ","Zhu ","Li ","Ya ","Quan ","Ban ","Gong ","Jia ","Wu ","Mai ","Lie ","Jin ","Keng ","Xie ","Zhi ","Dong ","Zhu ","Nu ","Jie ","Qu ","Shao ","Yi ","Zhu ","Miao ","Li ","Jing ","Lao ","Lao ","Juan ","Kou ","Yang ","Wa ","Xiao ","Mou ","Kuang ","Jie ","Lie ","He ","Shi ","Ke ","Jing ","Hao ","Bo ","Min ","Chi ","Lang ","Yong ","Yong ","Mian ","Ke ","Xun ","Juan ","Qing ","Lu ","Pou ","Meng ","Lai ","Le ","Kai ","Mian ","Dong ","Xu ","Xu ","Kan ","Wu ","Yi ","Xun ","Weng ","Sheng ","Lao ","Mu ","Lu ","Piao ","Shi ","Ji ","Qin ","Qiang ","Jiao ","Quan ","Yang ","Yi ","Jue ","Fan ","Juan ","Tong ","Ju ","Dan ","Xie ","Mai ","Xun ","Xun ","Lu ","Li ","Che ","Rang ","Quan ","Bao ","Shao ","Yun ","Jiu ","Bao ","Gou ","Wu "]});var LK=b((KGe,RK)=>{RK.exports=["Yun ","Mwun ","Nay ","Gai ","Gai ","Bao ","Cong ","[?] ","Xiong ","Peng ","Ju ","Tao ","Ge ","Pu ","An ","Pao ","Fu ","Gong ","Da ","Jiu ","Qiong ","Bi ","Hua ","Bei ","Nao ","Chi ","Fang ","Jiu ","Yi ","Za ","Jiang ","Kang ","Jiang ","Kuang ","Hu ","Xia ","Qu ","Bian ","Gui ","Qie ","Zang ","Kuang ","Fei ","Hu ","Tou ","Gui ","Gui ","Hui ","Dan ","Gui ","Lian ","Lian ","Suan ","Du ","Jiu ","Qu ","Xi ","Pi ","Qu ","Yi ","Qia ","Yan ","Bian ","Ni ","Qu ","Shi ","Xin ","Qian ","Nian ","Sa ","Zu ","Sheng ","Wu ","Hui ","Ban ","Shi ","Xi ","Wan ","Hua ","Xie ","Wan ","Bei ","Zu ","Zhuo ","Xie ","Dan ","Mai ","Nan ","Dan ","Ji ","Bo ","Shuai ","Bu ","Kuang ","Bian ","Bu ","Zhan ","Qia ","Lu ","You ","Lu ","Xi ","Gua ","Wo ","Xie ","Jie ","Jie ","Wei ","Ang ","Qiong ","Zhi ","Mao ","Yin ","Wei ","Shao ","Ji ","Que ","Luan ","Shi ","Juan ","Xie ","Xu ","Jin ","Que ","Wu ","Ji ","E ","Qing ","Xi ","[?] ","Han ","Zhan ","E ","Ting ","Li ","Zhe ","Han ","Li ","Ya ","Ya ","Yan ","She ","Zhi ","Zha ","Pang ","[?] ","He ","Ya ","Zhi ","Ce ","Pang ","Ti ","Li ","She ","Hou ","Ting ","Zui ","Cuo ","Fei ","Yuan ","Ce ","Yuan ","Xiang ","Yan ","Li ","Jue ","Sha ","Dian ","Chu ","Jiu ","Qin ","Ao ","Gui ","Yan ","Si ","Li ","Chang ","Lan ","Li ","Yan ","Yan ","Yuan ","Si ","Gong ","Lin ","Qiu ","Qu ","Qu ","Uk ","Lei ","Du ","Xian ","Zhuan ","San ","Can ","Can ","Can ","Can ","Ai ","Dai ","You ","Cha ","Ji ","You ","Shuang ","Fan ","Shou ","Guai ","Ba ","Fa ","Ruo ","Shi ","Shu ","Zhuo ","Qu ","Shou ","Bian ","Xu ","Jia ","Pan ","Sou ","Gao ","Wei ","Sou ","Die ","Rui ","Cong ","Kou ","Gu ","Ju ","Ling ","Gua ","Tao ","Kou ","Zhi ","Jiao ","Zhao ","Ba ","Ding ","Ke ","Tai ","Chi ","Shi ","You ","Qiu ","Po ","Xie ","Hao ","Si ","Tan ","Chi ","Le ","Diao ","Ji ","[?] ","Hong "]});var IK=b((zGe,FK)=>{FK.exports=["Mie ","Xu ","Mang ","Chi ","Ge ","Xuan ","Yao ","Zi ","He ","Ji ","Diao ","Cun ","Tong ","Ming ","Hou ","Li ","Tu ","Xiang ","Zha ","Xia ","Ye ","Lu ","A ","Ma ","Ou ","Xue ","Yi ","Jun ","Chou ","Lin ","Tun ","Yin ","Fei ","Bi ","Qin ","Qin ","Jie ","Bu ","Fou ","Ba ","Dun ","Fen ","E ","Han ","Ting ","Hang ","Shun ","Qi ","Hong ","Zhi ","Shen ","Wu ","Wu ","Chao ","Ne ","Xue ","Xi ","Chui ","Dou ","Wen ","Hou ","Ou ","Wu ","Gao ","Ya ","Jun ","Lu ","E ","Ge ","Mei ","Ai ","Qi ","Cheng ","Wu ","Gao ","Fu ","Jiao ","Hong ","Chi ","Sheng ","Ne ","Tun ","Fu ","Yi ","Dai ","Ou ","Li ","Bai ","Yuan ","Kuai ","[?] ","Qiang ","Wu ","E ","Shi ","Quan ","Pen ","Wen ","Ni ","M ","Ling ","Ran ","You ","Di ","Zhou ","Shi ","Zhou ","Tie ","Xi ","Yi ","Qi ","Ping ","Zi ","Gu ","Zi ","Wei ","Xu ","He ","Nao ","Xia ","Pei ","Yi ","Xiao ","Shen ","Hu ","Ming ","Da ","Qu ","Ju ","Gem ","Za ","Tuo ","Duo ","Pou ","Pao ","Bi ","Fu ","Yang ","He ","Zha ","He ","Hai ","Jiu ","Yong ","Fu ","Que ","Zhou ","Wa ","Ka ","Gu ","Ka ","Zuo ","Bu ","Long ","Dong ","Ning ","Tha ","Si ","Xian ","Huo ","Qi ","Er ","E ","Guang ","Zha ","Xi ","Yi ","Lie ","Zi ","Mie ","Mi ","Zhi ","Yao ","Ji ","Zhou ","Ge ","Shuai ","Zan ","Xiao ","Ke ","Hui ","Kua ","Huai ","Tao ","Xian ","E ","Xuan ","Xiu ","Wai ","Yan ","Lao ","Yi ","Ai ","Pin ","Shen ","Tong ","Hong ","Xiong ","Chi ","Wa ","Ha ","Zai ","Yu ","Di ","Pai ","Xiang ","Ai ","Hen ","Kuang ","Ya ","Da ","Xiao ","Bi ","Yue ","[?] ","Hua ","Sasou ","Kuai ","Duo ","[?] ","Ji ","Nong ","Mou ","Yo ","Hao ","Yuan ","Long ","Pou ","Mang ","Ge ","E ","Chi ","Shao ","Li ","Na ","Zu ","He ","Ku ","Xiao ","Xian ","Lao ","Bo ","Zhe ","Zha ","Liang ","Ba ","Mie ","Le ","Sui ","Fou ","Bu ","Han ","Heng ","Geng ","Shuo ","Ge "]});var AK=b((VGe,jK)=>{jK.exports=["You ","Yan ","Gu ","Gu ","Bai ","Han ","Suo ","Chun ","Yi ","Ai ","Jia ","Tu ","Xian ","Huan ","Li ","Xi ","Tang ","Zuo ","Qiu ","Che ","Wu ","Zao ","Ya ","Dou ","Qi ","Di ","Qin ","Ma ","Mal ","Hong ","Dou ","Kes ","Lao ","Liang ","Suo ","Zao ","Huan ","Lang ","Sha ","Ji ","Zuo ","Wo ","Feng ","Yin ","Hu ","Qi ","Shou ","Wei ","Shua ","Chang ","Er ","Li ","Qiang ","An ","Jie ","Yo ","Nian ","Yu ","Tian ","Lai ","Sha ","Xi ","Tuo ","Hu ","Ai ","Zhou ","Nou ","Ken ","Zhuo ","Zhuo ","Shang ","Di ","Heng ","Lan ","A ","Xiao ","Xiang ","Tun ","Wu ","Wen ","Cui ","Sha ","Hu ","Qi ","Qi ","Tao ","Dan ","Dan ","Ye ","Zi ","Bi ","Cui ","Chuo ","He ","Ya ","Qi ","Zhe ","Pei ","Liang ","Xian ","Pi ","Sha ","La ","Ze ","Qing ","Gua ","Pa ","Zhe ","Se ","Zhuan ","Nie ","Guo ","Luo ","Yan ","Di ","Quan ","Tan ","Bo ","Ding ","Lang ","Xiao ","[?] ","Tang ","Chi ","Ti ","An ","Jiu ","Dan ","Ke ","Yong ","Wei ","Nan ","Shan ","Yu ","Zhe ","La ","Jie ","Hou ","Han ","Die ","Zhou ","Chai ","Wai ","Re ","Yu ","Yin ","Zan ","Yao ","Wo ","Mian ","Hu ","Yun ","Chuan ","Hui ","Huan ","Huan ","Xi ","He ","Ji ","Kui ","Zhong ","Wei ","Sha ","Xu ","Huang ","Du ","Nie ","Xuan ","Liang ","Yu ","Sang ","Chi ","Qiao ","Yan ","Dan ","Pen ","Can ","Li ","Yo ","Zha ","Wei ","Miao ","Ying ","Pen ","Phos ","Kui ","Xi ","Yu ","Jie ","Lou ","Ku ","Sao ","Huo ","Ti ","Yao ","He ","A ","Xiu ","Qiang ","Se ","Yong ","Su ","Hong ","Xie ","Yi ","Suo ","Ma ","Cha ","Hai ","Ke ","Ta ","Sang ","Tian ","Ru ","Sou ","Wa ","Ji ","Pang ","Wu ","Xian ","Shi ","Ge ","Zi ","Jie ","Luo ","Weng ","Wa ","Si ","Chi ","Hao ","Suo ","Jia ","Hai ","Suo ","Qin ","Nie ","He ","Cis ","Sai ","Ng ","Ge ","Na ","Dia ","Ai ","[?] ","Tong ","Bi ","Ao ","Ao ","Lian ","Cui ","Zhe ","Mo ","Sou ","Sou ","Tan "]});var MK=b((e6e,OK)=>{OK.exports=["Di ","Qi ","Jiao ","Chong ","Jiao ","Kai ","Tan ","San ","Cao ","Jia ","Ai ","Xiao ","Piao ","Lou ","Ga ","Gu ","Xiao ","Hu ","Hui ","Guo ","Ou ","Xian ","Ze ","Chang ","Xu ","Po ","De ","Ma ","Ma ","Hu ","Lei ","Du ","Ga ","Tang ","Ye ","Beng ","Ying ","Saai ","Jiao ","Mi ","Xiao ","Hua ","Mai ","Ran ","Zuo ","Peng ","Lao ","Xiao ","Ji ","Zhu ","Chao ","Kui ","Zui ","Xiao ","Si ","Hao ","Fu ","Liao ","Qiao ","Xi ","Xiu ","Tan ","Tan ","Mo ","Xun ","E ","Zun ","Fan ","Chi ","Hui ","Zan ","Chuang ","Cu ","Dan ","Yu ","Tun ","Cheng ","Jiao ","Ye ","Xi ","Qi ","Hao ","Lian ","Xu ","Deng ","Hui ","Yin ","Pu ","Jue ","Qin ","Xun ","Nie ","Lu ","Si ","Yan ","Ying ","Da ","Dan ","Yu ","Zhou ","Jin ","Nong ","Yue ","Hui ","Qi ","E ","Zao ","Yi ","Shi ","Jiao ","Yuan ","Ai ","Yong ","Jue ","Kuai ","Yu ","Pen ","Dao ","Ge ","Xin ","Dun ","Dang ","Sin ","Sai ","Pi ","Pi ","Yin ","Zui ","Ning ","Di ","Lan ","Ta ","Huo ","Ru ","Hao ","Xia ","Ya ","Duo ","Xi ","Chou ","Ji ","Jin ","Hao ","Ti ","Chang ","[?] ","[?] ","Ca ","Ti ","Lu ","Hui ","Bo ","You ","Nie ","Yin ","Hu ","Mo ","Huang ","Zhe ","Li ","Liu ","Haai ","Nang ","Xiao ","Mo ","Yan ","Li ","Lu ","Long ","Fu ","Dan ","Chen ","Pin ","Pi ","Xiang ","Huo ","Mo ","Xi ","Duo ","Ku ","Yan ","Chan ","Ying ","Rang ","Dian ","La ","Ta ","Xiao ","Jiao ","Chuo ","Huan ","Huo ","Zhuan ","Nie ","Xiao ","Ca ","Li ","Chan ","Chai ","Li ","Yi ","Luo ","Nang ","Zan ","Su ","Xi ","So ","Jian ","Za ","Zhu ","Lan ","Nie ","Nang ","[?] ","[?] ","Wei ","Hui ","Yin ","Qiu ","Si ","Nin ","Jian ","Hui ","Xin ","Yin ","Nan ","Tuan ","Tuan ","Dun ","Kang ","Yuan ","Jiong ","Pian ","Yun ","Cong ","Hu ","Hui ","Yuan ","You ","Guo ","Kun ","Cong ","Wei ","Tu ","Wei ","Lun ","Guo ","Qun ","Ri ","Ling ","Gu ","Guo ","Tai ","Guo ","Tu ","You "]});var BK=b((t6e,NK)=>{NK.exports=["Guo ","Yin ","Hun ","Pu ","Yu ","Han ","Yuan ","Lun ","Quan ","Yu ","Qing ","Guo ","Chuan ","Wei ","Yuan ","Quan ","Ku ","Fu ","Yuan ","Yuan ","E ","Tu ","Tu ","Tu ","Tuan ","Lue ","Hui ","Yi ","Yuan ","Luan ","Luan ","Tu ","Ya ","Tu ","Ting ","Sheng ","Pu ","Lu ","Iri ","Ya ","Zai ","Wei ","Ge ","Yu ","Wu ","Gui ","Pi ","Yi ","Di ","Qian ","Qian ","Zhen ","Zhuo ","Dang ","Qia ","Akutsu ","Yama ","Kuang ","Chang ","Qi ","Nie ","Mo ","Ji ","Jia ","Zhi ","Zhi ","Ban ","Xun ","Tou ","Qin ","Fen ","Jun ","Keng ","Tun ","Fang ","Fen ","Ben ","Tan ","Kan ","Pi ","Zuo ","Keng ","Bi ","Xing ","Di ","Jing ","Ji ","Kuai ","Di ","Jing ","Jian ","Tan ","Li ","Ba ","Wu ","Fen ","Zhui ","Po ","Pan ","Tang ","Kun ","Qu ","Tan ","Zhi ","Tuo ","Gan ","Ping ","Dian ","Gua ","Ni ","Tai ","Pi ","Jiong ","Yang ","Fo ","Ao ","Liu ","Qiu ","Mu ","Ke ","Gou ","Xue ","Ba ","Chi ","Che ","Ling ","Zhu ","Fu ","Hu ","Zhi ","Chui ","La ","Long ","Long ","Lu ","Ao ","Tay ","Pao ","[?] ","Xing ","Dong ","Ji ","Ke ","Lu ","Ci ","Chi ","Lei ","Gai ","Yin ","Hou ","Dui ","Zhao ","Fu ","Guang ","Yao ","Duo ","Duo ","Gui ","Cha ","Yang ","Yin ","Fa ","Gou ","Yuan ","Die ","Xie ","Ken ","Jiong ","Shou ","E ","Ha ","Dian ","Hong ","Wu ","Kua ","[?] ","Tao ","Dang ","Kai ","Gake ","Nao ","An ","Xing ","Xian ","Huan ","Bang ","Pei ","Ba ","Yi ","Yin ","Han ","Xu ","Chui ","Cen ","Geng ","Ai ","Peng ","Fang ","Que ","Yong ","Xun ","Jia ","Di ","Mai ","Lang ","Xuan ","Cheng ","Yan ","Jin ","Zhe ","Lei ","Lie ","Bu ","Cheng ","Gomi ","Bu ","Shi ","Xun ","Guo ","Jiong ","Ye ","Nian ","Di ","Yu ","Bu ","Ya ","Juan ","Sui ","Pi ","Cheng ","Wan ","Ju ","Lun ","Zheng ","Kong ","Chong ","Dong ","Dai ","Tan ","An ","Cai ","Shu ","Beng ","Kan ","Zhi ","Duo ","Yi ","Zhi ","Yi ","Pei ","Ji ","Zhun ","Qi ","Sao ","Ju ","Ni "]});var qK=b((i6e,HK)=>{HK.exports=["Ku ","Ke ","Tang ","Kun ","Ni ","Jian ","Dui ","Jin ","Gang ","Yu ","E ","Peng ","Gu ","Tu ","Leng ","[?] ","Ya ","Qian ","[?] ","An ","[?] ","Duo ","Nao ","Tu ","Cheng ","Yin ","Hun ","Bi ","Lian ","Guo ","Die ","Zhuan ","Hou ","Bao ","Bao ","Yu ","Di ","Mao ","Jie ","Ruan ","E ","Geng ","Kan ","Zong ","Yu ","Huang ","E ","Yao ","Yan ","Bao ","Ji ","Mei ","Chang ","Du ","Tuo ","Yin ","Feng ","Zhong ","Jie ","Zhen ","Feng ","Gang ","Chuan ","Jian ","Pyeng ","Toride ","Xiang ","Huang ","Leng ","Duan ","[?] ","Xuan ","Ji ","Ji ","Kuai ","Ying ","Ta ","Cheng ","Yong ","Kai ","Su ","Su ","Shi ","Mi ","Ta ","Weng ","Cheng ","Tu ","Tang ","Que ","Zhong ","Li ","Peng ","Bang ","Sai ","Zang ","Dui ","Tian ","Wu ","Cheng ","Xun ","Ge ","Zhen ","Ai ","Gong ","Yan ","Kan ","Tian ","Yuan ","Wen ","Xie ","Liu ","Ama ","Lang ","Chang ","Peng ","Beng ","Chen ","Cu ","Lu ","Ou ","Qian ","Mei ","Mo ","Zhuan ","Shuang ","Shu ","Lou ","Chi ","Man ","Biao ","Jing ","Qi ","Shu ","Di ","Zhang ","Kan ","Yong ","Dian ","Chen ","Zhi ","Xi ","Guo ","Qiang ","Jin ","Di ","Shang ","Mu ","Cui ","Yan ","Ta ","Zeng ","Qi ","Qiang ","Liang ","[?] ","Zhui ","Qiao ","Zeng ","Xu ","Shan ","Shan ","Ba ","Pu ","Kuai ","Dong ","Fan ","Que ","Mo ","Dun ","Dun ","Dun ","Di ","Sheng ","Duo ","Duo ","Tan ","Deng ","Wu ","Fen ","Huang ","Tan ","Da ","Ye ","Sho ","Mama ","Yu ","Qiang ","Ji ","Qiao ","Ken ","Yi ","Pi ","Bi ","Dian ","Jiang ","Ye ","Yong ","Bo ","Tan ","Lan ","Ju ","Huai ","Dang ","Rang ","Qian ","Xun ","Lan ","Xi ","He ","Ai ","Ya ","Dao ","Hao ","Ruan ","Mama ","Lei ","Kuang ","Lu ","Yan ","Tan ","Wei ","Huai ","Long ","Long ","Rui ","Li ","Lin ","Rang ","Ten ","Xun ","Yan ","Lei ","Ba ","[?] ","Shi ","Ren ","[?] ","Zhuang ","Zhuang ","Sheng ","Yi ","Mai ","Ke ","Zhu ","Zhuang ","Hu ","Hu ","Kun ","Yi ","Hu ","Xu ","Kun ","Shou ","Mang ","Zun "]});var WK=b((n6e,YK)=>{YK.exports=["Shou ","Yi ","Zhi ","Gu ","Chu ","Jiang ","Feng ","Bei ","Cay ","Bian ","Sui ","Qun ","Ling ","Fu ","Zuo ","Xia ","Xiong ","[?] ","Nao ","Xia ","Kui ","Xi ","Wai ","Yuan ","Mao ","Su ","Duo ","Duo ","Ye ","Qing ","Uys ","Gou ","Gou ","Qi ","Meng ","Meng ","Yin ","Huo ","Chen ","Da ","Ze ","Tian ","Tai ","Fu ","Guai ","Yao ","Yang ","Hang ","Gao ","Shi ","Ben ","Tai ","Tou ","Yan ","Bi ","Yi ","Kua ","Jia ","Duo ","Kwu ","Kuang ","Yun ","Jia ","Pa ","En ","Lian ","Huan ","Di ","Yan ","Pao ","Quan ","Qi ","Nai ","Feng ","Xie ","Fen ","Dian ","[?] ","Kui ","Zou ","Huan ","Qi ","Kai ","Zha ","Ben ","Yi ","Jiang ","Tao ","Zang ","Ben ","Xi ","Xiang ","Fei ","Diao ","Xun ","Keng ","Dian ","Ao ","She ","Weng ","Pan ","Ao ","Wu ","Ao ","Jiang ","Lian ","Duo ","Yun ","Jiang ","Shi ","Fen ","Huo ","Bi ","Lian ","Duo ","Nu ","Nu ","Ding ","Nai ","Qian ","Jian ","Ta ","Jiu ","Nan ","Cha ","Hao ","Xian ","Fan ","Ji ","Shuo ","Ru ","Fei ","Wang ","Hong ","Zhuang ","Fu ","Ma ","Dan ","Ren ","Fu ","Jing ","Yan ","Xie ","Wen ","Zhong ","Pa ","Du ","Ji ","Keng ","Zhong ","Yao ","Jin ","Yun ","Miao ","Pei ","Shi ","Yue ","Zhuang ","Niu ","Yan ","Na ","Xin ","Fen ","Bi ","Yu ","Tuo ","Feng ","Yuan ","Fang ","Wu ","Yu ","Gui ","Du ","Ba ","Ni ","Zhou ","Zhuo ","Zhao ","Da ","Nai ","Yuan ","Tou ","Xuan ","Zhi ","E ","Mei ","Mo ","Qi ","Bi ","Shen ","Qie ","E ","He ","Xu ","Fa ","Zheng ","Min ","Ban ","Mu ","Fu ","Ling ","Zi ","Zi ","Shi ","Ran ","Shan ","Yang ","Man ","Jie ","Gu ","Si ","Xing ","Wei ","Zi ","Ju ","Shan ","Pin ","Ren ","Yao ","Tong ","Jiang ","Shu ","Ji ","Gai ","Shang ","Kuo ","Juan ","Jiao ","Gou ","Mu ","Jian ","Jian ","Yi ","Nian ","Zhi ","Ji ","Ji ","Xian ","Heng ","Guang ","Jun ","Kua ","Yan ","Ming ","Lie ","Pei ","Yan ","You ","Yan ","Cha ","Shen ","Yin ","Chi ","Gui ","Quan ","Zi "]});var JK=b((r6e,ZK)=>{ZK.exports=["Song ","Wei ","Hong ","Wa ","Lou ","Ya ","Rao ","Jiao ","Luan ","Ping ","Xian ","Shao ","Li ","Cheng ","Xiao ","Mang ","Fu ","Suo ","Wu ","Wei ","Ke ","Lai ","Chuo ","Ding ","Niang ","Xing ","Nan ","Yu ","Nuo ","Pei ","Nei ","Juan ","Shen ","Zhi ","Han ","Di ","Zhuang ","E ","Pin ","Tui ","Han ","Mian ","Wu ","Yan ","Wu ","Xi ","Yan ","Yu ","Si ","Yu ","Wa ","[?] ","Xian ","Ju ","Qu ","Shui ","Qi ","Xian ","Zhui ","Dong ","Chang ","Lu ","Ai ","E ","E ","Lou ","Mian ","Cong ","Pou ","Ju ","Po ","Cai ","Ding ","Wan ","Biao ","Xiao ","Shu ","Qi ","Hui ","Fu ","E ","Wo ","Tan ","Fei ","Wei ","Jie ","Tian ","Ni ","Quan ","Jing ","Hun ","Jing ","Qian ","Dian ","Xing ","Hu ","Wa ","Lai ","Bi ","Yin ","Chou ","Chuo ","Fu ","Jing ","Lun ","Yan ","Lan ","Kun ","Yin ","Ya ","Ju ","Li ","Dian ","Xian ","Hwa ","Hua ","Ying ","Chan ","Shen ","Ting ","Dang ","Yao ","Wu ","Nan ","Ruo ","Jia ","Tou ","Xu ","Yu ","Wei ","Ti ","Rou ","Mei ","Dan ","Ruan ","Qin ","Hui ","Wu ","Qian ","Chun ","Mao ","Fu ","Jie ","Duan ","Xi ","Zhong ","Mei ","Huang ","Mian ","An ","Ying ","Xuan ","Jie ","Wei ","Mei ","Yuan ","Zhen ","Qiu ","Ti ","Xie ","Tuo ","Lian ","Mao ","Ran ","Si ","Pian ","Wei ","Wa ","Jiu ","Hu ","Ao ","[?] ","Bou ","Xu ","Tou ","Gui ","Zou ","Yao ","Pi ","Xi ","Yuan ","Ying ","Rong ","Ru ","Chi ","Liu ","Mei ","Pan ","Ao ","Ma ","Gou ","Kui ","Qin ","Jia ","Sao ","Zhen ","Yuan ","Cha ","Yong ","Ming ","Ying ","Ji ","Su ","Niao ","Xian ","Tao ","Pang ","Lang ","Nao ","Bao ","Ai ","Pi ","Pin ","Yi ","Piao ","Yu ","Lei ","Xuan ","Man ","Yi ","Zhang ","Kang ","Yong ","Ni ","Li ","Di ","Gui ","Yan ","Jin ","Zhuan ","Chang ","Ce ","Han ","Nen ","Lao ","Mo ","Zhe ","Hu ","Hu ","Ao ","Nen ","Qiang ","Ma ","Pie ","Gu ","Wu ","Jiao ","Tuo ","Zhan ","Mao ","Xian ","Xian ","Mo ","Liao ","Lian ","Hua "]});var XK=b((o6e,$K)=>{$K.exports=["Gui ","Deng ","Zhi ","Xu ","Yi ","Hua ","Xi ","Hui ","Rao ","Xi ","Yan ","Chan ","Jiao ","Mei ","Fan ","Fan ","Xian ","Yi ","Wei ","Jiao ","Fu ","Shi ","Bi ","Shan ","Sui ","Qiang ","Lian ","Huan ","Xin ","Niao ","Dong ","Yi ","Can ","Ai ","Niang ","Neng ","Ma ","Tiao ","Chou ","Jin ","Ci ","Yu ","Pin ","Yong ","Xu ","Nai ","Yan ","Tai ","Ying ","Can ","Niao ","Wo ","Ying ","Mian ","Kaka ","Ma ","Shen ","Xing ","Ni ","Du ","Liu ","Yuan ","Lan ","Yan ","Shuang ","Ling ","Jiao ","Niang ","Lan ","Xian ","Ying ","Shuang ","Shuai ","Quan ","Mi ","Li ","Luan ","Yan ","Zhu ","Lan ","Zi ","Jie ","Jue ","Jue ","Kong ","Yun ","Zi ","Zi ","Cun ","Sun ","Fu ","Bei ","Zi ","Xiao ","Xin ","Meng ","Si ","Tai ","Bao ","Ji ","Gu ","Nu ","Xue ","[?] ","Zhuan ","Hai ","Luan ","Sun ","Huai ","Mie ","Cong ","Qian ","Shu ","Chan ","Ya ","Zi ","Ni ","Fu ","Zi ","Li ","Xue ","Bo ","Ru ","Lai ","Nie ","Nie ","Ying ","Luan ","Mian ","Zhu ","Rong ","Ta ","Gui ","Zhai ","Qiong ","Yu ","Shou ","An ","Tu ","Song ","Wan ","Rou ","Yao ","Hong ","Yi ","Jing ","Zhun ","Mi ","Zhu ","Dang ","Hong ","Zong ","Guan ","Zhou ","Ding ","Wan ","Yi ","Bao ","Shi ","Shi ","Chong ","Shen ","Ke ","Xuan ","Shi ","You ","Huan ","Yi ","Tiao ","Shi ","Xian ","Gong ","Cheng ","Qun ","Gong ","Xiao ","Zai ","Zha ","Bao ","Hai ","Yan ","Xiao ","Jia ","Shen ","Chen ","Rong ","Huang ","Mi ","Kou ","Kuan ","Bin ","Su ","Cai ","Zan ","Ji ","Yuan ","Ji ","Yin ","Mi ","Kou ","Qing ","Que ","Zhen ","Jian ","Fu ","Ning ","Bing ","Huan ","Mei ","Qin ","Han ","Yu ","Shi ","Ning ","Qin ","Ning ","Zhi ","Yu ","Bao ","Kuan ","Ning ","Qin ","Mo ","Cha ","Ju ","Gua ","Qin ","Hu ","Wu ","Liao ","Shi ","Zhu ","Zhai ","Shen ","Wei ","Xie ","Kuan ","Hui ","Liao ","Jun ","Huan ","Yi ","Yi ","Bao ","Qin ","Chong ","Bao ","Feng ","Cun ","Dui ","Si ","Xun ","Dao ","Lu ","Dui ","Shou "]});var GK=b((s6e,UK)=>{UK.exports=["Po ","Feng ","Zhuan ","Fu ","She ","Ke ","Jiang ","Jiang ","Zhuan ","Wei ","Zun ","Xun ","Shu ","Dui ","Dao ","Xiao ","Ji ","Shao ","Er ","Er ","Er ","Ga ","Jian ","Shu ","Chen ","Shang ","Shang ","Mo ","Ga ","Chang ","Liao ","Xian ","Xian ","[?] ","Wang ","Wang ","You ","Liao ","Liao ","Yao ","Mang ","Wang ","Wang ","Wang ","Ga ","Yao ","Duo ","Kui ","Zhong ","Jiu ","Gan ","Gu ","Gan ","Tui ","Gan ","Gan ","Shi ","Yin ","Chi ","Kao ","Ni ","Jin ","Wei ","Niao ","Ju ","Pi ","Ceng ","Xi ","Bi ","Ju ","Jie ","Tian ","Qu ","Ti ","Jie ","Wu ","Diao ","Shi ","Shi ","Ping ","Ji ","Xie ","Chen ","Xi ","Ni ","Zhan ","Xi ","[?] ","Man ","E ","Lou ","Ping ","Ti ","Fei ","Shu ","Xie ","Tu ","Lu ","Lu ","Xi ","Ceng ","Lu ","Ju ","Xie ","Ju ","Jue ","Liao ","Jue ","Shu ","Xi ","Che ","Tun ","Ni ","Shan ","[?] ","Xian ","Li ","Xue ","Nata ","[?] ","Long ","Yi ","Qi ","Ren ","Wu ","Han ","Shen ","Yu ","Chu ","Sui ","Qi ","[?] ","Yue ","Ban ","Yao ","Ang ","Ya ","Wu ","Jie ","E ","Ji ","Qian ","Fen ","Yuan ","Qi ","Cen ","Qian ","Qi ","Cha ","Jie ","Qu ","Gang ","Xian ","Ao ","Lan ","Dao ","Ba ","Zuo ","Zuo ","Yang ","Ju ","Gang ","Ke ","Gou ","Xue ","Bei ","Li ","Tiao ","Ju ","Yan ","Fu ","Xiu ","Jia ","Ling ","Tuo ","Pei ","You ","Dai ","Kuang ","Yue ","Qu ","Hu ","Po ","Min ","An ","Tiao ","Ling ","Chi ","Yuri ","Dong ","Cem ","Kui ","Xiu ","Mao ","Tong ","Xue ","Yi ","Kura ","He ","Ke ","Luo ","E ","Fu ","Xun ","Die ","Lu ","An ","Er ","Gai ","Quan ","Tong ","Yi ","Mu ","Shi ","An ","Wei ","Hu ","Zhi ","Mi ","Li ","Ji ","Tong ","Wei ","You ","Sang ","Xia ","Li ","Yao ","Jiao ","Zheng ","Luan ","Jiao ","E ","E ","Yu ","Ye ","Bu ","Qiao ","Qun ","Feng ","Feng ","Nao ","Li ","You ","Xian ","Hong ","Dao ","Shen ","Cheng ","Tu ","Geng ","Jun ","Hao ","Xia ","Yin ","Yu "]});var KK=b((a6e,QK)=>{QK.exports=["Lang ","Kan ","Lao ","Lai ","Xian ","Que ","Kong ","Chong ","Chong ","Ta ","Lin ","Hua ","Ju ","Lai ","Qi ","Min ","Kun ","Kun ","Zu ","Gu ","Cui ","Ya ","Ya ","Gang ","Lun ","Lun ","Leng ","Jue ","Duo ","Zheng ","Guo ","Yin ","Dong ","Han ","Zheng ","Wei ","Yao ","Pi ","Yan ","Song ","Jie ","Beng ","Zu ","Jue ","Dong ","Zhan ","Gu ","Yin ","[?] ","Ze ","Huang ","Yu ","Wei ","Yang ","Feng ","Qiu ","Dun ","Ti ","Yi ","Zhi ","Shi ","Zai ","Yao ","E ","Zhu ","Kan ","Lu ","Yan ","Mei ","Gan ","Ji ","Ji ","Huan ","Ting ","Sheng ","Mei ","Qian ","Wu ","Yu ","Zong ","Lan ","Jue ","Yan ","Yan ","Wei ","Zong ","Cha ","Sui ","Rong ","Yamashina ","Qin ","Yu ","Kewashii ","Lou ","Tu ","Dui ","Xi ","Weng ","Cang ","Dang ","Hong ","Jie ","Ai ","Liu ","Wu ","Song ","Qiao ","Zi ","Wei ","Beng ","Dian ","Cuo ","Qian ","Yong ","Nie ","Cuo ","Ji ","[?] ","Tao ","Song ","Zong ","Jiang ","Liao ","Kang ","Chan ","Die ","Cen ","Ding ","Tu ","Lou ","Zhang ","Zhan ","Zhan ","Ao ","Cao ","Qu ","Qiang ","Zui ","Zui ","Dao ","Dao ","Xi ","Yu ","Bo ","Long ","Xiang ","Ceng ","Bo ","Qin ","Jiao ","Yan ","Lao ","Zhan ","Lin ","Liao ","Liao ","Jin ","Deng ","Duo ","Zun ","Jiao ","Gui ","Yao ","Qiao ","Yao ","Jue ","Zhan ","Yi ","Xue ","Nao ","Ye ","Ye ","Yi ","E ","Xian ","Ji ","Xie ","Ke ","Xi ","Di ","Ao ","Zui ","[?] ","Ni ","Rong ","Dao ","Ling ","Za ","Yu ","Yue ","Yin ","[?] ","Jie ","Li ","Sui ","Long ","Long ","Dian ","Ying ","Xi ","Ju ","Chan ","Ying ","Kui ","Yan ","Wei ","Nao ","Quan ","Chao ","Cuan ","Luan ","Dian ","Dian ","[?] ","Yan ","Yan ","Yan ","Nao ","Yan ","Chuan ","Gui ","Chuan ","Zhou ","Huang ","Jing ","Xun ","Chao ","Chao ","Lie ","Gong ","Zuo ","Qiao ","Ju ","Gong ","Kek ","Wu ","Pwu ","Pwu ","Chai ","Qiu ","Qiu ","Ji ","Yi ","Si ","Ba ","Zhi ","Zhao ","Xiang ","Yi ","Jin ","Xun ","Juan ","Phas ","Xun ","Jin ","Fu "]});var VK=b((l6e,zK)=>{zK.exports=["Za ","Bi ","Shi ","Bu ","Ding ","Shuai ","Fan ","Nie ","Shi ","Fen ","Pa ","Zhi ","Xi ","Hu ","Dan ","Wei ","Zhang ","Tang ","Dai ","Ma ","Pei ","Pa ","Tie ","Fu ","Lian ","Zhi ","Zhou ","Bo ","Zhi ","Di ","Mo ","Yi ","Yi ","Ping ","Qia ","Juan ","Ru ","Shuai ","Dai ","Zheng ","Shui ","Qiao ","Zhen ","Shi ","Qun ","Xi ","Bang ","Dai ","Gui ","Chou ","Ping ","Zhang ","Sha ","Wan ","Dai ","Wei ","Chang ","Sha ","Qi ","Ze ","Guo ","Mao ","Du ","Hou ","Zheng ","Xu ","Mi ","Wei ","Wo ","Fu ","Yi ","Bang ","Ping ","Tazuna ","Gong ","Pan ","Huang ","Dao ","Mi ","Jia ","Teng ","Hui ","Zhong ","Shan ","Man ","Mu ","Biao ","Guo ","Ze ","Mu ","Bang ","Zhang ","Jiong ","Chan ","Fu ","Zhi ","Hu ","Fan ","Chuang ","Bi ","Hei ","[?] ","Mi ","Qiao ","Chan ","Fen ","Meng ","Bang ","Chou ","Mie ","Chu ","Jie ","Xian ","Lan ","Gan ","Ping ","Nian ","Qian ","Bing ","Bing ","Xing ","Gan ","Yao ","Huan ","You ","You ","Ji ","Yan ","Pi ","Ting ","Ze ","Guang ","Zhuang ","Mo ","Qing ","Bi ","Qin ","Dun ","Chuang ","Gui ","Ya ","Bai ","Jie ","Xu ","Lu ","Wu ","[?] ","Ku ","Ying ","Di ","Pao ","Dian ","Ya ","Miao ","Geng ","Ci ","Fu ","Tong ","Pang ","Fei ","Xiang ","Yi ","Zhi ","Tiao ","Zhi ","Xiu ","Du ","Zuo ","Xiao ","Tu ","Gui ","Ku ","Pang ","Ting ","You ","Bu ","Ding ","Cheng ","Lai ","Bei ","Ji ","An ","Shu ","Kang ","Yong ","Tuo ","Song ","Shu ","Qing ","Yu ","Yu ","Miao ","Sou ","Ce ","Xiang ","Fei ","Jiu ","He ","Hui ","Liu ","Sha ","Lian ","Lang ","Sou ","Jian ","Pou ","Qing ","Jiu ","Jiu ","Qin ","Ao ","Kuo ","Lou ","Yin ","Liao ","Dai ","Lu ","Yi ","Chu ","Chan ","Tu ","Si ","Xin ","Miao ","Chang ","Wu ","Fei ","Guang ","Koc ","Kuai ","Bi ","Qiang ","Xie ","Lin ","Lin ","Liao ","Lu ","[?] ","Ying ","Xian ","Ting ","Yong ","Li ","Ting ","Yin ","Xun ","Yan ","Ting ","Di ","Po ","Jian ","Hui ","Nai ","Hui ","Gong ","Nian "]});var tz=b((u6e,ez)=>{ez.exports=["Kai ","Bian ","Yi ","Qi ","Nong ","Fen ","Ju ","Yan ","Yi ","Zang ","Bi ","Yi ","Yi ","Er ","San ","Shi ","Er ","Shi ","Shi ","Gong ","Diao ","Yin ","Hu ","Fu ","Hong ","Wu ","Tui ","Chi ","Jiang ","Ba ","Shen ","Di ","Zhang ","Jue ","Tao ","Fu ","Di ","Mi ","Xian ","Hu ","Chao ","Nu ","Jing ","Zhen ","Yi ","Mi ","Quan ","Wan ","Shao ","Ruo ","Xuan ","Jing ","Dun ","Zhang ","Jiang ","Qiang ","Peng ","Dan ","Qiang ","Bi ","Bi ","She ","Dan ","Jian ","Gou ","Sei ","Fa ","Bi ","Kou ","Nagi ","Bie ","Xiao ","Dan ","Kuo ","Qiang ","Hong ","Mi ","Kuo ","Wan ","Jue ","Ji ","Ji ","Gui ","Dang ","Lu ","Lu ","Tuan ","Hui ","Zhi ","Hui ","Hui ","Yi ","Yi ","Yi ","Yi ","Huo ","Huo ","Shan ","Xing ","Wen ","Tong ","Yan ","Yan ","Yu ","Chi ","Cai ","Biao ","Diao ","Bin ","Peng ","Yong ","Piao ","Zhang ","Ying ","Chi ","Chi ","Zhuo ","Tuo ","Ji ","Pang ","Zhong ","Yi ","Wang ","Che ","Bi ","Chi ","Ling ","Fu ","Wang ","Zheng ","Cu ","Wang ","Jing ","Dai ","Xi ","Xun ","Hen ","Yang ","Huai ","Lu ","Hou ","Wa ","Cheng ","Zhi ","Xu ","Jing ","Tu ","Cong ","[?] ","Lai ","Cong ","De ","Pai ","Xi ","[?] ","Qi ","Chang ","Zhi ","Cong ","Zhou ","Lai ","Yu ","Xie ","Jie ","Jian ","Chi ","Jia ","Bian ","Huang ","Fu ","Xun ","Wei ","Pang ","Yao ","Wei ","Xi ","Zheng ","Piao ","Chi ","De ","Zheng ","Zheng ","Bie ","De ","Chong ","Che ","Jiao ","Wei ","Jiao ","Hui ","Mei ","Long ","Xiang ","Bao ","Qu ","Xin ","Shu ","Bi ","Yi ","Le ","Ren ","Dao ","Ding ","Gai ","Ji ","Ren ","Ren ","Chan ","Tan ","Te ","Te ","Gan ","Qi ","Shi ","Cun ","Zhi ","Wang ","Mang ","Xi ","Fan ","Ying ","Tian ","Min ","Min ","Zhong ","Chong ","Wu ","Ji ","Wu ","Xi ","Ye ","You ","Wan ","Cong ","Zhong ","Kuai ","Yu ","Bian ","Zhi ","Qi ","Cui ","Chen ","Tai ","Tun ","Qian ","Nian ","Hun ","Xiong ","Niu ","Wang ","Xian ","Xin ","Kang ","Hu ","Kai ","Fen "]});var nz=b((c6e,iz)=>{iz.exports=["Huai ","Tai ","Song ","Wu ","Ou ","Chang ","Chuang ","Ju ","Yi ","Bao ","Chao ","Min ","Pei ","Zuo ","Zen ","Yang ","Kou ","Ban ","Nu ","Nao ","Zheng ","Pa ","Bu ","Tie ","Gu ","Hu ","Ju ","Da ","Lian ","Si ","Chou ","Di ","Dai ","Yi ","Tu ","You ","Fu ","Ji ","Peng ","Xing ","Yuan ","Ni ","Guai ","Fu ","Xi ","Bi ","You ","Qie ","Xuan ","Cong ","Bing ","Huang ","Xu ","Chu ","Pi ","Xi ","Xi ","Tan ","Koraeru ","Zong ","Dui ","[?] ","Ki ","Yi ","Chi ","Ren ","Xun ","Shi ","Xi ","Lao ","Heng ","Kuang ","Mu ","Zhi ","Xie ","Lian ","Tiao ","Huang ","Die ","Hao ","Kong ","Gui ","Heng ","Xi ","Xiao ","Shu ","S ","Kua ","Qiu ","Yang ","Hui ","Hui ","Chi ","Jia ","Yi ","Xiong ","Guai ","Lin ","Hui ","Zi ","Xu ","Chi ","Xiang ","Nu ","Hen ","En ","Ke ","Tong ","Tian ","Gong ","Quan ","Xi ","Qia ","Yue ","Peng ","Ken ","De ","Hui ","E ","Kyuu ","Tong ","Yan ","Kai ","Ce ","Nao ","Yun ","Mang ","Yong ","Yong ","Yuan ","Pi ","Kun ","Qiao ","Yue ","Yu ","Yu ","Jie ","Xi ","Zhe ","Lin ","Ti ","Han ","Hao ","Qie ","Ti ","Bu ","Yi ","Qian ","Hui ","Xi ","Bei ","Man ","Yi ","Heng ","Song ","Quan ","Cheng ","Hui ","Wu ","Wu ","You ","Li ","Liang ","Huan ","Cong ","Yi ","Yue ","Li ","Nin ","Nao ","E ","Que ","Xuan ","Qian ","Wu ","Min ","Cong ","Fei ","Bei ","Duo ","Cui ","Chang ","Men ","Li ","Ji ","Guan ","Guan ","Xing ","Dao ","Qi ","Kong ","Tian ","Lun ","Xi ","Kan ","Kun ","Ni ","Qing ","Chou ","Dun ","Guo ","Chan ","Liang ","Wan ","Yuan ","Jin ","Ji ","Lin ","Yu ","Huo ","He ","Quan ","Tan ","Ti ","Ti ","Nie ","Wang ","Chuo ","Bu ","Hun ","Xi ","Tang ","Xin ","Wei ","Hui ","E ","Rui ","Zong ","Jian ","Yong ","Dian ","Ju ","Can ","Cheng ","De ","Bei ","Qie ","Can ","Dan ","Guan ","Duo ","Nao ","Yun ","Xiang ","Zhui ","Die ","Huang ","Chun ","Qiong ","Re ","Xing ","Ce ","Bian ","Hun ","Zong ","Ti "]});var oz=b((h6e,rz)=>{rz.exports=["Qiao ","Chou ","Bei ","Xuan ","Wei ","Ge ","Qian ","Wei ","Yu ","Yu ","Bi ","Xuan ","Huan ","Min ","Bi ","Yi ","Mian ","Yong ","Kai ","Dang ","Yin ","E ","Chen ","Mou ","Ke ","Ke ","Yu ","Ai ","Qie ","Yan ","Nuo ","Gan ","Yun ","Zong ","Sai ","Leng ","Fen ","[?] ","Kui ","Kui ","Que ","Gong ","Yun ","Su ","Su ","Qi ","Yao ","Song ","Huang ","Ji ","Gu ","Ju ","Chuang ","Ni ","Xie ","Kai ","Zheng ","Yong ","Cao ","Sun ","Shen ","Bo ","Kai ","Yuan ","Xie ","Hun ","Yong ","Yang ","Li ","Sao ","Tao ","Yin ","Ci ","Xu ","Qian ","Tai ","Huang ","Yun ","Shen ","Ming ","[?] ","She ","Cong ","Piao ","Mo ","Mu ","Guo ","Chi ","Can ","Can ","Can ","Cui ","Min ","Te ","Zhang ","Tong ","Ao ","Shuang ","Man ","Guan ","Que ","Zao ","Jiu ","Hui ","Kai ","Lian ","Ou ","Song ","Jin ","Yin ","Lu ","Shang ","Wei ","Tuan ","Man ","Qian ","She ","Yong ","Qing ","Kang ","Di ","Zhi ","Lou ","Juan ","Qi ","Qi ","Yu ","Ping ","Liao ","Cong ","You ","Chong ","Zhi ","Tong ","Cheng ","Qi ","Qu ","Peng ","Bei ","Bie ","Chun ","Jiao ","Zeng ","Chi ","Lian ","Ping ","Kui ","Hui ","Qiao ","Cheng ","Yin ","Yin ","Xi ","Xi ","Dan ","Tan ","Duo ","Dui ","Dui ","Su ","Jue ","Ce ","Xiao ","Fan ","Fen ","Lao ","Lao ","Chong ","Han ","Qi ","Xian ","Min ","Jing ","Liao ","Wu ","Can ","Jue ","Cu ","Xian ","Tan ","Sheng ","Pi ","Yi ","Chu ","Xian ","Nao ","Dan ","Tan ","Jing ","Song ","Han ","Jiao ","Wai ","Huan ","Dong ","Qin ","Qin ","Qu ","Cao ","Ken ","Xie ","Ying ","Ao ","Mao ","Yi ","Lin ","Se ","Jun ","Huai ","Men ","Lan ","Ai ","Lin ","Yan ","Gua ","Xia ","Chi ","Yu ","Yin ","Dai ","Meng ","Ai ","Meng ","Dui ","Qi ","Mo ","Lan ","Men ","Chou ","Zhi ","Nuo ","Nuo ","Yan ","Yang ","Bo ","Zhi ","Kuang ","Kuang ","You ","Fu ","Liu ","Mie ","Cheng ","[?] ","Chan ","Meng ","Lan ","Huai ","Xuan ","Rang ","Chan ","Ji ","Ju ","Huan ","She ","Yi "]});var az=b((d6e,sz)=>{sz.exports=["Lian ","Nan ","Mi ","Tang ","Jue ","Gang ","Gang ","Gang ","Ge ","Yue ","Wu ","Jian ","Xu ","Shu ","Rong ","Xi ","Cheng ","Wo ","Jie ","Ge ","Jian ","Qiang ","Huo ","Qiang ","Zhan ","Dong ","Qi ","Jia ","Die ","Zei ","Jia ","Ji ","Shi ","Kan ","Ji ","Kui ","Gai ","Deng ","Zhan ","Chuang ","Ge ","Jian ","Jie ","Yu ","Jian ","Yan ","Lu ","Xi ","Zhan ","Xi ","Xi ","Chuo ","Dai ","Qu ","Hu ","Hu ","Hu ","E ","Shi ","Li ","Mao ","Hu ","Li ","Fang ","Suo ","Bian ","Dian ","Jiong ","Shang ","Yi ","Yi ","Shan ","Hu ","Fei ","Yan ","Shou ","T ","Cai ","Zha ","Qiu ","Le ","Bu ","Ba ","Da ","Reng ","Fu ","Hameru ","Zai ","Tuo ","Zhang ","Diao ","Kang ","Yu ","Ku ","Han ","Shen ","Cha ","Yi ","Gu ","Kou ","Wu ","Tuo ","Qian ","Zhi ","Ren ","Kuo ","Men ","Sao ","Yang ","Niu ","Ban ","Che ","Rao ","Xi ","Qian ","Ban ","Jia ","Yu ","Fu ","Ao ","Xi ","Pi ","Zhi ","Zi ","E ","Dun ","Zhao ","Cheng ","Ji ","Yan ","Kuang ","Bian ","Chao ","Ju ","Wen ","Hu ","Yue ","Jue ","Ba ","Qin ","Zhen ","Zheng ","Yun ","Wan ","Nu ","Yi ","Shu ","Zhua ","Pou ","Tou ","Dou ","Kang ","Zhe ","Pou ","Fu ","Pao ","Ba ","Ao ","Ze ","Tuan ","Kou ","Lun ","Qiang ","[?] ","Hu ","Bao ","Bing ","Zhi ","Peng ","Tan ","Pu ","Pi ","Tai ","Yao ","Zhen ","Zha ","Yang ","Bao ","He ","Ni ","Yi ","Di ","Chi ","Pi ","Za ","Mo ","Mo ","Shen ","Ya ","Chou ","Qu ","Min ","Chu ","Jia ","Fu ","Zhan ","Zhu ","Dan ","Chai ","Mu ","Nian ","La ","Fu ","Pao ","Ban ","Pai ","Ling ","Na ","Guai ","Qian ","Ju ","Tuo ","Ba ","Tuo ","Tuo ","Ao ","Ju ","Zhuo ","Pan ","Zhao ","Bai ","Bai ","Di ","Ni ","Ju ","Kuo ","Long ","Jian ","[?] ","Yong ","Lan ","Ning ","Bo ","Ze ","Qian ","Hen ","Gua ","Shi ","Jie ","Zheng ","Nin ","Gong ","Gong ","Quan ","Shuan ","Cun ","Zan ","Kao ","Chi ","Xie ","Ce ","Hui ","Pin ","Zhuai ","Shi ","Na "]});var uz=b((g6e,lz)=>{lz.exports=["Bo ","Chi ","Gua ","Zhi ","Kuo ","Duo ","Duo ","Zhi ","Qie ","An ","Nong ","Zhen ","Ge ","Jiao ","Ku ","Dong ","Ru ","Tiao ","Lie ","Zha ","Lu ","Die ","Wa ","Jue ","Mushiru ","Ju ","Zhi ","Luan ","Ya ","Zhua ","Ta ","Xie ","Nao ","Dang ","Jiao ","Zheng ","Ji ","Hui ","Xun ","Ku ","Ai ","Tuo ","Nuo ","Cuo ","Bo ","Geng ","Ti ","Zhen ","Cheng ","Suo ","Suo ","Keng ","Mei ","Long ","Ju ","Peng ","Jian ","Yi ","Ting ","Shan ","Nuo ","Wan ","Xie ","Cha ","Feng ","Jiao ","Wu ","Jun ","Jiu ","Tong ","Kun ","Huo ","Tu ","Zhuo ","Pou ","Le ","Ba ","Han ","Shao ","Nie ","Juan ","Ze ","Song ","Ye ","Jue ","Bu ","Huan ","Bu ","Zun ","Yi ","Zhai ","Lu ","Sou ","Tuo ","Lao ","Sun ","Bang ","Jian ","Huan ","Dao ","[?] ","Wan ","Qin ","Peng ","She ","Lie ","Min ","Men ","Fu ","Bai ","Ju ","Dao ","Wo ","Ai ","Juan ","Yue ","Zong ","Chen ","Chui ","Jie ","Tu ","Ben ","Na ","Nian ","Nuo ","Zu ","Wo ","Xi ","Xian ","Cheng ","Dian ","Sao ","Lun ","Qing ","Gang ","Duo ","Shou ","Diao ","Pou ","Di ","Zhang ","Gun ","Ji ","Tao ","Qia ","Qi ","Pai ","Shu ","Qian ","Ling ","Yi ","Ya ","Jue ","Zheng ","Liang ","Gua ","Yi ","Huo ","Shan ","Zheng ","Lue ","Cai ","Tan ","Che ","Bing ","Jie ","Ti ","Kong ","Tui ","Yan ","Cuo ","Zou ","Ju ","Tian ","Qian ","Ken ","Bai ","Shou ","Jie ","Lu ","Guo ","Haba ","[?] ","Zhi ","Dan ","Mang ","Xian ","Sao ","Guan ","Peng ","Yuan ","Nuo ","Jian ","Zhen ","Jiu ","Jian ","Yu ","Yan ","Kui ","Nan ","Hong ","Rou ","Pi ","Wei ","Sai ","Zou ","Xuan ","Miao ","Ti ","Nie ","Cha ","Shi ","Zong ","Zhen ","Yi ","Shun ","Heng ","Bian ","Yang ","Huan ","Yan ","Zuan ","An ","Xu ","Ya ","Wo ","Ke ","Chuai ","Ji ","Ti ","La ","La ","Cheng ","Kai ","Jiu ","Jiu ","Tu ","Jie ","Hui ","Geng ","Chong ","Shuo ","She ","Xie ","Yuan ","Qian ","Ye ","Cha ","Zha ","Bei ","Yao ","[?] ","[?] ","Lan ","Wen ","Qin "]});var hz=b((f6e,cz)=>{cz.exports=["Chan ","Ge ","Lou ","Zong ","Geng ","Jiao ","Gou ","Qin ","Yong ","Que ","Chou ","Chi ","Zhan ","Sun ","Sun ","Bo ","Chu ","Rong ","Beng ","Cuo ","Sao ","Ke ","Yao ","Dao ","Zhi ","Nu ","Xie ","Jian ","Sou ","Qiu ","Gao ","Xian ","Shuo ","Sang ","Jin ","Mie ","E ","Chui ","Nuo ","Shan ","Ta ","Jie ","Tang ","Pan ","Ban ","Da ","Li ","Tao ","Hu ","Zhi ","Wa ","Xia ","Qian ","Wen ","Qiang ","Tian ","Zhen ","E ","Xi ","Nuo ","Quan ","Cha ","Zha ","Ge ","Wu ","En ","She ","Kang ","She ","Shu ","Bai ","Yao ","Bin ","Sou ","Tan ","Sa ","Chan ","Suo ","Liao ","Chong ","Chuang ","Guo ","Bing ","Feng ","Shuai ","Di ","Qi ","Sou ","Zhai ","Lian ","Tang ","Chi ","Guan ","Lu ","Luo ","Lou ","Zong ","Gai ","Hu ","Zha ","Chuang ","Tang ","Hua ","Cui ","Nai ","Mo ","Jiang ","Gui ","Ying ","Zhi ","Ao ","Zhi ","Nie ","Man ","Shan ","Kou ","Shu ","Suo ","Tuan ","Jiao ","Mo ","Mo ","Zhe ","Xian ","Keng ","Piao ","Jiang ","Yin ","Gou ","Qian ","Lue ","Ji ","Ying ","Jue ","Pie ","Pie ","Lao ","Dun ","Xian ","Ruan ","Kui ","Zan ","Yi ","Xun ","Cheng ","Cheng ","Sa ","Nao ","Heng ","Si ","Qian ","Huang ","Da ","Zun ","Nian ","Lin ","Zheng ","Hui ","Zhuang ","Jiao ","Ji ","Cao ","Dan ","Dan ","Che ","Bo ","Che ","Jue ","Xiao ","Liao ","Ben ","Fu ","Qiao ","Bo ","Cuo ","Zhuo ","Zhuan ","Tuo ","Pu ","Qin ","Dun ","Nian ","[?] ","Xie ","Lu ","Jiao ","Cuan ","Ta ","Han ","Qiao ","Zhua ","Jian ","Gan ","Yong ","Lei ","Kuo ","Lu ","Shan ","Zhuo ","Ze ","Pu ","Chuo ","Ji ","Dang ","Suo ","Cao ","Qing ","Jing ","Huan ","Jie ","Qin ","Kuai ","Dan ","Xi ","Ge ","Pi ","Bo ","Ao ","Ju ","Ye ","[?] ","Mang ","Sou ","Mi ","Ji ","Tai ","Zhuo ","Dao ","Xing ","Lan ","Ca ","Ju ","Ye ","Ru ","Ye ","Ye ","Ni ","Hu ","Ji ","Bin ","Ning ","Ge ","Zhi ","Jie ","Kuo ","Mo ","Jian ","Xie ","Lie ","Tan ","Bai ","Sou ","Lu ","Lue ","Rao ","Zhi "]});var gz=b((p6e,dz)=>{dz.exports=["Pan ","Yang ","Lei ","Sa ","Shu ","Zan ","Nian ","Xian ","Jun ","Huo ","Li ","La ","Han ","Ying ","Lu ","Long ","Qian ","Qian ","Zan ","Qian ","Lan ","San ","Ying ","Mei ","Rang ","Chan ","[?] ","Cuan ","Xi ","She ","Luo ","Jun ","Mi ","Li ","Zan ","Luan ","Tan ","Zuan ","Li ","Dian ","Wa ","Dang ","Jiao ","Jue ","Lan ","Li ","Nang ","Zhi ","Gui ","Gui ","Qi ","Xin ","Pu ","Sui ","Shou ","Kao ","You ","Gai ","Yi ","Gong ","Gan ","Ban ","Fang ","Zheng ","Bo ","Dian ","Kou ","Min ","Wu ","Gu ","He ","Ce ","Xiao ","Mi ","Chu ","Ge ","Di ","Xu ","Jiao ","Min ","Chen ","Jiu ","Zhen ","Duo ","Yu ","Chi ","Ao ","Bai ","Xu ","Jiao ","Duo ","Lian ","Nie ","Bi ","Chang ","Dian ","Duo ","Yi ","Gan ","San ","Ke ","Yan ","Dun ","Qi ","Dou ","Xiao ","Duo ","Jiao ","Jing ","Yang ","Xia ","Min ","Shu ","Ai ","Qiao ","Ai ","Zheng ","Di ","Zhen ","Fu ","Shu ","Liao ","Qu ","Xiong ","Xi ","Jiao ","Sen ","Jiao ","Zhuo ","Yi ","Lian ","Bi ","Li ","Xiao ","Xiao ","Wen ","Xue ","Qi ","Qi ","Zhai ","Bin ","Jue ","Zhai ","[?] ","Fei ","Ban ","Ban ","Lan ","Yu ","Lan ","Wei ","Dou ","Sheng ","Liao ","Jia ","Hu ","Xie ","Jia ","Yu ","Zhen ","Jiao ","Wo ","Tou ","Chu ","Jin ","Chi ","Yin ","Fu ","Qiang ","Zhan ","Qu ","Zhuo ","Zhan ","Duan ","Zhuo ","Si ","Xin ","Zhuo ","Zhuo ","Qin ","Lin ","Zhuo ","Chu ","Duan ","Zhu ","Fang ","Xie ","Hang ","Yu ","Shi ","Pei ","You ","Mye ","Pang ","Qi ","Zhan ","Mao ","Lu ","Pei ","Pi ","Liu ","Fu ","Fang ","Xuan ","Jing ","Jing ","Ni ","Zu ","Zhao ","Yi ","Liu ","Shao ","Jian ","Es ","Yi ","Qi ","Zhi ","Fan ","Piao ","Fan ","Zhan ","Guai ","Sui ","Yu ","Wu ","Ji ","Ji ","Ji ","Huo ","Ri ","Dan ","Jiu ","Zhi ","Zao ","Xie ","Tiao ","Xun ","Xu ","Xu ","Xu ","Gan ","Han ","Tai ","Di ","Xu ","Chan ","Shi ","Kuang ","Yang ","Shi ","Wang ","Min ","Min ","Tun ","Chun ","Wu "]});var pz=b((m6e,fz)=>{fz.exports=["Yun ","Bei ","Ang ","Ze ","Ban ","Jie ","Kun ","Sheng ","Hu ","Fang ","Hao ","Gui ","Chang ","Xuan ","Ming ","Hun ","Fen ","Qin ","Hu ","Yi ","Xi ","Xin ","Yan ","Ze ","Fang ","Tan ","Shen ","Ju ","Yang ","Zan ","Bing ","Xing ","Ying ","Xuan ","Pei ","Zhen ","Ling ","Chun ","Hao ","Mei ","Zuo ","Mo ","Bian ","Xu ","Hun ","Zhao ","Zong ","Shi ","Shi ","Yu ","Fei ","Die ","Mao ","Ni ","Chang ","Wen ","Dong ","Ai ","Bing ","Ang ","Zhou ","Long ","Xian ","Kuang ","Tiao ","Chao ","Shi ","Huang ","Huang ","Xuan ","Kui ","Xu ","Jiao ","Jin ","Zhi ","Jin ","Shang ","Tong ","Hong ","Yan ","Gai ","Xiang ","Shai ","Xiao ","Ye ","Yun ","Hui ","Han ","Han ","Jun ","Wan ","Xian ","Kun ","Zhou ","Xi ","Cheng ","Sheng ","Bu ","Zhe ","Zhe ","Wu ","Han ","Hui ","Hao ","Chen ","Wan ","Tian ","Zhuo ","Zui ","Zhou ","Pu ","Jing ","Xi ","Shan ","Yi ","Xi ","Qing ","Qi ","Jing ","Gui ","Zhen ","Yi ","Zhi ","An ","Wan ","Lin ","Liang ","Chang ","Wang ","Xiao ","Zan ","Hi ","Xuan ","Xuan ","Yi ","Xia ","Yun ","Hui ","Fu ","Min ","Kui ","He ","Ying ","Du ","Wei ","Shu ","Qing ","Mao ","Nan ","Jian ","Nuan ","An ","Yang ","Chun ","Yao ","Suo ","Jin ","Ming ","Jiao ","Kai ","Gao ","Weng ","Chang ","Qi ","Hao ","Yan ","Li ","Ai ","Ji ","Gui ","Men ","Zan ","Xie ","Hao ","Mu ","Mo ","Cong ","Ni ","Zhang ","Hui ","Bao ","Han ","Xuan ","Chuan ","Liao ","Xian ","Dan ","Jing ","Pie ","Lin ","Tun ","Xi ","Yi ","Ji ","Huang ","Tai ","Ye ","Ye ","Li ","Tan ","Tong ","Xiao ","Fei ","Qin ","Zhao ","Hao ","Yi ","Xiang ","Xing ","Sen ","Jiao ","Bao ","Jing ","Yian ","Ai ","Ye ","Ru ","Shu ","Meng ","Xun ","Yao ","Pu ","Li ","Chen ","Kuang ","Die ","[?] ","Yan ","Huo ","Lu ","Xi ","Rong ","Long ","Nang ","Luo ","Luan ","Shai ","Tang ","Yan ","Chu ","Yue ","Yue ","Qu ","Yi ","Geng ","Ye ","Hu ","He ","Shu ","Cao ","Cao ","Noboru ","Man ","Ceng ","Ceng ","Ti "]});var bz=b((b6e,mz)=>{mz.exports=["Zui ","Can ","Xu ","Hui ","Yin ","Qie ","Fen ","Pi ","Yue ","You ","Ruan ","Peng ","Ban ","Fu ","Ling ","Fei ","Qu ","[?] ","Nu ","Tiao ","Shuo ","Zhen ","Lang ","Lang ","Juan ","Ming ","Huang ","Wang ","Tun ","Zhao ","Ji ","Qi ","Ying ","Zong ","Wang ","Tong ","Lang ","[?] ","Meng ","Long ","Mu ","Deng ","Wei ","Mo ","Ben ","Zha ","Zhu ","Zhu ","[?] ","Zhu ","Ren ","Ba ","Po ","Duo ","Duo ","Dao ","Li ","Qiu ","Ji ","Jiu ","Bi ","Xiu ","Ting ","Ci ","Sha ","Eburi ","Za ","Quan ","Qian ","Yu ","Gan ","Wu ","Cha ","Shan ","Xun ","Fan ","Wu ","Zi ","Li ","Xing ","Cai ","Cun ","Ren ","Shao ","Tuo ","Di ","Zhang ","Mang ","Chi ","Yi ","Gu ","Gong ","Du ","Yi ","Qi ","Shu ","Gang ","Tiao ","Moku ","Soma ","Tochi ","Lai ","Sugi ","Mang ","Yang ","Ma ","Miao ","Si ","Yuan ","Hang ","Fei ","Bei ","Jie ","Dong ","Gao ","Yao ","Xian ","Chu ","Qun ","Pa ","Shu ","Hua ","Xin ","Chou ","Zhu ","Chou ","Song ","Ban ","Song ","Ji ","Yue ","Jin ","Gou ","Ji ","Mao ","Pi ","Bi ","Wang ","Ang ","Fang ","Fen ","Yi ","Fu ","Nan ","Xi ","Hu ","Ya ","Dou ","Xun ","Zhen ","Yao ","Lin ","Rui ","E ","Mei ","Zhao ","Guo ","Zhi ","Cong ","Yun ","Waku ","Dou ","Shu ","Zao ","[?] ","Li ","Haze ","Jian ","Cheng ","Matsu ","Qiang ","Feng ","Nan ","Xiao ","Xian ","Ku ","Ping ","Yi ","Xi ","Zhi ","Guai ","Xiao ","Jia ","Jia ","Gou ","Fu ","Mo ","Yi ","Ye ","Ye ","Shi ","Nie ","Bi ","Duo ","Yi ","Ling ","Bing ","Ni ","La ","He ","Pan ","Fan ","Zhong ","Dai ","Ci ","Yang ","Fu ","Bo ","Mou ","Gan ","Qi ","Ran ","Rou ","Mao ","Zhao ","Song ","Zhe ","Xia ","You ","Shen ","Ju ","Tuo ","Zuo ","Nan ","Ning ","Yong ","Di ","Zhi ","Zha ","Cha ","Dan ","Gu ","Pu ","Jiu ","Ao ","Fu ","Jian ","Bo ","Duo ","Ke ","Nai ","Zhu ","Bi ","Liu ","Chai ","Zha ","Si ","Zhu ","Pei ","Shi ","Guai ","Cha ","Yao ","Jue ","Jiu ","Shi "]});var vz=b((y6e,yz)=>{yz.exports=["Zhi ","Liu ","Mei ","Hoy ","Rong ","Zha ","[?] ","Biao ","Zhan ","Jie ","Long ","Dong ","Lu ","Sayng ","Li ","Lan ","Yong ","Shu ","Xun ","Shuan ","Qi ","Zhen ","Qi ","Li ","Yi ","Xiang ","Zhen ","Li ","Su ","Gua ","Kan ","Bing ","Ren ","Xiao ","Bo ","Ren ","Bing ","Zi ","Chou ","Yi ","Jie ","Xu ","Zhu ","Jian ","Zui ","Er ","Er ","You ","Fa ","Gong ","Kao ","Lao ","Zhan ","Li ","Yin ","Yang ","He ","Gen ","Zhi ","Chi ","Ge ","Zai ","Luan ","Fu ","Jie ","Hang ","Gui ","Tao ","Guang ","Wei ","Kuang ","Ru ","An ","An ","Juan ","Yi ","Zhuo ","Ku ","Zhi ","Qiong ","Tong ","Sang ","Sang ","Huan ","Jie ","Jiu ","Xue ","Duo ","Zhui ","Yu ","Zan ","Kasei ","Ying ","Masu ","[?] ","Zhan ","Ya ","Nao ","Zhen ","Dang ","Qi ","Qiao ","Hua ","Kuai ","Jiang ","Zhuang ","Xun ","Suo ","Sha ","Zhen ","Bei ","Ting ","Gua ","Jing ","Bo ","Ben ","Fu ","Rui ","Tong ","Jue ","Xi ","Lang ","Liu ","Feng ","Qi ","Wen ","Jun ","Gan ","Cu ","Liang ","Qiu ","Ting ","You ","Mei ","Bang ","Long ","Peng ","Zhuang ","Di ","Xuan ","Tu ","Zao ","Ao ","Gu ","Bi ","Di ","Han ","Zi ","Zhi ","Ren ","Bei ","Geng ","Jian ","Huan ","Wan ","Nuo ","Jia ","Tiao ","Ji ","Xiao ","Lu ","Huan ","Shao ","Cen ","Fen ","Song ","Meng ","Wu ","Li ","Li ","Dou ","Cen ","Ying ","Suo ","Ju ","Ti ","Jie ","Kun ","Zhuo ","Shu ","Chan ","Fan ","Wei ","Jing ","Li ","Bing ","Fumoto ","Shikimi ","Tao ","Zhi ","Lai ","Lian ","Jian ","Zhuo ","Ling ","Li ","Qi ","Bing ","Zhun ","Cong ","Qian ","Mian ","Qi ","Qi ","Cai ","Gun ","Chan ","Te ","Fei ","Pai ","Bang ","Pou ","Hun ","Zong ","Cheng ","Zao ","Ji ","Li ","Peng ","Yu ","Yu ","Gu ","Hun ","Dong ","Tang ","Gang ","Wang ","Di ","Xi ","Fan ","Cheng ","Zhan ","Qi ","Yuan ","Yan ","Yu ","Quan ","Yi ","Sen ","Ren ","Chui ","Leng ","Qi ","Zhuo ","Fu ","Ke ","Lai ","Zou ","Zou ","Zhuo ","Guan ","Fen ","Fen ","Chen ","Qiong ","Nie "]});var Dz=b((v6e,wz)=>{wz.exports=["Wan ","Guo ","Lu ","Hao ","Jie ","Yi ","Chou ","Ju ","Ju ","Cheng ","Zuo ","Liang ","Qiang ","Zhi ","Zhui ","Ya ","Ju ","Bei ","Jiao ","Zhuo ","Zi ","Bin ","Peng ","Ding ","Chu ","Chang ","Kunugi ","Momiji ","Jian ","Gui ","Xi ","Du ","Qian ","Kunugi ","Soko ","Shide ","Luo ","Zhi ","Ken ","Myeng ","Tafu ","[?] ","Peng ","Zhan ","[?] ","Tuo ","Sen ","Duo ","Ye ","Fou ","Wei ","Wei ","Duan ","Jia ","Zong ","Jian ","Yi ","Shen ","Xi ","Yan ","Yan ","Chuan ","Zhan ","Chun ","Yu ","He ","Zha ","Wo ","Pian ","Bi ","Yao ","Huo ","Xu ","Ruo ","Yang ","La ","Yan ","Ben ","Hun ","Kui ","Jie ","Kui ","Si ","Feng ","Xie ","Tuo ","Zhi ","Jian ","Mu ","Mao ","Chu ","Hu ","Hu ","Lian ","Leng ","Ting ","Nan ","Yu ","You ","Mei ","Song ","Xuan ","Xuan ","Ying ","Zhen ","Pian ","Ye ","Ji ","Jie ","Ye ","Chu ","Shun ","Yu ","Cou ","Wei ","Mei ","Di ","Ji ","Jie ","Kai ","Qiu ","Ying ","Rou ","Heng ","Lou ","Le ","Hazou ","Katsura ","Pin ","Muro ","Gai ","Tan ","Lan ","Yun ","Yu ","Chen ","Lu ","Ju ","Sakaki ","[?] ","Pi ","Xie ","Jia ","Yi ","Zhan ","Fu ","Nai ","Mi ","Lang ","Rong ","Gu ","Jian ","Ju ","Ta ","Yao ","Zhen ","Bang ","Sha ","Yuan ","Zi ","Ming ","Su ","Jia ","Yao ","Jie ","Huang ","Gan ","Fei ","Zha ","Qian ","Ma ","Sun ","Yuan ","Xie ","Rong ","Shi ","Zhi ","Cui ","Yun ","Ting ","Liu ","Rong ","Tang ","Que ","Zhai ","Si ","Sheng ","Ta ","Ke ","Xi ","Gu ","Qi ","Kao ","Gao ","Sun ","Pan ","Tao ","Ge ","Xun ","Dian ","Nou ","Ji ","Shuo ","Gou ","Chui ","Qiang ","Cha ","Qian ","Huai ","Mei ","Xu ","Gang ","Gao ","Zhuo ","Tuo ","Hashi ","Yang ","Dian ","Jia ","Jian ","Zui ","Kashi ","Ori ","Bin ","Zhu ","[?] ","Xi ","Qi ","Lian ","Hui ","Yong ","Qian ","Guo ","Gai ","Gai ","Tuan ","Hua ","Cu ","Sen ","Cui ","Beng ","You ","Hu ","Jiang ","Hu ","Huan ","Kui ","Yi ","Nie ","Gao ","Kang ","Gui ","Gui ","Cao ","Man ","Jin "]});var xz=b((w6e,Cz)=>{Cz.exports=["Di ","Zhuang ","Le ","Lang ","Chen ","Cong ","Li ","Xiu ","Qing ","Shuang ","Fan ","Tong ","Guan ","Ji ","Suo ","Lei ","Lu ","Liang ","Mi ","Lou ","Chao ","Su ","Ke ","Shu ","Tang ","Biao ","Lu ","Jiu ","Shu ","Zha ","Shu ","Zhang ","Men ","Mo ","Niao ","Yang ","Tiao ","Peng ","Zhu ","Sha ","Xi ","Quan ","Heng ","Jian ","Cong ","[?] ","Hokuso ","Qiang ","Tara ","Ying ","Er ","Xin ","Zhi ","Qiao ","Zui ","Cong ","Pu ","Shu ","Hua ","Kui ","Zhen ","Zun ","Yue ","Zhan ","Xi ","Xun ","Dian ","Fa ","Gan ","Mo ","Wu ","Qiao ","Nao ","Lin ","Liu ","Qiao ","Xian ","Run ","Fan ","Zhan ","Tuo ","Lao ","Yun ","Shun ","Tui ","Cheng ","Tang ","Meng ","Ju ","Cheng ","Su ","Jue ","Jue ","Tan ","Hui ","Ji ","Nuo ","Xiang ","Tuo ","Ning ","Rui ","Zhu ","Chuang ","Zeng ","Fen ","Qiong ","Ran ","Heng ","Cen ","Gu ","Liu ","Lao ","Gao ","Chu ","Zusa ","Nude ","Ca ","San ","Ji ","Dou ","Shou ","Lu ","[?] ","[?] ","Yuan ","Ta ","Shu ","Jiang ","Tan ","Lin ","Nong ","Yin ","Xi ","Sui ","Shan ","Zui ","Xuan ","Cheng ","Gan ","Ju ","Zui ","Yi ","Qin ","Pu ","Yan ","Lei ","Feng ","Hui ","Dang ","Ji ","Sui ","Bo ","Bi ","Ding ","Chu ","Zhua ","Kuai ","Ji ","Jie ","Jia ","Qing ","Zhe ","Jian ","Qiang ","Dao ","Yi ","Biao ","Song ","She ","Lin ","Kunugi ","Cha ","Meng ","Yin ","Tao ","Tai ","Mian ","Qi ","Toan ","Bin ","Huo ","Ji ","Qian ","Mi ","Ning ","Yi ","Gao ","Jian ","Yin ","Er ","Qing ","Yan ","Qi ","Mi ","Zhao ","Gui ","Chun ","Ji ","Kui ","Po ","Deng ","Chu ","[?] ","Mian ","You ","Zhi ","Guang ","Qian ","Lei ","Lei ","Sa ","Lu ","Li ","Cuan ","Lu ","Mie ","Hui ","Ou ","Lu ","Jie ","Gao ","Du ","Yuan ","Li ","Fei ","Zhuo ","Sou ","Lian ","Tamo ","Chu ","[?] ","Zhu ","Lu ","Yan ","Li ","Zhu ","Chen ","Jie ","E ","Su ","Huai ","Nie ","Yu ","Long ","Lai ","[?] ","Xian ","Kwi ","Ju ","Xiao ","Ling ","Ying ","Jian ","Yin ","You ","Ying "]});var Tz=b((D6e,Sz)=>{Sz.exports=["Xiang ","Nong ","Bo ","Chan ","Lan ","Ju ","Shuang ","She ","Wei ","Cong ","Quan ","Qu ","Cang ","[?] ","Yu ","Luo ","Li ","Zan ","Luan ","Dang ","Jue ","Em ","Lan ","Lan ","Zhu ","Lei ","Li ","Ba ","Nang ","Yu ","Ling ","Tsuki ","Qian ","Ci ","Huan ","Xin ","Yu ","Yu ","Qian ","Ou ","Xu ","Chao ","Chu ","Chi ","Kai ","Yi ","Jue ","Xi ","Xu ","Xia ","Yu ","Kuai ","Lang ","Kuan ","Shuo ","Xi ","Ai ","Yi ","Qi ","Hu ","Chi ","Qin ","Kuan ","Kan ","Kuan ","Kan ","Chuan ","Sha ","Gua ","Yin ","Xin ","Xie ","Yu ","Qian ","Xiao ","Yi ","Ge ","Wu ","Tan ","Jin ","Ou ","Hu ","Ti ","Huan ","Xu ","Pen ","Xi ","Xiao ","Xu ","Xi ","Sen ","Lian ","Chu ","Yi ","Kan ","Yu ","Chuo ","Huan ","Zhi ","Zheng ","Ci ","Bu ","Wu ","Qi ","Bu ","Bu ","Wai ","Ju ","Qian ","Chi ","Se ","Chi ","Se ","Zhong ","Sui ","Sui ","Li ","Cuo ","Yu ","Li ","Gui ","Dai ","Dai ","Si ","Jian ","Zhe ","Mo ","Mo ","Yao ","Mo ","Cu ","Yang ","Tian ","Sheng ","Dai ","Shang ","Xu ","Xun ","Shu ","Can ","Jue ","Piao ","Qia ","Qiu ","Su ","Qing ","Yun ","Lian ","Yi ","Fou ","Zhi ","Ye ","Can ","Hun ","Dan ","Ji ","Ye ","Zhen ","Yun ","Wen ","Chou ","Bin ","Ti ","Jin ","Shang ","Yin ","Diao ","Cu ","Hui ","Cuan ","Yi ","Dan ","Du ","Jiang ","Lian ","Bin ","Du ","Tsukusu ","Jian ","Shu ","Ou ","Duan ","Zhu ","Yin ","Qing ","Yi ","Sha ","Que ","Ke ","Yao ","Jun ","Dian ","Hui ","Hui ","Gu ","Que ","Ji ","Yi ","Ou ","Hui ","Duan ","Yi ","Xiao ","Wu ","Guan ","Mu ","Mei ","Mei ","Ai ","Zuo ","Du ","Yu ","Bi ","Bi ","Bi ","Pi ","Pi ","Bi ","Chan ","Mao ","[?] ","[?] ","Pu ","Mushiru ","Jia ","Zhan ","Sai ","Mu ","Tuo ","Xun ","Er ","Rong ","Xian ","Ju ","Mu ","Hao ","Qiu ","Dou ","Mushiru ","Tan ","Pei ","Ju ","Duo ","Cui ","Bi ","San ","[?] ","Mao ","Sui ","Yu ","Yu ","Tuo ","He ","Jian ","Ta ","San "]});var Ez=b((C6e,kz)=>{kz.exports=["Lu ","Mu ","Li ","Tong ","Rong ","Chang ","Pu ","Luo ","Zhan ","Sao ","Zhan ","Meng ","Luo ","Qu ","Die ","Shi ","Di ","Min ","Jue ","Mang ","Qi ","Pie ","Nai ","Qi ","Dao ","Xian ","Chuan ","Fen ","Ri ","Nei ","[?] ","Fu ","Shen ","Dong ","Qing ","Qi ","Yin ","Xi ","Hai ","Yang ","An ","Ya ","Ke ","Qing ","Ya ","Dong ","Dan ","Lu ","Qing ","Yang ","Yun ","Yun ","Shui ","San ","Zheng ","Bing ","Yong ","Dang ","Shitamizu ","Le ","Ni ","Tun ","Fan ","Gui ","Ting ","Zhi ","Qiu ","Bin ","Ze ","Mian ","Cuan ","Hui ","Diao ","Yi ","Cha ","Zhuo ","Chuan ","Wan ","Fan ","Dai ","Xi ","Tuo ","Mang ","Qiu ","Qi ","Shan ","Pai ","Han ","Qian ","Wu ","Wu ","Xun ","Si ","Ru ","Gong ","Jiang ","Chi ","Wu ","Tsuchi ","[?] ","Tang ","Zhi ","Chi ","Qian ","Mi ","Yu ","Wang ","Qing ","Jing ","Rui ","Jun ","Hong ","Tai ","Quan ","Ji ","Bian ","Bian ","Gan ","Wen ","Zhong ","Fang ","Xiong ","Jue ","Hang ","Niou ","Qi ","Fen ","Xu ","Xu ","Qin ","Yi ","Wo ","Yun ","Yuan ","Hang ","Yan ","Chen ","Chen ","Dan ","You ","Dun ","Hu ","Huo ","Qie ","Mu ","Rou ","Mei ","Ta ","Mian ","Wu ","Chong ","Tian ","Bi ","Sha ","Zhi ","Pei ","Pan ","Zhui ","Za ","Gou ","Liu ","Mei ","Ze ","Feng ","Ou ","Li ","Lun ","Cang ","Feng ","Wei ","Hu ","Mo ","Mei ","Shu ","Ju ","Zan ","Tuo ","Tuo ","Tuo ","He ","Li ","Mi ","Yi ","Fa ","Fei ","You ","Tian ","Zhi ","Zhao ","Gu ","Zhan ","Yan ","Si ","Kuang ","Jiong ","Ju ","Xie ","Qiu ","Yi ","Jia ","Zhong ","Quan ","Bo ","Hui ","Mi ","Ben ","Zhuo ","Chu ","Le ","You ","Gu ","Hong ","Gan ","Fa ","Mao ","Si ","Hu ","Ping ","Ci ","Fan ","Chi ","Su ","Ning ","Cheng ","Ling ","Pao ","Bo ","Qi ","Si ","Ni ","Ju ","Yue ","Zhu ","Sheng ","Lei ","Xuan ","Xue ","Fu ","Pan ","Min ","Tai ","Yang ","Ji ","Yong ","Guan ","Beng ","Xue ","Long ","Lu ","[?] ","Bo ","Xie ","Po ","Ze ","Jing ","Yin "]});var _z=b((x6e,Pz)=>{Pz.exports=["Zhou ","Ji ","Yi ","Hui ","Hui ","Zui ","Cheng ","Yin ","Wei ","Hou ","Jian ","Yang ","Lie ","Si ","Ji ","Er ","Xing ","Fu ","Sa ","Suo ","Zhi ","Yin ","Wu ","Xi ","Kao ","Zhu ","Jiang ","Luo ","[?] ","An ","Dong ","Yi ","Mou ","Lei ","Yi ","Mi ","Quan ","Jin ","Mo ","Wei ","Xiao ","Xie ","Hong ","Xu ","Shuo ","Kuang ","Tao ","Qie ","Ju ","Er ","Zhou ","Ru ","Ping ","Xun ","Xiong ","Zhi ","Guang ","Huan ","Ming ","Huo ","Wa ","Qia ","Pai ","Wu ","Qu ","Liu ","Yi ","Jia ","Jing ","Qian ","Jiang ","Jiao ","Cheng ","Shi ","Zhuo ","Ce ","Pal ","Kuai ","Ji ","Liu ","Chan ","Hun ","Hu ","Nong ","Xun ","Jin ","Lie ","Qiu ","Wei ","Zhe ","Jun ","Han ","Bang ","Mang ","Zhuo ","You ","Xi ","Bo ","Dou ","Wan ","Hong ","Yi ","Pu ","Ying ","Lan ","Hao ","Lang ","Han ","Li ","Geng ","Fu ","Wu ","Lian ","Chun ","Feng ","Yi ","Yu ","Tong ","Lao ","Hai ","Jin ","Jia ","Chong ","Weng ","Mei ","Sui ","Cheng ","Pei ","Xian ","Shen ","Tu ","Kun ","Pin ","Nie ","Han ","Jing ","Xiao ","She ","Nian ","Tu ","Yong ","Xiao ","Xian ","Ting ","E ","Su ","Tun ","Juan ","Cen ","Ti ","Li ","Shui ","Si ","Lei ","Shui ","Tao ","Du ","Lao ","Lai ","Lian ","Wei ","Wo ","Yun ","Huan ","Di ","[?] ","Run ","Jian ","Zhang ","Se ","Fu ","Guan ","Xing ","Shou ","Shuan ","Ya ","Chuo ","Zhang ","Ye ","Kong ","Wo ","Han ","Tuo ","Dong ","He ","Wo ","Ju ","Gan ","Liang ","Hun ","Ta ","Zhuo ","Dian ","Qie ","De ","Juan ","Zi ","Xi ","Yao ","Qi ","Gu ","Guo ","Han ","Lin ","Tang ","Zhou ","Peng ","Hao ","Chang ","Shu ","Qi ","Fang ","Chi ","Lu ","Nao ","Ju ","Tao ","Cong ","Lei ","Zhi ","Peng ","Fei ","Song ","Tian ","Pi ","Dan ","Yu ","Ni ","Yu ","Lu ","Gan ","Mi ","Jing ","Ling ","Lun ","Yin ","Cui ","Qu ","Huai ","Yu ","Nian ","Shen ","Piao ","Chun ","Wa ","Yuan ","Lai ","Hun ","Qing ","Yan ","Qian ","Tian ","Miao ","Zhi ","Yin ","Mi "]});var Lz=b((S6e,Rz)=>{Rz.exports=["Ben ","Yuan ","Wen ","Re ","Fei ","Qing ","Yuan ","Ke ","Ji ","She ","Yuan ","Shibui ","Lu ","Zi ","Du ","[?] ","Jian ","Min ","Pi ","Tani ","Yu ","Yuan ","Shen ","Shen ","Rou ","Huan ","Zhu ","Jian ","Nuan ","Yu ","Qiu ","Ting ","Qu ","Du ","Feng ","Zha ","Bo ","Wo ","Wo ","Di ","Wei ","Wen ","Ru ","Xie ","Ce ","Wei ","Ge ","Gang ","Yan ","Hong ","Xuan ","Mi ","Ke ","Mao ","Ying ","Yan ","You ","Hong ","Miao ","Xing ","Mei ","Zai ","Hun ","Nai ","Kui ","Shi ","E ","Pai ","Mei ","Lian ","Qi ","Qi ","Mei ","Tian ","Cou ","Wei ","Can ","Tuan ","Mian ","Hui ","Mo ","Xu ","Ji ","Pen ","Jian ","Jian ","Hu ","Feng ","Xiang ","Yi ","Yin ","Zhan ","Shi ","Jie ","Cheng ","Huang ","Tan ","Yu ","Bi ","Min ","Shi ","Tu ","Sheng ","Yong ","Qu ","Zhong ","Suei ","Jiu ","Jiao ","Qiou ","Yin ","Tang ","Long ","Huo ","Yuan ","Nan ","Ban ","You ","Quan ","Chui ","Liang ","Chan ","Yan ","Chun ","Nie ","Zi ","Wan ","Shi ","Man ","Ying ","Ratsu ","Kui ","[?] ","Jian ","Xu ","Lu ","Gui ","Gai ","[?] ","[?] ","Po ","Jin ","Gui ","Tang ","Yuan ","Suo ","Yuan ","Lian ","Yao ","Meng ","Zhun ","Sheng ","Ke ","Tai ","Da ","Wa ","Liu ","Gou ","Sao ","Ming ","Zha ","Shi ","Yi ","Lun ","Ma ","Pu ","Wei ","Li ","Cai ","Wu ","Xi ","Wen ","Qiang ","Ze ","Shi ","Su ","Yi ","Zhen ","Sou ","Yun ","Xiu ","Yin ","Rong ","Hun ","Su ","Su ","Ni ","Ta ","Shi ","Ru ","Wei ","Pan ","Chu ","Chu ","Pang ","Weng ","Cang ","Mie ","He ","Dian ","Hao ","Huang ","Xi ","Zi ","Di ","Zhi ","Ying ","Fu ","Jie ","Hua ","Ge ","Zi ","Tao ","Teng ","Sui ","Bi ","Jiao ","Hui ","Gun ","Yin ","Gao ","Long ","Zhi ","Yan ","She ","Man ","Ying ","Chun ","Lu ","Lan ","Luan ","[?] ","Bin ","Tan ","Yu ","Sou ","Hu ","Bi ","Biao ","Zhi ","Jiang ","Kou ","Shen ","Shang ","Di ","Mi ","Ao ","Lu ","Hu ","Hu ","You ","Chan ","Fan ","Yong ","Gun ","Man "]});var Iz=b((T6e,Fz)=>{Fz.exports=["Qing ","Yu ","Piao ","Ji ","Ya ","Jiao ","Qi ","Xi ","Ji ","Lu ","Lu ","Long ","Jin ","Guo ","Cong ","Lou ","Zhi ","Gai ","Qiang ","Li ","Yan ","Cao ","Jiao ","Cong ","Qun ","Tuan ","Ou ","Teng ","Ye ","Xi ","Mi ","Tang ","Mo ","Shang ","Han ","Lian ","Lan ","Wa ","Li ","Qian ","Feng ","Xuan ","Yi ","Man ","Zi ","Mang ","Kang ","Lei ","Peng ","Shu ","Zhang ","Zhang ","Chong ","Xu ","Huan ","Kuo ","Jian ","Yan ","Chuang ","Liao ","Cui ","Ti ","Yang ","Jiang ","Cong ","Ying ","Hong ","Xun ","Shu ","Guan ","Ying ","Xiao ","[?] ","[?] ","Xu ","Lian ","Zhi ","Wei ","Pi ","Jue ","Jiao ","Po ","Dang ","Hui ","Jie ","Wu ","Pa ","Ji ","Pan ","Gui ","Xiao ","Qian ","Qian ","Xi ","Lu ","Xi ","Xuan ","Dun ","Huang ","Min ","Run ","Su ","Liao ","Zhen ","Zhong ","Yi ","Di ","Wan ","Dan ","Tan ","Chao ","Xun ","Kui ","Yie ","Shao ","Tu ","Zhu ","San ","Hei ","Bi ","Shan ","Chan ","Chan ","Shu ","Tong ","Pu ","Lin ","Wei ","Se ","Se ","Cheng ","Jiong ","Cheng ","Hua ","Jiao ","Lao ","Che ","Gan ","Cun ","Heng ","Si ","Shu ","Peng ","Han ","Yun ","Liu ","Hong ","Fu ","Hao ","He ","Xian ","Jian ","Shan ","Xi ","Oki ","[?] ","Lan ","[?] ","Yu ","Lin ","Min ","Zao ","Dang ","Wan ","Ze ","Xie ","Yu ","Li ","Shi ","Xue ","Ling ","Man ","Zi ","Yong ","Kuai ","Can ","Lian ","Dian ","Ye ","Ao ","Huan ","Zhen ","Chan ","Man ","Dan ","Dan ","Yi ","Sui ","Pi ","Ju ","Ta ","Qin ","Ji ","Zhuo ","Lian ","Nong ","Guo ","Jin ","Fen ","Se ","Ji ","Sui ","Hui ","Chu ","Ta ","Song ","Ding ","[?] ","Zhu ","Lai ","Bin ","Lian ","Mi ","Shi ","Shu ","Mi ","Ning ","Ying ","Ying ","Meng ","Jin ","Qi ","Pi ","Ji ","Hao ","Ru ","Zui ","Wo ","Tao ","Yin ","Yin ","Dui ","Ci ","Huo ","Jing ","Lan ","Jun ","Ai ","Pu ","Zhuo ","Wei ","Bin ","Gu ","Qian ","Xing ","Hama ","Kuo ","Fei ","[?] ","Boku ","Jian ","Wei ","Luo ","Zan ","Lu ","Li "]});var Az=b((k6e,jz)=>{jz.exports=["You ","Yang ","Lu ","Si ","Jie ","Ying ","Du ","Wang ","Hui ","Xie ","Pan ","Shen ","Biao ","Chan ","Mo ","Liu ","Jian ","Pu ","Se ","Cheng ","Gu ","Bin ","Huo ","Xian ","Lu ","Qin ","Han ","Ying ","Yong ","Li ","Jing ","Xiao ","Ying ","Sui ","Wei ","Xie ","Huai ","Hao ","Zhu ","Long ","Lai ","Dui ","Fan ","Hu ","Lai ","[?] ","[?] ","Ying ","Mi ","Ji ","Lian ","Jian ","Ying ","Fen ","Lin ","Yi ","Jian ","Yue ","Chan ","Dai ","Rang ","Jian ","Lan ","Fan ","Shuang ","Yuan ","Zhuo ","Feng ","She ","Lei ","Lan ","Cong ","Qu ","Yong ","Qian ","Fa ","Guan ","Que ","Yan ","Hao ","Hyeng ","Sa ","Zan ","Luan ","Yan ","Li ","Mi ","Shan ","Tan ","Dang ","Jiao ","Chan ","[?] ","Hao ","Ba ","Zhu ","Lan ","Lan ","Nang ","Wan ","Luan ","Xun ","Xian ","Yan ","Gan ","Yan ","Yu ","Huo ","Si ","Mie ","Guang ","Deng ","Hui ","Xiao ","Xiao ","Hu ","Hong ","Ling ","Zao ","Zhuan ","Jiu ","Zha ","Xie ","Chi ","Zhuo ","Zai ","Zai ","Can ","Yang ","Qi ","Zhong ","Fen ","Niu ","Jiong ","Wen ","Po ","Yi ","Lu ","Chui ","Pi ","Kai ","Pan ","Yan ","Kai ","Pang ","Mu ","Chao ","Liao ","Gui ","Kang ","Tun ","Guang ","Xin ","Zhi ","Guang ","Guang ","Wei ","Qiang ","[?] ","Da ","Xia ","Zheng ","Zhu ","Ke ","Zhao ","Fu ","Ba ","Duo ","Duo ","Ling ","Zhuo ","Xuan ","Ju ","Tan ","Pao ","Jiong ","Pao ","Tai ","Tai ","Bing ","Yang ","Tong ","Han ","Zhu ","Zha ","Dian ","Wei ","Shi ","Lian ","Chi ","Huang ","[?] ","Hu ","Shuo ","Lan ","Jing ","Jiao ","Xu ","Xing ","Quan ","Lie ","Huan ","Yang ","Xiao ","Xiu ","Xian ","Yin ","Wu ","Zhou ","Yao ","Shi ","Wei ","Tong ","Xue ","Zai ","Kai ","Hong ","Luo ","Xia ","Zhu ","Xuan ","Zheng ","Po ","Yan ","Hui ","Guang ","Zhe ","Hui ","Kao ","[?] ","Fan ","Shao ","Ye ","Hui ","[?] ","Tang ","Jin ","Re ","[?] ","Xi ","Fu ","Jiong ","Che ","Pu ","Jing ","Zhuo ","Ting ","Wan ","Hai ","Peng ","Lang ","Shan ","Hu ","Feng ","Chi ","Rong "]});var Mz=b((E6e,Oz)=>{Oz.exports=["Hu ","Xi ","Shu ","He ","Xun ","Ku ","Jue ","Xiao ","Xi ","Yan ","Han ","Zhuang ","Jun ","Di ","Xie ","Ji ","Wu ","[?] ","[?] ","Han ","Yan ","Huan ","Men ","Ju ","Chou ","Bei ","Fen ","Lin ","Kun ","Hun ","Tun ","Xi ","Cui ","Wu ","Hong ","Ju ","Fu ","Wo ","Jiao ","Cong ","Feng ","Ping ","Qiong ","Ruo ","Xi ","Qiong ","Xin ","Zhuo ","Yan ","Yan ","Yi ","Jue ","Yu ","Gang ","Ran ","Pi ","Gu ","[?] ","Sheng ","Chang ","Shao ","[?] ","[?] ","[?] ","[?] ","Chen ","He ","Kui ","Zhong ","Duan ","Xia ","Hui ","Feng ","Lian ","Xuan ","Xing ","Huang ","Jiao ","Jian ","Bi ","Ying ","Zhu ","Wei ","Tuan ","Tian ","Xi ","Nuan ","Nuan ","Chan ","Yan ","Jiong ","Jiong ","Yu ","Mei ","Sha ","Wei ","Ye ","Xin ","Qiong ","Rou ","Mei ","Huan ","Xu ","Zhao ","Wei ","Fan ","Qiu ","Sui ","Yang ","Lie ","Zhu ","Jie ","Gao ","Gua ","Bao ","Hu ","Yun ","Xia ","[?] ","[?] ","Bian ","Gou ","Tui ","Tang ","Chao ","Shan ","N ","Bo ","Huang ","Xie ","Xi ","Wu ","Xi ","Yun ","He ","He ","Xi ","Yun ","Xiong ","Nai ","Shan ","Qiong ","Yao ","Xun ","Mi ","Lian ","Ying ","Wen ","Rong ","Oozutsu ","[?] ","Qiang ","Liu ","Xi ","Bi ","Biao ","Zong ","Lu ","Jian ","Shou ","Yi ","Lou ","Feng ","Sui ","Yi ","Tong ","Jue ","Zong ","Yun ","Hu ","Yi ","Zhi ","Ao ","Wei ","Liao ","Han ","Ou ","Re ","Jiong ","Man ","[?] ","Shang ","Cuan ","Zeng ","Jian ","Xi ","Xi ","Xi ","Yi ","Xiao ","Chi ","Huang ","Chan ","Ye ","Qian ","Ran ","Yan ","Xian ","Qiao ","Zun ","Deng ","Dun ","Shen ","Jiao ","Fen ","Si ","Liao ","Yu ","Lin ","Tong ","Shao ","Fen ","Fan ","Yan ","Xun ","Lan ","Mei ","Tang ","Yi ","Jing ","Men ","[?] ","[?] ","Ying ","Yu ","Yi ","Xue ","Lan ","Tai ","Zao ","Can ","Sui ","Xi ","Que ","Cong ","Lian ","Hui ","Zhu ","Xie ","Ling ","Wei ","Yi ","Xie ","Zhao ","Hui ","Tatsu ","Nung ","Lan ","Ru ","Xian ","Kao ","Xun ","Jin ","Chou ","Chou ","Yao "]});var Bz=b((P6e,Nz)=>{Nz.exports=["He ","Lan ","Biao ","Rong ","Li ","Mo ","Bao ","Ruo ","Lu ","La ","Ao ","Xun ","Kuang ","Shuo ","[?] ","Li ","Lu ","Jue ","Liao ","Yan ","Xi ","Xie ","Long ","Ye ","[?] ","Rang ","Yue ","Lan ","Cong ","Jue ","Tong ","Guan ","[?] ","Che ","Mi ","Tang ","Lan ","Zhu ","[?] ","Ling ","Cuan ","Yu ","Zhua ","Tsumekanmuri ","Pa ","Zheng ","Pao ","Cheng ","Yuan ","Ai ","Wei ","[?] ","Jue ","Jue ","Fu ","Ye ","Ba ","Die ","Ye ","Yao ","Zu ","Shuang ","Er ","Qiang ","Chuang ","Ge ","Zang ","Die ","Qiang ","Yong ","Qiang ","Pian ","Ban ","Pan ","Shao ","Jian ","Pai ","Du ","Chuang ","Tou ","Zha ","Bian ","Die ","Bang ","Bo ","Chuang ","You ","[?] ","Du ","Ya ","Cheng ","Niu ","Ushihen ","Pin ","Jiu ","Mou ","Tuo ","Mu ","Lao ","Ren ","Mang ","Fang ","Mao ","Mu ","Gang ","Wu ","Yan ","Ge ","Bei ","Si ","Jian ","Gu ","You ","Ge ","Sheng ","Mu ","Di ","Qian ","Quan ","Quan ","Zi ","Te ","Xi ","Mang ","Keng ","Qian ","Wu ","Gu ","Xi ","Li ","Li ","Pou ","Ji ","Gang ","Zhi ","Ben ","Quan ","Run ","Du ","Ju ","Jia ","Jian ","Feng ","Pian ","Ke ","Ju ","Kao ","Chu ","Xi ","Bei ","Luo ","Jie ","Ma ","San ","Wei ","Li ","Dun ","Tong ","[?] ","Jiang ","Ikenie ","Li ","Du ","Lie ","Pi ","Piao ","Bao ","Xi ","Chou ","Wei ","Kui ","Chou ","Quan ","Fan ","Ba ","Fan ","Qiu ","Ji ","Cai ","Chuo ","An ","Jie ","Zhuang ","Guang ","Ma ","You ","Kang ","Bo ","Hou ","Ya ","Yin ","Huan ","Zhuang ","Yun ","Kuang ","Niu ","Di ","Qing ","Zhong ","Mu ","Bei ","Pi ","Ju ","Ni ","Sheng ","Pao ","Xia ","Tuo ","Hu ","Ling ","Fei ","Pi ","Ni ","Ao ","You ","Gou ","Yue ","Ju ","Dan ","Po ","Gu ","Xian ","Ning ","Huan ","Hen ","Jiao ","He ","Zhao ","Ji ","Xun ","Shan ","Ta ","Rong ","Shou ","Tong ","Lao ","Du ","Xia ","Shi ","Hua ","Zheng ","Yu ","Sun ","Yu ","Bi ","Mang ","Xi ","Juan ","Li ","Xia ","Yin ","Suan ","Lang ","Bei ","Zhi ","Yan "]});var qz=b((_6e,Hz)=>{Hz.exports=["Sha ","Li ","Han ","Xian ","Jing ","Pai ","Fei ","Yao ","Ba ","Qi ","Ni ","Biao ","Yin ","Lai ","Xi ","Jian ","Qiang ","Kun ","Yan ","Guo ","Zong ","Mi ","Chang ","Yi ","Zhi ","Zheng ","Ya ","Meng ","Cai ","Cu ","She ","Kari ","Cen ","Luo ","Hu ","Zong ","Ji ","Wei ","Feng ","Wo ","Yuan ","Xing ","Zhu ","Mao ","Wei ","Yuan ","Xian ","Tuan ","Ya ","Nao ","Xie ","Jia ","Hou ","Bian ","You ","You ","Mei ","Zha ","Yao ","Sun ","Bo ","Ming ","Hua ","Yuan ","Sou ","Ma ","Yuan ","Dai ","Yu ","Shi ","Hao ","[?] ","Yi ","Zhen ","Chuang ","Hao ","Man ","Jing ","Jiang ","Mu ","Zhang ","Chan ","Ao ","Ao ","Hao ","Cui ","Fen ","Jue ","Bi ","Bi ","Huang ","Pu ","Lin ","Yu ","Tong ","Yao ","Liao ","Shuo ","Xiao ","Swu ","Ton ","Xi ","Ge ","Juan ","Du ","Hui ","Kuai ","Xian ","Xie ","Ta ","Xian ","Xun ","Ning ","Pin ","Huo ","Nou ","Meng ","Lie ","Nao ","Guang ","Shou ","Lu ","Ta ","Xian ","Mi ","Rang ","Huan ","Nao ","Luo ","Xian ","Qi ","Jue ","Xuan ","Miao ","Zi ","Lu ","Lu ","Yu ","Su ","Wang ","Qiu ","Ga ","Ding ","Le ","Ba ","Ji ","Hong ","Di ","Quan ","Gan ","Jiu ","Yu ","Ji ","Yu ","Yang ","Ma ","Gong ","Wu ","Fu ","Wen ","Jie ","Ya ","Fen ","Bian ","Beng ","Yue ","Jue ","Yun ","Jue ","Wan ","Jian ","Mei ","Dan ","Pi ","Wei ","Huan ","Xian ","Qiang ","Ling ","Dai ","Yi ","An ","Ping ","Dian ","Fu ","Xuan ","Xi ","Bo ","Ci ","Gou ","Jia ","Shao ","Po ","Ci ","Ke ","Ran ","Sheng ","Shen ","Yi ","Zu ","Jia ","Min ","Shan ","Liu ","Bi ","Zhen ","Zhen ","Jue ","Fa ","Long ","Jin ","Jiao ","Jian ","Li ","Guang ","Xian ","Zhou ","Gong ","Yan ","Xiu ","Yang ","Xu ","Luo ","Su ","Zhu ","Qin ","Ken ","Xun ","Bao ","Er ","Xiang ","Yao ","Xia ","Heng ","Gui ","Chong ","Xu ","Ban ","Pei ","[?] ","Dang ","Ei ","Hun ","Wen ","E ","Cheng ","Ti ","Wu ","Wu ","Cheng ","Jun ","Mei ","Bei ","Ting ","Xian ","Chuo "]});var Wz=b((R6e,Yz)=>{Yz.exports=["Han ","Xuan ","Yan ","Qiu ","Quan ","Lang ","Li ","Xiu ","Fu ","Liu ","Ye ","Xi ","Ling ","Li ","Jin ","Lian ","Suo ","Chiisai ","[?] ","Wan ","Dian ","Pin ","Zhan ","Cui ","Min ","Yu ","Ju ","Chen ","Lai ","Wen ","Sheng ","Wei ","Dian ","Chu ","Zhuo ","Pei ","Cheng ","Hu ","Qi ","E ","Kun ","Chang ","Qi ","Beng ","Wan ","Lu ","Cong ","Guan ","Yan ","Diao ","Bei ","Lin ","Qin ","Pi ","Pa ","Que ","Zhuo ","Qin ","Fa ","[?] ","Qiong ","Du ","Jie ","Hun ","Yu ","Mao ","Mei ","Chun ","Xuan ","Ti ","Xing ","Dai ","Rou ","Min ","Zhen ","Wei ","Ruan ","Huan ","Jie ","Chuan ","Jian ","Zhuan ","Yang ","Lian ","Quan ","Xia ","Duan ","Yuan ","Ye ","Nao ","Hu ","Ying ","Yu ","Huang ","Rui ","Se ","Liu ","Shi ","Rong ","Suo ","Yao ","Wen ","Wu ","Jin ","Jin ","Ying ","Ma ","Tao ","Liu ","Tang ","Li ","Lang ","Gui ","Zhen ","Qiang ","Cuo ","Jue ","Zhao ","Yao ","Ai ","Bin ","Tu ","Chang ","Kun ","Zhuan ","Cong ","Jin ","Yi ","Cui ","Cong ","Qi ","Li ","Ying ","Suo ","Qiu ","Xuan ","Ao ","Lian ","Man ","Zhang ","Yin ","[?] ","Ying ","Zhi ","Lu ","Wu ","Deng ","Xiou ","Zeng ","Xun ","Qu ","Dang ","Lin ","Liao ","Qiong ","Su ","Huang ","Gui ","Pu ","Jing ","Fan ","Jin ","Liu ","Ji ","[?] ","Jing ","Ai ","Bi ","Can ","Qu ","Zao ","Dang ","Jiao ","Gun ","Tan ","Hui ","Huan ","Se ","Sui ","Tian ","[?] ","Yu ","Jin ","Lu ","Bin ","Shou ","Wen ","Zui ","Lan ","Xi ","Ji ","Xuan ","Ruan ","Huo ","Gai ","Lei ","Du ","Li ","Zhi ","Rou ","Li ","Zan ","Qiong ","Zhe ","Gui ","Sui ","La ","Long ","Lu ","Li ","Zan ","Lan ","Ying ","Mi ","Xiang ","Xi ","Guan ","Dao ","Zan ","Huan ","Gua ","Bo ","Die ","Bao ","Hu ","Zhi ","Piao ","Ban ","Rang ","Li ","Wa ","Dekaguramu ","Jiang ","Qian ","Fan ","Pen ","Fang ","Dan ","Weng ","Ou ","Deshiguramu ","Miriguramu ","Thon ","Hu ","Ling ","Yi ","Ping ","Ci ","Hekutogura ","Juan ","Chang ","Chi ","Sarake ","Dang ","Meng ","Pou "]});var Jz=b((L6e,Zz)=>{Zz.exports=["Zhui ","Ping ","Bian ","Zhou ","Zhen ","Senchigura ","Ci ","Ying ","Qi ","Xian ","Lou ","Di ","Ou ","Meng ","Zhuan ","Peng ","Lin ","Zeng ","Wu ","Pi ","Dan ","Weng ","Ying ","Yan ","Gan ","Dai ","Shen ","Tian ","Tian ","Han ","Chang ","Sheng ","Qing ","Sheng ","Chan ","Chan ","Rui ","Sheng ","Su ","Sen ","Yong ","Shuai ","Lu ","Fu ","Yong ","Beng ","Feng ","Ning ","Tian ","You ","Jia ","Shen ","Zha ","Dian ","Fu ","Nan ","Dian ","Ping ","Ting ","Hua ","Ting ","Quan ","Zi ","Meng ","Bi ","Qi ","Liu ","Xun ","Liu ","Chang ","Mu ","Yun ","Fan ","Fu ","Geng ","Tian ","Jie ","Jie ","Quan ","Wei ","Fu ","Tian ","Mu ","Tap ","Pan ","Jiang ","Wa ","Da ","Nan ","Liu ","Ben ","Zhen ","Chu ","Mu ","Mu ","Ce ","Cen ","Gai ","Bi ","Da ","Zhi ","Lue ","Qi ","Lue ","Pan ","Kesa ","Fan ","Hua ","Yu ","Yu ","Mu ","Jun ","Yi ","Liu ","Yu ","Die ","Chou ","Hua ","Dang ","Chuo ","Ji ","Wan ","Jiang ","Sheng ","Chang ","Tuan ","Lei ","Ji ","Cha ","Liu ","Tatamu ","Tuan ","Lin ","Jiang ","Jiang ","Chou ","Bo ","Die ","Die ","Pi ","Nie ","Dan ","Shu ","Shu ","Zhi ","Yi ","Chuang ","Nai ","Ding ","Bi ","Jie ","Liao ","Gong ","Ge ","Jiu ","Zhou ","Xia ","Shan ","Xu ","Nue ","Li ","Yang ","Chen ","You ","Ba ","Jie ","Jue ","Zhi ","Xia ","Cui ","Bi ","Yi ","Li ","Zong ","Chuang ","Feng ","Zhu ","Pao ","Pi ","Gan ","Ke ","Ci ","Xie ","Qi ","Dan ","Zhen ","Fa ","Zhi ","Teng ","Ju ","Ji ","Fei ","Qu ","Dian ","Jia ","Xian ","Cha ","Bing ","Ni ","Zheng ","Yong ","Jing ","Quan ","Chong ","Tong ","Yi ","Kai ","Wei ","Hui ","Duo ","Yang ","Chi ","Zhi ","Hen ","Ya ","Mei ","Dou ","Jing ","Xiao ","Tong ","Tu ","Mang ","Pi ","Xiao ","Suan ","Pu ","Li ","Zhi ","Cuo ","Duo ","Wu ","Sha ","Lao ","Shou ","Huan ","Xian ","Yi ","Peng ","Zhang ","Guan ","Tan ","Fei ","Ma ","Lin ","Chi ","Ji ","Dian ","An ","Chi ","Bi ","Bei ","Min ","Gu ","Dui ","E ","Wei "]});var Xz=b((F6e,$z)=>{$z.exports=["Yu ","Cui ","Ya ","Zhu ","Cu ","Dan ","Shen ","Zhung ","Ji ","Yu ","Hou ","Feng ","La ","Yang ","Shen ","Tu ","Yu ","Gua ","Wen ","Huan ","Ku ","Jia ","Yin ","Yi ","Lu ","Sao ","Jue ","Chi ","Xi ","Guan ","Yi ","Wen ","Ji ","Chuang ","Ban ","Lei ","Liu ","Chai ","Shou ","Nue ","Dian ","Da ","Pie ","Tan ","Zhang ","Biao ","Shen ","Cu ","Luo ","Yi ","Zong ","Chou ","Zhang ","Zhai ","Sou ","Suo ","Que ","Diao ","Lou ","Lu ","Mo ","Jin ","Yin ","Ying ","Huang ","Fu ","Liao ","Long ","Qiao ","Liu ","Lao ","Xian ","Fei ","Dan ","Yin ","He ","Yan ","Ban ","Xian ","Guan ","Guai ","Nong ","Yu ","Wei ","Yi ","Yong ","Pi ","Lei ","Li ","Shu ","Dan ","Lin ","Dian ","Lin ","Lai ","Pie ","Ji ","Chi ","Yang ","Xian ","Jie ","Zheng ","[?] ","Li ","Huo ","Lai ","Shaku ","Dian ","Xian ","Ying ","Yin ","Qu ","Yong ","Tan ","Dian ","Luo ","Luan ","Luan ","Bo ","[?] ","Gui ","Po ","Fa ","Deng ","Fa ","Bai ","Bai ","Qie ","Bi ","Zao ","Zao ","Mao ","De ","Pa ","Jie ","Huang ","Gui ","Ci ","Ling ","Gao ","Mo ","Ji ","Jiao ","Peng ","Gao ","Ai ","E ","Hao ","Han ","Bi ","Wan ","Chou ","Qian ","Xi ","Ai ","Jiong ","Hao ","Huang ","Hao ","Ze ","Cui ","Hao ","Xiao ","Ye ","Po ","Hao ","Jiao ","Ai ","Xing ","Huang ","Li ","Piao ","He ","Jiao ","Pi ","Gan ","Pao ","Zhou ","Jun ","Qiu ","Cun ","Que ","Zha ","Gu ","Jun ","Jun ","Zhou ","Zha ","Gu ","Zhan ","Du ","Min ","Qi ","Ying ","Yu ","Bei ","Zhao ","Zhong ","Pen ","He ","Ying ","He ","Yi ","Bo ","Wan ","He ","Ang ","Zhan ","Yan ","Jian ","He ","Yu ","Kui ","Fan ","Gai ","Dao ","Pan ","Fu ","Qiu ","Sheng ","Dao ","Lu ","Zhan ","Meng ","Li ","Jin ","Xu ","Jian ","Pan ","Guan ","An ","Lu ","Shu ","Zhou ","Dang ","An ","Gu ","Li ","Mu ","Cheng ","Gan ","Xu ","Mang ","Mang ","Zhi ","Qi ","Ruan ","Tian ","Xiang ","Dun ","Xin ","Xi ","Pan ","Feng ","Dun ","Min "]});var Gz=b((I6e,Uz)=>{Uz.exports=["Ming ","Sheng ","Shi ","Yun ","Mian ","Pan ","Fang ","Miao ","Dan ","Mei ","Mao ","Kan ","Xian ","Ou ","Shi ","Yang ","Zheng ","Yao ","Shen ","Huo ","Da ","Zhen ","Kuang ","Ju ","Shen ","Chi ","Sheng ","Mei ","Mo ","Zhu ","Zhen ","Zhen ","Mian ","Di ","Yuan ","Die ","Yi ","Zi ","Zi ","Chao ","Zha ","Xuan ","Bing ","Mi ","Long ","Sui ","Dong ","Mi ","Die ","Yi ","Er ","Ming ","Xuan ","Chi ","Kuang ","Juan ","Mou ","Zhen ","Tiao ","Yang ","Yan ","Mo ","Zhong ","Mai ","Zhao ","Zheng ","Mei ","Jun ","Shao ","Han ","Huan ","Di ","Cheng ","Cuo ","Juan ","E ","Wan ","Xian ","Xi ","Kun ","Lai ","Jian ","Shan ","Tian ","Hun ","Wan ","Ling ","Shi ","Qiong ","Lie ","Yai ","Jing ","Zheng ","Li ","Lai ","Sui ","Juan ","Shui ","Sui ","Du ","Bi ","Bi ","Mu ","Hun ","Ni ","Lu ","Yi ","Jie ","Cai ","Zhou ","Yu ","Hun ","Ma ","Xia ","Xing ","Xi ","Gun ","Cai ","Chun ","Jian ","Mei ","Du ","Hou ","Xuan ","Ti ","Kui ","Gao ","Rui ","Mou ","Xu ","Fa ","Wen ","Miao ","Chou ","Kui ","Mi ","Weng ","Kou ","Dang ","Chen ","Ke ","Sou ","Xia ","Qiong ","Mao ","Ming ","Man ","Shui ","Ze ","Zhang ","Yi ","Diao ","Ou ","Mo ","Shun ","Cong ","Lou ","Chi ","Man ","Piao ","Cheng ","Ji ","Meng ","[?] ","Run ","Pie ","Xi ","Qiao ","Pu ","Zhu ","Deng ","Shen ","Shun ","Liao ","Che ","Xian ","Kan ","Ye ","Xu ","Tong ","Mou ","Lin ","Kui ","Xian ","Ye ","Ai ","Hui ","Zhan ","Jian ","Gu ","Zhao ","Qu ","Wei ","Chou ","Sao ","Ning ","Xun ","Yao ","Huo ","Meng ","Mian ","Bin ","Mian ","Li ","Kuang ","Jue ","Xuan ","Mian ","Huo ","Lu ","Meng ","Long ","Guan ","Man ","Xi ","Chu ","Tang ","Kan ","Zhu ","Mao ","Jin ","Lin ","Yu ","Shuo ","Ce ","Jue ","Shi ","Yi ","Shen ","Zhi ","Hou ","Shen ","Ying ","Ju ","Zhou ","Jiao ","Cuo ","Duan ","Ai ","Jiao ","Zeng ","Huo ","Bai ","Shi ","Ding ","Qi ","Ji ","Zi ","Gan ","Wu ","Tuo ","Ku ","Qiang ","Xi ","Fan ","Kuang "]});var Kz=b((j6e,Qz)=>{Qz.exports=["Dang ","Ma ","Sha ","Dan ","Jue ","Li ","Fu ","Min ","Nuo ","Huo ","Kang ","Zhi ","Qi ","Kan ","Jie ","Fen ","E ","Ya ","Pi ","Zhe ","Yan ","Sui ","Zhuan ","Che ","Dun ","Pan ","Yan ","[?] ","Feng ","Fa ","Mo ","Zha ","Qu ","Yu ","Luo ","Tuo ","Tuo ","Di ","Zhai ","Zhen ","Ai ","Fei ","Mu ","Zhu ","Li ","Bian ","Nu ","Ping ","Peng ","Ling ","Pao ","Le ","Po ","Bo ","Po ","Shen ","Za ","Nuo ","Li ","Long ","Tong ","[?] ","Li ","Aragane ","Chu ","Keng ","Quan ","Zhu ","Kuang ","Huo ","E ","Nao ","Jia ","Lu ","Wei ","Ai ","Luo ","Ken ","Xing ","Yan ","Tong ","Peng ","Xi ","[?] ","Hong ","Shuo ","Xia ","Qiao ","[?] ","Wei ","Qiao ","[?] ","Keng ","Xiao ","Que ","Chan ","Lang ","Hong ","Yu ","Xiao ","Xia ","Mang ","Long ","Iong ","Che ","Che ","E ","Liu ","Ying ","Mang ","Que ","Yan ","Sha ","Kun ","Yu ","[?] ","Kaki ","Lu ","Chen ","Jian ","Nue ","Song ","Zhuo ","Keng ","Peng ","Yan ","Zhui ","Kong ","Ceng ","Qi ","Zong ","Qing ","Lin ","Jun ","Bo ","Ding ","Min ","Diao ","Jian ","He ","Lu ","Ai ","Sui ","Que ","Ling ","Bei ","Yin ","Dui ","Wu ","Qi ","Lun ","Wan ","Dian ","Gang ","Pei ","Qi ","Chen ","Ruan ","Yan ","Die ","Ding ","Du ","Tuo ","Jie ","Ying ","Bian ","Ke ","Bi ","Wei ","Shuo ","Zhen ","Duan ","Xia ","Dang ","Ti ","Nao ","Peng ","Jian ","Di ","Tan ","Cha ","Seki ","Qi ","[?] ","Feng ","Xuan ","Que ","Que ","Ma ","Gong ","Nian ","Su ","E ","Ci ","Liu ","Si ","Tang ","Bang ","Hua ","Pi ","Wei ","Sang ","Lei ","Cuo ","Zhen ","Xia ","Qi ","Lian ","Pan ","Wei ","Yun ","Dui ","Zhe ","Ke ","La ","[?] ","Qing ","Gun ","Zhuan ","Chan ","Qi ","Ao ","Peng ","Lu ","Lu ","Kan ","Qiang ","Chen ","Yin ","Lei ","Biao ","Qi ","Mo ","Qi ","Cui ","Zong ","Qing ","Chuo ","[?] ","Ji ","Shan ","Lao ","Qu ","Zeng ","Deng ","Jian ","Xi ","Lin ","Ding ","Dian ","Huang ","Pan ","Za ","Qiao ","Di ","Li "]});var Vz=b((A6e,zz)=>{zz.exports=["Tani ","Jiao ","[?] ","Zhang ","Qiao ","Dun ","Xian ","Yu ","Zhui ","He ","Huo ","Zhai ","Lei ","Ke ","Chu ","Ji ","Que ","Dang ","Yi ","Jiang ","Pi ","Pi ","Yu ","Pin ","Qi ","Ai ","Kai ","Jian ","Yu ","Ruan ","Meng ","Pao ","Ci ","[?] ","[?] ","Mie ","Ca ","Xian ","Kuang ","Lei ","Lei ","Zhi ","Li ","Li ","Fan ","Que ","Pao ","Ying ","Li ","Long ","Long ","Mo ","Bo ","Shuang ","Guan ","Lan ","Zan ","Yan ","Shi ","Shi ","Li ","Reng ","She ","Yue ","Si ","Qi ","Ta ","Ma ","Xie ","Xian ","Xian ","Zhi ","Qi ","Zhi ","Beng ","Dui ","Zhong ","[?] ","Yi ","Shi ","You ","Zhi ","Tiao ","Fu ","Fu ","Mi ","Zu ","Zhi ","Suan ","Mei ","Zuo ","Qu ","Hu ","Zhu ","Shen ","Sui ","Ci ","Chai ","Mi ","Lu ","Yu ","Xiang ","Wu ","Tiao ","Piao ","Zhu ","Gui ","Xia ","Zhi ","Ji ","Gao ","Zhen ","Gao ","Shui ","Jin ","Chen ","Gai ","Kun ","Di ","Dao ","Huo ","Tao ","Qi ","Gu ","Guan ","Zui ","Ling ","Lu ","Bing ","Jin ","Dao ","Zhi ","Lu ","Shan ","Bei ","Zhe ","Hui ","You ","Xi ","Yin ","Zi ","Huo ","Zhen ","Fu ","Yuan ","Wu ","Xian ","Yang ","Ti ","Yi ","Mei ","Si ","Di ","[?] ","Zhuo ","Zhen ","Yong ","Ji ","Gao ","Tang ","Si ","Ma ","Ta ","[?] ","Xuan ","Qi ","Yu ","Xi ","Ji ","Si ","Chan ","Tan ","Kuai ","Sui ","Li ","Nong ","Ni ","Dao ","Li ","Rang ","Yue ","Ti ","Zan ","Lei ","Rou ","Yu ","Yu ","Chi ","Xie ","Qin ","He ","Tu ","Xiu ","Si ","Ren ","Tu ","Zi ","Cha ","Gan ","Yi ","Xian ","Bing ","Nian ","Qiu ","Qiu ","Chong ","Fen ","Hao ","Yun ","Ke ","Miao ","Zhi ","Geng ","Bi ","Zhi ","Yu ","Mi ","Ku ","Ban ","Pi ","Ni ","Li ","You ","Zu ","Pi ","Ba ","Ling ","Mo ","Cheng ","Nian ","Qin ","Yang ","Zuo ","Zhi ","Zhi ","Shu ","Ju ","Zi ","Huo ","Ji ","Cheng ","Tong ","Zhi ","Huo ","He ","Yin ","Zi ","Zhi ","Jie ","Ren ","Du ","Yi ","Zhu ","Hui ","Nong ","Fu "]});var t5=b((O6e,e5)=>{e5.exports=["Xi ","Kao ","Lang ","Fu ","Ze ","Shui ","Lu ","Kun ","Gan ","Geng ","Ti ","Cheng ","Tu ","Shao ","Shui ","Ya ","Lun ","Lu ","Gu ","Zuo ","Ren ","Zhun ","Bang ","Bai ","Ji ","Zhi ","Zhi ","Kun ","Leng ","Peng ","Ke ","Bing ","Chou ","Zu ","Yu ","Su ","Lue ","[?] ","Yi ","Xi ","Bian ","Ji ","Fu ","Bi ","Nuo ","Jie ","Zhong ","Zong ","Xu ","Cheng ","Dao ","Wen ","Lian ","Zi ","Yu ","Ji ","Xu ","Zhen ","Zhi ","Dao ","Jia ","Ji ","Gao ","Gao ","Gu ","Rong ","Sui ","You ","Ji ","Kang ","Mu ","Shan ","Men ","Zhi ","Ji ","Lu ","Su ","Ji ","Ying ","Wen ","Qiu ","Se ","[?] ","Yi ","Huang ","Qie ","Ji ","Sui ","Xiao ","Pu ","Jiao ","Zhuo ","Tong ","Sai ","Lu ","Sui ","Nong ","Se ","Hui ","Rang ","Nuo ","Yu ","Bin ","Ji ","Tui ","Wen ","Cheng ","Huo ","Gong ","Lu ","Biao ","[?] ","Rang ","Zhuo ","Li ","Zan ","Xue ","Wa ","Jiu ","Qiong ","Xi ","Qiong ","Kong ","Yu ","Sen ","Jing ","Yao ","Chuan ","Zhun ","Tu ","Lao ","Qie ","Zhai ","Yao ","Bian ","Bao ","Yao ","Bing ","Wa ","Zhu ","Jiao ","Qiao ","Diao ","Wu ","Gui ","Yao ","Zhi ","Chuang ","Yao ","Tiao ","Jiao ","Chuang ","Jiong ","Xiao ","Cheng ","Kou ","Cuan ","Wo ","Dan ","Ku ","Ke ","Zhui ","Xu ","Su ","Guan ","Kui ","Dou ","[?] ","Yin ","Wo ","Wa ","Ya ","Yu ","Ju ","Qiong ","Yao ","Yao ","Tiao ","Chao ","Yu ","Tian ","Diao ","Ju ","Liao ","Xi ","Wu ","Kui ","Chuang ","Zhao ","[?] ","Kuan ","Long ","Cheng ","Cui ","Piao ","Zao ","Cuan ","Qiao ","Qiong ","Dou ","Zao ","Long ","Qie ","Li ","Chu ","Shi ","Fou ","Qian ","Chu ","Hong ","Qi ","Qian ","Gong ","Shi ","Shu ","Miao ","Ju ","Zhan ","Zhu ","Ling ","Long ","Bing ","Jing ","Jing ","Zhang ","Yi ","Si ","Jun ","Hong ","Tong ","Song ","Jing ","Diao ","Yi ","Shu ","Jing ","Qu ","Jie ","Ping ","Duan ","Shao ","Zhuan ","Ceng ","Deng ","Cui ","Huai ","Jing ","Kan ","Jing ","Zhu ","Zhu ","Le ","Peng ","Yu ","Chi ","Gan "]});var n5=b((M6e,i5)=>{i5.exports=["Mang ","Zhu ","Utsubo ","Du ","Ji ","Xiao ","Ba ","Suan ","Ji ","Zhen ","Zhao ","Sun ","Ya ","Zhui ","Yuan ","Hu ","Gang ","Xiao ","Cen ","Pi ","Bi ","Jian ","Yi ","Dong ","Shan ","Sheng ","Xia ","Di ","Zhu ","Na ","Chi ","Gu ","Li ","Qie ","Min ","Bao ","Tiao ","Si ","Fu ","Ce ","Ben ","Pei ","Da ","Zi ","Di ","Ling ","Ze ","Nu ","Fu ","Gou ","Fan ","Jia ","Ge ","Fan ","Shi ","Mao ","Po ","Sey ","Jian ","Qiong ","Long ","Souke ","Bian ","Luo ","Gui ","Qu ","Chi ","Yin ","Yao ","Xian ","Bi ","Qiong ","Gua ","Deng ","Jiao ","Jin ","Quan ","Sun ","Ru ","Fa ","Kuang ","Zhu ","Tong ","Ji ","Da ","Xing ","Ce ","Zhong ","Kou ","Lai ","Bi ","Shai ","Dang ","Zheng ","Ce ","Fu ","Yun ","Tu ","Pa ","Li ","Lang ","Ju ","Guan ","Jian ","Han ","Tong ","Xia ","Zhi ","Cheng ","Suan ","Shi ","Zhu ","Zuo ","Xiao ","Shao ","Ting ","Ce ","Yan ","Gao ","Kuai ","Gan ","Chou ","Kago ","Gang ","Yun ","O ","Qian ","Xiao ","Jian ","Pu ","Lai ","Zou ","Bi ","Bi ","Bi ","Ge ","Chi ","Guai ","Yu ","Jian ","Zhao ","Gu ","Chi ","Zheng ","Jing ","Sha ","Zhou ","Lu ","Bo ","Ji ","Lin ","Suan ","Jun ","Fu ","Zha ","Gu ","Kong ","Qian ","Quan ","Jun ","Chui ","Guan ","Yuan ","Ce ","Ju ","Bo ","Ze ","Qie ","Tuo ","Luo ","Dan ","Xiao ","Ruo ","Jian ","Xuan ","Bian ","Sun ","Xiang ","Xian ","Ping ","Zhen ","Sheng ","Hu ","Shi ","Zhu ","Yue ","Chun ","Lu ","Wu ","Dong ","Xiao ","Ji ","Jie ","Huang ","Xing ","Mei ","Fan ","Chui ","Zhuan ","Pian ","Feng ","Zhu ","Hong ","Qie ","Hou ","Qiu ","Miao ","Qian ","[?] ","Kui ","Sik ","Lou ","Yun ","He ","Tang ","Yue ","Chou ","Gao ","Fei ","Ruo ","Zheng ","Gou ","Nie ","Qian ","Xiao ","Cuan ","Gong ","Pang ","Du ","Li ","Bi ","Zhuo ","Chu ","Shai ","Chi ","Zhu ","Qiang ","Long ","Lan ","Jian ","Bu ","Li ","Hui ","Bi ","Di ","Cong ","Yan ","Peng ","Sen ","Zhuan ","Pai ","Piao ","Dou ","Yu ","Mie ","Zhuan "]});var o5=b((N6e,r5)=>{r5.exports=["Ze ","Xi ","Guo ","Yi ","Hu ","Chan ","Kou ","Cu ","Ping ","Chou ","Ji ","Gui ","Su ","Lou ","Zha ","Lu ","Nian ","Suo ","Cuan ","Sasara ","Suo ","Le ","Duan ","Yana ","Xiao ","Bo ","Mi ","Si ","Dang ","Liao ","Dan ","Dian ","Fu ","Jian ","Min ","Kui ","Dai ","Qiao ","Deng ","Huang ","Sun ","Lao ","Zan ","Xiao ","Du ","Shi ","Zan ","[?] ","Pai ","Hata ","Pai ","Gan ","Ju ","Du ","Lu ","Yan ","Bo ","Dang ","Sai ","Ke ","Long ","Qian ","Lian ","Bo ","Zhou ","Lai ","[?] ","Lan ","Kui ","Yu ","Yue ","Hao ","Zhen ","Tai ","Ti ","Mi ","Chou ","Ji ","[?] ","Hata ","Teng ","Zhuan ","Zhou ","Fan ","Sou ","Zhou ","Kuji ","Zhuo ","Teng ","Lu ","Lu ","Jian ","Tuo ","Ying ","Yu ","Lai ","Long ","Shinshi ","Lian ","Lan ","Qian ","Yue ","Zhong ","Qu ","Lian ","Bian ","Duan ","Zuan ","Li ","Si ","Luo ","Ying ","Yue ","Zhuo ","Xu ","Mi ","Di ","Fan ","Shen ","Zhe ","Shen ","Nu ","Xie ","Lei ","Xian ","Zi ","Ni ","Cun ","[?] ","Qian ","Kume ","Bi ","Ban ","Wu ","Sha ","Kang ","Rou ","Fen ","Bi ","Cui ","[?] ","Li ","Chi ","Nukamiso ","Ro ","Ba ","Li ","Gan ","Ju ","Po ","Mo ","Cu ","Nian ","Zhou ","Li ","Su ","Tiao ","Li ","Qi ","Su ","Hong ","Tong ","Zi ","Ce ","Yue ","Zhou ","Lin ","Zhuang ","Bai ","[?] ","Fen ","Ji ","[?] ","Sukumo ","Liang ","Xian ","Fu ","Liang ","Can ","Geng ","Li ","Yue ","Lu ","Ju ","Qi ","Cui ","Bai ","Zhang ","Lin ","Zong ","Jing ","Guo ","Kouji ","San ","San ","Tang ","Bian ","Rou ","Mian ","Hou ","Xu ","Zong ","Hu ","Jian ","Zan ","Ci ","Li ","Xie ","Fu ","Ni ","Bei ","Gu ","Xiu ","Gao ","Tang ","Qiu ","Sukumo ","Cao ","Zhuang ","Tang ","Mi ","San ","Fen ","Zao ","Kang ","Jiang ","Mo ","San ","San ","Nuo ","Xi ","Liang ","Jiang ","Kuai ","Bo ","Huan ","[?] ","Zong ","Xian ","Nuo ","Tuan ","Nie ","Li ","Zuo ","Di ","Nie ","Tiao ","Lan ","Mi ","Jiao ","Jiu ","Xi ","Gong ","Zheng ","Jiu ","You "]});var a5=b((B6e,s5)=>{s5.exports=["Ji ","Cha ","Zhou ","Xun ","Yue ","Hong ","Yu ","He ","Wan ","Ren ","Wen ","Wen ","Qiu ","Na ","Zi ","Tou ","Niu ","Fou ","Jie ","Shu ","Chun ","Pi ","Yin ","Sha ","Hong ","Zhi ","Ji ","Fen ","Yun ","Ren ","Dan ","Jin ","Su ","Fang ","Suo ","Cui ","Jiu ","Zha ","Kinu ","Jin ","Fu ","Zhi ","Ci ","Zi ","Chou ","Hong ","Zha ","Lei ","Xi ","Fu ","Xie ","Shen ","Bei ","Zhu ","Qu ","Ling ","Zhu ","Shao ","Gan ","Yang ","Fu ","Tuo ","Zhen ","Dai ","Zhuo ","Shi ","Zhong ","Xian ","Zu ","Jiong ","Ban ","Ju ","Mo ","Shu ","Zui ","Wata ","Jing ","Ren ","Heng ","Xie ","Jie ","Zhu ","Chou ","Gua ","Bai ","Jue ","Kuang ","Hu ","Ci ","Geng ","Geng ","Tao ","Xie ","Ku ","Jiao ","Quan ","Gai ","Luo ","Xuan ","Bing ","Xian ","Fu ","Gei ","Tong ","Rong ","Tiao ","Yin ","Lei ","Xie ","Quan ","Xu ","Lun ","Die ","Tong ","Si ","Jiang ","Xiang ","Hui ","Jue ","Zhi ","Jian ","Juan ","Chi ","Mian ","Zhen ","Lu ","Cheng ","Qiu ","Shu ","Bang ","Tong ","Xiao ","Wan ","Qin ","Geng ","Xiu ","Ti ","Xiu ","Xie ","Hong ","Xi ","Fu ","Ting ","Sui ","Dui ","Kun ","Fu ","Jing ","Hu ","Zhi ","Yan ","Jiong ","Feng ","Ji ","Sok ","Kase ","Zong ","Lin ","Duo ","Li ","Lu ","Liang ","Chou ","Quan ","Shao ","Qi ","Qi ","Zhun ","Qi ","Wan ","Qian ","Xian ","Shou ","Wei ","Qi ","Tao ","Wan ","Gang ","Wang ","Beng ","Zhui ","Cai ","Guo ","Cui ","Lun ","Liu ","Qi ","Zhan ","Bei ","Chuo ","Ling ","Mian ","Qi ","Qie ","Tan ","Zong ","Gun ","Zou ","Yi ","Zi ","Xing ","Liang ","Jin ","Fei ","Rui ","Min ","Yu ","Zong ","Fan ","Lu ","Xu ","Yingl ","Zhang ","Kasuri ","Xu ","Xiang ","Jian ","Ke ","Xian ","Ruan ","Mian ","Qi ","Duan ","Zhong ","Di ","Min ","Miao ","Yuan ","Xie ","Bao ","Si ","Qiu ","Bian ","Huan ","Geng ","Cong ","Mian ","Wei ","Fu ","Wei ","Yu ","Gou ","Miao ","Xie ","Lian ","Zong ","Bian ","Yun ","Yin ","Ti ","Gua ","Zhi ","Yun ","Cheng ","Chan ","Dai "]});var u5=b((H6e,l5)=>{l5.exports=["Xia ","Yuan ","Zong ","Xu ","Nawa ","Odoshi ","Geng ","Sen ","Ying ","Jin ","Yi ","Zhui ","Ni ","Bang ","Gu ","Pan ","Zhou ","Jian ","Cuo ","Quan ","Shuang ","Yun ","Xia ","Shuai ","Xi ","Rong ","Tao ","Fu ","Yun ","Zhen ","Gao ","Ru ","Hu ","Zai ","Teng ","Xian ","Su ","Zhen ","Zong ","Tao ","Horo ","Cai ","Bi ","Feng ","Cu ","Li ","Suo ","Yin ","Xi ","Zong ","Lei ","Zhuan ","Qian ","Man ","Zhi ","Lu ","Mo ","Piao ","Lian ","Mi ","Xuan ","Zong ","Ji ","Shan ","Sui ","Fan ","Shuai ","Beng ","Yi ","Sao ","Mou ","Zhou ","Qiang ","Hun ","Sem ","Xi ","Jung ","Xiu ","Ran ","Xuan ","Hui ","Qiao ","Zeng ","Zuo ","Zhi ","Shan ","San ","Lin ","Yu ","Fan ","Liao ","Chuo ","Zun ","Jian ","Rao ","Chan ","Rui ","Xiu ","Hui ","Hua ","Zuan ","Xi ","Qiang ","Un ","Da ","Sheng ","Hui ","Xi ","Se ","Jian ","Jiang ","Huan ","Zao ","Cong ","Jie ","Jiao ","Bo ","Chan ","Yi ","Nao ","Sui ","Yi ","Shai ","Xu ","Ji ","Bin ","Qian ","Lan ","Pu ","Xun ","Zuan ","Qi ","Peng ","Li ","Mo ","Lei ","Xie ","Zuan ","Kuang ","You ","Xu ","Lei ","Xian ","Chan ","Kou ","Lu ","Chan ","Ying ","Cai ","Xiang ","Xian ","Zui ","Zuan ","Luo ","Xi ","Dao ","Lan ","Lei ","Lian ","Si ","Jiu ","Yu ","Hong ","Zhou ","Xian ","He ","Yue ","Ji ","Wan ","Kuang ","Ji ","Ren ","Wei ","Yun ","Hong ","Chun ","Pi ","Sha ","Gang ","Na ","Ren ","Zong ","Lun ","Fen ","Zhi ","Wen ","Fang ","Zhu ","Yin ","Niu ","Shu ","Xian ","Gan ","Xie ","Fu ","Lian ","Zu ","Shen ","Xi ","Zhi ","Zhong ","Zhou ","Ban ","Fu ","Zhuo ","Shao ","Yi ","Jing ","Dai ","Bang ","Rong ","Jie ","Ku ","Rao ","Die ","Heng ","Hui ","Gei ","Xuan ","Jiang ","Luo ","Jue ","Jiao ","Tong ","Geng ","Xiao ","Juan ","Xiu ","Xi ","Sui ","Tao ","Ji ","Ti ","Ji ","Xu ","Ling ","[?] ","Xu ","Qi ","Fei ","Chuo ","Zhang ","Gun ","Sheng ","Wei ","Mian ","Shou ","Beng ","Chou ","Tao ","Liu ","Quan ","Zong ","Zhan ","Wan ","Lu "]});var h5=b((q6e,c5)=>{c5.exports=["Zhui ","Zi ","Ke ","Xiang ","Jian ","Mian ","Lan ","Ti ","Miao ","Qi ","Yun ","Hui ","Si ","Duo ","Duan ","Bian ","Xian ","Gou ","Zhui ","Huan ","Di ","Lu ","Bian ","Min ","Yuan ","Jin ","Fu ","Ru ","Zhen ","Feng ","Shuai ","Gao ","Chan ","Li ","Yi ","Jian ","Bin ","Piao ","Man ","Lei ","Ying ","Suo ","Mou ","Sao ","Xie ","Liao ","Shan ","Zeng ","Jiang ","Qian ","Zao ","Huan ","Jiao ","Zuan ","Fou ","Xie ","Gang ","Fou ","Que ","Fou ","Kaakeru ","Bo ","Ping ","Hou ","[?] ","Gang ","Ying ","Ying ","Qing ","Xia ","Guan ","Zun ","Tan ","Chang ","Qi ","Weng ","Ying ","Lei ","Tan ","Lu ","Guan ","Wang ","Wang ","Gang ","Wang ","Han ","[?] ","Luo ","Fu ","Mi ","Fa ","Gu ","Zhu ","Ju ","Mao ","Gu ","Min ","Gang ","Ba ","Gua ","Ti ","Juan ","Fu ","Lin ","Yan ","Zhao ","Zui ","Gua ","Zhuo ","Yu ","Zhi ","An ","Fa ","Nan ","Shu ","Si ","Pi ","Ma ","Liu ","Ba ","Fa ","Li ","Chao ","Wei ","Bi ","Ji ","Zeng ","Tong ","Liu ","Ji ","Juan ","Mi ","Zhao ","Luo ","Pi ","Ji ","Ji ","Luan ","Yang ","Mie ","Qiang ","Ta ","Mei ","Yang ","You ","You ","Fen ","Ba ","Gao ","Yang ","Gu ","Qiang ","Zang ","Gao ","Ling ","Yi ","Zhu ","Di ","Xiu ","Qian ","Yi ","Xian ","Rong ","Qun ","Qun ","Qian ","Huan ","Zui ","Xian ","Yi ","Yashinau ","Qiang ","Xian ","Yu ","Geng ","Jie ","Tang ","Yuan ","Xi ","Fan ","Shan ","Fen ","Shan ","Lian ","Lei ","Geng ","Nou ","Qiang ","Chan ","Yu ","Gong ","Yi ","Chong ","Weng ","Fen ","Hong ","Chi ","Chi ","Cui ","Fu ","Xia ","Pen ","Yi ","La ","Yi ","Pi ","Ling ","Liu ","Zhi ","Qu ","Xi ","Xie ","Xiang ","Xi ","Xi ","Qi ","Qiao ","Hui ","Hui ","Xiao ","Se ","Hong ","Jiang ","Di ","Cui ","Fei ","Tao ","Sha ","Chi ","Zhu ","Jian ","Xuan ","Shi ","Pian ","Zong ","Wan ","Hui ","Hou ","He ","He ","Han ","Ao ","Piao ","Yi ","Lian ","Qu ","[?] ","Lin ","Pen ","Qiao ","Ao ","Fan ","Yi ","Hui ","Xuan ","Dao "]});var g5=b((Y6e,d5)=>{d5.exports=["Yao ","Lao ","[?] ","Kao ","Mao ","Zhe ","Qi ","Gou ","Gou ","Gou ","Die ","Die ","Er ","Shua ","Ruan ","Er ","Nai ","Zhuan ","Lei ","Ting ","Zi ","Geng ","Chao ","Hao ","Yun ","Pa ","Pi ","Chi ","Si ","Chu ","Jia ","Ju ","He ","Chu ","Lao ","Lun ","Ji ","Tang ","Ou ","Lou ","Nou ","Gou ","Pang ","Ze ","Lou ","Ji ","Lao ","Huo ","You ","Mo ","Huai ","Er ","Zhe ","Ting ","Ye ","Da ","Song ","Qin ","Yun ","Chi ","Dan ","Dan ","Hong ","Geng ","Zhi ","[?] ","Nie ","Dan ","Zhen ","Che ","Ling ","Zheng ","You ","Wa ","Liao ","Long ","Zhi ","Ning ","Tiao ","Er ","Ya ","Die ","Gua ","[?] ","Lian ","Hao ","Sheng ","Lie ","Pin ","Jing ","Ju ","Bi ","Di ","Guo ","Wen ","Xu ","Ping ","Cong ","Shikato ","[?] ","Ting ","Yu ","Cong ","Kui ","Tsuraneru ","Kui ","Cong ","Lian ","Weng ","Kui ","Lian ","Lian ","Cong ","Ao ","Sheng ","Song ","Ting ","Kui ","Nie ","Zhi ","Dan ","Ning ","Qie ","Ji ","Ting ","Ting ","Long ","Yu ","Yu ","Zhao ","Si ","Su ","Yi ","Su ","Si ","Zhao ","Zhao ","Rou ","Yi ","Le ","Ji ","Qiu ","Ken ","Cao ","Ge ","Di ","Huan ","Huang ","Yi ","Ren ","Xiao ","Ru ","Zhou ","Yuan ","Du ","Gang ","Rong ","Gan ","Cha ","Wo ","Chang ","Gu ","Zhi ","Han ","Fu ","Fei ","Fen ","Pei ","Pang ","Jian ","Fang ","Zhun ","You ","Na ","Hang ","Ken ","Ran ","Gong ","Yu ","Wen ","Yao ","Jin ","Pi ","Qian ","Xi ","Xi ","Fei ","Ken ","Jing ","Tai ","Shen ","Zhong ","Zhang ","Xie ","Shen ","Wei ","Zhou ","Die ","Dan ","Fei ","Ba ","Bo ","Qu ","Tian ","Bei ","Gua ","Tai ","Zi ","Ku ","Zhi ","Ni ","Ping ","Zi ","Fu ","Pang ","Zhen ","Xian ","Zuo ","Pei ","Jia ","Sheng ","Zhi ","Bao ","Mu ","Qu ","Hu ","Ke ","Yi ","Yin ","Xu ","Yang ","Long ","Dong ","Ka ","Lu ","Jing ","Nu ","Yan ","Pang ","Kua ","Yi ","Guang ","Gai ","Ge ","Dong ","Zhi ","Xiao ","Xiong ","Xiong ","Er ","E ","Xing ","Pian ","Neng ","Zi ","Gui "]});var p5=b((W6e,f5)=>{f5.exports=["Cheng ","Tiao ","Zhi ","Cui ","Mei ","Xie ","Cui ","Xie ","Mo ","Mai ","Ji ","Obiyaakasu ","[?] ","Kuai ","Sa ","Zang ","Qi ","Nao ","Mi ","Nong ","Luan ","Wan ","Bo ","Wen ","Guan ","Qiu ","Jiao ","Jing ","Rou ","Heng ","Cuo ","Lie ","Shan ","Ting ","Mei ","Chun ","Shen ","Xie ","De ","Zui ","Cu ","Xiu ","Xin ","Tuo ","Pao ","Cheng ","Nei ","Fu ","Dou ","Tuo ","Niao ","Noy ","Pi ","Gu ","Gua ","Li ","Lian ","Zhang ","Cui ","Jie ","Liang ","Zhou ","Pi ","Biao ","Lun ","Pian ","Guo ","Kui ","Chui ","Dan ","Tian ","Nei ","Jing ","Jie ","La ","Yi ","An ","Ren ","Shen ","Chuo ","Fu ","Fu ","Ju ","Fei ","Qiang ","Wan ","Dong ","Pi ","Guo ","Zong ","Ding ","Wu ","Mei ","Ruan ","Zhuan ","Zhi ","Cou ","Gua ","Ou ","Di ","An ","Xing ","Nao ","Yu ","Chuan ","Nan ","Yun ","Zhong ","Rou ","E ","Sai ","Tu ","Yao ","Jian ","Wei ","Jiao ","Yu ","Jia ","Duan ","Bi ","Chang ","Fu ","Xian ","Ni ","Mian ","Wa ","Teng ","Tui ","Bang ","Qian ","Lu ","Wa ","Sou ","Tang ","Su ","Zhui ","Ge ","Yi ","Bo ","Liao ","Ji ","Pi ","Xie ","Gao ","Lu ","Bin ","Ou ","Chang ","Lu ","Guo ","Pang ","Chuai ","Piao ","Jiang ","Fu ","Tang ","Mo ","Xi ","Zhuan ","Lu ","Jiao ","Ying ","Lu ","Zhi ","Tara ","Chun ","Lian ","Tong ","Peng ","Ni ","Zha ","Liao ","Cui ","Gui ","Xiao ","Teng ","Fan ","Zhi ","Jiao ","Shan ","Wu ","Cui ","Run ","Xiang ","Sui ","Fen ","Ying ","Tan ","Zhua ","Dan ","Kuai ","Nong ","Tun ","Lian ","Bi ","Yong ","Jue ","Chu ","Yi ","Juan ","La ","Lian ","Sao ","Tun ","Gu ","Qi ","Cui ","Bin ","Xun ","Ru ","Huo ","Zang ","Xian ","Biao ","Xing ","Kuan ","La ","Yan ","Lu ","Huo ","Zang ","Luo ","Qu ","Zang ","Luan ","Ni ","Zang ","Chen ","Qian ","Wo ","Guang ","Zang ","Lin ","Guang ","Zi ","Jiao ","Nie ","Chou ","Ji ","Gao ","Chou ","Mian ","Nie ","Zhi ","Zhi ","Ge ","Jian ","Die ","Zhi ","Xiu ","Tai ","Zhen ","Jiu ","Xian ","Yu ","Cha "]});var b5=b((Z6e,m5)=>{m5.exports=["Yao ","Yu ","Chong ","Xi ","Xi ","Jiu ","Yu ","Yu ","Xing ","Ju ","Jiu ","Xin ","She ","She ","Yadoru ","Jiu ","Shi ","Tan ","Shu ","Shi ","Tian ","Dan ","Pu ","Pu ","Guan ","Hua ","Tan ","Chuan ","Shun ","Xia ","Wu ","Zhou ","Dao ","Gang ","Shan ","Yi ","[?] ","Pa ","Tai ","Fan ","Ban ","Chuan ","Hang ","Fang ","Ban ","Que ","Hesaki ","Zhong ","Jian ","Cang ","Ling ","Zhu ","Ze ","Duo ","Bo ","Xian ","Ge ","Chuan ","Jia ","Lu ","Hong ","Pang ","Xi ","[?] ","Fu ","Zao ","Feng ","Li ","Shao ","Yu ","Lang ","Ting ","[?] ","Wei ","Bo ","Meng ","Nian ","Ju ","Huang ","Shou ","Zong ","Bian ","Mao ","Die ","[?] ","Bang ","Cha ","Yi ","Sao ","Cang ","Cao ","Lou ","Dai ","Sori ","Yao ","Tong ","Yofune ","Dang ","Tan ","Lu ","Yi ","Jie ","Jian ","Huo ","Meng ","Qi ","Lu ","Lu ","Chan ","Shuang ","Gen ","Liang ","Jian ","Jian ","Se ","Yan ","Fu ","Ping ","Yan ","Yan ","Cao ","Cao ","Yi ","Le ","Ting ","Qiu ","Ai ","Nai ","Tiao ","Jiao ","Jie ","Peng ","Wan ","Yi ","Chai ","Mian ","Mie ","Gan ","Qian ","Yu ","Yu ","Shuo ","Qiong ","Tu ","Xia ","Qi ","Mang ","Zi ","Hui ","Sui ","Zhi ","Xiang ","Bi ","Fu ","Tun ","Wei ","Wu ","Zhi ","Qi ","Shan ","Wen ","Qian ","Ren ","Fou ","Kou ","Jie ","Lu ","Xu ","Ji ","Qin ","Qi ","Yuan ","Fen ","Ba ","Rui ","Xin ","Ji ","Hua ","Hua ","Fang ","Wu ","Jue ","Gou ","Zhi ","Yun ","Qin ","Ao ","Chu ","Mao ","Ya ","Fei ","Reng ","Hang ","Cong ","Yin ","You ","Bian ","Yi ","Susa ","Wei ","Li ","Pi ","E ","Xian ","Chang ","Cang ","Meng ","Su ","Yi ","Yuan ","Ran ","Ling ","Tai ","Tiao ","Di ","Miao ","Qiong ","Li ","Yong ","Ke ","Mu ","Pei ","Bao ","Gou ","Min ","Yi ","Yi ","Ju ","Pi ","Ruo ","Ku ","Zhu ","Ni ","Bo ","Bing ","Shan ","Qiu ","Yao ","Xian ","Ben ","Hong ","Ying ","Zha ","Dong ","Ju ","Die ","Nie ","Gan ","Hu ","Ping ","Mei ","Fu ","Sheng ","Gu ","Bi ","Wei "]});var v5=b((J6e,y5)=>{y5.exports=["Fu ","Zhuo ","Mao ","Fan ","Qie ","Mao ","Mao ","Ba ","Zi ","Mo ","Zi ","Di ","Chi ","Ji ","Jing ","Long ","[?] ","Niao ","[?] ","Xue ","Ying ","Qiong ","Ge ","Ming ","Li ","Rong ","Yin ","Gen ","Qian ","Chai ","Chen ","Yu ","Xiu ","Zi ","Lie ","Wu ","Ji ","Kui ","Ce ","Chong ","Ci ","Gou ","Guang ","Mang ","Chi ","Jiao ","Jiao ","Fu ","Yu ","Zhu ","Zi ","Jiang ","Hui ","Yin ","Cha ","Fa ","Rong ","Ru ","Chong ","Mang ","Tong ","Zhong ","[?] ","Zhu ","Xun ","Huan ","Kua ","Quan ","Gai ","Da ","Jing ","Xing ","Quan ","Cao ","Jing ","Er ","An ","Shou ","Chi ","Ren ","Jian ","Ti ","Huang ","Ping ","Li ","Jin ","Lao ","Shu ","Zhuang ","Da ","Jia ","Rao ","Bi ","Ze ","Qiao ","Hui ","Qi ","Dang ","[?] ","Rong ","Hun ","Ying ","Luo ","Ying ","Xun ","Jin ","Sun ","Yin ","Mai ","Hong ","Zhou ","Yao ","Du ","Wei ","Chu ","Dou ","Fu ","Ren ","Yin ","He ","Bi ","Bu ","Yun ","Di ","Tu ","Sui ","Sui ","Cheng ","Chen ","Wu ","Bie ","Xi ","Geng ","Li ","Fu ","Zhu ","Mo ","Li ","Zhuang ","Ji ","Duo ","Qiu ","Sha ","Suo ","Chen ","Feng ","Ju ","Mei ","Meng ","Xing ","Jing ","Che ","Xin ","Jun ","Yan ","Ting ","Diao ","Cuo ","Wan ","Han ","You ","Cuo ","Jia ","Wang ","You ","Niu ","Shao ","Xian ","Lang ","Fu ","E ","Mo ","Wen ","Jie ","Nan ","Mu ","Kan ","Lai ","Lian ","Shi ","Wo ","Usagi ","Lian ","Huo ","You ","Ying ","Ying ","Nuc ","Chun ","Mang ","Mang ","Ci ","Wan ","Jing ","Di ","Qu ","Dong ","Jian ","Zou ","Gu ","La ","Lu ","Ju ","Wei ","Jun ","Nie ","Kun ","He ","Pu ","Zi ","Gao ","Guo ","Fu ","Lun ","Chang ","Chou ","Song ","Chui ","Zhan ","Men ","Cai ","Ba ","Li ","Tu ","Bo ","Han ","Bao ","Qin ","Juan ","Xi ","Qin ","Di ","Jie ","Pu ","Dang ","Jin ","Zhao ","Tai ","Geng ","Hua ","Gu ","Ling ","Fei ","Jin ","An ","Wang ","Beng ","Zhou ","Yan ","Ju ","Jian ","Lin ","Tan ","Shu ","Tian ","Dao "]});var D5=b(($6e,w5)=>{w5.exports=["Hu ","Qi ","He ","Cui ","Tao ","Chun ","Bei ","Chang ","Huan ","Fei ","Lai ","Qi ","Meng ","Ping ","Wei ","Dan ","Sha ","Huan ","Yan ","Yi ","Tiao ","Qi ","Wan ","Ce ","Nai ","Kutabireru ","Tuo ","Jiu ","Tie ","Luo ","[?] ","[?] ","Meng ","[?] ","Yaji ","[?] ","Ying ","Ying ","Ying ","Xiao ","Sa ","Qiu ","Ke ","Xiang ","Wan ","Yu ","Yu ","Fu ","Lian ","Xuan ","Yuan ","Nan ","Ze ","Wo ","Chun ","Xiao ","Yu ","Pian ","Mao ","An ","E ","Luo ","Ying ","Huo ","Gua ","Jiang ","Mian ","Zuo ","Zuo ","Ju ","Bao ","Rou ","Xi ","Xie ","An ","Qu ","Jian ","Fu ","Lu ","Jing ","Pen ","Feng ","Hong ","Hong ","Hou ","Yan ","Tu ","Zhu ","Zi ","Xiang ","Shen ","Ge ","Jie ","Jing ","Mi ","Huang ","Shen ","Pu ","Gai ","Dong ","Zhou ","Qian ","Wei ","Bo ","Wei ","Pa ","Ji ","Hu ","Zang ","Jia ","Duan ","Yao ","Jun ","Cong ","Quan ","Wei ","Xian ","Kui ","Ting ","Hun ","Xi ","Shi ","Qi ","Lan ","Zong ","Yao ","Yuan ","Mei ","Yun ","Shu ","Di ","Zhuan ","Guan ","Sukumo ","Xue ","Chan ","Kai ","Kui ","[?] ","Jiang ","Lou ","Wei ","Pai ","[?] ","Sou ","Yin ","Shi ","Chun ","Shi ","Yun ","Zhen ","Lang ","Nu ","Meng ","He ","Que ","Suan ","Yuan ","Li ","Ju ","Xi ","Pang ","Chu ","Xu ","Tu ","Liu ","Wo ","Zhen ","Qian ","Zu ","Po ","Cuo ","Yuan ","Chu ","Yu ","Kuai ","Pan ","Pu ","Pu ","Na ","Shuo ","Xi ","Fen ","Yun ","Zheng ","Jian ","Ji ","Ruo ","Cang ","En ","Mi ","Hao ","Sun ","Zhen ","Ming ","Sou ","Xu ","Liu ","Xi ","Gu ","Lang ","Rong ","Weng ","Gai ","Cuo ","Shi ","Tang ","Luo ","Ru ","Suo ","Xian ","Bei ","Yao ","Gui ","Bi ","Zong ","Gun ","Za ","Xiu ","Ce ","Hai ","Lan ","[?] ","Ji ","Li ","Can ","Lang ","Yu ","[?] ","Ying ","Mo ","Diao ","Tiao ","Mao ","Tong ","Zhu ","Peng ","An ","Lian ","Cong ","Xi ","Ping ","Qiu ","Jin ","Chun ","Jie ","Wei ","Tui ","Cao ","Yu ","Yi ","Ji ","Liao ","Bi ","Lu ","Su "]});var x5=b((X6e,C5)=>{C5.exports=["Bu ","Zhang ","Luo ","Jiang ","Man ","Yan ","Ling ","Ji ","Piao ","Gun ","Han ","Di ","Su ","Lu ","She ","Shang ","Di ","Mie ","Xun ","Man ","Bo ","Di ","Cuo ","Zhe ","Sen ","Xuan ","Wei ","Hu ","Ao ","Mi ","Lou ","Cu ","Zhong ","Cai ","Po ","Jiang ","Mi ","Cong ","Niao ","Hui ","Jun ","Yin ","Jian ","Yan ","Shu ","Yin ","Kui ","Chen ","Hu ","Sha ","Kou ","Qian ","Ma ","Zang ","Sonoko ","Qiang ","Dou ","Lian ","Lin ","Kou ","Ai ","Bi ","Li ","Wei ","Ji ","Xun ","Sheng ","Fan ","Meng ","Ou ","Chan ","Dian ","Xun ","Jiao ","Rui ","Rui ","Lei ","Yu ","Qiao ","Chu ","Hua ","Jian ","Mai ","Yun ","Bao ","You ","Qu ","Lu ","Rao ","Hui ","E ","Teng ","Fei ","Jue ","Zui ","Fa ","Ru ","Fen ","Kui ","Shun ","Rui ","Ya ","Xu ","Fu ","Jue ","Dang ","Wu ","Tong ","Si ","Xiao ","Xi ","Long ","Yun ","[?] ","Qi ","Jian ","Yun ","Sun ","Ling ","Yu ","Xia ","Yong ","Ji ","Hong ","Si ","Nong ","Lei ","Xuan ","Yun ","Yu ","Xi ","Hao ","Bo ","Hao ","Ai ","Wei ","Hui ","Wei ","Ji ","Ci ","Xiang ","Luan ","Mie ","Yi ","Leng ","Jiang ","Can ","Shen ","Qiang ","Lian ","Ke ","Yuan ","Da ","Ti ","Tang ","Xie ","Bi ","Zhan ","Sun ","Lian ","Fan ","Ding ","Jie ","Gu ","Xie ","Shu ","Jian ","Kao ","Hong ","Sa ","Xin ","Xun ","Yao ","Hie ","Sou ","Shu ","Xun ","Dui ","Pin ","Wei ","Neng ","Chou ","Mai ","Ru ","Piao ","Tai ","Qi ","Zao ","Chen ","Zhen ","Er ","Ni ","Ying ","Gao ","Cong ","Xiao ","Qi ","Fa ","Jian ","Xu ","Kui ","Jie ","Bian ","Diao ","Mi ","Lan ","Jin ","Cang ","Miao ","Qiong ","Qie ","Xian ","[?] ","Ou ","Xian ","Su ","Lu ","Yi ","Xu ","Xie ","Li ","Yi ","La ","Lei ","Xiao ","Di ","Zhi ","Bei ","Teng ","Yao ","Mo ","Huan ","Piao ","Fan ","Sou ","Tan ","Tui ","Qiong ","Qiao ","Wei ","Liu ","Hui ","[?] ","Gao ","Yun ","[?] ","Li ","Shu ","Chu ","Ai ","Lin ","Zao ","Xuan ","Chen ","Lai ","Huo "]});var T5=b((U6e,S5)=>{S5.exports=["Tuo ","Wu ","Rui ","Rui ","Qi ","Heng ","Lu ","Su ","Tui ","Mang ","Yun ","Pin ","Yu ","Xun ","Ji ","Jiong ","Xian ","Mo ","Hagi ","Su ","Jiong ","[?] ","Nie ","Bo ","Rang ","Yi ","Xian ","Yu ","Ju ","Lian ","Lian ","Yin ","Qiang ","Ying ","Long ","Tong ","Wei ","Yue ","Ling ","Qu ","Yao ","Fan ","Mi ","Lan ","Kui ","Lan ","Ji ","Dang ","Katsura ","Lei ","Lei ","Hua ","Feng ","Zhi ","Wei ","Kui ","Zhan ","Huai ","Li ","Ji ","Mi ","Lei ","Huai ","Luo ","Ji ","Kui ","Lu ","Jian ","San ","[?] ","Lei ","Quan ","Xiao ","Yi ","Luan ","Men ","Bie ","Hu ","Hu ","Lu ","Nue ","Lu ","Si ","Xiao ","Qian ","Chu ","Hu ","Xu ","Cuo ","Fu ","Xu ","Xu ","Lu ","Hu ","Yu ","Hao ","Jiao ","Ju ","Guo ","Bao ","Yan ","Zhan ","Zhan ","Kui ","Ban ","Xi ","Shu ","Chong ","Qiu ","Diao ","Ji ","Qiu ","Cheng ","Shi ","[?] ","Di ","Zhe ","She ","Yu ","Gan ","Zi ","Hong ","Hui ","Meng ","Ge ","Sui ","Xia ","Chai ","Shi ","Yi ","Ma ","Xiang ","Fang ","E ","Pa ","Chi ","Qian ","Wen ","Wen ","Rui ","Bang ","Bi ","Yue ","Yue ","Jun ","Qi ","Ran ","Yin ","Qi ","Tian ","Yuan ","Jue ","Hui ","Qin ","Qi ","Zhong ","Ya ","Ci ","Mu ","Wang ","Fen ","Fen ","Hang ","Gong ","Zao ","Fu ","Ran ","Jie ","Fu ","Chi ","Dou ","Piao ","Xian ","Ni ","Te ","Qiu ","You ","Zha ","Ping ","Chi ","You ","He ","Han ","Ju ","Li ","Fu ","Ran ","Zha ","Gou ","Pi ","Bo ","Xian ","Zhu ","Diao ","Bie ","Bing ","Gu ","Ran ","Qu ","She ","Tie ","Ling ","Gu ","Dan ","Gu ","Ying ","Li ","Cheng ","Qu ","Mou ","Ge ","Ci ","Hui ","Hui ","Mang ","Fu ","Yang ","Wa ","Lie ","Zhu ","Yi ","Xian ","Kuo ","Jiao ","Li ","Yi ","Ping ","Ji ","Ha ","She ","Yi ","Wang ","Mo ","Qiong ","Qie ","Gui ","Gong ","Zhi ","Man ","Ebi ","Zhi ","Jia ","Rao ","Si ","Qi ","Xing ","Lie ","Qiu ","Shao ","Yong ","Jia ","Shui ","Che ","Bai ","E ","Han "]});var E5=b((G6e,k5)=>{k5.exports=["Shu ","Xuan ","Feng ","Shen ","Zhen ","Fu ","Xian ","Zhe ","Wu ","Fu ","Li ","Lang ","Bi ","Chu ","Yuan ","You ","Jie ","Dan ","Yan ","Ting ","Dian ","Shui ","Hui ","Gua ","Zhi ","Song ","Fei ","Ju ","Mi ","Qi ","Qi ","Yu ","Jun ","Zha ","Meng ","Qiang ","Si ","Xi ","Lun ","Li ","Die ","Tiao ","Tao ","Kun ","Gan ","Han ","Yu ","Bang ","Fei ","Pi ","Wei ","Dun ","Yi ","Yuan ","Su ","Quan ","Qian ","Rui ","Ni ","Qing ","Wei ","Liang ","Guo ","Wan ","Dong ","E ","Ban ","Di ","Wang ","Can ","Yang ","Ying ","Guo ","Chan ","[?] ","La ","Ke ","Ji ","He ","Ting ","Mai ","Xu ","Mian ","Yu ","Jie ","Shi ","Xuan ","Huang ","Yan ","Bian ","Rou ","Wei ","Fu ","Yuan ","Mei ","Wei ","Fu ","Ruan ","Xie ","You ","Qiu ","Mao ","Xia ","Ying ","Shi ","Chong ","Tang ","Zhu ","Zong ","Ti ","Fu ","Yuan ","Hui ","Meng ","La ","Du ","Hu ","Qiu ","Die ","Li ","Gua ","Yun ","Ju ","Nan ","Lou ","Qun ","Rong ","Ying ","Jiang ","[?] ","Lang ","Pang ","Si ","Xi ","Ci ","Xi ","Yuan ","Weng ","Lian ","Sou ","Ban ","Rong ","Rong ","Ji ","Wu ","Qiu ","Han ","Qin ","Yi ","Bi ","Hua ","Tang ","Yi ","Du ","Nai ","He ","Hu ","Hui ","Ma ","Ming ","Yi ","Wen ","Ying ","Teng ","Yu ","Cang ","So ","Ebi ","Man ","[?] ","Shang ","Zhe ","Cao ","Chi ","Di ","Ao ","Lu ","Wei ","Zhi ","Tang ","Chen ","Piao ","Qu ","Pi ","Yu ","Jian ","Luo ","Lou ","Qin ","Zhong ","Yin ","Jiang ","Shuai ","Wen ","Jiao ","Wan ","Zhi ","Zhe ","Ma ","Ma ","Guo ","Liu ","Mao ","Xi ","Cong ","Li ","Man ","Xiao ","Kamakiri ","Zhang ","Mang ","Xiang ","Mo ","Zui ","Si ","Qiu ","Te ","Zhi ","Peng ","Peng ","Jiao ","Qu ","Bie ","Liao ","Pan ","Gui ","Xi ","Ji ","Zhuan ","Huang ","Fei ","Lao ","Jue ","Jue ","Hui ","Yin ","Chan ","Jiao ","Shan ","Rao ","Xiao ","Mou ","Chong ","Xun ","Si ","[?] ","Cheng ","Dang ","Li ","Xie ","Shan ","Yi ","Jing ","Da ","Chan ","Qi "]});var _5=b((Q6e,P5)=>{P5.exports=["Ci ","Xiang ","She ","Luo ","Qin ","Ying ","Chai ","Li ","Ze ","Xuan ","Lian ","Zhu ","Ze ","Xie ","Mang ","Xie ","Qi ","Rong ","Jian ","Meng ","Hao ","Ruan ","Huo ","Zhuo ","Jie ","Bin ","He ","Mie ","Fan ","Lei ","Jie ","La ","Mi ","Li ","Chun ","Li ","Qiu ","Nie ","Lu ","Du ","Xiao ","Zhu ","Long ","Li ","Long ","Feng ","Ye ","Beng ","Shang ","Gu ","Juan ","Ying ","[?] ","Xi ","Can ","Qu ","Quan ","Du ","Can ","Man ","Jue ","Jie ","Zhu ","Zha ","Xie ","Huang ","Niu ","Pei ","Nu ","Xin ","Zhong ","Mo ","Er ","Ke ","Mie ","Xi ","Xing ","Yan ","Kan ","Yuan ","[?] ","Ling ","Xuan ","Shu ","Xian ","Tong ","Long ","Jie ","Xian ","Ya ","Hu ","Wei ","Dao ","Chong ","Wei ","Dao ","Zhun ","Heng ","Qu ","Yi ","Yi ","Bu ","Gan ","Yu ","Biao ","Cha ","Yi ","Shan ","Chen ","Fu ","Gun ","Fen ","Shuai ","Jie ","Na ","Zhong ","Dan ","Ri ","Zhong ","Zhong ","Xie ","Qi ","Xie ","Ran ","Zhi ","Ren ","Qin ","Jin ","Jun ","Yuan ","Mei ","Chai ","Ao ","Niao ","Hui ","Ran ","Jia ","Tuo ","Ling ","Dai ","Bao ","Pao ","Yao ","Zuo ","Bi ","Shao ","Tan ","Ju ","He ","Shu ","Xiu ","Zhen ","Yi ","Pa ","Bo ","Di ","Wa ","Fu ","Gun ","Zhi ","Zhi ","Ran ","Pan ","Yi ","Mao ","Tuo ","Na ","Kou ","Xian ","Chan ","Qu ","Bei ","Gun ","Xi ","Ne ","Bo ","Horo ","Fu ","Yi ","Chi ","Ku ","Ren ","Jiang ","Jia ","Cun ","Mo ","Jie ","Er ","Luo ","Ru ","Zhu ","Gui ","Yin ","Cai ","Lie ","Kamishimo ","Yuki ","Zhuang ","Dang ","[?] ","Kun ","Ken ","Niao ","Shu ","Jia ","Kun ","Cheng ","Li ","Juan ","Shen ","Pou ","Ge ","Yi ","Yu ","Zhen ","Liu ","Qiu ","Qun ","Ji ","Yi ","Bu ","Zhuang ","Shui ","Sha ","Qun ","Li ","Lian ","Lian ","Ku ","Jian ","Fou ","Chan ","Bi ","Gun ","Tao ","Yuan ","Ling ","Chi ","Chang ","Chou ","Duo ","Biao ","Liang ","Chang ","Pei ","Pei ","Fei ","Yuan ","Luo ","Guo ","Yan ","Du ","Xi ","Zhi ","Ju ","Qi "]});var L5=b((K6e,R5)=>{R5.exports=["Ji ","Zhi ","Gua ","Ken ","Che ","Ti ","Ti ","Fu ","Chong ","Xie ","Bian ","Die ","Kun ","Duan ","Xiu ","Xiu ","He ","Yuan ","Bao ","Bao ","Fu ","Yu ","Tuan ","Yan ","Hui ","Bei ","Chu ","Lu ","Ena ","Hitoe ","Yun ","Da ","Gou ","Da ","Huai ","Rong ","Yuan ","Ru ","Nai ","Jiong ","Suo ","Ban ","Tun ","Chi ","Sang ","Niao ","Ying ","Jie ","Qian ","Huai ","Ku ","Lian ","Bao ","Li ","Zhe ","Shi ","Lu ","Yi ","Die ","Xie ","Xian ","Wei ","Biao ","Cao ","Ji ","Jiang ","Sen ","Bao ","Xiang ","Chihaya ","Pu ","Jian ","Zhuan ","Jian ","Zui ","Ji ","Dan ","Za ","Fan ","Bo ","Xiang ","Xin ","Bie ","Rao ","Man ","Lan ","Ao ","Duo ","Gui ","Cao ","Sui ","Nong ","Chan ","Lian ","Bi ","Jin ","Dang ","Shu ","Tan ","Bi ","Lan ","Pu ","Ru ","Zhi ","[?] ","Shu ","Wa ","Shi ","Bai ","Xie ","Bo ","Chen ","Lai ","Long ","Xi ","Xian ","Lan ","Zhe ","Dai ","Tasuki ","Zan ","Shi ","Jian ","Pan ","Yi ","Ran ","Ya ","Xi ","Xi ","Yao ","Feng ","Tan ","[?] ","Biao ","Fu ","Ba ","He ","Ji ","Ji ","Jian ","Guan ","Bian ","Yan ","Gui ","Jue ","Pian ","Mao ","Mi ","Mi ","Mie ","Shi ","Si ","Zhan ","Luo ","Jue ","Mi ","Tiao ","Lian ","Yao ","Zhi ","Jun ","Xi ","Shan ","Wei ","Xi ","Tian ","Yu ","Lan ","E ","Du ","Qin ","Pang ","Ji ","Ming ","Ying ","Gou ","Qu ","Zhan ","Jin ","Guan ","Deng ","Jian ","Luo ","Qu ","Jian ","Wei ","Jue ","Qu ","Luo ","Lan ","Shen ","Di ","Guan ","Jian ","Guan ","Yan ","Gui ","Mi ","Shi ","Zhan ","Lan ","Jue ","Ji ","Xi ","Di ","Tian ","Yu ","Gou ","Jin ","Qu ","Jiao ","Jiu ","Jin ","Cu ","Jue ","Zhi ","Chao ","Ji ","Gu ","Dan ","Zui ","Di ","Shang ","Hua ","Quan ","Ge ","Chi ","Jie ","Gui ","Gong ","Hong ","Jie ","Hun ","Qiu ","Xing ","Su ","Ni ","Ji ","Lu ","Zhi ","Zha ","Bi ","Xing ","Hu ","Shang ","Gong ","Zhi ","Xue ","Chu ","Xi ","Yi ","Lu ","Jue ","Xi ","Yan ","Xi "]});var I5=b((z6e,F5)=>{F5.exports=["Yan ","Yan ","Ding ","Fu ","Qiu ","Qiu ","Jiao ","Hong ","Ji ","Fan ","Xun ","Diao ","Hong ","Cha ","Tao ","Xu ","Jie ","Yi ","Ren ","Xun ","Yin ","Shan ","Qi ","Tuo ","Ji ","Xun ","Yin ","E ","Fen ","Ya ","Yao ","Song ","Shen ","Yin ","Xin ","Jue ","Xiao ","Ne ","Chen ","You ","Zhi ","Xiong ","Fang ","Xin ","Chao ","She ","Xian ","Sha ","Tun ","Xu ","Yi ","Yi ","Su ","Chi ","He ","Shen ","He ","Xu ","Zhen ","Zhu ","Zheng ","Gou ","Zi ","Zi ","Zhan ","Gu ","Fu ","Quan ","Die ","Ling ","Di ","Yang ","Li ","Nao ","Pan ","Zhou ","Gan ","Yi ","Ju ","Ao ","Zha ","Tuo ","Yi ","Qu ","Zhao ","Ping ","Bi ","Xiong ","Qu ","Ba ","Da ","Zu ","Tao ","Zhu ","Ci ","Zhe ","Yong ","Xu ","Xun ","Yi ","Huang ","He ","Shi ","Cha ","Jiao ","Shi ","Hen ","Cha ","Gou ","Gui ","Quan ","Hui ","Jie ","Hua ","Gai ","Xiang ","Wei ","Shen ","Chou ","Tong ","Mi ","Zhan ","Ming ","E ","Hui ","Yan ","Xiong ","Gua ","Er ","Beng ","Tiao ","Chi ","Lei ","Zhu ","Kuang ","Kua ","Wu ","Yu ","Teng ","Ji ","Zhi ","Ren ","Su ","Lang ","E ","Kuang ","E ","Shi ","Ting ","Dan ","Bo ","Chan ","You ","Heng ","Qiao ","Qin ","Shua ","An ","Yu ","Xiao ","Cheng ","Jie ","Xian ","Wu ","Wu ","Gao ","Song ","Pu ","Hui ","Jing ","Shuo ","Zhen ","Shuo ","Du ","Yasashi ","Chang ","Shui ","Jie ","Ke ","Qu ","Cong ","Xiao ","Sui ","Wang ","Xuan ","Fei ","Chi ","Ta ","Yi ","Na ","Yin ","Diao ","Pi ","Chuo ","Chan ","Chen ","Zhun ","Ji ","Qi ","Tan ","Zhui ","Wei ","Ju ","Qing ","Jian ","Zheng ","Ze ","Zou ","Qian ","Zhuo ","Liang ","Jian ","Zhu ","Hao ","Lun ","Shen ","Biao ","Huai ","Pian ","Yu ","Die ","Xu ","Pian ","Shi ","Xuan ","Shi ","Hun ","Hua ","E ","Zhong ","Di ","Xie ","Fu ","Pu ","Ting ","Jian ","Qi ","Yu ","Zi ","Chuan ","Xi ","Hui ","Yin ","An ","Xian ","Nan ","Chen ","Feng ","Zhu ","Yang ","Yan ","Heng ","Xuan ","Ge ","Nuo ","Qi "]});var A5=b((V6e,j5)=>{j5.exports=["Mou ","Ye ","Wei ","[?] ","Teng ","Zou ","Shan ","Jian ","Bo ","Ku ","Huang ","Huo ","Ge ","Ying ","Mi ","Xiao ","Mi ","Xi ","Qiang ","Chen ","Nue ","Ti ","Su ","Bang ","Chi ","Qian ","Shi ","Jiang ","Yuan ","Xie ","Xue ","Tao ","Yao ","Yao ","[?] ","Yu ","Biao ","Cong ","Qing ","Li ","Mo ","Mo ","Shang ","Zhe ","Miu ","Jian ","Ze ","Jie ","Lian ","Lou ","Can ","Ou ","Guan ","Xi ","Zhuo ","Ao ","Ao ","Jin ","Zhe ","Yi ","Hu ","Jiang ","Man ","Chao ","Han ","Hua ","Chan ","Xu ","Zeng ","Se ","Xi ","She ","Dui ","Zheng ","Nao ","Lan ","E ","Ying ","Jue ","Ji ","Zun ","Jiao ","Bo ","Hui ","Zhuan ","Mu ","Zen ","Zha ","Shi ","Qiao ","Tan ","Zen ","Pu ","Sheng ","Xuan ","Zao ","Tan ","Dang ","Sui ","Qian ","Ji ","Jiao ","Jing ","Lian ","Nou ","Yi ","Ai ","Zhan ","Pi ","Hui ","Hua ","Yi ","Yi ","Shan ","Rang ","Nou ","Qian ","Zhui ","Ta ","Hu ","Zhou ","Hao ","Ye ","Ying ","Jian ","Yu ","Jian ","Hui ","Du ","Zhe ","Xuan ","Zan ","Lei ","Shen ","Wei ","Chan ","Li ","Yi ","Bian ","Zhe ","Yan ","E ","Chou ","Wei ","Chou ","Yao ","Chan ","Rang ","Yin ","Lan ","Chen ","Huo ","Zhe ","Huan ","Zan ","Yi ","Dang ","Zhan ","Yan ","Du ","Yan ","Ji ","Ding ","Fu ","Ren ","Ji ","Jie ","Hong ","Tao ","Rang ","Shan ","Qi ","Tuo ","Xun ","Yi ","Xun ","Ji ","Ren ","Jiang ","Hui ","Ou ","Ju ","Ya ","Ne ","Xu ","E ","Lun ","Xiong ","Song ","Feng ","She ","Fang ","Jue ","Zheng ","Gu ","He ","Ping ","Zu ","Shi ","Xiong ","Zha ","Su ","Zhen ","Di ","Zou ","Ci ","Qu ","Zhao ","Bi ","Yi ","Yi ","Kuang ","Lei ","Shi ","Gua ","Shi ","Jie ","Hui ","Cheng ","Zhu ","Shen ","Hua ","Dan ","Gou ","Quan ","Gui ","Xun ","Yi ","Zheng ","Gai ","Xiang ","Cha ","Hun ","Xu ","Zhou ","Jie ","Wu ","Yu ","Qiao ","Wu ","Gao ","You ","Hui ","Kuang ","Shuo ","Song ","Ai ","Qing ","Zhu ","Zou ","Nuo ","Du ","Zhuo ","Fei ","Ke ","Wei "]});var M5=b((e4e,O5)=>{O5.exports=["Yu ","Shui ","Shen ","Diao ","Chan ","Liang ","Zhun ","Sui ","Tan ","Shen ","Yi ","Mou ","Chen ","Die ","Huang ","Jian ","Xie ","Nue ","Ye ","Wei ","E ","Yu ","Xuan ","Chan ","Zi ","An ","Yan ","Di ","Mi ","Pian ","Xu ","Mo ","Dang ","Su ","Xie ","Yao ","Bang ","Shi ","Qian ","Mi ","Jin ","Man ","Zhe ","Jian ","Miu ","Tan ","Zen ","Qiao ","Lan ","Pu ","Jue ","Yan ","Qian ","Zhan ","Chen ","Gu ","Qian ","Hong ","Xia ","Jue ","Hong ","Han ","Hong ","Xi ","Xi ","Huo ","Liao ","Han ","Du ","Long ","Dou ","Jiang ","Qi ","Shi ","Li ","Deng ","Wan ","Bi ","Shu ","Xian ","Feng ","Zhi ","Zhi ","Yan ","Yan ","Shi ","Chu ","Hui ","Tun ","Yi ","Tun ","Yi ","Jian ","Ba ","Hou ","E ","Cu ","Xiang ","Huan ","Jian ","Ken ","Gai ","Qu ","Fu ","Xi ","Bin ","Hao ","Yu ","Zhu ","Jia ","[?] ","Xi ","Bo ","Wen ","Huan ","Bin ","Di ","Zong ","Fen ","Yi ","Zhi ","Bao ","Chai ","Han ","Pi ","Na ","Pi ","Gou ","Na ","You ","Diao ","Mo ","Si ","Xiu ","Huan ","Kun ","He ","He ","Mo ","Han ","Mao ","Li ","Ni ","Bi ","Yu ","Jia ","Tuan ","Mao ","Pi ","Xi ","E ","Ju ","Mo ","Chu ","Tan ","Huan ","Jue ","Bei ","Zhen ","Yuan ","Fu ","Cai ","Gong ","Te ","Yi ","Hang ","Wan ","Pin ","Huo ","Fan ","Tan ","Guan ","Ze ","Zhi ","Er ","Zhu ","Shi ","Bi ","Zi ","Er ","Gui ","Pian ","Bian ","Mai ","Dai ","Sheng ","Kuang ","Fei ","Tie ","Yi ","Chi ","Mao ","He ","Bi ","Lu ","Ren ","Hui ","Gai ","Pian ","Zi ","Jia ","Xu ","Zei ","Jiao ","Gai ","Zang ","Jian ","Ying ","Xun ","Zhen ","She ","Bin ","Bin ","Qiu ","She ","Chuan ","Zang ","Zhou ","Lai ","Zan ","Si ","Chen ","Shang ","Tian ","Pei ","Geng ","Xian ","Mai ","Jian ","Sui ","Fu ","Tan ","Cong ","Cong ","Zhi ","Ji ","Zhang ","Du ","Jin ","Xiong ","Shun ","Yun ","Bao ","Zai ","Lai ","Feng ","Cang ","Ji ","Sheng ","Ai ","Zhuan ","Fu ","Gou ","Sai ","Ze ","Liao "]});var B5=b((t4e,N5)=>{N5.exports=["Wei ","Bai ","Chen ","Zhuan ","Zhi ","Zhui ","Biao ","Yun ","Zeng ","Tan ","Zan ","Yan ","[?] ","Shan ","Wan ","Ying ","Jin ","Gan ","Xian ","Zang ","Bi ","Du ","Shu ","Yan ","[?] ","Xuan ","Long ","Gan ","Zang ","Bei ","Zhen ","Fu ","Yuan ","Gong ","Cai ","Ze ","Xian ","Bai ","Zhang ","Huo ","Zhi ","Fan ","Tan ","Pin ","Bian ","Gou ","Zhu ","Guan ","Er ","Jian ","Bi ","Shi ","Tie ","Gui ","Kuang ","Dai ","Mao ","Fei ","He ","Yi ","Zei ","Zhi ","Jia ","Hui ","Zi ","Ren ","Lu ","Zang ","Zi ","Gai ","Jin ","Qiu ","Zhen ","Lai ","She ","Fu ","Du ","Ji ","Shu ","Shang ","Si ","Bi ","Zhou ","Geng ","Pei ","Tan ","Lai ","Feng ","Zhui ","Fu ","Zhuan ","Sai ","Ze ","Yan ","Zan ","Yun ","Zeng ","Shan ","Ying ","Gan ","Chi ","Xi ","She ","Nan ","Xiong ","Xi ","Cheng ","He ","Cheng ","Zhe ","Xia ","Tang ","Zou ","Zou ","Li ","Jiu ","Fu ","Zhao ","Gan ","Qi ","Shan ","Qiong ","Qin ","Xian ","Ci ","Jue ","Qin ","Chi ","Ci ","Chen ","Chen ","Die ","Ju ","Chao ","Di ","Se ","Zhan ","Zhu ","Yue ","Qu ","Jie ","Chi ","Chu ","Gua ","Xue ","Ci ","Tiao ","Duo ","Lie ","Gan ","Suo ","Cu ","Xi ","Zhao ","Su ","Yin ","Ju ","Jian ","Que ","Tang ","Chuo ","Cui ","Lu ","Qu ","Dang ","Qiu ","Zi ","Ti ","Qu ","Chi ","Huang ","Qiao ","Qiao ","Yao ","Zao ","Ti ","[?] ","Zan ","Zan ","Zu ","Pa ","Bao ","Ku ","Ke ","Dun ","Jue ","Fu ","Chen ","Jian ","Fang ","Zhi ","Sa ","Yue ","Pa ","Qi ","Yue ","Qiang ","Tuo ","Tai ","Yi ","Nian ","Ling ","Mei ","Ba ","Die ","Ku ","Tuo ","Jia ","Ci ","Pao ","Qia ","Zhu ","Ju ","Die ","Zhi ","Fu ","Pan ","Ju ","Shan ","Bo ","Ni ","Ju ","Li ","Gen ","Yi ","Ji ","Dai ","Xian ","Jiao ","Duo ","Zhu ","Zhuan ","Kua ","Zhuai ","Gui ","Qiong ","Kui ","Xiang ","Chi ","Lu ","Beng ","Zhi ","Jia ","Tiao ","Cai ","Jian ","Ta ","Qiao ","Bi ","Xian ","Duo ","Ji ","Ju ","Ji ","Shu ","Tu "]});var q5=b((i4e,H5)=>{H5.exports=["Chu ","Jing ","Nie ","Xiao ","Bo ","Chi ","Qun ","Mou ","Shu ","Lang ","Yong ","Jiao ","Chou ","Qiao ","[?] ","Ta ","Jian ","Qi ","Wo ","Wei ","Zhuo ","Jie ","Ji ","Nie ","Ju ","Ju ","Lun ","Lu ","Leng ","Huai ","Ju ","Chi ","Wan ","Quan ","Ti ","Bo ","Zu ","Qie ","Ji ","Cu ","Zong ","Cai ","Zong ","Peng ","Zhi ","Zheng ","Dian ","Zhi ","Yu ","Duo ","Dun ","Chun ","Yong ","Zhong ","Di ","Zhe ","Chen ","Chuai ","Jian ","Gua ","Tang ","Ju ","Fu ","Zu ","Die ","Pian ","Rou ","Nuo ","Ti ","Cha ","Tui ","Jian ","Dao ","Cuo ","Xi ","Ta ","Qiang ","Zhan ","Dian ","Ti ","Ji ","Nie ","Man ","Liu ","Zhan ","Bi ","Chong ","Lu ","Liao ","Cu ","Tang ","Dai ","Suo ","Xi ","Kui ","Ji ","Zhi ","Qiang ","Di ","Man ","Zong ","Lian ","Beng ","Zao ","Nian ","Bie ","Tui ","Ju ","Deng ","Ceng ","Xian ","Fan ","Chu ","Zhong ","Dun ","Bo ","Cu ","Zu ","Jue ","Jue ","Lin ","Ta ","Qiao ","Qiao ","Pu ","Liao ","Dun ","Cuan ","Kuang ","Zao ","Ta ","Bi ","Bi ","Zhu ","Ju ","Chu ","Qiao ","Dun ","Chou ","Ji ","Wu ","Yue ","Nian ","Lin ","Lie ","Zhi ","Li ","Zhi ","Chan ","Chu ","Duan ","Wei ","Long ","Lin ","Xian ","Wei ","Zuan ","Lan ","Xie ","Rang ","Xie ","Nie ","Ta ","Qu ","Jie ","Cuan ","Zuan ","Xi ","Kui ","Jue ","Lin ","Shen ","Gong ","Dan ","Segare ","Qu ","Ti ","Duo ","Duo ","Gong ","Lang ","Nerau ","Luo ","Ai ","Ji ","Ju ","Tang ","Utsuke ","[?] ","Yan ","Shitsuke ","Kang ","Qu ","Lou ","Lao ","Tuo ","Zhi ","Yagate ","Ti ","Dao ","Yagate ","Yu ","Che ","Ya ","Gui ","Jun ","Wei ","Yue ","Xin ","Di ","Xuan ","Fan ","Ren ","Shan ","Qiang ","Shu ","Tun ","Chen ","Dai ","E ","Na ","Qi ","Mao ","Ruan ","Ren ","Fan ","Zhuan ","Hong ","Hu ","Qu ","Huang ","Di ","Ling ","Dai ","Ao ","Zhen ","Fan ","Kuang ","Ang ","Peng ","Bei ","Gu ","Ku ","Pao ","Zhu ","Rong ","E ","Ba ","Zhou ","Zhi ","Yao ","Ke ","Yi ","Qing ","Shi ","Ping "]});var W5=b((n4e,Y5)=>{Y5.exports=["Er ","Qiong ","Ju ","Jiao ","Guang ","Lu ","Kai ","Quan ","Zhou ","Zai ","Zhi ","She ","Liang ","Yu ","Shao ","You ","Huan ","Yun ","Zhe ","Wan ","Fu ","Qing ","Zhou ","Ni ","Ling ","Zhe ","Zhan ","Liang ","Zi ","Hui ","Wang ","Chuo ","Guo ","Kan ","Yi ","Peng ","Qian ","Gun ","Nian ","Pian ","Guan ","Bei ","Lun ","Pai ","Liang ","Ruan ","Rou ","Ji ","Yang ","Xian ","Chuan ","Cou ","Qun ","Ge ","You ","Hong ","Shu ","Fu ","Zi ","Fu ","Wen ","Ben ","Zhan ","Yu ","Wen ","Tao ","Gu ","Zhen ","Xia ","Yuan ","Lu ","Jiu ","Chao ","Zhuan ","Wei ","Hun ","Sori ","Che ","Jiao ","Zhan ","Pu ","Lao ","Fen ","Fan ","Lin ","Ge ","Se ","Kan ","Huan ","Yi ","Ji ","Dui ","Er ","Yu ","Xian ","Hong ","Lei ","Pei ","Li ","Li ","Lu ","Lin ","Che ","Ya ","Gui ","Xuan ","Di ","Ren ","Zhuan ","E ","Lun ","Ruan ","Hong ","Ku ","Ke ","Lu ","Zhou ","Zhi ","Yi ","Hu ","Zhen ","Li ","Yao ","Qing ","Shi ","Zai ","Zhi ","Jiao ","Zhou ","Quan ","Lu ","Jiao ","Zhe ","Fu ","Liang ","Nian ","Bei ","Hui ","Gun ","Wang ","Liang ","Chuo ","Zi ","Cou ","Fu ","Ji ","Wen ","Shu ","Pei ","Yuan ","Xia ","Zhan ","Lu ","Che ","Lin ","Xin ","Gu ","Ci ","Ci ","Pi ","Zui ","Bian ","La ","La ","Ci ","Xue ","Ban ","Bian ","Bian ","Bian ","[?] ","Bian ","Ban ","Ci ","Bian ","Bian ","Chen ","Ru ","Nong ","Nong ","Zhen ","Chuo ","Chuo ","Suberu ","Reng ","Bian ","Bian ","Sip ","Ip ","Liao ","Da ","Chan ","Gan ","Qian ","Yu ","Yu ","Qi ","Xun ","Yi ","Guo ","Mai ","Qi ","Za ","Wang ","Jia ","Zhun ","Ying ","Ti ","Yun ","Jin ","Hang ","Ya ","Fan ","Wu ","Da ","E ","Huan ","Zhe ","Totemo ","Jin ","Yuan ","Wei ","Lian ","Chi ","Che ","Ni ","Tiao ","Zhi ","Yi ","Jiong ","Jia ","Chen ","Dai ","Er ","Di ","Po ","Wang ","Die ","Ze ","Tao ","Shu ","Tuo ","Kep ","Jing ","Hui ","Tong ","You ","Mi ","Beng ","Ji ","Nai ","Yi ","Jie ","Zhui ","Lie ","Xun "]});var J5=b((r4e,Z5)=>{Z5.exports=["Tui ","Song ","Gua ","Tao ","Pang ","Hou ","Ni ","Dun ","Jiong ","Xuan ","Xun ","Bu ","You ","Xiao ","Qiu ","Tou ","Zhu ","Qiu ","Di ","Di ","Tu ","Jing ","Ti ","Dou ","Yi ","Zhe ","Tong ","Guang ","Wu ","Shi ","Cheng ","Su ","Zao ","Qun ","Feng ","Lian ","Suo ","Hui ","Li ","Sako ","Lai ","Ben ","Cuo ","Jue ","Beng ","Huan ","Dai ","Lu ","You ","Zhou ","Jin ","Yu ","Chuo ","Kui ","Wei ","Ti ","Yi ","Da ","Yuan ","Luo ","Bi ","Nuo ","Yu ","Dang ","Sui ","Dun ","Sui ","Yan ","Chuan ","Chi ","Ti ","Yu ","Shi ","Zhen ","You ","Yun ","E ","Bian ","Guo ","E ","Xia ","Huang ","Qiu ","Dao ","Da ","Wei ","Appare ","Yi ","Gou ","Yao ","Chu ","Liu ","Xun ","Ta ","Di ","Chi ","Yuan ","Su ","Ta ","Qian ","[?] ","Yao ","Guan ","Zhang ","Ao ","Shi ","Ce ","Chi ","Su ","Zao ","Zhe ","Dun ","Di ","Lou ","Chi ","Cuo ","Lin ","Zun ","Rao ","Qian ","Xuan ","Yu ","Yi ","Wu ","Liao ","Ju ","Shi ","Bi ","Yao ","Mai ","Xie ","Sui ","Huan ","Zhan ","Teng ","Er ","Miao ","Bian ","Bian ","La ","Li ","Yuan ","Yao ","Luo ","Li ","Yi ","Ting ","Deng ","Qi ","Yong ","Shan ","Han ","Yu ","Mang ","Ru ","Qiong ","[?] ","Kuang ","Fu ","Kang ","Bin ","Fang ","Xing ","Na ","Xin ","Shen ","Bang ","Yuan ","Cun ","Huo ","Xie ","Bang ","Wu ","Ju ","You ","Han ","Tai ","Qiu ","Bi ","Pei ","Bing ","Shao ","Bei ","Wa ","Di ","Zou ","Ye ","Lin ","Kuang ","Gui ","Zhu ","Shi ","Ku ","Yu ","Gai ","Ge ","Xi ","Zhi ","Ji ","Xun ","Hou ","Xing ","Jiao ","Xi ","Gui ","Nuo ","Lang ","Jia ","Kuai ","Zheng ","Otoko ","Yun ","Yan ","Cheng ","Dou ","Chi ","Lu ","Fu ","Wu ","Fu ","Gao ","Hao ","Lang ","Jia ","Geng ","Jun ","Ying ","Bo ","Xi ","Bei ","Li ","Yun ","Bu ","Xiao ","Qi ","Pi ","Qing ","Guo ","Zhou ","Tan ","Zou ","Ping ","Lai ","Ni ","Chen ","You ","Bu ","Xiang ","Dan ","Ju ","Yong ","Qiao ","Yi ","Du ","Yan ","Mei "]});var X5=b((o4e,$5)=>{$5.exports=["Ruo ","Bei ","E ","Yu ","Juan ","Yu ","Yun ","Hou ","Kui ","Xiang ","Xiang ","Sou ","Tang ","Ming ","Xi ","Ru ","Chu ","Zi ","Zou ","Ju ","Wu ","Xiang ","Yun ","Hao ","Yong ","Bi ","Mo ","Chao ","Fu ","Liao ","Yin ","Zhuan ","Hu ","Qiao ","Yan ","Zhang ","Fan ","Qiao ","Xu ","Deng ","Bi ","Xin ","Bi ","Ceng ","Wei ","Zheng ","Mao ","Shan ","Lin ","Po ","Dan ","Meng ","Ye ","Cao ","Kuai ","Feng ","Meng ","Zou ","Kuang ","Lian ","Zan ","Chan ","You ","Qi ","Yan ","Chan ","Zan ","Ling ","Huan ","Xi ","Feng ","Zan ","Li ","You ","Ding ","Qiu ","Zhuo ","Pei ","Zhou ","Yi ","Hang ","Yu ","Jiu ","Yan ","Zui ","Mao ","Dan ","Xu ","Tou ","Zhen ","Fen ","Sakenomoto ","[?] ","Yun ","Tai ","Tian ","Qia ","Tuo ","Zuo ","Han ","Gu ","Su ","Po ","Chou ","Zai ","Ming ","Luo ","Chuo ","Chou ","You ","Tong ","Zhi ","Xian ","Jiang ","Cheng ","Yin ","Tu ","Xiao ","Mei ","Ku ","Suan ","Lei ","Pu ","Zui ","Hai ","Yan ","Xi ","Niang ","Wei ","Lu ","Lan ","Yan ","Tao ","Pei ","Zhan ","Chun ","Tan ","Zui ","Chuo ","Cu ","Kun ","Ti ","Mian ","Du ","Hu ","Xu ","Xing ","Tan ","Jiu ","Chun ","Yun ","Po ","Ke ","Sou ","Mi ","Quan ","Chou ","Cuo ","Yun ","Yong ","Ang ","Zha ","Hai ","Tang ","Jiang ","Piao ","Shan ","Yu ","Li ","Zao ","Lao ","Yi ","Jiang ","Pu ","Jiao ","Xi ","Tan ","Po ","Nong ","Yi ","Li ","Ju ","Jiao ","Yi ","Niang ","Ru ","Xun ","Chou ","Yan ","Ling ","Mi ","Mi ","Niang ","Xin ","Jiao ","Xi ","Mi ","Yan ","Bian ","Cai ","Shi ","You ","Shi ","Shi ","Li ","Zhong ","Ye ","Liang ","Li ","Jin ","Jin ","Qiu ","Yi ","Diao ","Dao ","Zhao ","Ding ","Po ","Qiu ","He ","Fu ","Zhen ","Zhi ","Ba ","Luan ","Fu ","Nai ","Diao ","Shan ","Qiao ","Kou ","Chuan ","Zi ","Fan ","Yu ","Hua ","Han ","Gong ","Qi ","Mang ","Ri ","Di ","Si ","Xi ","Yi ","Chai ","Shi ","Tu ","Xi ","Nu ","Qian ","Ishiyumi ","Jian ","Pi ","Ye ","Yin "]});var G5=b((s4e,U5)=>{U5.exports=["Ba ","Fang ","Chen ","Xing ","Tou ","Yue ","Yan ","Fu ","Pi ","Na ","Xin ","E ","Jue ","Dun ","Gou ","Yin ","Qian ","Ban ","Ji ","Ren ","Chao ","Niu ","Fen ","Yun ","Ji ","Qin ","Pi ","Guo ","Hong ","Yin ","Jun ","Shi ","Yi ","Zhong ","Nie ","Gai ","Ri ","Huo ","Tai ","Kang ","Habaki ","Irori ","Ngaak ","[?] ","Duo ","Zi ","Ni ","Tu ","Shi ","Min ","Gu ","E ","Ling ","Bing ","Yi ","Gu ","Ba ","Pi ","Yu ","Si ","Zuo ","Bu ","You ","Dian ","Jia ","Zhen ","Shi ","Shi ","Tie ","Ju ","Zhan ","Shi ","She ","Xuan ","Zhao ","Bao ","He ","Bi ","Sheng ","Chu ","Shi ","Bo ","Zhu ","Chi ","Za ","Po ","Tong ","Qian ","Fu ","Zhai ","Liu ","Qian ","Fu ","Li ","Yue ","Pi ","Yang ","Ban ","Bo ","Jie ","Gou ","Shu ","Zheng ","Mu ","Ni ","Nie ","Di ","Jia ","Mu ","Dan ","Shen ","Yi ","Si ","Kuang ","Ka ","Bei ","Jian ","Tong ","Xing ","Hong ","Jiao ","Chi ","Er ","Ge ","Bing ","Shi ","Mou ","Jia ","Yin ","Jun ","Zhou ","Chong ","Shang ","Tong ","Mo ","Lei ","Ji ","Yu ","Xu ","Ren ","Zun ","Zhi ","Qiong ","Shan ","Chi ","Xian ","Xing ","Quan ","Pi ","Tie ","Zhu ","Hou ","Ming ","Kua ","Yao ","Xian ","Xian ","Xiu ","Jun ","Cha ","Lao ","Ji ","Pi ","Ru ","Mi ","Yi ","Yin ","Guang ","An ","Diou ","You ","Se ","Kao ","Qian ","Luan ","Kasugai ","Ai ","Diao ","Han ","Rui ","Shi ","Keng ","Qiu ","Xiao ","Zhe ","Xiu ","Zang ","Ti ","Cuo ","Gua ","Gong ","Zhong ","Dou ","Lu ","Mei ","Lang ","Wan ","Xin ","Yun ","Bei ","Wu ","Su ","Yu ","Chan ","Ting ","Bo ","Han ","Jia ","Hong ","Cuan ","Feng ","Chan ","Wan ","Zhi ","Si ","Xuan ","Wu ","Wu ","Tiao ","Gong ","Zhuo ","Lue ","Xing ","Qian ","Shen ","Han ","Lue ","Xie ","Chu ","Zheng ","Ju ","Xian ","Tie ","Mang ","Pu ","Li ","Pan ","Rui ","Cheng ","Gao ","Li ","Te ","Pyeng ","Zhu ","[?] ","Tu ","Liu ","Zui ","Ju ","Chang ","Yuan ","Jian ","Gang ","Diao ","Tao ","Chang "]});var K5=b((a4e,Q5)=>{Q5.exports=["Lun ","Kua ","Ling ","Bei ","Lu ","Li ","Qiang ","Pou ","Juan ","Min ","Zui ","Peng ","An ","Pi ","Xian ","Ya ","Zhui ","Lei ","A ","Kong ","Ta ","Kun ","Du ","Wei ","Chui ","Zi ","Zheng ","Ben ","Nie ","Cong ","Qun ","Tan ","Ding ","Qi ","Qian ","Zhuo ","Qi ","Yu ","Jin ","Guan ","Mao ","Chang ","Tian ","Xi ","Lian ","Tao ","Gu ","Cuo ","Shu ","Zhen ","Lu ","Meng ","Lu ","Hua ","Biao ","Ga ","Lai ","Ken ","Kazari ","Bu ","Nai ","Wan ","Zan ","[?] ","De ","Xian ","[?] ","Huo ","Liang ","[?] ","Men ","Kai ","Ying ","Di ","Lian ","Guo ","Xian ","Du ","Tu ","Wei ","Cong ","Fu ","Rou ","Ji ","E ","Rou ","Chen ","Ti ","Zha ","Hong ","Yang ","Duan ","Xia ","Yu ","Keng ","Xing ","Huang ","Wei ","Fu ","Zhao ","Cha ","Qie ","She ","Hong ","Kui ","Tian ","Mou ","Qiao ","Qiao ","Hou ","Tou ","Cong ","Huan ","Ye ","Min ","Jian ","Duan ","Jian ","Song ","Kui ","Hu ","Xuan ","Duo ","Jie ","Zhen ","Bian ","Zhong ","Zi ","Xiu ","Ye ","Mei ","Pai ","Ai ","Jie ","[?] ","Mei ","Chuo ","Ta ","Bang ","Xia ","Lian ","Suo ","Xi ","Liu ","Zu ","Ye ","Nou ","Weng ","Rong ","Tang ","Suo ","Qiang ","Ge ","Shuo ","Chui ","Bo ","Pan ","Sa ","Bi ","Sang ","Gang ","Zi ","Wu ","Ying ","Huang ","Tiao ","Liu ","Kai ","Sun ","Sha ","Sou ","Wan ","Hao ","Zhen ","Zhen ","Luo ","Yi ","Yuan ","Tang ","Nie ","Xi ","Jia ","Ge ","Ma ","Juan ","Kasugai ","Habaki ","Suo ","[?] ","[?] ","[?] ","Na ","Lu ","Suo ","Ou ","Zu ","Tuan ","Xiu ","Guan ","Xuan ","Lian ","Shou ","Ao ","Man ","Mo ","Luo ","Bi ","Wei ","Liu ","Di ","Qiao ","Cong ","Yi ","Lu ","Ao ","Keng ","Qiang ","Cui ","Qi ","Chang ","Tang ","Man ","Yong ","Chan ","Feng ","Jing ","Biao ","Shu ","Lou ","Xiu ","Cong ","Long ","Zan ","Jian ","Cao ","Li ","Xia ","Xi ","Kang ","[?] ","Beng ","[?] ","[?] ","Zheng ","Lu ","Hua ","Ji ","Pu ","Hui ","Qiang ","Po ","Lin ","Suo ","Xiu ","San ","Cheng "]});var V5=b((l4e,z5)=>{z5.exports=["Kui ","Si ","Liu ","Nao ","Heng ","Pie ","Sui ","Fan ","Qiao ","Quan ","Yang ","Tang ","Xiang ","Jue ","Jiao ","Zun ","Liao ","Jie ","Lao ","Dui ","Tan ","Zan ","Ji ","Jian ","Zhong ","Deng ","Ya ","Ying ","Dui ","Jue ","Nou ","Ti ","Pu ","Tie ","[?] ","[?] ","Ding ","Shan ","Kai ","Jian ","Fei ","Sui ","Lu ","Juan ","Hui ","Yu ","Lian ","Zhuo ","Qiao ","Qian ","Zhuo ","Lei ","Bi ","Tie ","Huan ","Ye ","Duo ","Guo ","Dang ","Ju ","Fen ","Da ","Bei ","Yi ","Ai ","Zong ","Xun ","Diao ","Zhu ","Heng ","Zhui ","Ji ","Nie ","Ta ","Huo ","Qing ","Bin ","Ying ","Kui ","Ning ","Xu ","Jian ","Jian ","Yari ","Cha ","Zhi ","Mie ","Li ","Lei ","Ji ","Zuan ","Kuang ","Shang ","Peng ","La ","Du ","Shuo ","Chuo ","Lu ","Biao ","Bao ","Lu ","[?] ","[?] ","Long ","E ","Lu ","Xin ","Jian ","Lan ","Bo ","Jian ","Yao ","Chan ","Xiang ","Jian ","Xi ","Guan ","Cang ","Nie ","Lei ","Cuan ","Qu ","Pan ","Luo ","Zuan ","Luan ","Zao ","Nie ","Jue ","Tang ","Shu ","Lan ","Jin ","Qiu ","Yi ","Zhen ","Ding ","Zhao ","Po ","Diao ","Tu ","Qian ","Chuan ","Shan ","Ji ","Fan ","Diao ","Men ","Nu ","Xi ","Chai ","Xing ","Gai ","Bu ","Tai ","Ju ","Dun ","Chao ","Zhong ","Na ","Bei ","Gang ","Ban ","Qian ","Yao ","Qin ","Jun ","Wu ","Gou ","Kang ","Fang ","Huo ","Tou ","Niu ","Ba ","Yu ","Qian ","Zheng ","Qian ","Gu ","Bo ","E ","Po ","Bu ","Ba ","Yue ","Zuan ","Mu ","Dan ","Jia ","Dian ","You ","Tie ","Bo ","Ling ","Shuo ","Qian ","Liu ","Bao ","Shi ","Xuan ","She ","Bi ","Ni ","Pi ","Duo ","Xing ","Kao ","Lao ","Er ","Mang ","Ya ","You ","Cheng ","Jia ","Ye ","Nao ","Zhi ","Dang ","Tong ","Lu ","Diao ","Yin ","Kai ","Zha ","Zhu ","Xian ","Ting ","Diu ","Xian ","Hua ","Quan ","Sha ","Jia ","Yao ","Ge ","Ming ","Zheng ","Se ","Jiao ","Yi ","Chan ","Chong ","Tang ","An ","Yin ","Ru ","Zhu ","Lao ","Pu ","Wu ","Lai ","Te ","Lian ","Keng "]});var t7=b((u4e,e7)=>{e7.exports=["Xiao ","Suo ","Li ","Zheng ","Chu ","Guo ","Gao ","Tie ","Xiu ","Cuo ","Lue ","Feng ","Xin ","Liu ","Kai ","Jian ","Rui ","Ti ","Lang ","Qian ","Ju ","A ","Qiang ","Duo ","Tian ","Cuo ","Mao ","Ben ","Qi ","De ","Kua ","Kun ","Chang ","Xi ","Gu ","Luo ","Chui ","Zhui ","Jin ","Zhi ","Xian ","Juan ","Huo ","Pou ","Tan ","Ding ","Jian ","Ju ","Meng ","Zi ","Qie ","Ying ","Kai ","Qiang ","Song ","E ","Cha ","Qiao ","Zhong ","Duan ","Sou ","Huang ","Huan ","Ai ","Du ","Mei ","Lou ","Zi ","Fei ","Mei ","Mo ","Zhen ","Bo ","Ge ","Nie ","Tang ","Juan ","Nie ","Na ","Liu ","Hao ","Bang ","Yi ","Jia ","Bin ","Rong ","Biao ","Tang ","Man ","Luo ","Beng ","Yong ","Jing ","Di ","Zu ","Xuan ","Liu ","Tan ","Jue ","Liao ","Pu ","Lu ","Dui ","Lan ","Pu ","Cuan ","Qiang ","Deng ","Huo ","Lei ","Huan ","Zhuo ","Lian ","Yi ","Cha ","Biao ","La ","Chan ","Xiang ","Chang ","Chang ","Jiu ","Ao ","Die ","Qu ","Liao ","Mi ","Chang ","Men ","Ma ","Shuan ","Shan ","Huo ","Men ","Yan ","Bi ","Han ","Bi ","San ","Kai ","Kang ","Beng ","Hong ","Run ","San ","Xian ","Xian ","Jian ","Min ","Xia ","Yuru ","Dou ","Zha ","Nao ","Jian ","Peng ","Xia ","Ling ","Bian ","Bi ","Run ","He ","Guan ","Ge ","Ge ","Fa ","Chu ","Hong ","Gui ","Min ","Se ","Kun ","Lang ","Lu ","Ting ","Sha ","Ju ","Yue ","Yue ","Chan ","Qu ","Lin ","Chang ","Shai ","Kun ","Yan ","Min ","Yan ","E ","Hun ","Yu ","Wen ","Xiang ","Bao ","Xiang ","Qu ","Yao ","Wen ","Ban ","An ","Wei ","Yin ","Kuo ","Que ","Lan ","Du ","[?] ","Phwung ","Tian ","Nie ","Ta ","Kai ","He ","Que ","Chuang ","Guan ","Dou ","Qi ","Kui ","Tang ","Guan ","Piao ","Kan ","Xi ","Hui ","Chan ","Pi ","Dang ","Huan ","Ta ","Wen ","[?] ","Men ","Shuan ","Shan ","Yan ","Han ","Bi ","Wen ","Chuang ","Run ","Wei ","Xian ","Hong ","Jian ","Min ","Kang ","Men ","Zha ","Nao ","Gui ","Wen ","Ta ","Min ","Lu ","Kai "]});var n7=b((c4e,i7)=>{i7.exports=["Fa ","Ge ","He ","Kun ","Jiu ","Yue ","Lang ","Du ","Yu ","Yan ","Chang ","Xi ","Wen ","Hun ","Yan ","E ","Chan ","Lan ","Qu ","Hui ","Kuo ","Que ","Ge ","Tian ","Ta ","Que ","Kan ","Huan ","Fu ","Fu ","Le ","Dui ","Xin ","Qian ","Wu ","Yi ","Tuo ","Yin ","Yang ","Dou ","E ","Sheng ","Ban ","Pei ","Keng ","Yun ","Ruan ","Zhi ","Pi ","Jing ","Fang ","Yang ","Yin ","Zhen ","Jie ","Cheng ","E ","Qu ","Di ","Zu ","Zuo ","Dian ","Ling ","A ","Tuo ","Tuo ","Po ","Bing ","Fu ","Ji ","Lu ","Long ","Chen ","Xing ","Duo ","Lou ","Mo ","Jiang ","Shu ","Duo ","Xian ","Er ","Gui ","Yu ","Gai ","Shan ","Xun ","Qiao ","Xing ","Chun ","Fu ","Bi ","Xia ","Shan ","Sheng ","Zhi ","Pu ","Dou ","Yuan ","Zhen ","Chu ","Xian ","Tou ","Nie ","Yun ","Xian ","Pei ","Pei ","Zou ","Yi ","Dui ","Lun ","Yin ","Ju ","Chui ","Chen ","Pi ","Ling ","Tao ","Xian ","Lu ","Sheng ","Xian ","Yin ","Zhu ","Yang ","Reng ","Shan ","Chong ","Yan ","Yin ","Yu ","Ti ","Yu ","Long ","Wei ","Wei ","Nie ","Dui ","Sui ","An ","Huang ","Jie ","Sui ","Yin ","Gai ","Yan ","Hui ","Ge ","Yun ","Wu ","Wei ","Ai ","Xi ","Tang ","Ji ","Zhang ","Dao ","Ao ","Xi ","Yin ","[?] ","Rao ","Lin ","Tui ","Deng ","Pi ","Sui ","Sui ","Yu ","Xian ","Fen ","Ni ","Er ","Ji ","Dao ","Xi ","Yin ","E ","Hui ","Long ","Xi ","Li ","Li ","Li ","Zhui ","He ","Zhi ","Zhun ","Jun ","Nan ","Yi ","Que ","Yan ","Qian ","Ya ","Xiong ","Ya ","Ji ","Gu ","Huan ","Zhi ","Gou ","Jun ","Ci ","Yong ","Ju ","Chu ","Hu ","Za ","Luo ","Yu ","Chou ","Diao ","Sui ","Han ","Huo ","Shuang ","Guan ","Chu ","Za ","Yong ","Ji ","Xi ","Chou ","Liu ","Li ","Nan ","Xue ","Za ","Ji ","Ji ","Yu ","Yu ","Xue ","Na ","Fou ","Se ","Mu ","Wen ","Fen ","Pang ","Yun ","Li ","Li ","Ang ","Ling ","Lei ","An ","Bao ","Meng ","Dian ","Dang ","Xing ","Wu ","Zhao "]});var o7=b((h4e,r7)=>{r7.exports=["Xu ","Ji ","Mu ","Chen ","Xiao ","Zha ","Ting ","Zhen ","Pei ","Mei ","Ling ","Qi ","Chou ","Huo ","Sha ","Fei ","Weng ","Zhan ","Yin ","Ni ","Chou ","Tun ","Lin ","[?] ","Dong ","Ying ","Wu ","Ling ","Shuang ","Ling ","Xia ","Hong ","Yin ","Mo ","Mai ","Yun ","Liu ","Meng ","Bin ","Wu ","Wei ","Huo ","Yin ","Xi ","Yi ","Ai ","Dan ","Deng ","Xian ","Yu ","Lu ","Long ","Dai ","Ji ","Pang ","Yang ","Ba ","Pi ","Wei ","[?] ","Xi ","Ji ","Mai ","Meng ","Meng ","Lei ","Li ","Huo ","Ai ","Fei ","Dai ","Long ","Ling ","Ai ","Feng ","Li ","Bao ","[?] ","He ","He ","Bing ","Qing ","Qing ","Jing ","Tian ","Zhen ","Jing ","Cheng ","Qing ","Jing ","Jing ","Dian ","Jing ","Tian ","Fei ","Fei ","Kao ","Mi ","Mian ","Mian ","Pao ","Ye ","Tian ","Hui ","Ye ","Ge ","Ding ","Cha ","Jian ","Ren ","Di ","Du ","Wu ","Ren ","Qin ","Jin ","Xue ","Niu ","Ba ","Yin ","Sa ","Na ","Mo ","Zu ","Da ","Ban ","Yi ","Yao ","Tao ","Tuo ","Jia ","Hong ","Pao ","Yang ","Tomo ","Yin ","Jia ","Tao ","Ji ","Xie ","An ","An ","Hen ","Gong ","Kohaze ","Da ","Qiao ","Ting ","Wan ","Ying ","Sui ","Tiao ","Qiao ","Xuan ","Kong ","Beng ","Ta ","Zhang ","Bing ","Kuo ","Ju ","La ","Xie ","Rou ","Bang ","Yi ","Qiu ","Qiu ","He ","Xiao ","Mu ","Ju ","Jian ","Bian ","Di ","Jian ","On ","Tao ","Gou ","Ta ","Bei ","Xie ","Pan ","Ge ","Bi ","Kuo ","Tang ","Lou ","Gui ","Qiao ","Xue ","Ji ","Jian ","Jiang ","Chan ","Da ","Huo ","Xian ","Qian ","Du ","Wa ","Jian ","Lan ","Wei ","Ren ","Fu ","Mei ","Juan ","Ge ","Wei ","Qiao ","Han ","Chang ","[?] ","Rou ","Xun ","She ","Wei ","Ge ","Bei ","Tao ","Gou ","Yun ","[?] ","Bi ","Wei ","Hui ","Du ","Wa ","Du ","Wei ","Ren ","Fu ","Han ","Wei ","Yun ","Tao ","Jiu ","Jiu ","Xian ","Xie ","Xian ","Ji ","Yin ","Za ","Yun ","Shao ","Le ","Peng ","Heng ","Ying ","Yun ","Peng ","Yin ","Yin ","Xiang "]});var a7=b((d4e,s7)=>{s7.exports=["Hu ","Ye ","Ding ","Qing ","Pan ","Xiang ","Shun ","Han ","Xu ","Yi ","Xu ","Gu ","Song ","Kui ","Qi ","Hang ","Yu ","Wan ","Ban ","Dun ","Di ","Dan ","Pan ","Po ","Ling ","Ce ","Jing ","Lei ","He ","Qiao ","E ","E ","Wei ","Jie ","Gua ","Shen ","Yi ","Shen ","Hai ","Dui ","Pian ","Ping ","Lei ","Fu ","Jia ","Tou ","Hui ","Kui ","Jia ","Le ","Tian ","Cheng ","Ying ","Jun ","Hu ","Han ","Jing ","Tui ","Tui ","Pin ","Lai ","Tui ","Zi ","Zi ","Chui ","Ding ","Lai ","Yan ","Han ","Jian ","Ke ","Cui ","Jiong ","Qin ","Yi ","Sai ","Ti ","E ","E ","Yan ","Hun ","Kan ","Yong ","Zhuan ","Yan ","Xian ","Xin ","Yi ","Yuan ","Sang ","Dian ","Dian ","Jiang ","Ku ","Lei ","Liao ","Piao ","Yi ","Man ","Qi ","Rao ","Hao ","Qiao ","Gu ","Xun ","Qian ","Hui ","Zhan ","Ru ","Hong ","Bin ","Xian ","Pin ","Lu ","Lan ","Nie ","Quan ","Ye ","Ding ","Qing ","Han ","Xiang ","Shun ","Xu ","Xu ","Wan ","Gu ","Dun ","Qi ","Ban ","Song ","Hang ","Yu ","Lu ","Ling ","Po ","Jing ","Jie ","Jia ","Tian ","Han ","Ying ","Jiong ","Hai ","Yi ","Pin ","Hui ","Tui ","Han ","Ying ","Ying ","Ke ","Ti ","Yong ","E ","Zhuan ","Yan ","E ","Nie ","Man ","Dian ","Sang ","Hao ","Lei ","Zhan ","Ru ","Pin ","Quan ","Feng ","Biao ","Oroshi ","Fu ","Xia ","Zhan ","Biao ","Sa ","Ba ","Tai ","Lie ","Gua ","Xuan ","Shao ","Ju ","Bi ","Si ","Wei ","Yang ","Yao ","Sou ","Kai ","Sao ","Fan ","Liu ","Xi ","Liao ","Piao ","Piao ","Liu ","Biao ","Biao ","Biao ","Liao ","[?] ","Se ","Feng ","Biao ","Feng ","Yang ","Zhan ","Biao ","Sa ","Ju ","Si ","Sou ","Yao ","Liu ","Piao ","Biao ","Biao ","Fei ","Fan ","Fei ","Fei ","Shi ","Shi ","Can ","Ji ","Ding ","Si ","Tuo ","Zhan ","Sun ","Xiang ","Tun ","Ren ","Yu ","Juan ","Chi ","Yin ","Fan ","Fan ","Sun ","Yin ","Zhu ","Yi ","Zhai ","Bi ","Jie ","Tao ","Liu ","Ci ","Tie ","Si ","Bao ","Shi ","Duo "]});var u7=b((g4e,l7)=>{l7.exports=["Hai ","Ren ","Tian ","Jiao ","Jia ","Bing ","Yao ","Tong ","Ci ","Xiang ","Yang ","Yang ","Er ","Yan ","Le ","Yi ","Can ","Bo ","Nei ","E ","Bu ","Jun ","Dou ","Su ","Yu ","Shi ","Yao ","Hun ","Guo ","Shi ","Jian ","Zhui ","Bing ","Xian ","Bu ","Ye ","Tan ","Fei ","Zhang ","Wei ","Guan ","E ","Nuan ","Hun ","Hu ","Huang ","Tie ","Hui ","Jian ","Hou ","He ","Xing ","Fen ","Wei ","Gu ","Cha ","Song ","Tang ","Bo ","Gao ","Xi ","Kui ","Liu ","Sou ","Tao ","Ye ","Yun ","Mo ","Tang ","Man ","Bi ","Yu ","Xiu ","Jin ","San ","Kui ","Zhuan ","Shan ","Chi ","Dan ","Yi ","Ji ","Rao ","Cheng ","Yong ","Tao ","Hui ","Xiang ","Zhan ","Fen ","Hai ","Meng ","Yan ","Mo ","Chan ","Xiang ","Luo ","Zuan ","Nang ","Shi ","Ding ","Ji ","Tuo ","Xing ","Tun ","Xi ","Ren ","Yu ","Chi ","Fan ","Yin ","Jian ","Shi ","Bao ","Si ","Duo ","Yi ","Er ","Rao ","Xiang ","Jia ","Le ","Jiao ","Yi ","Bing ","Bo ","Dou ","E ","Yu ","Nei ","Jun ","Guo ","Hun ","Xian ","Guan ","Cha ","Kui ","Gu ","Sou ","Chan ","Ye ","Mo ","Bo ","Liu ","Xiu ","Jin ","Man ","San ","Zhuan ","Nang ","Shou ","Kui ","Guo ","Xiang ","Fen ","Ba ","Ni ","Bi ","Bo ","Tu ","Han ","Fei ","Jian ","An ","Ai ","Fu ","Xian ","Wen ","Xin ","Fen ","Bin ","Xing ","Ma ","Yu ","Feng ","Han ","Di ","Tuo ","Tuo ","Chi ","Xun ","Zhu ","Zhi ","Pei ","Xin ","Ri ","Sa ","Yin ","Wen ","Zhi ","Dan ","Lu ","You ","Bo ","Bao ","Kuai ","Tuo ","Yi ","Qu ","[?] ","Qu ","Jiong ","Bo ","Zhao ","Yuan ","Peng ","Zhou ","Ju ","Zhu ","Nu ","Ju ","Pi ","Zang ","Jia ","Ling ","Zhen ","Tai ","Fu ","Yang ","Shi ","Bi ","Tuo ","Tuo ","Si ","Liu ","Ma ","Pian ","Tao ","Zhi ","Rong ","Teng ","Dong ","Xun ","Quan ","Shen ","Jiong ","Er ","Hai ","Bo ","Zhu ","Yin ","Luo ","Shuu ","Dan ","Xie ","Liu ","Ju ","Song ","Qin ","Mang ","Liang ","Han ","Tu ","Xuan ","Tui ","Jun "]});var h7=b((f4e,c7)=>{c7.exports=["E ","Cheng ","Xin ","Ai ","Lu ","Zhui ","Zhou ","She ","Pian ","Kun ","Tao ","Lai ","Zong ","Ke ","Qi ","Qi ","Yan ","Fei ","Sao ","Yan ","Jie ","Yao ","Wu ","Pian ","Cong ","Pian ","Qian ","Fei ","Huang ","Jian ","Huo ","Yu ","Ti ","Quan ","Xia ","Zong ","Kui ","Rou ","Si ","Gua ","Tuo ","Kui ","Sou ","Qian ","Cheng ","Zhi ","Liu ","Pang ","Teng ","Xi ","Cao ","Du ","Yan ","Yuan ","Zou ","Sao ","Shan ","Li ","Zhi ","Shuang ","Lu ","Xi ","Luo ","Zhang ","Mo ","Ao ","Can ","Piao ","Cong ","Qu ","Bi ","Zhi ","Yu ","Xu ","Hua ","Bo ","Su ","Xiao ","Lin ","Chan ","Dun ","Liu ","Tuo ","Zeng ","Tan ","Jiao ","Tie ","Yan ","Luo ","Zhan ","Jing ","Yi ","Ye ","Tuo ","Bin ","Zou ","Yan ","Peng ","Lu ","Teng ","Xiang ","Ji ","Shuang ","Ju ","Xi ","Huan ","Li ","Biao ","Ma ","Yu ","Tuo ","Xun ","Chi ","Qu ","Ri ","Bo ","Lu ","Zang ","Shi ","Si ","Fu ","Ju ","Zou ","Zhu ","Tuo ","Nu ","Jia ","Yi ","Tai ","Xiao ","Ma ","Yin ","Jiao ","Hua ","Luo ","Hai ","Pian ","Biao ","Li ","Cheng ","Yan ","Xin ","Qin ","Jun ","Qi ","Qi ","Ke ","Zhui ","Zong ","Su ","Can ","Pian ","Zhi ","Kui ","Sao ","Wu ","Ao ","Liu ","Qian ","Shan ","Piao ","Luo ","Cong ","Chan ","Zou ","Ji ","Shuang ","Xiang ","Gu ","Wei ","Wei ","Wei ","Yu ","Gan ","Yi ","Ang ","Tou ","Xie ","Bao ","Bi ","Chi ","Ti ","Di ","Ku ","Hai ","Qiao ","Gou ","Kua ","Ge ","Tui ","Geng ","Pian ","Bi ","Ke ","Ka ","Yu ","Sui ","Lou ","Bo ","Xiao ","Pang ","Bo ","Ci ","Kuan ","Bin ","Mo ","Liao ","Lou ","Nao ","Du ","Zang ","Sui ","Ti ","Bin ","Kuan ","Lu ","Gao ","Gao ","Qiao ","Kao ","Qiao ","Lao ","Zao ","Biao ","Kun ","Kun ","Ti ","Fang ","Xiu ","Ran ","Mao ","Dan ","Kun ","Bin ","Fa ","Tiao ","Peng ","Zi ","Fa ","Ran ","Ti ","Pao ","Pi ","Mao ","Fu ","Er ","Rong ","Qu ","Gong ","Xiu ","Gua ","Ji ","Peng ","Zhua ","Shao ","Sha "]});var g7=b((p4e,d7)=>{d7.exports=["Ti ","Li ","Bin ","Zong ","Ti ","Peng ","Song ","Zheng ","Quan ","Zong ","Shun ","Jian ","Duo ","Hu ","La ","Jiu ","Qi ","Lian ","Zhen ","Bin ","Peng ","Mo ","San ","Man ","Man ","Seng ","Xu ","Lie ","Qian ","Qian ","Nong ","Huan ","Kuai ","Ning ","Bin ","Lie ","Rang ","Dou ","Dou ","Nao ","Hong ","Xi ","Dou ","Han ","Dou ","Dou ","Jiu ","Chang ","Yu ","Yu ","Li ","Juan ","Fu ","Qian ","Gui ","Zong ","Liu ","Gui ","Shang ","Yu ","Gui ","Mei ","Ji ","Qi ","Jie ","Kui ","Hun ","Ba ","Po ","Mei ","Xu ","Yan ","Xiao ","Liang ","Yu ","Tui ","Qi ","Wang ","Liang ","Wei ","Jian ","Chi ","Piao ","Bi ","Mo ","Ji ","Xu ","Chou ","Yan ","Zhan ","Yu ","Dao ","Ren ","Ji ","Eri ","Gong ","Tuo ","Diao ","Ji ","Xu ","E ","E ","Sha ","Hang ","Tun ","Mo ","Jie ","Shen ","Fan ","Yuan ","Bi ","Lu ","Wen ","Hu ","Lu ","Za ","Fang ","Fen ","Na ","You ","Namazu ","Todo ","He ","Xia ","Qu ","Han ","Pi ","Ling ","Tuo ","Bo ","Qiu ","Ping ","Fu ","Bi ","Ji ","Wei ","Ju ","Diao ","Bo ","You ","Gun ","Pi ","Nian ","Xing ","Tai ","Bao ","Fu ","Zha ","Ju ","Gu ","Kajika ","Tong ","[?] ","Ta ","Jie ","Shu ","Hou ","Xiang ","Er ","An ","Wei ","Tiao ","Zhu ","Yin ","Lie ","Luo ","Tong ","Yi ","Qi ","Bing ","Wei ","Jiao ","Bu ","Gui ","Xian ","Ge ","Hui ","Bora ","Mate ","Kao ","Gori ","Duo ","Jun ","Ti ","Man ","Xiao ","Za ","Sha ","Qin ","Yu ","Nei ","Zhe ","Gun ","Geng ","Su ","Wu ","Qiu ","Ting ","Fu ","Wan ","You ","Li ","Sha ","Sha ","Gao ","Meng ","Ugui ","Asari ","Subashiri ","Kazunoko ","Yong ","Ni ","Zi ","Qi ","Qing ","Xiang ","Nei ","Chun ","Ji ","Diao ","Qie ","Gu ","Zhou ","Dong ","Lai ","Fei ","Ni ","Yi ","Kun ","Lu ","Jiu ","Chang ","Jing ","Lun ","Ling ","Zou ","Li ","Meng ","Zong ","Zhi ","Nian ","Shachi ","Dojou ","Sukesou ","Shi ","Shen ","Hun ","Shi ","Hou ","Xing ","Zhu ","La ","Zong ","Ji ","Bian ","Bian "]});var p7=b((m4e,f7)=>{f7.exports=["Huan ","Quan ","Ze ","Wei ","Wei ","Yu ","Qun ","Rou ","Die ","Huang ","Lian ","Yan ","Qiu ","Qiu ","Jian ","Bi ","E ","Yang ","Fu ","Sai ","Jian ","Xia ","Tuo ","Hu ","Muroaji ","Ruo ","Haraka ","Wen ","Jian ","Hao ","Wu ","Fang ","Sao ","Liu ","Ma ","Shi ","Shi ","Yin ","Z ","Teng ","Ta ","Yao ","Ge ","Rong ","Qian ","Qi ","Wen ","Ruo ","Hatahata ","Lian ","Ao ","Le ","Hui ","Min ","Ji ","Tiao ","Qu ","Jian ","Sao ","Man ","Xi ","Qiu ","Biao ","Ji ","Ji ","Zhu ","Jiang ","Qiu ","Zhuan ","Yong ","Zhang ","Kang ","Xue ","Bie ","Jue ","Qu ","Xiang ","Bo ","Jiao ","Xun ","Su ","Huang ","Zun ","Shan ","Shan ","Fan ","Jue ","Lin ","Xun ","Miao ","Xi ","Eso ","Kyou ","Fen ","Guan ","Hou ","Kuai ","Zei ","Sao ","Zhan ","Gan ","Gui ","Sheng ","Li ","Chang ","Hatahata ","Shiira ","Mutsu ","Ru ","Ji ","Xu ","Huo ","Shiira ","Li ","Lie ","Li ","Mie ","Zhen ","Xiang ","E ","Lu ","Guan ","Li ","Xian ","Yu ","Dao ","Ji ","You ","Tun ","Lu ","Fang ","Ba ","He ","Bo ","Ping ","Nian ","Lu ","You ","Zha ","Fu ","Bo ","Bao ","Hou ","Pi ","Tai ","Gui ","Jie ","Kao ","Wei ","Er ","Tong ","Ze ","Hou ","Kuai ","Ji ","Jiao ","Xian ","Za ","Xiang ","Xun ","Geng ","Li ","Lian ","Jian ","Li ","Shi ","Tiao ","Gun ","Sha ","Wan ","Jun ","Ji ","Yong ","Qing ","Ling ","Qi ","Zou ","Fei ","Kun ","Chang ","Gu ","Ni ","Nian ","Diao ","Jing ","Shen ","Shi ","Zi ","Fen ","Die ","Bi ","Chang ","Shi ","Wen ","Wei ","Sai ","E ","Qiu ","Fu ","Huang ","Quan ","Jiang ","Bian ","Sao ","Ao ","Qi ","Ta ","Yin ","Yao ","Fang ","Jian ","Le ","Biao ","Xue ","Bie ","Man ","Min ","Yong ","Wei ","Xi ","Jue ","Shan ","Lin ","Zun ","Huo ","Gan ","Li ","Zhan ","Guan ","Niao ","Yi ","Fu ","Li ","Jiu ","Bu ","Yan ","Fu ","Diao ","Ji ","Feng ","Nio ","Gan ","Shi ","Feng ","Ming ","Bao ","Yuan ","Zhi ","Hu ","Qin ","Fu ","Fen ","Wen ","Jian ","Shi ","Yu "]});var b7=b((b4e,m7)=>{m7.exports=["Fou ","Yiao ","Jue ","Jue ","Pi ","Huan ","Zhen ","Bao ","Yan ","Ya ","Zheng ","Fang ","Feng ","Wen ","Ou ","Te ","Jia ","Nu ","Ling ","Mie ","Fu ","Tuo ","Wen ","Li ","Bian ","Zhi ","Ge ","Yuan ","Zi ","Qu ","Xiao ","Zhi ","Dan ","Ju ","You ","Gu ","Zhong ","Yu ","Yang ","Rong ","Ya ","Tie ","Yu ","Shigi ","Ying ","Zhui ","Wu ","Er ","Gua ","Ai ","Zhi ","Yan ","Heng ","Jiao ","Ji ","Lie ","Zhu ","Ren ","Yi ","Hong ","Luo ","Ru ","Mou ","Ge ","Ren ","Jiao ","Xiu ","Zhou ","Zhi ","Luo ","Chidori ","Toki ","Ten ","Luan ","Jia ","Ji ","Yu ","Huan ","Tuo ","Bu ","Wu ","Juan ","Yu ","Bo ","Xun ","Xun ","Bi ","Xi ","Jun ","Ju ","Tu ","Jing ","Ti ","E ","E ","Kuang ","Hu ","Wu ","Shen ","Lai ","Ikaruga ","Kakesu ","Lu ","Ping ","Shu ","Fu ","An ","Zhao ","Peng ","Qin ","Qian ","Bei ","Diao ","Lu ","Que ","Jian ","Ju ","Tu ","Ya ","Yuan ","Qi ","Li ","Ye ","Zhui ","Kong ","Zhui ","Kun ","Sheng ","Qi ","Jing ","Yi ","Yi ","Jing ","Zi ","Lai ","Dong ","Qi ","Chun ","Geng ","Ju ","Qu ","Isuka ","Kikuitadaki ","Ji ","Shu ","[?] ","Chi ","Miao ","Rou ","An ","Qiu ","Ti ","Hu ","Ti ","E ","Jie ","Mao ","Fu ","Chun ","Tu ","Yan ","He ","Yuan ","Pian ","Yun ","Mei ","Hu ","Ying ","Dun ","Mu ","Ju ","Tsugumi ","Cang ","Fang ","Gu ","Ying ","Yuan ","Xuan ","Weng ","Shi ","He ","Chu ","Tang ","Xia ","Ruo ","Liu ","Ji ","Gu ","Jian ","Zhun ","Han ","Zi ","Zi ","Ni ","Yao ","Yan ","Ji ","Li ","Tian ","Kou ","Ti ","Ti ","Ni ","Tu ","Ma ","Jiao ","Gao ","Tian ","Chen ","Li ","Zhuan ","Zhe ","Ao ","Yao ","Yi ","Ou ","Chi ","Zhi ","Liao ","Rong ","Lou ","Bi ","Shuang ","Zhuo ","Yu ","Wu ","Jue ","Yin ","Quan ","Si ","Jiao ","Yi ","Hua ","Bi ","Ying ","Su ","Huang ","Fan ","Jiao ","Liao ","Yan ","Kao ","Jiu ","Xian ","Xian ","Tu ","Mai ","Zun ","Yu ","Ying ","Lu ","Tuan ","Xian ","Xue ","Yi ","Pi "]});var v7=b((y4e,y7)=>{y7.exports=["Shu ","Luo ","Qi ","Yi ","Ji ","Zhe ","Yu ","Zhan ","Ye ","Yang ","Pi ","Ning ","Huo ","Mi ","Ying ","Meng ","Di ","Yue ","Yu ","Lei ","Bao ","Lu ","He ","Long ","Shuang ","Yue ","Ying ","Guan ","Qu ","Li ","Luan ","Niao ","Jiu ","Ji ","Yuan ","Ming ","Shi ","Ou ","Ya ","Cang ","Bao ","Zhen ","Gu ","Dong ","Lu ","Ya ","Xiao ","Yang ","Ling ","Zhi ","Qu ","Yuan ","Xue ","Tuo ","Si ","Zhi ","Er ","Gua ","Xiu ","Heng ","Zhou ","Ge ","Luan ","Hong ","Wu ","Bo ","Li ","Juan ","Hu ","E ","Yu ","Xian ","Ti ","Wu ","Que ","Miao ","An ","Kun ","Bei ","Peng ","Qian ","Chun ","Geng ","Yuan ","Su ","Hu ","He ","E ","Gu ","Qiu ","Zi ","Mei ","Mu ","Ni ","Yao ","Weng ","Liu ","Ji ","Ni ","Jian ","He ","Yi ","Ying ","Zhe ","Liao ","Liao ","Jiao ","Jiu ","Yu ","Lu ","Xuan ","Zhan ","Ying ","Huo ","Meng ","Guan ","Shuang ","Lu ","Jin ","Ling ","Jian ","Xian ","Cuo ","Jian ","Jian ","Yan ","Cuo ","Lu ","You ","Cu ","Ji ","Biao ","Cu ","Biao ","Zhu ","Jun ","Zhu ","Jian ","Mi ","Mi ","Wu ","Liu ","Chen ","Jun ","Lin ","Ni ","Qi ","Lu ","Jiu ","Jun ","Jing ","Li ","Xiang ","Yan ","Jia ","Mi ","Li ","She ","Zhang ","Lin ","Jing ","Ji ","Ling ","Yan ","Cu ","Mai ","Mai ","Ge ","Chao ","Fu ","Mian ","Mian ","Fu ","Pao ","Qu ","Qu ","Mou ","Fu ","Xian ","Lai ","Qu ","Mian ","[?] ","Feng ","Fu ","Qu ","Mian ","Ma ","Mo ","Mo ","Hui ","Ma ","Zou ","Nen ","Fen ","Huang ","Huang ","Jin ","Guang ","Tian ","Tou ","Heng ","Xi ","Kuang ","Heng ","Shu ","Li ","Nian ","Chi ","Hei ","Hei ","Yi ","Qian ","Dan ","Xi ","Tuan ","Mo ","Mo ","Qian ","Dai ","Chu ","You ","Dian ","Yi ","Xia ","Yan ","Qu ","Mei ","Yan ","Jing ","Yu ","Li ","Dang ","Du ","Can ","Yin ","An ","Yan ","Tan ","An ","Zhen ","Dai ","Can ","Yi ","Mei ","Dan ","Yan ","Du ","Lu ","Zhi ","Fen ","Fu ","Fu ","Min ","Min ","Yuan "]});var D7=b((v4e,w7)=>{w7.exports=["Cu ","Qu ","Chao ","Wa ","Zhu ","Zhi ","Mang ","Ao ","Bie ","Tuo ","Bi ","Yuan ","Chao ","Tuo ","Ding ","Mi ","Nai ","Ding ","Zi ","Gu ","Gu ","Dong ","Fen ","Tao ","Yuan ","Pi ","Chang ","Gao ","Qi ","Yuan ","Tang ","Teng ","Shu ","Shu ","Fen ","Fei ","Wen ","Ba ","Diao ","Tuo ","Tong ","Qu ","Sheng ","Shi ","You ","Shi ","Ting ","Wu ","Nian ","Jing ","Hun ","Ju ","Yan ","Tu ","Ti ","Xi ","Xian ","Yan ","Lei ","Bi ","Yao ","Qiu ","Han ","Wu ","Wu ","Hou ","Xi ","Ge ","Zha ","Xiu ","Weng ","Zha ","Nong ","Nang ","Qi ","Zhai ","Ji ","Zi ","Ji ","Ji ","Qi ","Ji ","Chi ","Chen ","Chen ","He ","Ya ","Ken ","Xie ","Pao ","Cuo ","Shi ","Zi ","Chi ","Nian ","Ju ","Tiao ","Ling ","Ling ","Chu ","Quan ","Xie ","Ken ","Nie ","Jiu ","Yao ","Chuo ","Kun ","Yu ","Chu ","Yi ","Ni ","Cuo ","Zou ","Qu ","Nen ","Xian ","Ou ","E ","Wo ","Yi ","Chuo ","Zou ","Dian ","Chu ","Jin ","Ya ","Chi ","Chen ","He ","Ken ","Ju ","Ling ","Pao ","Tiao ","Zi ","Ken ","Yu ","Chuo ","Qu ","Wo ","Long ","Pang ","Gong ","Pang ","Yan ","Long ","Long ","Gong ","Kan ","Ta ","Ling ","Ta ","Long ","Gong ","Kan ","Gui ","Qiu ","Bie ","Gui ","Yue ","Chui ","He ","Jue ","Xie ","Yu ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var x7=b((w4e,C7)=>{C7.exports=["it","ix","i","ip","iet","iex","ie","iep","at","ax","a","ap","uox","uo","uop","ot","ox","o","op","ex","e","wu","bit","bix","bi","bip","biet","biex","bie","biep","bat","bax","ba","bap","buox","buo","buop","bot","box","bo","bop","bex","be","bep","but","bux","bu","bup","burx","bur","byt","byx","by","byp","byrx","byr","pit","pix","pi","pip","piex","pie","piep","pat","pax","pa","pap","puox","puo","puop","pot","pox","po","pop","put","pux","pu","pup","purx","pur","pyt","pyx","py","pyp","pyrx","pyr","bbit","bbix","bbi","bbip","bbiet","bbiex","bbie","bbiep","bbat","bbax","bba","bbap","bbuox","bbuo","bbuop","bbot","bbox","bbo","bbop","bbex","bbe","bbep","bbut","bbux","bbu","bbup","bburx","bbur","bbyt","bbyx","bby","bbyp","nbit","nbix","nbi","nbip","nbiex","nbie","nbiep","nbat","nbax","nba","nbap","nbot","nbox","nbo","nbop","nbut","nbux","nbu","nbup","nburx","nbur","nbyt","nbyx","nby","nbyp","nbyrx","nbyr","hmit","hmix","hmi","hmip","hmiex","hmie","hmiep","hmat","hmax","hma","hmap","hmuox","hmuo","hmuop","hmot","hmox","hmo","hmop","hmut","hmux","hmu","hmup","hmurx","hmur","hmyx","hmy","hmyp","hmyrx","hmyr","mit","mix","mi","mip","miex","mie","miep","mat","max","ma","map","muot","muox","muo","muop","mot","mox","mo","mop","mex","me","mut","mux","mu","mup","murx","mur","myt","myx","my","myp","fit","fix","fi","fip","fat","fax","fa","fap","fox","fo","fop","fut","fux","fu","fup","furx","fur","fyt","fyx","fy","fyp","vit","vix","vi","vip","viet","viex","vie","viep","vat","vax","va","vap","vot","vox","vo","vop","vex","vep","vut","vux","vu","vup","vurx","vur","vyt","vyx","vy","vyp","vyrx","vyr"]});var T7=b((D4e,S7)=>{S7.exports=["dit","dix","di","dip","diex","die","diep","dat","dax","da","dap","duox","duo","dot","dox","do","dop","dex","de","dep","dut","dux","du","dup","durx","dur","tit","tix","ti","tip","tiex","tie","tiep","tat","tax","ta","tap","tuot","tuox","tuo","tuop","tot","tox","to","top","tex","te","tep","tut","tux","tu","tup","turx","tur","ddit","ddix","ddi","ddip","ddiex","ddie","ddiep","ddat","ddax","dda","ddap","dduox","dduo","dduop","ddot","ddox","ddo","ddop","ddex","dde","ddep","ddut","ddux","ddu","ddup","ddurx","ddur","ndit","ndix","ndi","ndip","ndiex","ndie","ndat","ndax","nda","ndap","ndot","ndox","ndo","ndop","ndex","nde","ndep","ndut","ndux","ndu","ndup","ndurx","ndur","hnit","hnix","hni","hnip","hniet","hniex","hnie","hniep","hnat","hnax","hna","hnap","hnuox","hnuo","hnot","hnox","hnop","hnex","hne","hnep","hnut","nit","nix","ni","nip","niex","nie","niep","nax","na","nap","nuox","nuo","nuop","not","nox","no","nop","nex","ne","nep","nut","nux","nu","nup","nurx","nur","hlit","hlix","hli","hlip","hliex","hlie","hliep","hlat","hlax","hla","hlap","hluox","hluo","hluop","hlox","hlo","hlop","hlex","hle","hlep","hlut","hlux","hlu","hlup","hlurx","hlur","hlyt","hlyx","hly","hlyp","hlyrx","hlyr","lit","lix","li","lip","liet","liex","lie","liep","lat","lax","la","lap","luot","luox","luo","luop","lot","lox","lo","lop","lex","le","lep","lut","lux","lu","lup","lurx","lur","lyt","lyx","ly","lyp","lyrx","lyr","git","gix","gi","gip","giet","giex","gie","giep","gat","gax","ga","gap","guot","guox","guo","guop","got","gox","go","gop","get","gex","ge","gep","gut","gux","gu","gup","gurx","gur","kit","kix","ki","kip","kiex","kie","kiep","kat"]});var E7=b((C4e,k7)=>{k7.exports=["kax","ka","kap","kuox","kuo","kuop","kot","kox","ko","kop","ket","kex","ke","kep","kut","kux","ku","kup","kurx","kur","ggit","ggix","ggi","ggiex","ggie","ggiep","ggat","ggax","gga","ggap","gguot","gguox","gguo","gguop","ggot","ggox","ggo","ggop","gget","ggex","gge","ggep","ggut","ggux","ggu","ggup","ggurx","ggur","mgiex","mgie","mgat","mgax","mga","mgap","mguox","mguo","mguop","mgot","mgox","mgo","mgop","mgex","mge","mgep","mgut","mgux","mgu","mgup","mgurx","mgur","hxit","hxix","hxi","hxip","hxiet","hxiex","hxie","hxiep","hxat","hxax","hxa","hxap","hxuot","hxuox","hxuo","hxuop","hxot","hxox","hxo","hxop","hxex","hxe","hxep","ngiex","ngie","ngiep","ngat","ngax","nga","ngap","nguot","nguox","nguo","ngot","ngox","ngo","ngop","ngex","nge","ngep","hit","hiex","hie","hat","hax","ha","hap","huot","huox","huo","huop","hot","hox","ho","hop","hex","he","hep","wat","wax","wa","wap","wuox","wuo","wuop","wox","wo","wop","wex","we","wep","zit","zix","zi","zip","ziex","zie","ziep","zat","zax","za","zap","zuox","zuo","zuop","zot","zox","zo","zop","zex","ze","zep","zut","zux","zu","zup","zurx","zur","zyt","zyx","zy","zyp","zyrx","zyr","cit","cix","ci","cip","ciet","ciex","cie","ciep","cat","cax","ca","cap","cuox","cuo","cuop","cot","cox","co","cop","cex","ce","cep","cut","cux","cu","cup","curx","cur","cyt","cyx","cy","cyp","cyrx","cyr","zzit","zzix","zzi","zzip","zziet","zziex","zzie","zziep","zzat","zzax","zza","zzap","zzox","zzo","zzop","zzex","zze","zzep","zzux","zzu","zzup","zzurx","zzur","zzyt","zzyx","zzy","zzyp","zzyrx","zzyr","nzit","nzix","nzi","nzip","nziex","nzie","nziep","nzat","nzax","nza","nzap","nzuox","nzuo","nzox","nzop","nzex","nze","nzux","nzu"]});var _7=b((x4e,P7)=>{P7.exports=["nzup","nzurx","nzur","nzyt","nzyx","nzy","nzyp","nzyrx","nzyr","sit","six","si","sip","siex","sie","siep","sat","sax","sa","sap","suox","suo","suop","sot","sox","so","sop","sex","se","sep","sut","sux","su","sup","surx","sur","syt","syx","sy","syp","syrx","syr","ssit","ssix","ssi","ssip","ssiex","ssie","ssiep","ssat","ssax","ssa","ssap","ssot","ssox","sso","ssop","ssex","sse","ssep","ssut","ssux","ssu","ssup","ssyt","ssyx","ssy","ssyp","ssyrx","ssyr","zhat","zhax","zha","zhap","zhuox","zhuo","zhuop","zhot","zhox","zho","zhop","zhet","zhex","zhe","zhep","zhut","zhux","zhu","zhup","zhurx","zhur","zhyt","zhyx","zhy","zhyp","zhyrx","zhyr","chat","chax","cha","chap","chuot","chuox","chuo","chuop","chot","chox","cho","chop","chet","chex","che","chep","chux","chu","chup","churx","chur","chyt","chyx","chy","chyp","chyrx","chyr","rrax","rra","rruox","rruo","rrot","rrox","rro","rrop","rret","rrex","rre","rrep","rrut","rrux","rru","rrup","rrurx","rrur","rryt","rryx","rry","rryp","rryrx","rryr","nrat","nrax","nra","nrap","nrox","nro","nrop","nret","nrex","nre","nrep","nrut","nrux","nru","nrup","nrurx","nrur","nryt","nryx","nry","nryp","nryrx","nryr","shat","shax","sha","shap","shuox","shuo","shuop","shot","shox","sho","shop","shet","shex","she","shep","shut","shux","shu","shup","shurx","shur","shyt","shyx","shy","shyp","shyrx","shyr","rat","rax","ra","rap","ruox","ruo","ruop","rot","rox","ro","rop","rex","re","rep","rut","rux","ru","rup","rurx","rur","ryt","ryx","ry","ryp","ryrx","ryr","jit","jix","ji","jip","jiet","jiex","jie","jiep","juot","juox","juo","juop","jot","jox","jo","jop","jut","jux","ju","jup","jurx","jur","jyt","jyx","jy","jyp","jyrx","jyr","qit","qix","qi","qip"]});var L7=b((S4e,R7)=>{R7.exports=["qiet","qiex","qie","qiep","quot","quox","quo","quop","qot","qox","qo","qop","qut","qux","qu","qup","qurx","qur","qyt","qyx","qy","qyp","qyrx","qyr","jjit","jjix","jji","jjip","jjiet","jjiex","jjie","jjiep","jjuox","jjuo","jjuop","jjot","jjox","jjo","jjop","jjut","jjux","jju","jjup","jjurx","jjur","jjyt","jjyx","jjy","jjyp","njit","njix","nji","njip","njiet","njiex","njie","njiep","njuox","njuo","njot","njox","njo","njop","njux","nju","njup","njurx","njur","njyt","njyx","njy","njyp","njyrx","njyr","nyit","nyix","nyi","nyip","nyiet","nyiex","nyie","nyiep","nyuox","nyuo","nyuop","nyot","nyox","nyo","nyop","nyut","nyux","nyu","nyup","xit","xix","xi","xip","xiet","xiex","xie","xiep","xuox","xuo","xot","xox","xo","xop","xyt","xyx","xy","xyp","xyrx","xyr","yit","yix","yi","yip","yiet","yiex","yie","yiep","yuot","yuox","yuo","yuop","yot","yox","yo","yop","yut","yux","yu","yup","yurx","yur","yyt","yyx","yy","yyp","yyrx","yyr","[?]","[?]","[?]","Qot","Li","Kit","Nyip","Cyp","Ssi","Ggop","Gep","Mi","Hxit","Lyr","Bbut","Mop","Yo","Put","Hxuo","Tat","Ga","[?]","[?]","Ddur","Bur","Gguo","Nyop","Tu","Op","Jjut","Zot","Pyt","Hmo","Yit","Vur","Shy","Vep","Za","Jo","[?]","Jjy","Got","Jjie","Wo","Du","Shur","Lie","Cy","Cuop","Cip","Hxop","Shat","[?]","Shop","Che","Zziet","[?]","Ke","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var I7=b((T4e,F7)=>{F7.exports=["ga","gag","gagg","gags","gan","ganj","ganh","gad","gal","galg","galm","galb","gals","galt","galp","galh","gam","gab","gabs","gas","gass","gang","gaj","gac","gak","gat","gap","gah","gae","gaeg","gaegg","gaegs","gaen","gaenj","gaenh","gaed","gael","gaelg","gaelm","gaelb","gaels","gaelt","gaelp","gaelh","gaem","gaeb","gaebs","gaes","gaess","gaeng","gaej","gaec","gaek","gaet","gaep","gaeh","gya","gyag","gyagg","gyags","gyan","gyanj","gyanh","gyad","gyal","gyalg","gyalm","gyalb","gyals","gyalt","gyalp","gyalh","gyam","gyab","gyabs","gyas","gyass","gyang","gyaj","gyac","gyak","gyat","gyap","gyah","gyae","gyaeg","gyaegg","gyaegs","gyaen","gyaenj","gyaenh","gyaed","gyael","gyaelg","gyaelm","gyaelb","gyaels","gyaelt","gyaelp","gyaelh","gyaem","gyaeb","gyaebs","gyaes","gyaess","gyaeng","gyaej","gyaec","gyaek","gyaet","gyaep","gyaeh","geo","geog","geogg","geogs","geon","geonj","geonh","geod","geol","geolg","geolm","geolb","geols","geolt","geolp","geolh","geom","geob","geobs","geos","geoss","geong","geoj","geoc","geok","geot","geop","geoh","ge","geg","gegg","gegs","gen","genj","genh","ged","gel","gelg","gelm","gelb","gels","gelt","gelp","gelh","gem","geb","gebs","ges","gess","geng","gej","gec","gek","get","gep","geh","gyeo","gyeog","gyeogg","gyeogs","gyeon","gyeonj","gyeonh","gyeod","gyeol","gyeolg","gyeolm","gyeolb","gyeols","gyeolt","gyeolp","gyeolh","gyeom","gyeob","gyeobs","gyeos","gyeoss","gyeong","gyeoj","gyeoc","gyeok","gyeot","gyeop","gyeoh","gye","gyeg","gyegg","gyegs","gyen","gyenj","gyenh","gyed","gyel","gyelg","gyelm","gyelb","gyels","gyelt","gyelp","gyelh","gyem","gyeb","gyebs","gyes","gyess","gyeng","gyej","gyec","gyek","gyet","gyep","gyeh","go","gog","gogg","gogs","gon","gonj","gonh","god","gol","golg","golm","golb","gols","golt","golp","golh","gom","gob","gobs","gos","goss","gong","goj","goc","gok","got","gop","goh","gwa","gwag","gwagg","gwags"]});var A7=b((k4e,j7)=>{j7.exports=["gwan","gwanj","gwanh","gwad","gwal","gwalg","gwalm","gwalb","gwals","gwalt","gwalp","gwalh","gwam","gwab","gwabs","gwas","gwass","gwang","gwaj","gwac","gwak","gwat","gwap","gwah","gwae","gwaeg","gwaegg","gwaegs","gwaen","gwaenj","gwaenh","gwaed","gwael","gwaelg","gwaelm","gwaelb","gwaels","gwaelt","gwaelp","gwaelh","gwaem","gwaeb","gwaebs","gwaes","gwaess","gwaeng","gwaej","gwaec","gwaek","gwaet","gwaep","gwaeh","goe","goeg","goegg","goegs","goen","goenj","goenh","goed","goel","goelg","goelm","goelb","goels","goelt","goelp","goelh","goem","goeb","goebs","goes","goess","goeng","goej","goec","goek","goet","goep","goeh","gyo","gyog","gyogg","gyogs","gyon","gyonj","gyonh","gyod","gyol","gyolg","gyolm","gyolb","gyols","gyolt","gyolp","gyolh","gyom","gyob","gyobs","gyos","gyoss","gyong","gyoj","gyoc","gyok","gyot","gyop","gyoh","gu","gug","gugg","gugs","gun","gunj","gunh","gud","gul","gulg","gulm","gulb","guls","gult","gulp","gulh","gum","gub","gubs","gus","guss","gung","guj","guc","guk","gut","gup","guh","gweo","gweog","gweogg","gweogs","gweon","gweonj","gweonh","gweod","gweol","gweolg","gweolm","gweolb","gweols","gweolt","gweolp","gweolh","gweom","gweob","gweobs","gweos","gweoss","gweong","gweoj","gweoc","gweok","gweot","gweop","gweoh","gwe","gweg","gwegg","gwegs","gwen","gwenj","gwenh","gwed","gwel","gwelg","gwelm","gwelb","gwels","gwelt","gwelp","gwelh","gwem","gweb","gwebs","gwes","gwess","gweng","gwej","gwec","gwek","gwet","gwep","gweh","gwi","gwig","gwigg","gwigs","gwin","gwinj","gwinh","gwid","gwil","gwilg","gwilm","gwilb","gwils","gwilt","gwilp","gwilh","gwim","gwib","gwibs","gwis","gwiss","gwing","gwij","gwic","gwik","gwit","gwip","gwih","gyu","gyug","gyugg","gyugs","gyun","gyunj","gyunh","gyud","gyul","gyulg","gyulm","gyulb","gyuls","gyult","gyulp","gyulh","gyum","gyub","gyubs","gyus","gyuss","gyung","gyuj","gyuc","gyuk","gyut","gyup","gyuh","geu","geug","geugg","geugs","geun","geunj","geunh","geud"]});var M7=b((E4e,O7)=>{O7.exports=["geul","geulg","geulm","geulb","geuls","geult","geulp","geulh","geum","geub","geubs","geus","geuss","geung","geuj","geuc","geuk","geut","geup","geuh","gyi","gyig","gyigg","gyigs","gyin","gyinj","gyinh","gyid","gyil","gyilg","gyilm","gyilb","gyils","gyilt","gyilp","gyilh","gyim","gyib","gyibs","gyis","gyiss","gying","gyij","gyic","gyik","gyit","gyip","gyih","gi","gig","gigg","gigs","gin","ginj","ginh","gid","gil","gilg","gilm","gilb","gils","gilt","gilp","gilh","gim","gib","gibs","gis","giss","ging","gij","gic","gik","git","gip","gih","gga","ggag","ggagg","ggags","ggan","gganj","gganh","ggad","ggal","ggalg","ggalm","ggalb","ggals","ggalt","ggalp","ggalh","ggam","ggab","ggabs","ggas","ggass","ggang","ggaj","ggac","ggak","ggat","ggap","ggah","ggae","ggaeg","ggaegg","ggaegs","ggaen","ggaenj","ggaenh","ggaed","ggael","ggaelg","ggaelm","ggaelb","ggaels","ggaelt","ggaelp","ggaelh","ggaem","ggaeb","ggaebs","ggaes","ggaess","ggaeng","ggaej","ggaec","ggaek","ggaet","ggaep","ggaeh","ggya","ggyag","ggyagg","ggyags","ggyan","ggyanj","ggyanh","ggyad","ggyal","ggyalg","ggyalm","ggyalb","ggyals","ggyalt","ggyalp","ggyalh","ggyam","ggyab","ggyabs","ggyas","ggyass","ggyang","ggyaj","ggyac","ggyak","ggyat","ggyap","ggyah","ggyae","ggyaeg","ggyaegg","ggyaegs","ggyaen","ggyaenj","ggyaenh","ggyaed","ggyael","ggyaelg","ggyaelm","ggyaelb","ggyaels","ggyaelt","ggyaelp","ggyaelh","ggyaem","ggyaeb","ggyaebs","ggyaes","ggyaess","ggyaeng","ggyaej","ggyaec","ggyaek","ggyaet","ggyaep","ggyaeh","ggeo","ggeog","ggeogg","ggeogs","ggeon","ggeonj","ggeonh","ggeod","ggeol","ggeolg","ggeolm","ggeolb","ggeols","ggeolt","ggeolp","ggeolh","ggeom","ggeob","ggeobs","ggeos","ggeoss","ggeong","ggeoj","ggeoc","ggeok","ggeot","ggeop","ggeoh","gge","ggeg","ggegg","ggegs","ggen","ggenj","ggenh","gged","ggel","ggelg","ggelm","ggelb","ggels","ggelt","ggelp","ggelh","ggem","ggeb","ggebs","gges","ggess","ggeng","ggej","ggec","ggek","gget","ggep","ggeh","ggyeo","ggyeog","ggyeogg","ggyeogs","ggyeon","ggyeonj","ggyeonh","ggyeod","ggyeol","ggyeolg","ggyeolm","ggyeolb"]});var B7=b((P4e,N7)=>{N7.exports=["ggyeols","ggyeolt","ggyeolp","ggyeolh","ggyeom","ggyeob","ggyeobs","ggyeos","ggyeoss","ggyeong","ggyeoj","ggyeoc","ggyeok","ggyeot","ggyeop","ggyeoh","ggye","ggyeg","ggyegg","ggyegs","ggyen","ggyenj","ggyenh","ggyed","ggyel","ggyelg","ggyelm","ggyelb","ggyels","ggyelt","ggyelp","ggyelh","ggyem","ggyeb","ggyebs","ggyes","ggyess","ggyeng","ggyej","ggyec","ggyek","ggyet","ggyep","ggyeh","ggo","ggog","ggogg","ggogs","ggon","ggonj","ggonh","ggod","ggol","ggolg","ggolm","ggolb","ggols","ggolt","ggolp","ggolh","ggom","ggob","ggobs","ggos","ggoss","ggong","ggoj","ggoc","ggok","ggot","ggop","ggoh","ggwa","ggwag","ggwagg","ggwags","ggwan","ggwanj","ggwanh","ggwad","ggwal","ggwalg","ggwalm","ggwalb","ggwals","ggwalt","ggwalp","ggwalh","ggwam","ggwab","ggwabs","ggwas","ggwass","ggwang","ggwaj","ggwac","ggwak","ggwat","ggwap","ggwah","ggwae","ggwaeg","ggwaegg","ggwaegs","ggwaen","ggwaenj","ggwaenh","ggwaed","ggwael","ggwaelg","ggwaelm","ggwaelb","ggwaels","ggwaelt","ggwaelp","ggwaelh","ggwaem","ggwaeb","ggwaebs","ggwaes","ggwaess","ggwaeng","ggwaej","ggwaec","ggwaek","ggwaet","ggwaep","ggwaeh","ggoe","ggoeg","ggoegg","ggoegs","ggoen","ggoenj","ggoenh","ggoed","ggoel","ggoelg","ggoelm","ggoelb","ggoels","ggoelt","ggoelp","ggoelh","ggoem","ggoeb","ggoebs","ggoes","ggoess","ggoeng","ggoej","ggoec","ggoek","ggoet","ggoep","ggoeh","ggyo","ggyog","ggyogg","ggyogs","ggyon","ggyonj","ggyonh","ggyod","ggyol","ggyolg","ggyolm","ggyolb","ggyols","ggyolt","ggyolp","ggyolh","ggyom","ggyob","ggyobs","ggyos","ggyoss","ggyong","ggyoj","ggyoc","ggyok","ggyot","ggyop","ggyoh","ggu","ggug","ggugg","ggugs","ggun","ggunj","ggunh","ggud","ggul","ggulg","ggulm","ggulb","gguls","ggult","ggulp","ggulh","ggum","ggub","ggubs","ggus","gguss","ggung","gguj","gguc","gguk","ggut","ggup","gguh","ggweo","ggweog","ggweogg","ggweogs","ggweon","ggweonj","ggweonh","ggweod","ggweol","ggweolg","ggweolm","ggweolb","ggweols","ggweolt","ggweolp","ggweolh","ggweom","ggweob","ggweobs","ggweos","ggweoss","ggweong","ggweoj","ggweoc","ggweok","ggweot","ggweop","ggweoh","ggwe","ggweg","ggwegg","ggwegs","ggwen","ggwenj","ggwenh","ggwed","ggwel","ggwelg","ggwelm","ggwelb","ggwels","ggwelt","ggwelp","ggwelh"]});var q7=b((_4e,H7)=>{H7.exports=["ggwem","ggweb","ggwebs","ggwes","ggwess","ggweng","ggwej","ggwec","ggwek","ggwet","ggwep","ggweh","ggwi","ggwig","ggwigg","ggwigs","ggwin","ggwinj","ggwinh","ggwid","ggwil","ggwilg","ggwilm","ggwilb","ggwils","ggwilt","ggwilp","ggwilh","ggwim","ggwib","ggwibs","ggwis","ggwiss","ggwing","ggwij","ggwic","ggwik","ggwit","ggwip","ggwih","ggyu","ggyug","ggyugg","ggyugs","ggyun","ggyunj","ggyunh","ggyud","ggyul","ggyulg","ggyulm","ggyulb","ggyuls","ggyult","ggyulp","ggyulh","ggyum","ggyub","ggyubs","ggyus","ggyuss","ggyung","ggyuj","ggyuc","ggyuk","ggyut","ggyup","ggyuh","ggeu","ggeug","ggeugg","ggeugs","ggeun","ggeunj","ggeunh","ggeud","ggeul","ggeulg","ggeulm","ggeulb","ggeuls","ggeult","ggeulp","ggeulh","ggeum","ggeub","ggeubs","ggeus","ggeuss","ggeung","ggeuj","ggeuc","ggeuk","ggeut","ggeup","ggeuh","ggyi","ggyig","ggyigg","ggyigs","ggyin","ggyinj","ggyinh","ggyid","ggyil","ggyilg","ggyilm","ggyilb","ggyils","ggyilt","ggyilp","ggyilh","ggyim","ggyib","ggyibs","ggyis","ggyiss","ggying","ggyij","ggyic","ggyik","ggyit","ggyip","ggyih","ggi","ggig","ggigg","ggigs","ggin","gginj","gginh","ggid","ggil","ggilg","ggilm","ggilb","ggils","ggilt","ggilp","ggilh","ggim","ggib","ggibs","ggis","ggiss","gging","ggij","ggic","ggik","ggit","ggip","ggih","na","nag","nagg","nags","nan","nanj","nanh","nad","nal","nalg","nalm","nalb","nals","nalt","nalp","nalh","nam","nab","nabs","nas","nass","nang","naj","nac","nak","nat","nap","nah","nae","naeg","naegg","naegs","naen","naenj","naenh","naed","nael","naelg","naelm","naelb","naels","naelt","naelp","naelh","naem","naeb","naebs","naes","naess","naeng","naej","naec","naek","naet","naep","naeh","nya","nyag","nyagg","nyags","nyan","nyanj","nyanh","nyad","nyal","nyalg","nyalm","nyalb","nyals","nyalt","nyalp","nyalh","nyam","nyab","nyabs","nyas","nyass","nyang","nyaj","nyac","nyak","nyat","nyap","nyah","nyae","nyaeg","nyaegg","nyaegs","nyaen","nyaenj","nyaenh","nyaed","nyael","nyaelg","nyaelm","nyaelb","nyaels","nyaelt","nyaelp","nyaelh","nyaem","nyaeb","nyaebs","nyaes"]});var W7=b((R4e,Y7)=>{Y7.exports=["nyaess","nyaeng","nyaej","nyaec","nyaek","nyaet","nyaep","nyaeh","neo","neog","neogg","neogs","neon","neonj","neonh","neod","neol","neolg","neolm","neolb","neols","neolt","neolp","neolh","neom","neob","neobs","neos","neoss","neong","neoj","neoc","neok","neot","neop","neoh","ne","neg","negg","negs","nen","nenj","nenh","ned","nel","nelg","nelm","nelb","nels","nelt","nelp","nelh","nem","neb","nebs","nes","ness","neng","nej","nec","nek","net","nep","neh","nyeo","nyeog","nyeogg","nyeogs","nyeon","nyeonj","nyeonh","nyeod","nyeol","nyeolg","nyeolm","nyeolb","nyeols","nyeolt","nyeolp","nyeolh","nyeom","nyeob","nyeobs","nyeos","nyeoss","nyeong","nyeoj","nyeoc","nyeok","nyeot","nyeop","nyeoh","nye","nyeg","nyegg","nyegs","nyen","nyenj","nyenh","nyed","nyel","nyelg","nyelm","nyelb","nyels","nyelt","nyelp","nyelh","nyem","nyeb","nyebs","nyes","nyess","nyeng","nyej","nyec","nyek","nyet","nyep","nyeh","no","nog","nogg","nogs","non","nonj","nonh","nod","nol","nolg","nolm","nolb","nols","nolt","nolp","nolh","nom","nob","nobs","nos","noss","nong","noj","noc","nok","not","nop","noh","nwa","nwag","nwagg","nwags","nwan","nwanj","nwanh","nwad","nwal","nwalg","nwalm","nwalb","nwals","nwalt","nwalp","nwalh","nwam","nwab","nwabs","nwas","nwass","nwang","nwaj","nwac","nwak","nwat","nwap","nwah","nwae","nwaeg","nwaegg","nwaegs","nwaen","nwaenj","nwaenh","nwaed","nwael","nwaelg","nwaelm","nwaelb","nwaels","nwaelt","nwaelp","nwaelh","nwaem","nwaeb","nwaebs","nwaes","nwaess","nwaeng","nwaej","nwaec","nwaek","nwaet","nwaep","nwaeh","noe","noeg","noegg","noegs","noen","noenj","noenh","noed","noel","noelg","noelm","noelb","noels","noelt","noelp","noelh","noem","noeb","noebs","noes","noess","noeng","noej","noec","noek","noet","noep","noeh","nyo","nyog","nyogg","nyogs","nyon","nyonj","nyonh","nyod","nyol","nyolg","nyolm","nyolb","nyols","nyolt","nyolp","nyolh","nyom","nyob","nyobs","nyos","nyoss","nyong","nyoj","nyoc"]});var J7=b((L4e,Z7)=>{Z7.exports=["nyok","nyot","nyop","nyoh","nu","nug","nugg","nugs","nun","nunj","nunh","nud","nul","nulg","nulm","nulb","nuls","nult","nulp","nulh","num","nub","nubs","nus","nuss","nung","nuj","nuc","nuk","nut","nup","nuh","nweo","nweog","nweogg","nweogs","nweon","nweonj","nweonh","nweod","nweol","nweolg","nweolm","nweolb","nweols","nweolt","nweolp","nweolh","nweom","nweob","nweobs","nweos","nweoss","nweong","nweoj","nweoc","nweok","nweot","nweop","nweoh","nwe","nweg","nwegg","nwegs","nwen","nwenj","nwenh","nwed","nwel","nwelg","nwelm","nwelb","nwels","nwelt","nwelp","nwelh","nwem","nweb","nwebs","nwes","nwess","nweng","nwej","nwec","nwek","nwet","nwep","nweh","nwi","nwig","nwigg","nwigs","nwin","nwinj","nwinh","nwid","nwil","nwilg","nwilm","nwilb","nwils","nwilt","nwilp","nwilh","nwim","nwib","nwibs","nwis","nwiss","nwing","nwij","nwic","nwik","nwit","nwip","nwih","nyu","nyug","nyugg","nyugs","nyun","nyunj","nyunh","nyud","nyul","nyulg","nyulm","nyulb","nyuls","nyult","nyulp","nyulh","nyum","nyub","nyubs","nyus","nyuss","nyung","nyuj","nyuc","nyuk","nyut","nyup","nyuh","neu","neug","neugg","neugs","neun","neunj","neunh","neud","neul","neulg","neulm","neulb","neuls","neult","neulp","neulh","neum","neub","neubs","neus","neuss","neung","neuj","neuc","neuk","neut","neup","neuh","nyi","nyig","nyigg","nyigs","nyin","nyinj","nyinh","nyid","nyil","nyilg","nyilm","nyilb","nyils","nyilt","nyilp","nyilh","nyim","nyib","nyibs","nyis","nyiss","nying","nyij","nyic","nyik","nyit","nyip","nyih","ni","nig","nigg","nigs","nin","ninj","ninh","nid","nil","nilg","nilm","nilb","nils","nilt","nilp","nilh","nim","nib","nibs","nis","niss","ning","nij","nic","nik","nit","nip","nih","da","dag","dagg","dags","dan","danj","danh","dad","dal","dalg","dalm","dalb","dals","dalt","dalp","dalh","dam","dab","dabs","das","dass","dang","daj","dac","dak","dat","dap","dah"]});var X7=b((F4e,$7)=>{$7.exports=["dae","daeg","daegg","daegs","daen","daenj","daenh","daed","dael","daelg","daelm","daelb","daels","daelt","daelp","daelh","daem","daeb","daebs","daes","daess","daeng","daej","daec","daek","daet","daep","daeh","dya","dyag","dyagg","dyags","dyan","dyanj","dyanh","dyad","dyal","dyalg","dyalm","dyalb","dyals","dyalt","dyalp","dyalh","dyam","dyab","dyabs","dyas","dyass","dyang","dyaj","dyac","dyak","dyat","dyap","dyah","dyae","dyaeg","dyaegg","dyaegs","dyaen","dyaenj","dyaenh","dyaed","dyael","dyaelg","dyaelm","dyaelb","dyaels","dyaelt","dyaelp","dyaelh","dyaem","dyaeb","dyaebs","dyaes","dyaess","dyaeng","dyaej","dyaec","dyaek","dyaet","dyaep","dyaeh","deo","deog","deogg","deogs","deon","deonj","deonh","deod","deol","deolg","deolm","deolb","deols","deolt","deolp","deolh","deom","deob","deobs","deos","deoss","deong","deoj","deoc","deok","deot","deop","deoh","de","deg","degg","degs","den","denj","denh","ded","del","delg","delm","delb","dels","delt","delp","delh","dem","deb","debs","des","dess","deng","dej","dec","dek","det","dep","deh","dyeo","dyeog","dyeogg","dyeogs","dyeon","dyeonj","dyeonh","dyeod","dyeol","dyeolg","dyeolm","dyeolb","dyeols","dyeolt","dyeolp","dyeolh","dyeom","dyeob","dyeobs","dyeos","dyeoss","dyeong","dyeoj","dyeoc","dyeok","dyeot","dyeop","dyeoh","dye","dyeg","dyegg","dyegs","dyen","dyenj","dyenh","dyed","dyel","dyelg","dyelm","dyelb","dyels","dyelt","dyelp","dyelh","dyem","dyeb","dyebs","dyes","dyess","dyeng","dyej","dyec","dyek","dyet","dyep","dyeh","do","dog","dogg","dogs","don","donj","donh","dod","dol","dolg","dolm","dolb","dols","dolt","dolp","dolh","dom","dob","dobs","dos","doss","dong","doj","doc","dok","dot","dop","doh","dwa","dwag","dwagg","dwags","dwan","dwanj","dwanh","dwad","dwal","dwalg","dwalm","dwalb","dwals","dwalt","dwalp","dwalh","dwam","dwab","dwabs","dwas","dwass","dwang","dwaj","dwac","dwak","dwat","dwap","dwah","dwae","dwaeg","dwaegg","dwaegs"]});var G7=b((I4e,U7)=>{U7.exports=["dwaen","dwaenj","dwaenh","dwaed","dwael","dwaelg","dwaelm","dwaelb","dwaels","dwaelt","dwaelp","dwaelh","dwaem","dwaeb","dwaebs","dwaes","dwaess","dwaeng","dwaej","dwaec","dwaek","dwaet","dwaep","dwaeh","doe","doeg","doegg","doegs","doen","doenj","doenh","doed","doel","doelg","doelm","doelb","doels","doelt","doelp","doelh","doem","doeb","doebs","does","doess","doeng","doej","doec","doek","doet","doep","doeh","dyo","dyog","dyogg","dyogs","dyon","dyonj","dyonh","dyod","dyol","dyolg","dyolm","dyolb","dyols","dyolt","dyolp","dyolh","dyom","dyob","dyobs","dyos","dyoss","dyong","dyoj","dyoc","dyok","dyot","dyop","dyoh","du","dug","dugg","dugs","dun","dunj","dunh","dud","dul","dulg","dulm","dulb","duls","dult","dulp","dulh","dum","dub","dubs","dus","duss","dung","duj","duc","duk","dut","dup","duh","dweo","dweog","dweogg","dweogs","dweon","dweonj","dweonh","dweod","dweol","dweolg","dweolm","dweolb","dweols","dweolt","dweolp","dweolh","dweom","dweob","dweobs","dweos","dweoss","dweong","dweoj","dweoc","dweok","dweot","dweop","dweoh","dwe","dweg","dwegg","dwegs","dwen","dwenj","dwenh","dwed","dwel","dwelg","dwelm","dwelb","dwels","dwelt","dwelp","dwelh","dwem","dweb","dwebs","dwes","dwess","dweng","dwej","dwec","dwek","dwet","dwep","dweh","dwi","dwig","dwigg","dwigs","dwin","dwinj","dwinh","dwid","dwil","dwilg","dwilm","dwilb","dwils","dwilt","dwilp","dwilh","dwim","dwib","dwibs","dwis","dwiss","dwing","dwij","dwic","dwik","dwit","dwip","dwih","dyu","dyug","dyugg","dyugs","dyun","dyunj","dyunh","dyud","dyul","dyulg","dyulm","dyulb","dyuls","dyult","dyulp","dyulh","dyum","dyub","dyubs","dyus","dyuss","dyung","dyuj","dyuc","dyuk","dyut","dyup","dyuh","deu","deug","deugg","deugs","deun","deunj","deunh","deud","deul","deulg","deulm","deulb","deuls","deult","deulp","deulh","deum","deub","deubs","deus","deuss","deung","deuj","deuc","deuk","deut","deup","deuh","dyi","dyig","dyigg","dyigs","dyin","dyinj","dyinh","dyid"]});var K7=b((j4e,Q7)=>{Q7.exports=["dyil","dyilg","dyilm","dyilb","dyils","dyilt","dyilp","dyilh","dyim","dyib","dyibs","dyis","dyiss","dying","dyij","dyic","dyik","dyit","dyip","dyih","di","dig","digg","digs","din","dinj","dinh","did","dil","dilg","dilm","dilb","dils","dilt","dilp","dilh","dim","dib","dibs","dis","diss","ding","dij","dic","dik","dit","dip","dih","dda","ddag","ddagg","ddags","ddan","ddanj","ddanh","ddad","ddal","ddalg","ddalm","ddalb","ddals","ddalt","ddalp","ddalh","ddam","ddab","ddabs","ddas","ddass","ddang","ddaj","ddac","ddak","ddat","ddap","ddah","ddae","ddaeg","ddaegg","ddaegs","ddaen","ddaenj","ddaenh","ddaed","ddael","ddaelg","ddaelm","ddaelb","ddaels","ddaelt","ddaelp","ddaelh","ddaem","ddaeb","ddaebs","ddaes","ddaess","ddaeng","ddaej","ddaec","ddaek","ddaet","ddaep","ddaeh","ddya","ddyag","ddyagg","ddyags","ddyan","ddyanj","ddyanh","ddyad","ddyal","ddyalg","ddyalm","ddyalb","ddyals","ddyalt","ddyalp","ddyalh","ddyam","ddyab","ddyabs","ddyas","ddyass","ddyang","ddyaj","ddyac","ddyak","ddyat","ddyap","ddyah","ddyae","ddyaeg","ddyaegg","ddyaegs","ddyaen","ddyaenj","ddyaenh","ddyaed","ddyael","ddyaelg","ddyaelm","ddyaelb","ddyaels","ddyaelt","ddyaelp","ddyaelh","ddyaem","ddyaeb","ddyaebs","ddyaes","ddyaess","ddyaeng","ddyaej","ddyaec","ddyaek","ddyaet","ddyaep","ddyaeh","ddeo","ddeog","ddeogg","ddeogs","ddeon","ddeonj","ddeonh","ddeod","ddeol","ddeolg","ddeolm","ddeolb","ddeols","ddeolt","ddeolp","ddeolh","ddeom","ddeob","ddeobs","ddeos","ddeoss","ddeong","ddeoj","ddeoc","ddeok","ddeot","ddeop","ddeoh","dde","ddeg","ddegg","ddegs","dden","ddenj","ddenh","dded","ddel","ddelg","ddelm","ddelb","ddels","ddelt","ddelp","ddelh","ddem","ddeb","ddebs","ddes","ddess","ddeng","ddej","ddec","ddek","ddet","ddep","ddeh","ddyeo","ddyeog","ddyeogg","ddyeogs","ddyeon","ddyeonj","ddyeonh","ddyeod","ddyeol","ddyeolg","ddyeolm","ddyeolb","ddyeols","ddyeolt","ddyeolp","ddyeolh","ddyeom","ddyeob","ddyeobs","ddyeos","ddyeoss","ddyeong","ddyeoj","ddyeoc","ddyeok","ddyeot","ddyeop","ddyeoh","ddye","ddyeg","ddyegg","ddyegs","ddyen","ddyenj","ddyenh","ddyed","ddyel","ddyelg","ddyelm","ddyelb"]});var V7=b((A4e,z7)=>{z7.exports=["ddyels","ddyelt","ddyelp","ddyelh","ddyem","ddyeb","ddyebs","ddyes","ddyess","ddyeng","ddyej","ddyec","ddyek","ddyet","ddyep","ddyeh","ddo","ddog","ddogg","ddogs","ddon","ddonj","ddonh","ddod","ddol","ddolg","ddolm","ddolb","ddols","ddolt","ddolp","ddolh","ddom","ddob","ddobs","ddos","ddoss","ddong","ddoj","ddoc","ddok","ddot","ddop","ddoh","ddwa","ddwag","ddwagg","ddwags","ddwan","ddwanj","ddwanh","ddwad","ddwal","ddwalg","ddwalm","ddwalb","ddwals","ddwalt","ddwalp","ddwalh","ddwam","ddwab","ddwabs","ddwas","ddwass","ddwang","ddwaj","ddwac","ddwak","ddwat","ddwap","ddwah","ddwae","ddwaeg","ddwaegg","ddwaegs","ddwaen","ddwaenj","ddwaenh","ddwaed","ddwael","ddwaelg","ddwaelm","ddwaelb","ddwaels","ddwaelt","ddwaelp","ddwaelh","ddwaem","ddwaeb","ddwaebs","ddwaes","ddwaess","ddwaeng","ddwaej","ddwaec","ddwaek","ddwaet","ddwaep","ddwaeh","ddoe","ddoeg","ddoegg","ddoegs","ddoen","ddoenj","ddoenh","ddoed","ddoel","ddoelg","ddoelm","ddoelb","ddoels","ddoelt","ddoelp","ddoelh","ddoem","ddoeb","ddoebs","ddoes","ddoess","ddoeng","ddoej","ddoec","ddoek","ddoet","ddoep","ddoeh","ddyo","ddyog","ddyogg","ddyogs","ddyon","ddyonj","ddyonh","ddyod","ddyol","ddyolg","ddyolm","ddyolb","ddyols","ddyolt","ddyolp","ddyolh","ddyom","ddyob","ddyobs","ddyos","ddyoss","ddyong","ddyoj","ddyoc","ddyok","ddyot","ddyop","ddyoh","ddu","ddug","ddugg","ddugs","ddun","ddunj","ddunh","ddud","ddul","ddulg","ddulm","ddulb","dduls","ddult","ddulp","ddulh","ddum","ddub","ddubs","ddus","dduss","ddung","dduj","dduc","dduk","ddut","ddup","dduh","ddweo","ddweog","ddweogg","ddweogs","ddweon","ddweonj","ddweonh","ddweod","ddweol","ddweolg","ddweolm","ddweolb","ddweols","ddweolt","ddweolp","ddweolh","ddweom","ddweob","ddweobs","ddweos","ddweoss","ddweong","ddweoj","ddweoc","ddweok","ddweot","ddweop","ddweoh","ddwe","ddweg","ddwegg","ddwegs","ddwen","ddwenj","ddwenh","ddwed","ddwel","ddwelg","ddwelm","ddwelb","ddwels","ddwelt","ddwelp","ddwelh","ddwem","ddweb","ddwebs","ddwes","ddwess","ddweng","ddwej","ddwec","ddwek","ddwet","ddwep","ddweh","ddwi","ddwig","ddwigg","ddwigs","ddwin","ddwinj","ddwinh","ddwid","ddwil","ddwilg","ddwilm","ddwilb","ddwils","ddwilt","ddwilp","ddwilh"]});var t9=b((O4e,e9)=>{e9.exports=["ddwim","ddwib","ddwibs","ddwis","ddwiss","ddwing","ddwij","ddwic","ddwik","ddwit","ddwip","ddwih","ddyu","ddyug","ddyugg","ddyugs","ddyun","ddyunj","ddyunh","ddyud","ddyul","ddyulg","ddyulm","ddyulb","ddyuls","ddyult","ddyulp","ddyulh","ddyum","ddyub","ddyubs","ddyus","ddyuss","ddyung","ddyuj","ddyuc","ddyuk","ddyut","ddyup","ddyuh","ddeu","ddeug","ddeugg","ddeugs","ddeun","ddeunj","ddeunh","ddeud","ddeul","ddeulg","ddeulm","ddeulb","ddeuls","ddeult","ddeulp","ddeulh","ddeum","ddeub","ddeubs","ddeus","ddeuss","ddeung","ddeuj","ddeuc","ddeuk","ddeut","ddeup","ddeuh","ddyi","ddyig","ddyigg","ddyigs","ddyin","ddyinj","ddyinh","ddyid","ddyil","ddyilg","ddyilm","ddyilb","ddyils","ddyilt","ddyilp","ddyilh","ddyim","ddyib","ddyibs","ddyis","ddyiss","ddying","ddyij","ddyic","ddyik","ddyit","ddyip","ddyih","ddi","ddig","ddigg","ddigs","ddin","ddinj","ddinh","ddid","ddil","ddilg","ddilm","ddilb","ddils","ddilt","ddilp","ddilh","ddim","ddib","ddibs","ddis","ddiss","dding","ddij","ddic","ddik","ddit","ddip","ddih","ra","rag","ragg","rags","ran","ranj","ranh","rad","ral","ralg","ralm","ralb","rals","ralt","ralp","ralh","ram","rab","rabs","ras","rass","rang","raj","rac","rak","rat","rap","rah","rae","raeg","raegg","raegs","raen","raenj","raenh","raed","rael","raelg","raelm","raelb","raels","raelt","raelp","raelh","raem","raeb","raebs","raes","raess","raeng","raej","raec","raek","raet","raep","raeh","rya","ryag","ryagg","ryags","ryan","ryanj","ryanh","ryad","ryal","ryalg","ryalm","ryalb","ryals","ryalt","ryalp","ryalh","ryam","ryab","ryabs","ryas","ryass","ryang","ryaj","ryac","ryak","ryat","ryap","ryah","ryae","ryaeg","ryaegg","ryaegs","ryaen","ryaenj","ryaenh","ryaed","ryael","ryaelg","ryaelm","ryaelb","ryaels","ryaelt","ryaelp","ryaelh","ryaem","ryaeb","ryaebs","ryaes","ryaess","ryaeng","ryaej","ryaec","ryaek","ryaet","ryaep","ryaeh","reo","reog","reogg","reogs","reon","reonj","reonh","reod","reol","reolg","reolm","reolb","reols","reolt","reolp","reolh","reom","reob","reobs","reos"]});var n9=b((M4e,i9)=>{i9.exports=["reoss","reong","reoj","reoc","reok","reot","reop","reoh","re","reg","regg","regs","ren","renj","renh","red","rel","relg","relm","relb","rels","relt","relp","relh","rem","reb","rebs","res","ress","reng","rej","rec","rek","ret","rep","reh","ryeo","ryeog","ryeogg","ryeogs","ryeon","ryeonj","ryeonh","ryeod","ryeol","ryeolg","ryeolm","ryeolb","ryeols","ryeolt","ryeolp","ryeolh","ryeom","ryeob","ryeobs","ryeos","ryeoss","ryeong","ryeoj","ryeoc","ryeok","ryeot","ryeop","ryeoh","rye","ryeg","ryegg","ryegs","ryen","ryenj","ryenh","ryed","ryel","ryelg","ryelm","ryelb","ryels","ryelt","ryelp","ryelh","ryem","ryeb","ryebs","ryes","ryess","ryeng","ryej","ryec","ryek","ryet","ryep","ryeh","ro","rog","rogg","rogs","ron","ronj","ronh","rod","rol","rolg","rolm","rolb","rols","rolt","rolp","rolh","rom","rob","robs","ros","ross","rong","roj","roc","rok","rot","rop","roh","rwa","rwag","rwagg","rwags","rwan","rwanj","rwanh","rwad","rwal","rwalg","rwalm","rwalb","rwals","rwalt","rwalp","rwalh","rwam","rwab","rwabs","rwas","rwass","rwang","rwaj","rwac","rwak","rwat","rwap","rwah","rwae","rwaeg","rwaegg","rwaegs","rwaen","rwaenj","rwaenh","rwaed","rwael","rwaelg","rwaelm","rwaelb","rwaels","rwaelt","rwaelp","rwaelh","rwaem","rwaeb","rwaebs","rwaes","rwaess","rwaeng","rwaej","rwaec","rwaek","rwaet","rwaep","rwaeh","roe","roeg","roegg","roegs","roen","roenj","roenh","roed","roel","roelg","roelm","roelb","roels","roelt","roelp","roelh","roem","roeb","roebs","roes","roess","roeng","roej","roec","roek","roet","roep","roeh","ryo","ryog","ryogg","ryogs","ryon","ryonj","ryonh","ryod","ryol","ryolg","ryolm","ryolb","ryols","ryolt","ryolp","ryolh","ryom","ryob","ryobs","ryos","ryoss","ryong","ryoj","ryoc","ryok","ryot","ryop","ryoh","ru","rug","rugg","rugs","run","runj","runh","rud","rul","rulg","rulm","rulb","ruls","rult","rulp","rulh","rum","rub","rubs","rus","russ","rung","ruj","ruc"]});var o9=b((N4e,r9)=>{r9.exports=["ruk","rut","rup","ruh","rweo","rweog","rweogg","rweogs","rweon","rweonj","rweonh","rweod","rweol","rweolg","rweolm","rweolb","rweols","rweolt","rweolp","rweolh","rweom","rweob","rweobs","rweos","rweoss","rweong","rweoj","rweoc","rweok","rweot","rweop","rweoh","rwe","rweg","rwegg","rwegs","rwen","rwenj","rwenh","rwed","rwel","rwelg","rwelm","rwelb","rwels","rwelt","rwelp","rwelh","rwem","rweb","rwebs","rwes","rwess","rweng","rwej","rwec","rwek","rwet","rwep","rweh","rwi","rwig","rwigg","rwigs","rwin","rwinj","rwinh","rwid","rwil","rwilg","rwilm","rwilb","rwils","rwilt","rwilp","rwilh","rwim","rwib","rwibs","rwis","rwiss","rwing","rwij","rwic","rwik","rwit","rwip","rwih","ryu","ryug","ryugg","ryugs","ryun","ryunj","ryunh","ryud","ryul","ryulg","ryulm","ryulb","ryuls","ryult","ryulp","ryulh","ryum","ryub","ryubs","ryus","ryuss","ryung","ryuj","ryuc","ryuk","ryut","ryup","ryuh","reu","reug","reugg","reugs","reun","reunj","reunh","reud","reul","reulg","reulm","reulb","reuls","reult","reulp","reulh","reum","reub","reubs","reus","reuss","reung","reuj","reuc","reuk","reut","reup","reuh","ryi","ryig","ryigg","ryigs","ryin","ryinj","ryinh","ryid","ryil","ryilg","ryilm","ryilb","ryils","ryilt","ryilp","ryilh","ryim","ryib","ryibs","ryis","ryiss","rying","ryij","ryic","ryik","ryit","ryip","ryih","ri","rig","rigg","rigs","rin","rinj","rinh","rid","ril","rilg","rilm","rilb","rils","rilt","rilp","rilh","rim","rib","ribs","ris","riss","ring","rij","ric","rik","rit","rip","rih","ma","mag","magg","mags","man","manj","manh","mad","mal","malg","malm","malb","mals","malt","malp","malh","mam","mab","mabs","mas","mass","mang","maj","mac","mak","mat","map","mah","mae","maeg","maegg","maegs","maen","maenj","maenh","maed","mael","maelg","maelm","maelb","maels","maelt","maelp","maelh","maem","maeb","maebs","maes","maess","maeng","maej","maec","maek","maet","maep","maeh"]});var a9=b((B4e,s9)=>{s9.exports=["mya","myag","myagg","myags","myan","myanj","myanh","myad","myal","myalg","myalm","myalb","myals","myalt","myalp","myalh","myam","myab","myabs","myas","myass","myang","myaj","myac","myak","myat","myap","myah","myae","myaeg","myaegg","myaegs","myaen","myaenj","myaenh","myaed","myael","myaelg","myaelm","myaelb","myaels","myaelt","myaelp","myaelh","myaem","myaeb","myaebs","myaes","myaess","myaeng","myaej","myaec","myaek","myaet","myaep","myaeh","meo","meog","meogg","meogs","meon","meonj","meonh","meod","meol","meolg","meolm","meolb","meols","meolt","meolp","meolh","meom","meob","meobs","meos","meoss","meong","meoj","meoc","meok","meot","meop","meoh","me","meg","megg","megs","men","menj","menh","med","mel","melg","melm","melb","mels","melt","melp","melh","mem","meb","mebs","mes","mess","meng","mej","mec","mek","met","mep","meh","myeo","myeog","myeogg","myeogs","myeon","myeonj","myeonh","myeod","myeol","myeolg","myeolm","myeolb","myeols","myeolt","myeolp","myeolh","myeom","myeob","myeobs","myeos","myeoss","myeong","myeoj","myeoc","myeok","myeot","myeop","myeoh","mye","myeg","myegg","myegs","myen","myenj","myenh","myed","myel","myelg","myelm","myelb","myels","myelt","myelp","myelh","myem","myeb","myebs","myes","myess","myeng","myej","myec","myek","myet","myep","myeh","mo","mog","mogg","mogs","mon","monj","monh","mod","mol","molg","molm","molb","mols","molt","molp","molh","mom","mob","mobs","mos","moss","mong","moj","moc","mok","mot","mop","moh","mwa","mwag","mwagg","mwags","mwan","mwanj","mwanh","mwad","mwal","mwalg","mwalm","mwalb","mwals","mwalt","mwalp","mwalh","mwam","mwab","mwabs","mwas","mwass","mwang","mwaj","mwac","mwak","mwat","mwap","mwah","mwae","mwaeg","mwaegg","mwaegs","mwaen","mwaenj","mwaenh","mwaed","mwael","mwaelg","mwaelm","mwaelb","mwaels","mwaelt","mwaelp","mwaelh","mwaem","mwaeb","mwaebs","mwaes","mwaess","mwaeng","mwaej","mwaec","mwaek","mwaet","mwaep","mwaeh","moe","moeg","moegg","moegs"]});var u9=b((H4e,l9)=>{l9.exports=["moen","moenj","moenh","moed","moel","moelg","moelm","moelb","moels","moelt","moelp","moelh","moem","moeb","moebs","moes","moess","moeng","moej","moec","moek","moet","moep","moeh","myo","myog","myogg","myogs","myon","myonj","myonh","myod","myol","myolg","myolm","myolb","myols","myolt","myolp","myolh","myom","myob","myobs","myos","myoss","myong","myoj","myoc","myok","myot","myop","myoh","mu","mug","mugg","mugs","mun","munj","munh","mud","mul","mulg","mulm","mulb","muls","mult","mulp","mulh","mum","mub","mubs","mus","muss","mung","muj","muc","muk","mut","mup","muh","mweo","mweog","mweogg","mweogs","mweon","mweonj","mweonh","mweod","mweol","mweolg","mweolm","mweolb","mweols","mweolt","mweolp","mweolh","mweom","mweob","mweobs","mweos","mweoss","mweong","mweoj","mweoc","mweok","mweot","mweop","mweoh","mwe","mweg","mwegg","mwegs","mwen","mwenj","mwenh","mwed","mwel","mwelg","mwelm","mwelb","mwels","mwelt","mwelp","mwelh","mwem","mweb","mwebs","mwes","mwess","mweng","mwej","mwec","mwek","mwet","mwep","mweh","mwi","mwig","mwigg","mwigs","mwin","mwinj","mwinh","mwid","mwil","mwilg","mwilm","mwilb","mwils","mwilt","mwilp","mwilh","mwim","mwib","mwibs","mwis","mwiss","mwing","mwij","mwic","mwik","mwit","mwip","mwih","myu","myug","myugg","myugs","myun","myunj","myunh","myud","myul","myulg","myulm","myulb","myuls","myult","myulp","myulh","myum","myub","myubs","myus","myuss","myung","myuj","myuc","myuk","myut","myup","myuh","meu","meug","meugg","meugs","meun","meunj","meunh","meud","meul","meulg","meulm","meulb","meuls","meult","meulp","meulh","meum","meub","meubs","meus","meuss","meung","meuj","meuc","meuk","meut","meup","meuh","myi","myig","myigg","myigs","myin","myinj","myinh","myid","myil","myilg","myilm","myilb","myils","myilt","myilp","myilh","myim","myib","myibs","myis","myiss","mying","myij","myic","myik","myit","myip","myih","mi","mig","migg","migs","min","minj","minh","mid"]});var h9=b((q4e,c9)=>{c9.exports=["mil","milg","milm","milb","mils","milt","milp","milh","mim","mib","mibs","mis","miss","ming","mij","mic","mik","mit","mip","mih","ba","bag","bagg","bags","ban","banj","banh","bad","bal","balg","balm","balb","bals","balt","balp","balh","bam","bab","babs","bas","bass","bang","baj","bac","bak","bat","bap","bah","bae","baeg","baegg","baegs","baen","baenj","baenh","baed","bael","baelg","baelm","baelb","baels","baelt","baelp","baelh","baem","baeb","baebs","baes","baess","baeng","baej","baec","baek","baet","baep","baeh","bya","byag","byagg","byags","byan","byanj","byanh","byad","byal","byalg","byalm","byalb","byals","byalt","byalp","byalh","byam","byab","byabs","byas","byass","byang","byaj","byac","byak","byat","byap","byah","byae","byaeg","byaegg","byaegs","byaen","byaenj","byaenh","byaed","byael","byaelg","byaelm","byaelb","byaels","byaelt","byaelp","byaelh","byaem","byaeb","byaebs","byaes","byaess","byaeng","byaej","byaec","byaek","byaet","byaep","byaeh","beo","beog","beogg","beogs","beon","beonj","beonh","beod","beol","beolg","beolm","beolb","beols","beolt","beolp","beolh","beom","beob","beobs","beos","beoss","beong","beoj","beoc","beok","beot","beop","beoh","be","beg","begg","begs","ben","benj","benh","bed","bel","belg","belm","belb","bels","belt","belp","belh","bem","beb","bebs","bes","bess","beng","bej","bec","bek","bet","bep","beh","byeo","byeog","byeogg","byeogs","byeon","byeonj","byeonh","byeod","byeol","byeolg","byeolm","byeolb","byeols","byeolt","byeolp","byeolh","byeom","byeob","byeobs","byeos","byeoss","byeong","byeoj","byeoc","byeok","byeot","byeop","byeoh","bye","byeg","byegg","byegs","byen","byenj","byenh","byed","byel","byelg","byelm","byelb","byels","byelt","byelp","byelh","byem","byeb","byebs","byes","byess","byeng","byej","byec","byek","byet","byep","byeh","bo","bog","bogg","bogs","bon","bonj","bonh","bod","bol","bolg","bolm","bolb"]});var g9=b((Y4e,d9)=>{d9.exports=["bols","bolt","bolp","bolh","bom","bob","bobs","bos","boss","bong","boj","boc","bok","bot","bop","boh","bwa","bwag","bwagg","bwags","bwan","bwanj","bwanh","bwad","bwal","bwalg","bwalm","bwalb","bwals","bwalt","bwalp","bwalh","bwam","bwab","bwabs","bwas","bwass","bwang","bwaj","bwac","bwak","bwat","bwap","bwah","bwae","bwaeg","bwaegg","bwaegs","bwaen","bwaenj","bwaenh","bwaed","bwael","bwaelg","bwaelm","bwaelb","bwaels","bwaelt","bwaelp","bwaelh","bwaem","bwaeb","bwaebs","bwaes","bwaess","bwaeng","bwaej","bwaec","bwaek","bwaet","bwaep","bwaeh","boe","boeg","boegg","boegs","boen","boenj","boenh","boed","boel","boelg","boelm","boelb","boels","boelt","boelp","boelh","boem","boeb","boebs","boes","boess","boeng","boej","boec","boek","boet","boep","boeh","byo","byog","byogg","byogs","byon","byonj","byonh","byod","byol","byolg","byolm","byolb","byols","byolt","byolp","byolh","byom","byob","byobs","byos","byoss","byong","byoj","byoc","byok","byot","byop","byoh","bu","bug","bugg","bugs","bun","bunj","bunh","bud","bul","bulg","bulm","bulb","buls","bult","bulp","bulh","bum","bub","bubs","bus","buss","bung","buj","buc","buk","but","bup","buh","bweo","bweog","bweogg","bweogs","bweon","bweonj","bweonh","bweod","bweol","bweolg","bweolm","bweolb","bweols","bweolt","bweolp","bweolh","bweom","bweob","bweobs","bweos","bweoss","bweong","bweoj","bweoc","bweok","bweot","bweop","bweoh","bwe","bweg","bwegg","bwegs","bwen","bwenj","bwenh","bwed","bwel","bwelg","bwelm","bwelb","bwels","bwelt","bwelp","bwelh","bwem","bweb","bwebs","bwes","bwess","bweng","bwej","bwec","bwek","bwet","bwep","bweh","bwi","bwig","bwigg","bwigs","bwin","bwinj","bwinh","bwid","bwil","bwilg","bwilm","bwilb","bwils","bwilt","bwilp","bwilh","bwim","bwib","bwibs","bwis","bwiss","bwing","bwij","bwic","bwik","bwit","bwip","bwih","byu","byug","byugg","byugs","byun","byunj","byunh","byud","byul","byulg","byulm","byulb","byuls","byult","byulp","byulh"]});var p9=b((W4e,f9)=>{f9.exports=["byum","byub","byubs","byus","byuss","byung","byuj","byuc","byuk","byut","byup","byuh","beu","beug","beugg","beugs","beun","beunj","beunh","beud","beul","beulg","beulm","beulb","beuls","beult","beulp","beulh","beum","beub","beubs","beus","beuss","beung","beuj","beuc","beuk","beut","beup","beuh","byi","byig","byigg","byigs","byin","byinj","byinh","byid","byil","byilg","byilm","byilb","byils","byilt","byilp","byilh","byim","byib","byibs","byis","byiss","bying","byij","byic","byik","byit","byip","byih","bi","big","bigg","bigs","bin","binj","binh","bid","bil","bilg","bilm","bilb","bils","bilt","bilp","bilh","bim","bib","bibs","bis","biss","bing","bij","bic","bik","bit","bip","bih","bba","bbag","bbagg","bbags","bban","bbanj","bbanh","bbad","bbal","bbalg","bbalm","bbalb","bbals","bbalt","bbalp","bbalh","bbam","bbab","bbabs","bbas","bbass","bbang","bbaj","bbac","bbak","bbat","bbap","bbah","bbae","bbaeg","bbaegg","bbaegs","bbaen","bbaenj","bbaenh","bbaed","bbael","bbaelg","bbaelm","bbaelb","bbaels","bbaelt","bbaelp","bbaelh","bbaem","bbaeb","bbaebs","bbaes","bbaess","bbaeng","bbaej","bbaec","bbaek","bbaet","bbaep","bbaeh","bbya","bbyag","bbyagg","bbyags","bbyan","bbyanj","bbyanh","bbyad","bbyal","bbyalg","bbyalm","bbyalb","bbyals","bbyalt","bbyalp","bbyalh","bbyam","bbyab","bbyabs","bbyas","bbyass","bbyang","bbyaj","bbyac","bbyak","bbyat","bbyap","bbyah","bbyae","bbyaeg","bbyaegg","bbyaegs","bbyaen","bbyaenj","bbyaenh","bbyaed","bbyael","bbyaelg","bbyaelm","bbyaelb","bbyaels","bbyaelt","bbyaelp","bbyaelh","bbyaem","bbyaeb","bbyaebs","bbyaes","bbyaess","bbyaeng","bbyaej","bbyaec","bbyaek","bbyaet","bbyaep","bbyaeh","bbeo","bbeog","bbeogg","bbeogs","bbeon","bbeonj","bbeonh","bbeod","bbeol","bbeolg","bbeolm","bbeolb","bbeols","bbeolt","bbeolp","bbeolh","bbeom","bbeob","bbeobs","bbeos","bbeoss","bbeong","bbeoj","bbeoc","bbeok","bbeot","bbeop","bbeoh","bbe","bbeg","bbegg","bbegs","bben","bbenj","bbenh","bbed","bbel","bbelg","bbelm","bbelb","bbels","bbelt","bbelp","bbelh","bbem","bbeb","bbebs","bbes"]});var b9=b((Z4e,m9)=>{m9.exports=["bbess","bbeng","bbej","bbec","bbek","bbet","bbep","bbeh","bbyeo","bbyeog","bbyeogg","bbyeogs","bbyeon","bbyeonj","bbyeonh","bbyeod","bbyeol","bbyeolg","bbyeolm","bbyeolb","bbyeols","bbyeolt","bbyeolp","bbyeolh","bbyeom","bbyeob","bbyeobs","bbyeos","bbyeoss","bbyeong","bbyeoj","bbyeoc","bbyeok","bbyeot","bbyeop","bbyeoh","bbye","bbyeg","bbyegg","bbyegs","bbyen","bbyenj","bbyenh","bbyed","bbyel","bbyelg","bbyelm","bbyelb","bbyels","bbyelt","bbyelp","bbyelh","bbyem","bbyeb","bbyebs","bbyes","bbyess","bbyeng","bbyej","bbyec","bbyek","bbyet","bbyep","bbyeh","bbo","bbog","bbogg","bbogs","bbon","bbonj","bbonh","bbod","bbol","bbolg","bbolm","bbolb","bbols","bbolt","bbolp","bbolh","bbom","bbob","bbobs","bbos","bboss","bbong","bboj","bboc","bbok","bbot","bbop","bboh","bbwa","bbwag","bbwagg","bbwags","bbwan","bbwanj","bbwanh","bbwad","bbwal","bbwalg","bbwalm","bbwalb","bbwals","bbwalt","bbwalp","bbwalh","bbwam","bbwab","bbwabs","bbwas","bbwass","bbwang","bbwaj","bbwac","bbwak","bbwat","bbwap","bbwah","bbwae","bbwaeg","bbwaegg","bbwaegs","bbwaen","bbwaenj","bbwaenh","bbwaed","bbwael","bbwaelg","bbwaelm","bbwaelb","bbwaels","bbwaelt","bbwaelp","bbwaelh","bbwaem","bbwaeb","bbwaebs","bbwaes","bbwaess","bbwaeng","bbwaej","bbwaec","bbwaek","bbwaet","bbwaep","bbwaeh","bboe","bboeg","bboegg","bboegs","bboen","bboenj","bboenh","bboed","bboel","bboelg","bboelm","bboelb","bboels","bboelt","bboelp","bboelh","bboem","bboeb","bboebs","bboes","bboess","bboeng","bboej","bboec","bboek","bboet","bboep","bboeh","bbyo","bbyog","bbyogg","bbyogs","bbyon","bbyonj","bbyonh","bbyod","bbyol","bbyolg","bbyolm","bbyolb","bbyols","bbyolt","bbyolp","bbyolh","bbyom","bbyob","bbyobs","bbyos","bbyoss","bbyong","bbyoj","bbyoc","bbyok","bbyot","bbyop","bbyoh","bbu","bbug","bbugg","bbugs","bbun","bbunj","bbunh","bbud","bbul","bbulg","bbulm","bbulb","bbuls","bbult","bbulp","bbulh","bbum","bbub","bbubs","bbus","bbuss","bbung","bbuj","bbuc","bbuk","bbut","bbup","bbuh","bbweo","bbweog","bbweogg","bbweogs","bbweon","bbweonj","bbweonh","bbweod","bbweol","bbweolg","bbweolm","bbweolb","bbweols","bbweolt","bbweolp","bbweolh","bbweom","bbweob","bbweobs","bbweos","bbweoss","bbweong","bbweoj","bbweoc"]});var v9=b((J4e,y9)=>{y9.exports=["bbweok","bbweot","bbweop","bbweoh","bbwe","bbweg","bbwegg","bbwegs","bbwen","bbwenj","bbwenh","bbwed","bbwel","bbwelg","bbwelm","bbwelb","bbwels","bbwelt","bbwelp","bbwelh","bbwem","bbweb","bbwebs","bbwes","bbwess","bbweng","bbwej","bbwec","bbwek","bbwet","bbwep","bbweh","bbwi","bbwig","bbwigg","bbwigs","bbwin","bbwinj","bbwinh","bbwid","bbwil","bbwilg","bbwilm","bbwilb","bbwils","bbwilt","bbwilp","bbwilh","bbwim","bbwib","bbwibs","bbwis","bbwiss","bbwing","bbwij","bbwic","bbwik","bbwit","bbwip","bbwih","bbyu","bbyug","bbyugg","bbyugs","bbyun","bbyunj","bbyunh","bbyud","bbyul","bbyulg","bbyulm","bbyulb","bbyuls","bbyult","bbyulp","bbyulh","bbyum","bbyub","bbyubs","bbyus","bbyuss","bbyung","bbyuj","bbyuc","bbyuk","bbyut","bbyup","bbyuh","bbeu","bbeug","bbeugg","bbeugs","bbeun","bbeunj","bbeunh","bbeud","bbeul","bbeulg","bbeulm","bbeulb","bbeuls","bbeult","bbeulp","bbeulh","bbeum","bbeub","bbeubs","bbeus","bbeuss","bbeung","bbeuj","bbeuc","bbeuk","bbeut","bbeup","bbeuh","bbyi","bbyig","bbyigg","bbyigs","bbyin","bbyinj","bbyinh","bbyid","bbyil","bbyilg","bbyilm","bbyilb","bbyils","bbyilt","bbyilp","bbyilh","bbyim","bbyib","bbyibs","bbyis","bbyiss","bbying","bbyij","bbyic","bbyik","bbyit","bbyip","bbyih","bbi","bbig","bbigg","bbigs","bbin","bbinj","bbinh","bbid","bbil","bbilg","bbilm","bbilb","bbils","bbilt","bbilp","bbilh","bbim","bbib","bbibs","bbis","bbiss","bbing","bbij","bbic","bbik","bbit","bbip","bbih","sa","sag","sagg","sags","san","sanj","sanh","sad","sal","salg","salm","salb","sals","salt","salp","salh","sam","sab","sabs","sas","sass","sang","saj","sac","sak","sat","sap","sah","sae","saeg","saegg","saegs","saen","saenj","saenh","saed","sael","saelg","saelm","saelb","saels","saelt","saelp","saelh","saem","saeb","saebs","saes","saess","saeng","saej","saec","saek","saet","saep","saeh","sya","syag","syagg","syags","syan","syanj","syanh","syad","syal","syalg","syalm","syalb","syals","syalt","syalp","syalh","syam","syab","syabs","syas","syass","syang","syaj","syac","syak","syat","syap","syah"]});var D9=b(($4e,w9)=>{w9.exports=["syae","syaeg","syaegg","syaegs","syaen","syaenj","syaenh","syaed","syael","syaelg","syaelm","syaelb","syaels","syaelt","syaelp","syaelh","syaem","syaeb","syaebs","syaes","syaess","syaeng","syaej","syaec","syaek","syaet","syaep","syaeh","seo","seog","seogg","seogs","seon","seonj","seonh","seod","seol","seolg","seolm","seolb","seols","seolt","seolp","seolh","seom","seob","seobs","seos","seoss","seong","seoj","seoc","seok","seot","seop","seoh","se","seg","segg","segs","sen","senj","senh","sed","sel","selg","selm","selb","sels","selt","selp","selh","sem","seb","sebs","ses","sess","seng","sej","sec","sek","set","sep","seh","syeo","syeog","syeogg","syeogs","syeon","syeonj","syeonh","syeod","syeol","syeolg","syeolm","syeolb","syeols","syeolt","syeolp","syeolh","syeom","syeob","syeobs","syeos","syeoss","syeong","syeoj","syeoc","syeok","syeot","syeop","syeoh","sye","syeg","syegg","syegs","syen","syenj","syenh","syed","syel","syelg","syelm","syelb","syels","syelt","syelp","syelh","syem","syeb","syebs","syes","syess","syeng","syej","syec","syek","syet","syep","syeh","so","sog","sogg","sogs","son","sonj","sonh","sod","sol","solg","solm","solb","sols","solt","solp","solh","som","sob","sobs","sos","soss","song","soj","soc","sok","sot","sop","soh","swa","swag","swagg","swags","swan","swanj","swanh","swad","swal","swalg","swalm","swalb","swals","swalt","swalp","swalh","swam","swab","swabs","swas","swass","swang","swaj","swac","swak","swat","swap","swah","swae","swaeg","swaegg","swaegs","swaen","swaenj","swaenh","swaed","swael","swaelg","swaelm","swaelb","swaels","swaelt","swaelp","swaelh","swaem","swaeb","swaebs","swaes","swaess","swaeng","swaej","swaec","swaek","swaet","swaep","swaeh","soe","soeg","soegg","soegs","soen","soenj","soenh","soed","soel","soelg","soelm","soelb","soels","soelt","soelp","soelh","soem","soeb","soebs","soes","soess","soeng","soej","soec","soek","soet","soep","soeh","syo","syog","syogg","syogs"]});var x9=b((X4e,C9)=>{C9.exports=["syon","syonj","syonh","syod","syol","syolg","syolm","syolb","syols","syolt","syolp","syolh","syom","syob","syobs","syos","syoss","syong","syoj","syoc","syok","syot","syop","syoh","su","sug","sugg","sugs","sun","sunj","sunh","sud","sul","sulg","sulm","sulb","suls","sult","sulp","sulh","sum","sub","subs","sus","suss","sung","suj","suc","suk","sut","sup","suh","sweo","sweog","sweogg","sweogs","sweon","sweonj","sweonh","sweod","sweol","sweolg","sweolm","sweolb","sweols","sweolt","sweolp","sweolh","sweom","sweob","sweobs","sweos","sweoss","sweong","sweoj","sweoc","sweok","sweot","sweop","sweoh","swe","sweg","swegg","swegs","swen","swenj","swenh","swed","swel","swelg","swelm","swelb","swels","swelt","swelp","swelh","swem","sweb","swebs","swes","swess","sweng","swej","swec","swek","swet","swep","sweh","swi","swig","swigg","swigs","swin","swinj","swinh","swid","swil","swilg","swilm","swilb","swils","swilt","swilp","swilh","swim","swib","swibs","swis","swiss","swing","swij","swic","swik","swit","swip","swih","syu","syug","syugg","syugs","syun","syunj","syunh","syud","syul","syulg","syulm","syulb","syuls","syult","syulp","syulh","syum","syub","syubs","syus","syuss","syung","syuj","syuc","syuk","syut","syup","syuh","seu","seug","seugg","seugs","seun","seunj","seunh","seud","seul","seulg","seulm","seulb","seuls","seult","seulp","seulh","seum","seub","seubs","seus","seuss","seung","seuj","seuc","seuk","seut","seup","seuh","syi","syig","syigg","syigs","syin","syinj","syinh","syid","syil","syilg","syilm","syilb","syils","syilt","syilp","syilh","syim","syib","syibs","syis","syiss","sying","syij","syic","syik","syit","syip","syih","si","sig","sigg","sigs","sin","sinj","sinh","sid","sil","silg","silm","silb","sils","silt","silp","silh","sim","sib","sibs","sis","siss","sing","sij","sic","sik","sit","sip","sih","ssa","ssag","ssagg","ssags","ssan","ssanj","ssanh","ssad"]});var T9=b((U4e,S9)=>{S9.exports=["ssal","ssalg","ssalm","ssalb","ssals","ssalt","ssalp","ssalh","ssam","ssab","ssabs","ssas","ssass","ssang","ssaj","ssac","ssak","ssat","ssap","ssah","ssae","ssaeg","ssaegg","ssaegs","ssaen","ssaenj","ssaenh","ssaed","ssael","ssaelg","ssaelm","ssaelb","ssaels","ssaelt","ssaelp","ssaelh","ssaem","ssaeb","ssaebs","ssaes","ssaess","ssaeng","ssaej","ssaec","ssaek","ssaet","ssaep","ssaeh","ssya","ssyag","ssyagg","ssyags","ssyan","ssyanj","ssyanh","ssyad","ssyal","ssyalg","ssyalm","ssyalb","ssyals","ssyalt","ssyalp","ssyalh","ssyam","ssyab","ssyabs","ssyas","ssyass","ssyang","ssyaj","ssyac","ssyak","ssyat","ssyap","ssyah","ssyae","ssyaeg","ssyaegg","ssyaegs","ssyaen","ssyaenj","ssyaenh","ssyaed","ssyael","ssyaelg","ssyaelm","ssyaelb","ssyaels","ssyaelt","ssyaelp","ssyaelh","ssyaem","ssyaeb","ssyaebs","ssyaes","ssyaess","ssyaeng","ssyaej","ssyaec","ssyaek","ssyaet","ssyaep","ssyaeh","sseo","sseog","sseogg","sseogs","sseon","sseonj","sseonh","sseod","sseol","sseolg","sseolm","sseolb","sseols","sseolt","sseolp","sseolh","sseom","sseob","sseobs","sseos","sseoss","sseong","sseoj","sseoc","sseok","sseot","sseop","sseoh","sse","sseg","ssegg","ssegs","ssen","ssenj","ssenh","ssed","ssel","sselg","sselm","sselb","ssels","sselt","sselp","sselh","ssem","sseb","ssebs","sses","ssess","sseng","ssej","ssec","ssek","sset","ssep","sseh","ssyeo","ssyeog","ssyeogg","ssyeogs","ssyeon","ssyeonj","ssyeonh","ssyeod","ssyeol","ssyeolg","ssyeolm","ssyeolb","ssyeols","ssyeolt","ssyeolp","ssyeolh","ssyeom","ssyeob","ssyeobs","ssyeos","ssyeoss","ssyeong","ssyeoj","ssyeoc","ssyeok","ssyeot","ssyeop","ssyeoh","ssye","ssyeg","ssyegg","ssyegs","ssyen","ssyenj","ssyenh","ssyed","ssyel","ssyelg","ssyelm","ssyelb","ssyels","ssyelt","ssyelp","ssyelh","ssyem","ssyeb","ssyebs","ssyes","ssyess","ssyeng","ssyej","ssyec","ssyek","ssyet","ssyep","ssyeh","sso","ssog","ssogg","ssogs","sson","ssonj","ssonh","ssod","ssol","ssolg","ssolm","ssolb","ssols","ssolt","ssolp","ssolh","ssom","ssob","ssobs","ssos","ssoss","ssong","ssoj","ssoc","ssok","ssot","ssop","ssoh","sswa","sswag","sswagg","sswags","sswan","sswanj","sswanh","sswad","sswal","sswalg","sswalm","sswalb"]});var E9=b((G4e,k9)=>{k9.exports=["sswals","sswalt","sswalp","sswalh","sswam","sswab","sswabs","sswas","sswass","sswang","sswaj","sswac","sswak","sswat","sswap","sswah","sswae","sswaeg","sswaegg","sswaegs","sswaen","sswaenj","sswaenh","sswaed","sswael","sswaelg","sswaelm","sswaelb","sswaels","sswaelt","sswaelp","sswaelh","sswaem","sswaeb","sswaebs","sswaes","sswaess","sswaeng","sswaej","sswaec","sswaek","sswaet","sswaep","sswaeh","ssoe","ssoeg","ssoegg","ssoegs","ssoen","ssoenj","ssoenh","ssoed","ssoel","ssoelg","ssoelm","ssoelb","ssoels","ssoelt","ssoelp","ssoelh","ssoem","ssoeb","ssoebs","ssoes","ssoess","ssoeng","ssoej","ssoec","ssoek","ssoet","ssoep","ssoeh","ssyo","ssyog","ssyogg","ssyogs","ssyon","ssyonj","ssyonh","ssyod","ssyol","ssyolg","ssyolm","ssyolb","ssyols","ssyolt","ssyolp","ssyolh","ssyom","ssyob","ssyobs","ssyos","ssyoss","ssyong","ssyoj","ssyoc","ssyok","ssyot","ssyop","ssyoh","ssu","ssug","ssugg","ssugs","ssun","ssunj","ssunh","ssud","ssul","ssulg","ssulm","ssulb","ssuls","ssult","ssulp","ssulh","ssum","ssub","ssubs","ssus","ssuss","ssung","ssuj","ssuc","ssuk","ssut","ssup","ssuh","ssweo","ssweog","ssweogg","ssweogs","ssweon","ssweonj","ssweonh","ssweod","ssweol","ssweolg","ssweolm","ssweolb","ssweols","ssweolt","ssweolp","ssweolh","ssweom","ssweob","ssweobs","ssweos","ssweoss","ssweong","ssweoj","ssweoc","ssweok","ssweot","ssweop","ssweoh","sswe","ssweg","sswegg","sswegs","sswen","sswenj","sswenh","sswed","sswel","sswelg","sswelm","sswelb","sswels","sswelt","sswelp","sswelh","sswem","ssweb","sswebs","sswes","sswess","ssweng","sswej","sswec","sswek","sswet","sswep","ssweh","sswi","sswig","sswigg","sswigs","sswin","sswinj","sswinh","sswid","sswil","sswilg","sswilm","sswilb","sswils","sswilt","sswilp","sswilh","sswim","sswib","sswibs","sswis","sswiss","sswing","sswij","sswic","sswik","sswit","sswip","sswih","ssyu","ssyug","ssyugg","ssyugs","ssyun","ssyunj","ssyunh","ssyud","ssyul","ssyulg","ssyulm","ssyulb","ssyuls","ssyult","ssyulp","ssyulh","ssyum","ssyub","ssyubs","ssyus","ssyuss","ssyung","ssyuj","ssyuc","ssyuk","ssyut","ssyup","ssyuh","sseu","sseug","sseugg","sseugs","sseun","sseunj","sseunh","sseud","sseul","sseulg","sseulm","sseulb","sseuls","sseult","sseulp","sseulh"]});var _9=b((Q4e,P9)=>{P9.exports=["sseum","sseub","sseubs","sseus","sseuss","sseung","sseuj","sseuc","sseuk","sseut","sseup","sseuh","ssyi","ssyig","ssyigg","ssyigs","ssyin","ssyinj","ssyinh","ssyid","ssyil","ssyilg","ssyilm","ssyilb","ssyils","ssyilt","ssyilp","ssyilh","ssyim","ssyib","ssyibs","ssyis","ssyiss","ssying","ssyij","ssyic","ssyik","ssyit","ssyip","ssyih","ssi","ssig","ssigg","ssigs","ssin","ssinj","ssinh","ssid","ssil","ssilg","ssilm","ssilb","ssils","ssilt","ssilp","ssilh","ssim","ssib","ssibs","ssis","ssiss","ssing","ssij","ssic","ssik","ssit","ssip","ssih","a","ag","agg","ags","an","anj","anh","ad","al","alg","alm","alb","als","alt","alp","alh","am","ab","abs","as","ass","ang","aj","ac","ak","at","ap","ah","ae","aeg","aegg","aegs","aen","aenj","aenh","aed","ael","aelg","aelm","aelb","aels","aelt","aelp","aelh","aem","aeb","aebs","aes","aess","aeng","aej","aec","aek","aet","aep","aeh","ya","yag","yagg","yags","yan","yanj","yanh","yad","yal","yalg","yalm","yalb","yals","yalt","yalp","yalh","yam","yab","yabs","yas","yass","yang","yaj","yac","yak","yat","yap","yah","yae","yaeg","yaegg","yaegs","yaen","yaenj","yaenh","yaed","yael","yaelg","yaelm","yaelb","yaels","yaelt","yaelp","yaelh","yaem","yaeb","yaebs","yaes","yaess","yaeng","yaej","yaec","yaek","yaet","yaep","yaeh","eo","eog","eogg","eogs","eon","eonj","eonh","eod","eol","eolg","eolm","eolb","eols","eolt","eolp","eolh","eom","eob","eobs","eos","eoss","eong","eoj","eoc","eok","eot","eop","eoh","e","eg","egg","egs","en","enj","enh","ed","el","elg","elm","elb","els","elt","elp","elh","em","eb","ebs","es","ess","eng","ej","ec","ek","et","ep","eh","yeo","yeog","yeogg","yeogs","yeon","yeonj","yeonh","yeod","yeol","yeolg","yeolm","yeolb","yeols","yeolt","yeolp","yeolh","yeom","yeob","yeobs","yeos"]});var L9=b((K4e,R9)=>{R9.exports=["yeoss","yeong","yeoj","yeoc","yeok","yeot","yeop","yeoh","ye","yeg","yegg","yegs","yen","yenj","yenh","yed","yel","yelg","yelm","yelb","yels","yelt","yelp","yelh","yem","yeb","yebs","yes","yess","yeng","yej","yec","yek","yet","yep","yeh","o","og","ogg","ogs","on","onj","onh","od","ol","olg","olm","olb","ols","olt","olp","olh","om","ob","obs","os","oss","ong","oj","oc","ok","ot","op","oh","wa","wag","wagg","wags","wan","wanj","wanh","wad","wal","walg","walm","walb","wals","walt","walp","walh","wam","wab","wabs","was","wass","wang","waj","wac","wak","wat","wap","wah","wae","waeg","waegg","waegs","waen","waenj","waenh","waed","wael","waelg","waelm","waelb","waels","waelt","waelp","waelh","waem","waeb","waebs","waes","waess","waeng","waej","waec","waek","waet","waep","waeh","oe","oeg","oegg","oegs","oen","oenj","oenh","oed","oel","oelg","oelm","oelb","oels","oelt","oelp","oelh","oem","oeb","oebs","oes","oess","oeng","oej","oec","oek","oet","oep","oeh","yo","yog","yogg","yogs","yon","yonj","yonh","yod","yol","yolg","yolm","yolb","yols","yolt","yolp","yolh","yom","yob","yobs","yos","yoss","yong","yoj","yoc","yok","yot","yop","yoh","u","ug","ugg","ugs","un","unj","unh","ud","ul","ulg","ulm","ulb","uls","ult","ulp","ulh","um","ub","ubs","us","uss","ung","uj","uc","uk","ut","up","uh","weo","weog","weogg","weogs","weon","weonj","weonh","weod","weol","weolg","weolm","weolb","weols","weolt","weolp","weolh","weom","weob","weobs","weos","weoss","weong","weoj","weoc","weok","weot","weop","weoh","we","weg","wegg","wegs","wen","wenj","wenh","wed","wel","welg","welm","welb","wels","welt","welp","welh","wem","web","webs","wes","wess","weng","wej","wec"]});var I9=b((z4e,F9)=>{F9.exports=["wek","wet","wep","weh","wi","wig","wigg","wigs","win","winj","winh","wid","wil","wilg","wilm","wilb","wils","wilt","wilp","wilh","wim","wib","wibs","wis","wiss","wing","wij","wic","wik","wit","wip","wih","yu","yug","yugg","yugs","yun","yunj","yunh","yud","yul","yulg","yulm","yulb","yuls","yult","yulp","yulh","yum","yub","yubs","yus","yuss","yung","yuj","yuc","yuk","yut","yup","yuh","eu","eug","eugg","eugs","eun","eunj","eunh","eud","eul","eulg","eulm","eulb","euls","eult","eulp","eulh","eum","eub","eubs","eus","euss","eung","euj","euc","euk","eut","eup","euh","yi","yig","yigg","yigs","yin","yinj","yinh","yid","yil","yilg","yilm","yilb","yils","yilt","yilp","yilh","yim","yib","yibs","yis","yiss","ying","yij","yic","yik","yit","yip","yih","i","ig","igg","igs","in","inj","inh","id","il","ilg","ilm","ilb","ils","ilt","ilp","ilh","im","ib","ibs","is","iss","ing","ij","ic","ik","it","ip","ih","ja","jag","jagg","jags","jan","janj","janh","jad","jal","jalg","jalm","jalb","jals","jalt","jalp","jalh","jam","jab","jabs","jas","jass","jang","jaj","jac","jak","jat","jap","jah","jae","jaeg","jaegg","jaegs","jaen","jaenj","jaenh","jaed","jael","jaelg","jaelm","jaelb","jaels","jaelt","jaelp","jaelh","jaem","jaeb","jaebs","jaes","jaess","jaeng","jaej","jaec","jaek","jaet","jaep","jaeh","jya","jyag","jyagg","jyags","jyan","jyanj","jyanh","jyad","jyal","jyalg","jyalm","jyalb","jyals","jyalt","jyalp","jyalh","jyam","jyab","jyabs","jyas","jyass","jyang","jyaj","jyac","jyak","jyat","jyap","jyah","jyae","jyaeg","jyaegg","jyaegs","jyaen","jyaenj","jyaenh","jyaed","jyael","jyaelg","jyaelm","jyaelb","jyaels","jyaelt","jyaelp","jyaelh","jyaem","jyaeb","jyaebs","jyaes","jyaess","jyaeng","jyaej","jyaec","jyaek","jyaet","jyaep","jyaeh"]});var A9=b((V4e,j9)=>{j9.exports=["jeo","jeog","jeogg","jeogs","jeon","jeonj","jeonh","jeod","jeol","jeolg","jeolm","jeolb","jeols","jeolt","jeolp","jeolh","jeom","jeob","jeobs","jeos","jeoss","jeong","jeoj","jeoc","jeok","jeot","jeop","jeoh","je","jeg","jegg","jegs","jen","jenj","jenh","jed","jel","jelg","jelm","jelb","jels","jelt","jelp","jelh","jem","jeb","jebs","jes","jess","jeng","jej","jec","jek","jet","jep","jeh","jyeo","jyeog","jyeogg","jyeogs","jyeon","jyeonj","jyeonh","jyeod","jyeol","jyeolg","jyeolm","jyeolb","jyeols","jyeolt","jyeolp","jyeolh","jyeom","jyeob","jyeobs","jyeos","jyeoss","jyeong","jyeoj","jyeoc","jyeok","jyeot","jyeop","jyeoh","jye","jyeg","jyegg","jyegs","jyen","jyenj","jyenh","jyed","jyel","jyelg","jyelm","jyelb","jyels","jyelt","jyelp","jyelh","jyem","jyeb","jyebs","jyes","jyess","jyeng","jyej","jyec","jyek","jyet","jyep","jyeh","jo","jog","jogg","jogs","jon","jonj","jonh","jod","jol","jolg","jolm","jolb","jols","jolt","jolp","jolh","jom","job","jobs","jos","joss","jong","joj","joc","jok","jot","jop","joh","jwa","jwag","jwagg","jwags","jwan","jwanj","jwanh","jwad","jwal","jwalg","jwalm","jwalb","jwals","jwalt","jwalp","jwalh","jwam","jwab","jwabs","jwas","jwass","jwang","jwaj","jwac","jwak","jwat","jwap","jwah","jwae","jwaeg","jwaegg","jwaegs","jwaen","jwaenj","jwaenh","jwaed","jwael","jwaelg","jwaelm","jwaelb","jwaels","jwaelt","jwaelp","jwaelh","jwaem","jwaeb","jwaebs","jwaes","jwaess","jwaeng","jwaej","jwaec","jwaek","jwaet","jwaep","jwaeh","joe","joeg","joegg","joegs","joen","joenj","joenh","joed","joel","joelg","joelm","joelb","joels","joelt","joelp","joelh","joem","joeb","joebs","joes","joess","joeng","joej","joec","joek","joet","joep","joeh","jyo","jyog","jyogg","jyogs","jyon","jyonj","jyonh","jyod","jyol","jyolg","jyolm","jyolb","jyols","jyolt","jyolp","jyolh","jyom","jyob","jyobs","jyos","jyoss","jyong","jyoj","jyoc","jyok","jyot","jyop","jyoh","ju","jug","jugg","jugs"]});var M9=b((eQe,O9)=>{O9.exports=["jun","junj","junh","jud","jul","julg","julm","julb","juls","jult","julp","julh","jum","jub","jubs","jus","juss","jung","juj","juc","juk","jut","jup","juh","jweo","jweog","jweogg","jweogs","jweon","jweonj","jweonh","jweod","jweol","jweolg","jweolm","jweolb","jweols","jweolt","jweolp","jweolh","jweom","jweob","jweobs","jweos","jweoss","jweong","jweoj","jweoc","jweok","jweot","jweop","jweoh","jwe","jweg","jwegg","jwegs","jwen","jwenj","jwenh","jwed","jwel","jwelg","jwelm","jwelb","jwels","jwelt","jwelp","jwelh","jwem","jweb","jwebs","jwes","jwess","jweng","jwej","jwec","jwek","jwet","jwep","jweh","jwi","jwig","jwigg","jwigs","jwin","jwinj","jwinh","jwid","jwil","jwilg","jwilm","jwilb","jwils","jwilt","jwilp","jwilh","jwim","jwib","jwibs","jwis","jwiss","jwing","jwij","jwic","jwik","jwit","jwip","jwih","jyu","jyug","jyugg","jyugs","jyun","jyunj","jyunh","jyud","jyul","jyulg","jyulm","jyulb","jyuls","jyult","jyulp","jyulh","jyum","jyub","jyubs","jyus","jyuss","jyung","jyuj","jyuc","jyuk","jyut","jyup","jyuh","jeu","jeug","jeugg","jeugs","jeun","jeunj","jeunh","jeud","jeul","jeulg","jeulm","jeulb","jeuls","jeult","jeulp","jeulh","jeum","jeub","jeubs","jeus","jeuss","jeung","jeuj","jeuc","jeuk","jeut","jeup","jeuh","jyi","jyig","jyigg","jyigs","jyin","jyinj","jyinh","jyid","jyil","jyilg","jyilm","jyilb","jyils","jyilt","jyilp","jyilh","jyim","jyib","jyibs","jyis","jyiss","jying","jyij","jyic","jyik","jyit","jyip","jyih","ji","jig","jigg","jigs","jin","jinj","jinh","jid","jil","jilg","jilm","jilb","jils","jilt","jilp","jilh","jim","jib","jibs","jis","jiss","jing","jij","jic","jik","jit","jip","jih","jja","jjag","jjagg","jjags","jjan","jjanj","jjanh","jjad","jjal","jjalg","jjalm","jjalb","jjals","jjalt","jjalp","jjalh","jjam","jjab","jjabs","jjas","jjass","jjang","jjaj","jjac","jjak","jjat","jjap","jjah","jjae","jjaeg","jjaegg","jjaegs","jjaen","jjaenj","jjaenh","jjaed"]});var B9=b((tQe,N9)=>{N9.exports=["jjael","jjaelg","jjaelm","jjaelb","jjaels","jjaelt","jjaelp","jjaelh","jjaem","jjaeb","jjaebs","jjaes","jjaess","jjaeng","jjaej","jjaec","jjaek","jjaet","jjaep","jjaeh","jjya","jjyag","jjyagg","jjyags","jjyan","jjyanj","jjyanh","jjyad","jjyal","jjyalg","jjyalm","jjyalb","jjyals","jjyalt","jjyalp","jjyalh","jjyam","jjyab","jjyabs","jjyas","jjyass","jjyang","jjyaj","jjyac","jjyak","jjyat","jjyap","jjyah","jjyae","jjyaeg","jjyaegg","jjyaegs","jjyaen","jjyaenj","jjyaenh","jjyaed","jjyael","jjyaelg","jjyaelm","jjyaelb","jjyaels","jjyaelt","jjyaelp","jjyaelh","jjyaem","jjyaeb","jjyaebs","jjyaes","jjyaess","jjyaeng","jjyaej","jjyaec","jjyaek","jjyaet","jjyaep","jjyaeh","jjeo","jjeog","jjeogg","jjeogs","jjeon","jjeonj","jjeonh","jjeod","jjeol","jjeolg","jjeolm","jjeolb","jjeols","jjeolt","jjeolp","jjeolh","jjeom","jjeob","jjeobs","jjeos","jjeoss","jjeong","jjeoj","jjeoc","jjeok","jjeot","jjeop","jjeoh","jje","jjeg","jjegg","jjegs","jjen","jjenj","jjenh","jjed","jjel","jjelg","jjelm","jjelb","jjels","jjelt","jjelp","jjelh","jjem","jjeb","jjebs","jjes","jjess","jjeng","jjej","jjec","jjek","jjet","jjep","jjeh","jjyeo","jjyeog","jjyeogg","jjyeogs","jjyeon","jjyeonj","jjyeonh","jjyeod","jjyeol","jjyeolg","jjyeolm","jjyeolb","jjyeols","jjyeolt","jjyeolp","jjyeolh","jjyeom","jjyeob","jjyeobs","jjyeos","jjyeoss","jjyeong","jjyeoj","jjyeoc","jjyeok","jjyeot","jjyeop","jjyeoh","jjye","jjyeg","jjyegg","jjyegs","jjyen","jjyenj","jjyenh","jjyed","jjyel","jjyelg","jjyelm","jjyelb","jjyels","jjyelt","jjyelp","jjyelh","jjyem","jjyeb","jjyebs","jjyes","jjyess","jjyeng","jjyej","jjyec","jjyek","jjyet","jjyep","jjyeh","jjo","jjog","jjogg","jjogs","jjon","jjonj","jjonh","jjod","jjol","jjolg","jjolm","jjolb","jjols","jjolt","jjolp","jjolh","jjom","jjob","jjobs","jjos","jjoss","jjong","jjoj","jjoc","jjok","jjot","jjop","jjoh","jjwa","jjwag","jjwagg","jjwags","jjwan","jjwanj","jjwanh","jjwad","jjwal","jjwalg","jjwalm","jjwalb","jjwals","jjwalt","jjwalp","jjwalh","jjwam","jjwab","jjwabs","jjwas","jjwass","jjwang","jjwaj","jjwac","jjwak","jjwat","jjwap","jjwah","jjwae","jjwaeg","jjwaegg","jjwaegs","jjwaen","jjwaenj","jjwaenh","jjwaed","jjwael","jjwaelg","jjwaelm","jjwaelb"]});var q9=b((iQe,H9)=>{H9.exports=["jjwaels","jjwaelt","jjwaelp","jjwaelh","jjwaem","jjwaeb","jjwaebs","jjwaes","jjwaess","jjwaeng","jjwaej","jjwaec","jjwaek","jjwaet","jjwaep","jjwaeh","jjoe","jjoeg","jjoegg","jjoegs","jjoen","jjoenj","jjoenh","jjoed","jjoel","jjoelg","jjoelm","jjoelb","jjoels","jjoelt","jjoelp","jjoelh","jjoem","jjoeb","jjoebs","jjoes","jjoess","jjoeng","jjoej","jjoec","jjoek","jjoet","jjoep","jjoeh","jjyo","jjyog","jjyogg","jjyogs","jjyon","jjyonj","jjyonh","jjyod","jjyol","jjyolg","jjyolm","jjyolb","jjyols","jjyolt","jjyolp","jjyolh","jjyom","jjyob","jjyobs","jjyos","jjyoss","jjyong","jjyoj","jjyoc","jjyok","jjyot","jjyop","jjyoh","jju","jjug","jjugg","jjugs","jjun","jjunj","jjunh","jjud","jjul","jjulg","jjulm","jjulb","jjuls","jjult","jjulp","jjulh","jjum","jjub","jjubs","jjus","jjuss","jjung","jjuj","jjuc","jjuk","jjut","jjup","jjuh","jjweo","jjweog","jjweogg","jjweogs","jjweon","jjweonj","jjweonh","jjweod","jjweol","jjweolg","jjweolm","jjweolb","jjweols","jjweolt","jjweolp","jjweolh","jjweom","jjweob","jjweobs","jjweos","jjweoss","jjweong","jjweoj","jjweoc","jjweok","jjweot","jjweop","jjweoh","jjwe","jjweg","jjwegg","jjwegs","jjwen","jjwenj","jjwenh","jjwed","jjwel","jjwelg","jjwelm","jjwelb","jjwels","jjwelt","jjwelp","jjwelh","jjwem","jjweb","jjwebs","jjwes","jjwess","jjweng","jjwej","jjwec","jjwek","jjwet","jjwep","jjweh","jjwi","jjwig","jjwigg","jjwigs","jjwin","jjwinj","jjwinh","jjwid","jjwil","jjwilg","jjwilm","jjwilb","jjwils","jjwilt","jjwilp","jjwilh","jjwim","jjwib","jjwibs","jjwis","jjwiss","jjwing","jjwij","jjwic","jjwik","jjwit","jjwip","jjwih","jjyu","jjyug","jjyugg","jjyugs","jjyun","jjyunj","jjyunh","jjyud","jjyul","jjyulg","jjyulm","jjyulb","jjyuls","jjyult","jjyulp","jjyulh","jjyum","jjyub","jjyubs","jjyus","jjyuss","jjyung","jjyuj","jjyuc","jjyuk","jjyut","jjyup","jjyuh","jjeu","jjeug","jjeugg","jjeugs","jjeun","jjeunj","jjeunh","jjeud","jjeul","jjeulg","jjeulm","jjeulb","jjeuls","jjeult","jjeulp","jjeulh","jjeum","jjeub","jjeubs","jjeus","jjeuss","jjeung","jjeuj","jjeuc","jjeuk","jjeut","jjeup","jjeuh","jjyi","jjyig","jjyigg","jjyigs","jjyin","jjyinj","jjyinh","jjyid","jjyil","jjyilg","jjyilm","jjyilb","jjyils","jjyilt","jjyilp","jjyilh"]});var W9=b((nQe,Y9)=>{Y9.exports=["jjyim","jjyib","jjyibs","jjyis","jjyiss","jjying","jjyij","jjyic","jjyik","jjyit","jjyip","jjyih","jji","jjig","jjigg","jjigs","jjin","jjinj","jjinh","jjid","jjil","jjilg","jjilm","jjilb","jjils","jjilt","jjilp","jjilh","jjim","jjib","jjibs","jjis","jjiss","jjing","jjij","jjic","jjik","jjit","jjip","jjih","ca","cag","cagg","cags","can","canj","canh","cad","cal","calg","calm","calb","cals","calt","calp","calh","cam","cab","cabs","cas","cass","cang","caj","cac","cak","cat","cap","cah","cae","caeg","caegg","caegs","caen","caenj","caenh","caed","cael","caelg","caelm","caelb","caels","caelt","caelp","caelh","caem","caeb","caebs","caes","caess","caeng","caej","caec","caek","caet","caep","caeh","cya","cyag","cyagg","cyags","cyan","cyanj","cyanh","cyad","cyal","cyalg","cyalm","cyalb","cyals","cyalt","cyalp","cyalh","cyam","cyab","cyabs","cyas","cyass","cyang","cyaj","cyac","cyak","cyat","cyap","cyah","cyae","cyaeg","cyaegg","cyaegs","cyaen","cyaenj","cyaenh","cyaed","cyael","cyaelg","cyaelm","cyaelb","cyaels","cyaelt","cyaelp","cyaelh","cyaem","cyaeb","cyaebs","cyaes","cyaess","cyaeng","cyaej","cyaec","cyaek","cyaet","cyaep","cyaeh","ceo","ceog","ceogg","ceogs","ceon","ceonj","ceonh","ceod","ceol","ceolg","ceolm","ceolb","ceols","ceolt","ceolp","ceolh","ceom","ceob","ceobs","ceos","ceoss","ceong","ceoj","ceoc","ceok","ceot","ceop","ceoh","ce","ceg","cegg","cegs","cen","cenj","cenh","ced","cel","celg","celm","celb","cels","celt","celp","celh","cem","ceb","cebs","ces","cess","ceng","cej","cec","cek","cet","cep","ceh","cyeo","cyeog","cyeogg","cyeogs","cyeon","cyeonj","cyeonh","cyeod","cyeol","cyeolg","cyeolm","cyeolb","cyeols","cyeolt","cyeolp","cyeolh","cyeom","cyeob","cyeobs","cyeos","cyeoss","cyeong","cyeoj","cyeoc","cyeok","cyeot","cyeop","cyeoh","cye","cyeg","cyegg","cyegs","cyen","cyenj","cyenh","cyed","cyel","cyelg","cyelm","cyelb","cyels","cyelt","cyelp","cyelh","cyem","cyeb","cyebs","cyes"]});var J9=b((rQe,Z9)=>{Z9.exports=["cyess","cyeng","cyej","cyec","cyek","cyet","cyep","cyeh","co","cog","cogg","cogs","con","conj","conh","cod","col","colg","colm","colb","cols","colt","colp","colh","com","cob","cobs","cos","coss","cong","coj","coc","cok","cot","cop","coh","cwa","cwag","cwagg","cwags","cwan","cwanj","cwanh","cwad","cwal","cwalg","cwalm","cwalb","cwals","cwalt","cwalp","cwalh","cwam","cwab","cwabs","cwas","cwass","cwang","cwaj","cwac","cwak","cwat","cwap","cwah","cwae","cwaeg","cwaegg","cwaegs","cwaen","cwaenj","cwaenh","cwaed","cwael","cwaelg","cwaelm","cwaelb","cwaels","cwaelt","cwaelp","cwaelh","cwaem","cwaeb","cwaebs","cwaes","cwaess","cwaeng","cwaej","cwaec","cwaek","cwaet","cwaep","cwaeh","coe","coeg","coegg","coegs","coen","coenj","coenh","coed","coel","coelg","coelm","coelb","coels","coelt","coelp","coelh","coem","coeb","coebs","coes","coess","coeng","coej","coec","coek","coet","coep","coeh","cyo","cyog","cyogg","cyogs","cyon","cyonj","cyonh","cyod","cyol","cyolg","cyolm","cyolb","cyols","cyolt","cyolp","cyolh","cyom","cyob","cyobs","cyos","cyoss","cyong","cyoj","cyoc","cyok","cyot","cyop","cyoh","cu","cug","cugg","cugs","cun","cunj","cunh","cud","cul","culg","culm","culb","culs","cult","culp","culh","cum","cub","cubs","cus","cuss","cung","cuj","cuc","cuk","cut","cup","cuh","cweo","cweog","cweogg","cweogs","cweon","cweonj","cweonh","cweod","cweol","cweolg","cweolm","cweolb","cweols","cweolt","cweolp","cweolh","cweom","cweob","cweobs","cweos","cweoss","cweong","cweoj","cweoc","cweok","cweot","cweop","cweoh","cwe","cweg","cwegg","cwegs","cwen","cwenj","cwenh","cwed","cwel","cwelg","cwelm","cwelb","cwels","cwelt","cwelp","cwelh","cwem","cweb","cwebs","cwes","cwess","cweng","cwej","cwec","cwek","cwet","cwep","cweh","cwi","cwig","cwigg","cwigs","cwin","cwinj","cwinh","cwid","cwil","cwilg","cwilm","cwilb","cwils","cwilt","cwilp","cwilh","cwim","cwib","cwibs","cwis","cwiss","cwing","cwij","cwic"]});var X9=b((oQe,$9)=>{$9.exports=["cwik","cwit","cwip","cwih","cyu","cyug","cyugg","cyugs","cyun","cyunj","cyunh","cyud","cyul","cyulg","cyulm","cyulb","cyuls","cyult","cyulp","cyulh","cyum","cyub","cyubs","cyus","cyuss","cyung","cyuj","cyuc","cyuk","cyut","cyup","cyuh","ceu","ceug","ceugg","ceugs","ceun","ceunj","ceunh","ceud","ceul","ceulg","ceulm","ceulb","ceuls","ceult","ceulp","ceulh","ceum","ceub","ceubs","ceus","ceuss","ceung","ceuj","ceuc","ceuk","ceut","ceup","ceuh","cyi","cyig","cyigg","cyigs","cyin","cyinj","cyinh","cyid","cyil","cyilg","cyilm","cyilb","cyils","cyilt","cyilp","cyilh","cyim","cyib","cyibs","cyis","cyiss","cying","cyij","cyic","cyik","cyit","cyip","cyih","ci","cig","cigg","cigs","cin","cinj","cinh","cid","cil","cilg","cilm","cilb","cils","cilt","cilp","cilh","cim","cib","cibs","cis","ciss","cing","cij","cic","cik","cit","cip","cih","ka","kag","kagg","kags","kan","kanj","kanh","kad","kal","kalg","kalm","kalb","kals","kalt","kalp","kalh","kam","kab","kabs","kas","kass","kang","kaj","kac","kak","kat","kap","kah","kae","kaeg","kaegg","kaegs","kaen","kaenj","kaenh","kaed","kael","kaelg","kaelm","kaelb","kaels","kaelt","kaelp","kaelh","kaem","kaeb","kaebs","kaes","kaess","kaeng","kaej","kaec","kaek","kaet","kaep","kaeh","kya","kyag","kyagg","kyags","kyan","kyanj","kyanh","kyad","kyal","kyalg","kyalm","kyalb","kyals","kyalt","kyalp","kyalh","kyam","kyab","kyabs","kyas","kyass","kyang","kyaj","kyac","kyak","kyat","kyap","kyah","kyae","kyaeg","kyaegg","kyaegs","kyaen","kyaenj","kyaenh","kyaed","kyael","kyaelg","kyaelm","kyaelb","kyaels","kyaelt","kyaelp","kyaelh","kyaem","kyaeb","kyaebs","kyaes","kyaess","kyaeng","kyaej","kyaec","kyaek","kyaet","kyaep","kyaeh","keo","keog","keogg","keogs","keon","keonj","keonh","keod","keol","keolg","keolm","keolb","keols","keolt","keolp","keolh","keom","keob","keobs","keos","keoss","keong","keoj","keoc","keok","keot","keop","keoh"]});var G9=b((sQe,U9)=>{U9.exports=["ke","keg","kegg","kegs","ken","kenj","kenh","ked","kel","kelg","kelm","kelb","kels","kelt","kelp","kelh","kem","keb","kebs","kes","kess","keng","kej","kec","kek","ket","kep","keh","kyeo","kyeog","kyeogg","kyeogs","kyeon","kyeonj","kyeonh","kyeod","kyeol","kyeolg","kyeolm","kyeolb","kyeols","kyeolt","kyeolp","kyeolh","kyeom","kyeob","kyeobs","kyeos","kyeoss","kyeong","kyeoj","kyeoc","kyeok","kyeot","kyeop","kyeoh","kye","kyeg","kyegg","kyegs","kyen","kyenj","kyenh","kyed","kyel","kyelg","kyelm","kyelb","kyels","kyelt","kyelp","kyelh","kyem","kyeb","kyebs","kyes","kyess","kyeng","kyej","kyec","kyek","kyet","kyep","kyeh","ko","kog","kogg","kogs","kon","konj","konh","kod","kol","kolg","kolm","kolb","kols","kolt","kolp","kolh","kom","kob","kobs","kos","koss","kong","koj","koc","kok","kot","kop","koh","kwa","kwag","kwagg","kwags","kwan","kwanj","kwanh","kwad","kwal","kwalg","kwalm","kwalb","kwals","kwalt","kwalp","kwalh","kwam","kwab","kwabs","kwas","kwass","kwang","kwaj","kwac","kwak","kwat","kwap","kwah","kwae","kwaeg","kwaegg","kwaegs","kwaen","kwaenj","kwaenh","kwaed","kwael","kwaelg","kwaelm","kwaelb","kwaels","kwaelt","kwaelp","kwaelh","kwaem","kwaeb","kwaebs","kwaes","kwaess","kwaeng","kwaej","kwaec","kwaek","kwaet","kwaep","kwaeh","koe","koeg","koegg","koegs","koen","koenj","koenh","koed","koel","koelg","koelm","koelb","koels","koelt","koelp","koelh","koem","koeb","koebs","koes","koess","koeng","koej","koec","koek","koet","koep","koeh","kyo","kyog","kyogg","kyogs","kyon","kyonj","kyonh","kyod","kyol","kyolg","kyolm","kyolb","kyols","kyolt","kyolp","kyolh","kyom","kyob","kyobs","kyos","kyoss","kyong","kyoj","kyoc","kyok","kyot","kyop","kyoh","ku","kug","kugg","kugs","kun","kunj","kunh","kud","kul","kulg","kulm","kulb","kuls","kult","kulp","kulh","kum","kub","kubs","kus","kuss","kung","kuj","kuc","kuk","kut","kup","kuh","kweo","kweog","kweogg","kweogs"]});var K9=b((aQe,Q9)=>{Q9.exports=["kweon","kweonj","kweonh","kweod","kweol","kweolg","kweolm","kweolb","kweols","kweolt","kweolp","kweolh","kweom","kweob","kweobs","kweos","kweoss","kweong","kweoj","kweoc","kweok","kweot","kweop","kweoh","kwe","kweg","kwegg","kwegs","kwen","kwenj","kwenh","kwed","kwel","kwelg","kwelm","kwelb","kwels","kwelt","kwelp","kwelh","kwem","kweb","kwebs","kwes","kwess","kweng","kwej","kwec","kwek","kwet","kwep","kweh","kwi","kwig","kwigg","kwigs","kwin","kwinj","kwinh","kwid","kwil","kwilg","kwilm","kwilb","kwils","kwilt","kwilp","kwilh","kwim","kwib","kwibs","kwis","kwiss","kwing","kwij","kwic","kwik","kwit","kwip","kwih","kyu","kyug","kyugg","kyugs","kyun","kyunj","kyunh","kyud","kyul","kyulg","kyulm","kyulb","kyuls","kyult","kyulp","kyulh","kyum","kyub","kyubs","kyus","kyuss","kyung","kyuj","kyuc","kyuk","kyut","kyup","kyuh","keu","keug","keugg","keugs","keun","keunj","keunh","keud","keul","keulg","keulm","keulb","keuls","keult","keulp","keulh","keum","keub","keubs","keus","keuss","keung","keuj","keuc","keuk","keut","keup","keuh","kyi","kyig","kyigg","kyigs","kyin","kyinj","kyinh","kyid","kyil","kyilg","kyilm","kyilb","kyils","kyilt","kyilp","kyilh","kyim","kyib","kyibs","kyis","kyiss","kying","kyij","kyic","kyik","kyit","kyip","kyih","ki","kig","kigg","kigs","kin","kinj","kinh","kid","kil","kilg","kilm","kilb","kils","kilt","kilp","kilh","kim","kib","kibs","kis","kiss","king","kij","kic","kik","kit","kip","kih","ta","tag","tagg","tags","tan","tanj","tanh","tad","tal","talg","talm","talb","tals","talt","talp","talh","tam","tab","tabs","tas","tass","tang","taj","tac","tak","tat","tap","tah","tae","taeg","taegg","taegs","taen","taenj","taenh","taed","tael","taelg","taelm","taelb","taels","taelt","taelp","taelh","taem","taeb","taebs","taes","taess","taeng","taej","taec","taek","taet","taep","taeh","tya","tyag","tyagg","tyags","tyan","tyanj","tyanh","tyad"]});var V9=b((lQe,z9)=>{z9.exports=["tyal","tyalg","tyalm","tyalb","tyals","tyalt","tyalp","tyalh","tyam","tyab","tyabs","tyas","tyass","tyang","tyaj","tyac","tyak","tyat","tyap","tyah","tyae","tyaeg","tyaegg","tyaegs","tyaen","tyaenj","tyaenh","tyaed","tyael","tyaelg","tyaelm","tyaelb","tyaels","tyaelt","tyaelp","tyaelh","tyaem","tyaeb","tyaebs","tyaes","tyaess","tyaeng","tyaej","tyaec","tyaek","tyaet","tyaep","tyaeh","teo","teog","teogg","teogs","teon","teonj","teonh","teod","teol","teolg","teolm","teolb","teols","teolt","teolp","teolh","teom","teob","teobs","teos","teoss","teong","teoj","teoc","teok","teot","teop","teoh","te","teg","tegg","tegs","ten","tenj","tenh","ted","tel","telg","telm","telb","tels","telt","telp","telh","tem","teb","tebs","tes","tess","teng","tej","tec","tek","tet","tep","teh","tyeo","tyeog","tyeogg","tyeogs","tyeon","tyeonj","tyeonh","tyeod","tyeol","tyeolg","tyeolm","tyeolb","tyeols","tyeolt","tyeolp","tyeolh","tyeom","tyeob","tyeobs","tyeos","tyeoss","tyeong","tyeoj","tyeoc","tyeok","tyeot","tyeop","tyeoh","tye","tyeg","tyegg","tyegs","tyen","tyenj","tyenh","tyed","tyel","tyelg","tyelm","tyelb","tyels","tyelt","tyelp","tyelh","tyem","tyeb","tyebs","tyes","tyess","tyeng","tyej","tyec","tyek","tyet","tyep","tyeh","to","tog","togg","togs","ton","tonj","tonh","tod","tol","tolg","tolm","tolb","tols","tolt","tolp","tolh","tom","tob","tobs","tos","toss","tong","toj","toc","tok","tot","top","toh","twa","twag","twagg","twags","twan","twanj","twanh","twad","twal","twalg","twalm","twalb","twals","twalt","twalp","twalh","twam","twab","twabs","twas","twass","twang","twaj","twac","twak","twat","twap","twah","twae","twaeg","twaegg","twaegs","twaen","twaenj","twaenh","twaed","twael","twaelg","twaelm","twaelb","twaels","twaelt","twaelp","twaelh","twaem","twaeb","twaebs","twaes","twaess","twaeng","twaej","twaec","twaek","twaet","twaep","twaeh","toe","toeg","toegg","toegs","toen","toenj","toenh","toed","toel","toelg","toelm","toelb"]});var tV=b((uQe,eV)=>{eV.exports=["toels","toelt","toelp","toelh","toem","toeb","toebs","toes","toess","toeng","toej","toec","toek","toet","toep","toeh","tyo","tyog","tyogg","tyogs","tyon","tyonj","tyonh","tyod","tyol","tyolg","tyolm","tyolb","tyols","tyolt","tyolp","tyolh","tyom","tyob","tyobs","tyos","tyoss","tyong","tyoj","tyoc","tyok","tyot","tyop","tyoh","tu","tug","tugg","tugs","tun","tunj","tunh","tud","tul","tulg","tulm","tulb","tuls","tult","tulp","tulh","tum","tub","tubs","tus","tuss","tung","tuj","tuc","tuk","tut","tup","tuh","tweo","tweog","tweogg","tweogs","tweon","tweonj","tweonh","tweod","tweol","tweolg","tweolm","tweolb","tweols","tweolt","tweolp","tweolh","tweom","tweob","tweobs","tweos","tweoss","tweong","tweoj","tweoc","tweok","tweot","tweop","tweoh","twe","tweg","twegg","twegs","twen","twenj","twenh","twed","twel","twelg","twelm","twelb","twels","twelt","twelp","twelh","twem","tweb","twebs","twes","twess","tweng","twej","twec","twek","twet","twep","tweh","twi","twig","twigg","twigs","twin","twinj","twinh","twid","twil","twilg","twilm","twilb","twils","twilt","twilp","twilh","twim","twib","twibs","twis","twiss","twing","twij","twic","twik","twit","twip","twih","tyu","tyug","tyugg","tyugs","tyun","tyunj","tyunh","tyud","tyul","tyulg","tyulm","tyulb","tyuls","tyult","tyulp","tyulh","tyum","tyub","tyubs","tyus","tyuss","tyung","tyuj","tyuc","tyuk","tyut","tyup","tyuh","teu","teug","teugg","teugs","teun","teunj","teunh","teud","teul","teulg","teulm","teulb","teuls","teult","teulp","teulh","teum","teub","teubs","teus","teuss","teung","teuj","teuc","teuk","teut","teup","teuh","tyi","tyig","tyigg","tyigs","tyin","tyinj","tyinh","tyid","tyil","tyilg","tyilm","tyilb","tyils","tyilt","tyilp","tyilh","tyim","tyib","tyibs","tyis","tyiss","tying","tyij","tyic","tyik","tyit","tyip","tyih","ti","tig","tigg","tigs","tin","tinj","tinh","tid","til","tilg","tilm","tilb","tils","tilt","tilp","tilh"]});var nV=b((cQe,iV)=>{iV.exports=["tim","tib","tibs","tis","tiss","ting","tij","tic","tik","tit","tip","tih","pa","pag","pagg","pags","pan","panj","panh","pad","pal","palg","palm","palb","pals","palt","palp","palh","pam","pab","pabs","pas","pass","pang","paj","pac","pak","pat","pap","pah","pae","paeg","paegg","paegs","paen","paenj","paenh","paed","pael","paelg","paelm","paelb","paels","paelt","paelp","paelh","paem","paeb","paebs","paes","paess","paeng","paej","paec","paek","paet","paep","paeh","pya","pyag","pyagg","pyags","pyan","pyanj","pyanh","pyad","pyal","pyalg","pyalm","pyalb","pyals","pyalt","pyalp","pyalh","pyam","pyab","pyabs","pyas","pyass","pyang","pyaj","pyac","pyak","pyat","pyap","pyah","pyae","pyaeg","pyaegg","pyaegs","pyaen","pyaenj","pyaenh","pyaed","pyael","pyaelg","pyaelm","pyaelb","pyaels","pyaelt","pyaelp","pyaelh","pyaem","pyaeb","pyaebs","pyaes","pyaess","pyaeng","pyaej","pyaec","pyaek","pyaet","pyaep","pyaeh","peo","peog","peogg","peogs","peon","peonj","peonh","peod","peol","peolg","peolm","peolb","peols","peolt","peolp","peolh","peom","peob","peobs","peos","peoss","peong","peoj","peoc","peok","peot","peop","peoh","pe","peg","pegg","pegs","pen","penj","penh","ped","pel","pelg","pelm","pelb","pels","pelt","pelp","pelh","pem","peb","pebs","pes","pess","peng","pej","pec","pek","pet","pep","peh","pyeo","pyeog","pyeogg","pyeogs","pyeon","pyeonj","pyeonh","pyeod","pyeol","pyeolg","pyeolm","pyeolb","pyeols","pyeolt","pyeolp","pyeolh","pyeom","pyeob","pyeobs","pyeos","pyeoss","pyeong","pyeoj","pyeoc","pyeok","pyeot","pyeop","pyeoh","pye","pyeg","pyegg","pyegs","pyen","pyenj","pyenh","pyed","pyel","pyelg","pyelm","pyelb","pyels","pyelt","pyelp","pyelh","pyem","pyeb","pyebs","pyes","pyess","pyeng","pyej","pyec","pyek","pyet","pyep","pyeh","po","pog","pogg","pogs","pon","ponj","ponh","pod","pol","polg","polm","polb","pols","polt","polp","polh","pom","pob","pobs","pos"]});var oV=b((hQe,rV)=>{rV.exports=["poss","pong","poj","poc","pok","pot","pop","poh","pwa","pwag","pwagg","pwags","pwan","pwanj","pwanh","pwad","pwal","pwalg","pwalm","pwalb","pwals","pwalt","pwalp","pwalh","pwam","pwab","pwabs","pwas","pwass","pwang","pwaj","pwac","pwak","pwat","pwap","pwah","pwae","pwaeg","pwaegg","pwaegs","pwaen","pwaenj","pwaenh","pwaed","pwael","pwaelg","pwaelm","pwaelb","pwaels","pwaelt","pwaelp","pwaelh","pwaem","pwaeb","pwaebs","pwaes","pwaess","pwaeng","pwaej","pwaec","pwaek","pwaet","pwaep","pwaeh","poe","poeg","poegg","poegs","poen","poenj","poenh","poed","poel","poelg","poelm","poelb","poels","poelt","poelp","poelh","poem","poeb","poebs","poes","poess","poeng","poej","poec","poek","poet","poep","poeh","pyo","pyog","pyogg","pyogs","pyon","pyonj","pyonh","pyod","pyol","pyolg","pyolm","pyolb","pyols","pyolt","pyolp","pyolh","pyom","pyob","pyobs","pyos","pyoss","pyong","pyoj","pyoc","pyok","pyot","pyop","pyoh","pu","pug","pugg","pugs","pun","punj","punh","pud","pul","pulg","pulm","pulb","puls","pult","pulp","pulh","pum","pub","pubs","pus","puss","pung","puj","puc","puk","put","pup","puh","pweo","pweog","pweogg","pweogs","pweon","pweonj","pweonh","pweod","pweol","pweolg","pweolm","pweolb","pweols","pweolt","pweolp","pweolh","pweom","pweob","pweobs","pweos","pweoss","pweong","pweoj","pweoc","pweok","pweot","pweop","pweoh","pwe","pweg","pwegg","pwegs","pwen","pwenj","pwenh","pwed","pwel","pwelg","pwelm","pwelb","pwels","pwelt","pwelp","pwelh","pwem","pweb","pwebs","pwes","pwess","pweng","pwej","pwec","pwek","pwet","pwep","pweh","pwi","pwig","pwigg","pwigs","pwin","pwinj","pwinh","pwid","pwil","pwilg","pwilm","pwilb","pwils","pwilt","pwilp","pwilh","pwim","pwib","pwibs","pwis","pwiss","pwing","pwij","pwic","pwik","pwit","pwip","pwih","pyu","pyug","pyugg","pyugs","pyun","pyunj","pyunh","pyud","pyul","pyulg","pyulm","pyulb","pyuls","pyult","pyulp","pyulh","pyum","pyub","pyubs","pyus","pyuss","pyung","pyuj","pyuc"]});var aV=b((dQe,sV)=>{sV.exports=["pyuk","pyut","pyup","pyuh","peu","peug","peugg","peugs","peun","peunj","peunh","peud","peul","peulg","peulm","peulb","peuls","peult","peulp","peulh","peum","peub","peubs","peus","peuss","peung","peuj","peuc","peuk","peut","peup","peuh","pyi","pyig","pyigg","pyigs","pyin","pyinj","pyinh","pyid","pyil","pyilg","pyilm","pyilb","pyils","pyilt","pyilp","pyilh","pyim","pyib","pyibs","pyis","pyiss","pying","pyij","pyic","pyik","pyit","pyip","pyih","pi","pig","pigg","pigs","pin","pinj","pinh","pid","pil","pilg","pilm","pilb","pils","pilt","pilp","pilh","pim","pib","pibs","pis","piss","ping","pij","pic","pik","pit","pip","pih","ha","hag","hagg","hags","han","hanj","hanh","had","hal","halg","halm","halb","hals","halt","halp","halh","ham","hab","habs","has","hass","hang","haj","hac","hak","hat","hap","hah","hae","haeg","haegg","haegs","haen","haenj","haenh","haed","hael","haelg","haelm","haelb","haels","haelt","haelp","haelh","haem","haeb","haebs","haes","haess","haeng","haej","haec","haek","haet","haep","haeh","hya","hyag","hyagg","hyags","hyan","hyanj","hyanh","hyad","hyal","hyalg","hyalm","hyalb","hyals","hyalt","hyalp","hyalh","hyam","hyab","hyabs","hyas","hyass","hyang","hyaj","hyac","hyak","hyat","hyap","hyah","hyae","hyaeg","hyaegg","hyaegs","hyaen","hyaenj","hyaenh","hyaed","hyael","hyaelg","hyaelm","hyaelb","hyaels","hyaelt","hyaelp","hyaelh","hyaem","hyaeb","hyaebs","hyaes","hyaess","hyaeng","hyaej","hyaec","hyaek","hyaet","hyaep","hyaeh","heo","heog","heogg","heogs","heon","heonj","heonh","heod","heol","heolg","heolm","heolb","heols","heolt","heolp","heolh","heom","heob","heobs","heos","heoss","heong","heoj","heoc","heok","heot","heop","heoh","he","heg","hegg","hegs","hen","henj","henh","hed","hel","helg","helm","helb","hels","helt","help","helh","hem","heb","hebs","hes","hess","heng","hej","hec","hek","het","hep","heh"]});var uV=b((gQe,lV)=>{lV.exports=["hyeo","hyeog","hyeogg","hyeogs","hyeon","hyeonj","hyeonh","hyeod","hyeol","hyeolg","hyeolm","hyeolb","hyeols","hyeolt","hyeolp","hyeolh","hyeom","hyeob","hyeobs","hyeos","hyeoss","hyeong","hyeoj","hyeoc","hyeok","hyeot","hyeop","hyeoh","hye","hyeg","hyegg","hyegs","hyen","hyenj","hyenh","hyed","hyel","hyelg","hyelm","hyelb","hyels","hyelt","hyelp","hyelh","hyem","hyeb","hyebs","hyes","hyess","hyeng","hyej","hyec","hyek","hyet","hyep","hyeh","ho","hog","hogg","hogs","hon","honj","honh","hod","hol","holg","holm","holb","hols","holt","holp","holh","hom","hob","hobs","hos","hoss","hong","hoj","hoc","hok","hot","hop","hoh","hwa","hwag","hwagg","hwags","hwan","hwanj","hwanh","hwad","hwal","hwalg","hwalm","hwalb","hwals","hwalt","hwalp","hwalh","hwam","hwab","hwabs","hwas","hwass","hwang","hwaj","hwac","hwak","hwat","hwap","hwah","hwae","hwaeg","hwaegg","hwaegs","hwaen","hwaenj","hwaenh","hwaed","hwael","hwaelg","hwaelm","hwaelb","hwaels","hwaelt","hwaelp","hwaelh","hwaem","hwaeb","hwaebs","hwaes","hwaess","hwaeng","hwaej","hwaec","hwaek","hwaet","hwaep","hwaeh","hoe","hoeg","hoegg","hoegs","hoen","hoenj","hoenh","hoed","hoel","hoelg","hoelm","hoelb","hoels","hoelt","hoelp","hoelh","hoem","hoeb","hoebs","hoes","hoess","hoeng","hoej","hoec","hoek","hoet","hoep","hoeh","hyo","hyog","hyogg","hyogs","hyon","hyonj","hyonh","hyod","hyol","hyolg","hyolm","hyolb","hyols","hyolt","hyolp","hyolh","hyom","hyob","hyobs","hyos","hyoss","hyong","hyoj","hyoc","hyok","hyot","hyop","hyoh","hu","hug","hugg","hugs","hun","hunj","hunh","hud","hul","hulg","hulm","hulb","huls","hult","hulp","hulh","hum","hub","hubs","hus","huss","hung","huj","huc","huk","hut","hup","huh","hweo","hweog","hweogg","hweogs","hweon","hweonj","hweonh","hweod","hweol","hweolg","hweolm","hweolb","hweols","hweolt","hweolp","hweolh","hweom","hweob","hweobs","hweos","hweoss","hweong","hweoj","hweoc","hweok","hweot","hweop","hweoh","hwe","hweg","hwegg","hwegs"]});var hV=b((fQe,cV)=>{cV.exports=["hwen","hwenj","hwenh","hwed","hwel","hwelg","hwelm","hwelb","hwels","hwelt","hwelp","hwelh","hwem","hweb","hwebs","hwes","hwess","hweng","hwej","hwec","hwek","hwet","hwep","hweh","hwi","hwig","hwigg","hwigs","hwin","hwinj","hwinh","hwid","hwil","hwilg","hwilm","hwilb","hwils","hwilt","hwilp","hwilh","hwim","hwib","hwibs","hwis","hwiss","hwing","hwij","hwic","hwik","hwit","hwip","hwih","hyu","hyug","hyugg","hyugs","hyun","hyunj","hyunh","hyud","hyul","hyulg","hyulm","hyulb","hyuls","hyult","hyulp","hyulh","hyum","hyub","hyubs","hyus","hyuss","hyung","hyuj","hyuc","hyuk","hyut","hyup","hyuh","heu","heug","heugg","heugs","heun","heunj","heunh","heud","heul","heulg","heulm","heulb","heuls","heult","heulp","heulh","heum","heub","heubs","heus","heuss","heung","heuj","heuc","heuk","heut","heup","heuh","hyi","hyig","hyigg","hyigs","hyin","hyinj","hyinh","hyid","hyil","hyilg","hyilm","hyilb","hyils","hyilt","hyilp","hyilh","hyim","hyib","hyibs","hyis","hyiss","hying","hyij","hyic","hyik","hyit","hyip","hyih","hi","hig","higg","higs","hin","hinj","hinh","hid","hil","hilg","hilm","hilb","hils","hilt","hilp","hilh","him","hib","hibs","his","hiss","hing","hij","hic","hik","hit","hip","hih","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var gV=b((pQe,dV)=>{dV.exports=["Kay ","Kayng ","Ke ","Ko ","Kol ","Koc ","Kwi ","Kwi ","Kyun ","Kul ","Kum ","Na ","Na ","Na ","La ","Na ","Na ","Na ","Na ","Na ","Nak ","Nak ","Nak ","Nak ","Nak ","Nak ","Nak ","Nan ","Nan ","Nan ","Nan ","Nan ","Nan ","Nam ","Nam ","Nam ","Nam ","Nap ","Nap ","Nap ","Nang ","Nang ","Nang ","Nang ","Nang ","Nay ","Nayng ","No ","No ","No ","No ","No ","No ","No ","No ","No ","No ","No ","No ","Nok ","Nok ","Nok ","Nok ","Nok ","Nok ","Non ","Nong ","Nong ","Nong ","Nong ","Noy ","Noy ","Noy ","Noy ","Nwu ","Nwu ","Nwu ","Nwu ","Nwu ","Nwu ","Nwu ","Nwu ","Nuk ","Nuk ","Num ","Nung ","Nung ","Nung ","Nung ","Nung ","Twu ","La ","Lak ","Lak ","Lan ","Lyeng ","Lo ","Lyul ","Li ","Pey ","Pen ","Pyen ","Pwu ","Pwul ","Pi ","Sak ","Sak ","Sam ","Sayk ","Sayng ","Sep ","Sey ","Sway ","Sin ","Sim ","Sip ","Ya ","Yak ","Yak ","Yang ","Yang ","Yang ","Yang ","Yang ","Yang ","Yang ","Yang ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Ye ","Yek ","Yek ","Yek ","Yek ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yen ","Yel ","Yel ","Yel ","Yel ","Yel ","Yel ","Yem ","Yem ","Yem ","Yem ","Yem ","Yep ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yeng ","Yey ","Yey ","Yey ","Yey ","O ","Yo ","Yo ","Yo ","Yo ","Yo ","Yo ","Yo ","Yo ","Yo ","Yo ","Yong ","Wun ","Wen ","Yu ","Yu ","Yu ","Yu ","Yu ","Yu ","Yu ","Yu ","Yu ","Yu ","Yuk ","Yuk ","Yuk ","Yun ","Yun ","Yun ","Yun ","Yul ","Yul ","Yul ","Yul ","Yung ","I ","I ","I ","I ","I ","I ","I ","I ","I ","I ","I ","I ","I ","I ","Ik ","Ik ","In ","In ","In ","In ","In ","In ","In ","Im ","Im ","Im ","Ip ","Ip ","Ip ","Cang ","Cek ","Ci ","Cip ","Cha ","Chek "]});var pV=b((mQe,fV)=>{fV.exports=["Chey ","Thak ","Thak ","Thang ","Thayk ","Thong ","Pho ","Phok ","Hang ","Hang ","Hyen ","Hwak ","Wu ","Huo ","[?] ","[?] ","Zhong ","[?] ","Qing ","[?] ","[?] ","Xi ","Zhu ","Yi ","Li ","Shen ","Xiang ","Fu ","Jing ","Jing ","Yu ","[?] ","Hagi ","[?] ","Zhu ","[?] ","[?] ","Yi ","Du ","[?] ","[?] ","[?] ","Fan ","Si ","Guan ","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]"]});var bV=b((bQe,mV)=>{mV.exports=["ff","fi","fl","ffi","ffl","st","st","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","mn","me","mi","vn","mkh","[?]","[?]","[?]","[?]","[?]","yi","","ay","`","","d","h","k","l","m","m","t","+","sh","s","sh","s","a","a","","b","g","d","h","v","z","[?]","t","y","k","k","l","[?]","l","[?]","n","n","[?]","p","p","[?]","ts","ts","r","sh","t","vo","b","k","p","l","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]});var vV=b((yQe,yV)=>{yV.exports=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]});var DV=b((vQe,wV)=>{wV.exports=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","","","","","","","","","","[?]","[?]","[?]"]});var xV=b((wQe,CV)=>{CV.exports=["[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","","","","~","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","..","--","-","_","_","(",") ","{","} ","[","] ","[(",")] ","<<",">> ","<","> ","[","] ","{","}","[?]","[?]","[?]","[?]","","","","","","","",",",",",".","",";",":","?","!","-","(",")","{","}","{","}","#","&","*","+","-","<",">","=","","\\","$","%","@","[?]","[?]","[?]","[?]","","","","[?]","","[?]","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","[?]","[?]",""]});var TV=b((DQe,SV)=>{SV.exports=["[?]","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","[?]","[?]",".","[","]",",","*","wo","a","i","u","e","o","ya","yu","yo","tu","+","a","i","u","e","o","ka","ki","ku","ke","ko","sa","si","su","se","so","ta","ti","tu","te","to","na","ni","nu","ne","no","ha","hi","hu","he","ho","ma","mi","mu","me","mo","ya","yu","yo","ra","ri","ru","re","ro","wa","n",":",";","","g","gg","gs","n","nj","nh","d","dd","r","lg","lm","lb","ls","lt","lp","rh","m","b","bb","bs","s","ss","","j","jj","c","k","t","p","h","[?]","[?]","[?]","a","ae","ya","yae","eo","e","[?]","[?]","yeo","ye","o","wa","wae","oe","[?]","[?]","yo","u","weo","we","wi","yu","[?]","[?]","eu","yi","i","[?]","[?]","[?]","/C","PS","!","-","|","Y=","W=","[?]","|","-","|","-","|","#","O","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","[?]","{","|","}","","","",""]});var EV=b((CQe,kV)=>{"use strict";var R={},P0e=/(?![\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3})./g;kV.exports=function(n){return n.replace(P0e,_0e)};function _0e(n){var e=L0e(n);if(e>65535)return"_";var t=e>>8,i=e&255;if(t>24&&t<30||t>215&&t<249)return"";if(!R[t])switch(R0e(t)){case"00":R[t]=J4();break;case"01":R[t]=X4();break;case"02":R[t]=G4();break;case"03":R[t]=K4();break;case"04":R[t]=V4();break;case"05":R[t]=tQ();break;case"06":R[t]=nQ();break;case"07":R[t]=oQ();break;case"09":R[t]=aQ();break;case"0a":R[t]=uQ();break;case"0b":R[t]=hQ();break;case"0c":R[t]=gQ();break;case"0d":R[t]=pQ();break;case"0e":R[t]=bQ();break;case"0f":R[t]=vQ();break;case"10":R[t]=DQ();break;case"11":R[t]=xQ();break;case"12":R[t]=TQ();break;case"13":R[t]=EQ();break;case"14":R[t]=_Q();break;case"15":R[t]=LQ();break;case"16":R[t]=IQ();break;case"17":R[t]=AQ();break;case"18":R[t]=MQ();break;case"1e":R[t]=BQ();break;case"1f":R[t]=qQ();break;case"20":R[t]=WQ();break;case"21":R[t]=JQ();break;case"22":R[t]=XQ();break;case"23":R[t]=GQ();break;case"24":R[t]=KQ();break;case"25":R[t]=VQ();break;case"26":R[t]=tK();break;case"27":R[t]=nK();break;case"28":R[t]=oK();break;case"2e":R[t]=aK();break;case"2f":R[t]=uK();break;case"30":R[t]=hK();break;case"31":R[t]=gK();break;case"32":R[t]=pK();break;case"33":R[t]=bK();break;case"4d":R[t]=vK();break;case"4e":R[t]=DK();break;case"4f":R[t]=xK();break;case"50":R[t]=TK();break;case"51":R[t]=EK();break;case"52":R[t]=_K();break;case"53":R[t]=LK();break;case"54":R[t]=IK();break;case"55":R[t]=AK();break;case"56":R[t]=MK();break;case"57":R[t]=BK();break;case"58":R[t]=qK();break;case"59":R[t]=WK();break;case"5a":R[t]=JK();break;case"5b":R[t]=XK();break;case"5c":R[t]=GK();break;case"5d":R[t]=KK();break;case"5e":R[t]=VK();break;case"5f":R[t]=tz();break;case"60":R[t]=nz();break;case"61":R[t]=oz();break;case"62":R[t]=az();break;case"63":R[t]=uz();break;case"64":R[t]=hz();break;case"65":R[t]=gz();break;case"66":R[t]=pz();break;case"67":R[t]=bz();break;case"68":R[t]=vz();break;case"69":R[t]=Dz();break;case"6a":R[t]=xz();break;case"6b":R[t]=Tz();break;case"6c":R[t]=Ez();break;case"6d":R[t]=_z();break;case"6e":R[t]=Lz();break;case"6f":R[t]=Iz();break;case"70":R[t]=Az();break;case"71":R[t]=Mz();break;case"72":R[t]=Bz();break;case"73":R[t]=qz();break;case"74":R[t]=Wz();break;case"75":R[t]=Jz();break;case"76":R[t]=Xz();break;case"77":R[t]=Gz();break;case"78":R[t]=Kz();break;case"79":R[t]=Vz();break;case"7a":R[t]=t5();break;case"7b":R[t]=n5();break;case"7c":R[t]=o5();break;case"7d":R[t]=a5();break;case"7e":R[t]=u5();break;case"7f":R[t]=h5();break;case"80":R[t]=g5();break;case"81":R[t]=p5();break;case"82":R[t]=b5();break;case"83":R[t]=v5();break;case"84":R[t]=D5();break;case"85":R[t]=x5();break;case"86":R[t]=T5();break;case"87":R[t]=E5();break;case"88":R[t]=_5();break;case"89":R[t]=L5();break;case"8a":R[t]=I5();break;case"8b":R[t]=A5();break;case"8c":R[t]=M5();break;case"8d":R[t]=B5();break;case"8e":R[t]=q5();break;case"8f":R[t]=W5();break;case"90":R[t]=J5();break;case"91":R[t]=X5();break;case"92":R[t]=G5();break;case"93":R[t]=K5();break;case"94":R[t]=V5();break;case"95":R[t]=t7();break;case"96":R[t]=n7();break;case"97":R[t]=o7();break;case"98":R[t]=a7();break;case"99":R[t]=u7();break;case"9a":R[t]=h7();break;case"9b":R[t]=g7();break;case"9c":R[t]=p7();break;case"9d":R[t]=b7();break;case"9e":R[t]=v7();break;case"9f":R[t]=D7();break;case"a0":R[t]=x7();break;case"a1":R[t]=T7();break;case"a2":R[t]=E7();break;case"a3":R[t]=_7();break;case"a4":R[t]=L7();break;case"ac":R[t]=I7();break;case"ad":R[t]=A7();break;case"ae":R[t]=M7();break;case"af":R[t]=B7();break;case"b0":R[t]=q7();break;case"b1":R[t]=W7();break;case"b2":R[t]=J7();break;case"b3":R[t]=X7();break;case"b4":R[t]=G7();break;case"b5":R[t]=K7();break;case"b6":R[t]=V7();break;case"b7":R[t]=t9();break;case"b8":R[t]=n9();break;case"b9":R[t]=o9();break;case"ba":R[t]=a9();break;case"bb":R[t]=u9();break;case"bc":R[t]=h9();break;case"bd":R[t]=g9();break;case"be":R[t]=p9();break;case"bf":R[t]=b9();break;case"c0":R[t]=v9();break;case"c1":R[t]=D9();break;case"c2":R[t]=x9();break;case"c3":R[t]=T9();break;case"c4":R[t]=E9();break;case"c5":R[t]=_9();break;case"c6":R[t]=L9();break;case"c7":R[t]=I9();break;case"c8":R[t]=A9();break;case"c9":R[t]=M9();break;case"ca":R[t]=B9();break;case"cb":R[t]=q9();break;case"cc":R[t]=W9();break;case"cd":R[t]=J9();break;case"ce":R[t]=X9();break;case"cf":R[t]=G9();break;case"d0":R[t]=K9();break;case"d1":R[t]=V9();break;case"d2":R[t]=tV();break;case"d3":R[t]=nV();break;case"d4":R[t]=oV();break;case"d5":R[t]=aV();break;case"d6":R[t]=uV();break;case"d7":R[t]=hV();break;case"f9":R[t]=gV();break;case"fa":R[t]=pV();break;case"fb":R[t]=bV();break;case"fc":R[t]=vV();break;case"fd":R[t]=DV();break;case"fe":R[t]=xV();break;case"ff":R[t]=TV();break;default:return""}return R[t][i]}function R0e(n){return(n+256).toString(16).substr(-2)}function L0e(n){for(var e,t,i,r,o,s,a;Array.isArray(n);)n=n[0];switch(n.length){case 1:return xo(n);case 2:return e=xo(n.substr(0,1)),t=xo(n.substr(1,1)),o=(e&3)<<6|t&63,s=(e&28)>>2,s<<8|o;case 3:return e=xo(n.substr(0,1)),t=xo(n.substr(1,1)),i=xo(n.substr(2,1)),o=(t&3)<<6|i&63,s=(e&15)<<4|(t&60)>>2,s<<8|o;default:return e=xo(n.substr(0,1)),t=xo(n.substr(1,1)),i=xo(n.substr(2,1)),r=xo(n.substr(3,1)),o=(i&3)<<6|r&63,s=(t&15)<<4|(i&60)>>2,a=(e&7)<<5|(t&48)>>4,a<<16|s<<8|o}}function xo(n){var e=n+"",t=e.charCodeAt(0);if(55296<=t&&t<=56319){var i=t;if(e.length===1)return t;var r=e.charCodeAt(1);return(i-55296)*1024+(r-56320)+65536}return 56320<=t&&t<=57343,t}});var PV=_(()=>{"use strict"});async function LV(n,e,t,i=""){if(e=="vim")return(await n.eval(t)).toString();if(e=="shell"){let s=await(0,RV.promisify)(_V.exec)(t);return s.stdout.replace(/\s*$/,"")||s.stderr}let r=[`snip._reset("${Qf(i)}")`];r.push(...t.split(/\r?\n/).map(s=>s.replace(/\t/g," "))),await xh(n,r);let o=await n.call("pyxeval","str(snip.rv)");return typeof o=="string"?o:""}function oD(n){let{range:e,regex:t,line:i}=n,r=[];if(t&&e!=null){let o=i.slice(e.start.character,e.end.character);r.push(`pattern = re.compile("${Qf(t)}")`),r.push(`match = pattern.search("${Qf(o)}")`)}else r.push("match = None");return r.join(` -`)}function FV(n){let{range:e,context:t,line:i}=n,r=["import re, os, vim, string, random",`path = vim.eval('expand("%:p")') or ""`,"fn = os.path.basename(path)"];t?(r.push("snip = ContextSnippet()"),r.push(`context = ${t}`)):r.push("context = True");let o=`(${e.start.line},${Buffer.byteLength(i.slice(0,e.start.character))})`,s=`(${e.start.line},${Buffer.byteLength(i.slice(0,e.end.character))})`,a=i.match(/^\s*/)[0];return r.push(`snip = SnippetUtil("${Qf(a)}", ${o}, ${s}, context)`),r}async function xh(n,e){try{await n.command(`pyx ${I0e(e.join(` -`))}`)}catch(t){let i=new Error(t instanceof Error?t.message:t.toString());throw i.stack=`Error on execute python code: -${e.join(` -`)} -`+(t instanceof Error?t.stack:t),i}}function Kf(n){let e=Object.keys(n),t=e.length?Math.max.apply(null,e.map(r=>Number(r))):0,i=new Array(t).fill('""');for(let[r,o]of Object.entries(n))i[r]=`"${Qf(o)}"`;return`t = (${i.join(",")},)`}function I0e(n,e=!1){if(!F0e&&e===!1)return n;let t=["import traceback, vim","vim.vars['errmsg'] = ''","try:"];return t.push(...n.split(` -`).map(i=>" "+i)),t.push("except Exception as e:"),t.push(" vim.vars['errmsg'] = traceback.format_exc()"),t.join(` -`)}function Qf(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\t/g,"\\t").replace(/\n/g,"\\n")}function IV(n){if(n.indexOf("\\z")!==-1)throw new Error("pattern \\z not supported");if(n.indexOf("(?s)")!==-1)throw new Error("pattern (?s) not supported");if(n.indexOf("(?x)")!==-1)throw new Error("pattern (?x) not supported");if(n.indexOf(` -`)!==-1)throw new Error("pattern \\n not supported");if(A0e.test(n))throw new Error("pattern (?id/name)yes-pattern|no-pattern not supported");return n.replace(B0e,(e,t)=>e=="\\A"?"^":e.startsWith("(?#")?"":e.startsWith("(?P<")?"(?"+e.slice(3):e.startsWith("(?P=")?`\\k<${t}>`:"")}var _V,RV,SQe,F0e,j0e,A0e,O0e,M0e,N0e,B0e,j_=_(()=>{"use strict";_V=require("child_process"),RV=require("util"),SQe=H()("snippets-eval"),F0e=process.env.VIM_NODE_RPC=="1";j0e=/\\A/,A0e=/\(\?\(\w+\).+\|/,O0e=/\(\?#.*?\)/,M0e=/\(\?P<\w+>.*?\)/,N0e=/\(\?P=(\w+)\)/,B0e=new RegExp(`${O0e.source}|${j0e.source}|${M0e.source}|${N0e.source}`,"g")});function jV(n,e){let t=[...n];for(;t.length>0;){let i=t.shift();if(!e(i))break;t.unshift(...i.children)}}function W0e(n,e=[]){let t="",i=n.length,r=0,o=!1,s=!1;for(;r{"use strict";AV=x(EV());so();PV();_e();j_();H0e=H()("snippets-parser"),q0e=["d","g","i","m","s","u","y"],qr=class{static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}constructor(){this.text("")}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e=this.pos,t=0,i=this.value.charCodeAt(e),r;if(r=qr._table[i],typeof r=="number")return this.pos+=1,{type:r,pos:e,len:1};if(qr.isDigitCharacter(i)){r=8;do t+=1,i=this.value.charCodeAt(e+t);while(qr.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}if(qr.isVariableCharacter(i)){r=9;do i=this.value.charCodeAt(e+ ++t);while(qr.isVariableCharacter(i)||qr.isDigitCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}r=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof qr._table[i]>"u"&&!qr.isDigitCharacter(i)&&!qr.isVariableCharacter(i));return this.pos+=t,{type:r,pos:e,len:t}}},A_=qr;A_._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13,[40]:15,[41]:16,[96]:17,[33]:18};hs=class{constructor(){this._children=[]}appendChild(e){return e instanceof Ct&&this._children[this._children.length-1]instanceof Ct?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}setOnlyChild(e){e.parent=this,this._children=[e]}replaceChildren(e){for(let t of e)t.parent=this;this._children=e}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof ep)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}},Ct=class extends hs{constructor(e){super();this.value=e}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}toString(){return this.value}toTextmateString(){return Ct.escape(this.value)}len(){return this.value.length}clone(){return new Ct(this.value)}},cs=class extends hs{constructor(e,t,i){super();this.code=e;this.kind=t;this._value="";this._related=[];if(t==="python"){let{_related:r}=this,o,s=/\bt\[(\d+)\]/g;for(;o=s.exec(e),o!=null;){let a=parseInt(o[1],10);r.includes(a)||r.push(a)}}typeof i=="string"&&(this._value=i)}get related(){return this._related}update(e){if(this.kind!=="python")return;let t=new Set;this.code=this.code.replace(/\bt\[(\d+)\]/g,(i,r)=>{let o=Number(r),s=e.has(o)?e.get(o):o;return t.add(s),`t[${s}]`}),this._related=Array.from(t)}get index(){if(this.parent instanceof ot)return this.parent.index}async resolve(e){var i;if(!this.code.length)return;let t=await LV(e,this.kind,this.code,(i=this._value)!=null?i:"");t!=null&&(this._value=t)}len(){return this._value.length}toString(){return this._value}get value(){return this._value}toTextmateString(){let e="";return this.kind=="python"?e="!p ":this.kind=="shell"?e="":this.kind=="vim"&&(e="!v "),"`"+e+this.code+"`"}clone(){return new cs(this.code,this.kind,this.value)}},O_=class extends hs{},ot=class extends O_{constructor(e){super();this.index=e;this.primary=!1}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof zf?this._children[0]:void 0}toTextmateString(){let e="";return this.transform&&(e=this.transform.toTextmateString()),this.children.length===0&&!this.transform?`$${this.index}`:this.children.length===0?`\${${this.index}${e}}`:this.choice?`\${${this.index}|${this.choice.toTextmateString()}|${e}}`:`\${${this.index}:${this.children.map(t=>t.toTextmateString()).join("")}${e}}`}clone(){let e=new ot(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}},zf=class extends hs{constructor(){super(...arguments);this.options=[]}appendChild(e){return e instanceof Ct&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}toTextmateString(){return this.options.map(e=>e.value.replace(/\||,/g,"\\$&")).join(",")}len(){return this.options[0].len()}clone(){let e=new zf;for(let t of this.options)e.appendChild(t);return e}},sD=class extends hs{constructor(){super(...arguments);this.ascii=!1;this.ultisnip=!1}resolve(e){let t=!1,i=e.replace(this.regexp,(...r)=>(t=!0,this._replace(r.slice(0,-2))));return!t&&this._children.some(r=>r instanceof hr&&Boolean(r.elseValue))&&(i=this._replace([])),i}_replace(e){let t="",i=[];for(let r of this._children)if(r instanceof hr){let o=r.resolve(e[r.index]||"");if(this.ultisnip&&o.indexOf("\\")!==-1){let s=t.length;i.push(...wH(o,"\\").map(a=>a+s))}t+=o}else r instanceof Vf?t+=r.resolve(e[r.index]):t+=r.toString();return this.ascii&&(t=(0,AV.default)(t)),this.ultisnip?W0e(t,i):t}toString(){return""}toTextmateString(){return`/${this.regexp.source}/${this.children.map(e=>e.toTextmateString())}/${(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")}`}clone(){let e=new sD;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}},Vf=class extends hs{constructor(e,t,i){super();this.index=e;this.ifValue=t;this.elseValue=i}resolve(e){return e?this.ifValue:this.elseValue}toTextmateString(){return"(?"+this.index+":"+this.ifValue+(this.elseValue?":"+this.elseValue:"")+")"}clone(){return new Vf(this.index,this.ifValue,this.elseValue)}},hr=class extends hs{constructor(e,t,i,r){super();this.index=e;this.shorthandName=t;this.ifValue=i;this.elseValue=r}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){let t=e.match(/[a-z]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join(""):e}toTextmateString(){let e="${";return e+=this.index,this.shorthandName?e+=`:/${this.shorthandName}`:this.ifValue&&this.elseValue?e+=`:?${this.ifValue}:${this.elseValue}`:this.ifValue?e+=`:+${this.ifValue}`:this.elseValue&&(e+=`:-${this.elseValue}`),e+="}",e}clone(){return new hr(this.index,this.shorthandName,this.ifValue,this.elseValue)}},So=class extends O_{constructor(e,t){super();this.name=e;this._resolved=!1;typeof t=="boolean"&&(this._resolved=t)}get resolved(){return this._resolved}async resolve(e){let t=await e.resolve(this);if(this._resolved=!0,t&&t.includes(` -`)){let i="";this.snippet.walk(l=>{if(l==this)return!1;if(l instanceof Ct){let u=l.toString().split(/\r?\n/);i=u[u.length-1].match(/^\s*/)[0]}return!0});let r=t.split(` -`),o=r.filter(l=>l.length>0).map(l=>l.match(/^\s*/)[0]),s=o.length==0?"":o.reduce((l,u)=>l.lengthu==0||l.length==0||!l.startsWith(s)?l:i+l.slice(s.length)).join(` -`)}return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new Ct(t)],!0):!1}toTextmateString(){let e="";return this.transform&&(e=this.transform.toTextmateString()),this.children.length===0?`\${${this.name}${e}}`:`\${${this.name}:${this.children.map(t=>t.toTextmateString()).join("")}${e}}`}clone(){let e=new So(this.name,this.resolved);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}};ep=class extends hs{constructor(e){super();this.ultisnip=e===!0}get hasPython(){return this.ultisnip?this.pyBlocks.length>0:!1}get hasCodeBlock(){if(!this.ultisnip)return!1;let{pyBlocks:e,otherBlocks:t}=this;return e.length>0||t.length>0}get values(){if(this._values)return this._values;let e={},t=0;this.placeholders.forEach(i=>{t=Math.max(i.index,t),i.transform==null&&(i.primary||e[i.index]===void 0)&&(e[i.index]=i.toString())});for(let i=0;i<=t;i++)e[i]===void 0&&(e[i]="");return this._values=e,e}get orderedPyIndexBlocks(){let e=[],t=this.pyBlocks.filter(s=>typeof s.index=="number");if(t.length==0)return e;let i=t.map(s=>s.index),r=[],o=s=>{let{related:a}=s;return a.length==0||a.every(l=>!i.includes(l)||r.includes(l))?(r.push(s.index),e.push(s),!0):!1};for(;t.length>0;){let s=!1;for(let a of t)o(a)&&(s=!0);if(!s)break;t=t.filter(a=>!r.includes(a.index))}return e}async evalCodeBlocks(e,t){let{pyBlocks:i,otherBlocks:r}=this;if(await Promise.all(r.map(o=>{let s=o.value;return o.resolve(e).then(()=>{o.parent instanceof ot&&s!==o.value&&this.onPlaceholderUpdate(o.parent)})})),i.length){let o=Kf(this.values);await xh(e,[...t,o]);for(let a of i){let l=a.value;await a.resolve(e),l!==a.value&&a.parent instanceof ot&&(this.onPlaceholderUpdate(a.parent),await xh(e,[Kf(this.values)]))}for(let a of this.orderedPyIndexBlocks)await this.updatePyIndexBlock(e,a);let s=i.filter(a=>a.index===void 0&&a.related.length>0);for(let a of s)await a.resolve(e)}}async updatePythonCodes(e,t){let i;if(t instanceof ot)i=t.index;else for(;t.parent;){if(t instanceof ot){i=t.index;break}t=t.parent}if(i===void 0)return;let r=this.getDependentPyIndexBlocks(i);await xh(e,[Kf(this.values)]);for(let s of r)await this.updatePyIndexBlock(e,s);let o=this.pyBlocks.filter(s=>s.index===void 0&&s.related.length>0);for(let s of o)await s.resolve(e)}getDependentPyIndexBlocks(e){let t=[],i=[],r=this.pyBlocks.filter(s=>typeof s.index=="number"),o=s=>{let a=r.filter(l=>!i.includes(l.index)&&l.related.includes(s));a.length>0&&(t.push(...a),a.forEach(l=>{o(l.index)}))};return o(e),t}async updatePyIndexBlock(e,t){let i=t.value;await t.resolve(e),i!==t.value&&(t.parent instanceof ot&&this.onPlaceholderUpdate(t.parent),await xh(e,[Kf(this.values)]))}get placeholderInfo(){if(!this._placeholders){let e=[],t=[],i=[],r=[];this.walk(o=>{if(o instanceof ot)r.push(o);else if(o instanceof So){let s=o.name.charCodeAt(0);(s<65||s>90)&&e.push(o)}else o instanceof cs&&(o.kind==="python"?t.push(o):i.push(o));return!0}),this._placeholders={placeholders:r,pyBlocks:t,otherBlocks:i,variables:e}}return this._placeholders}get variables(){return this.placeholderInfo.variables}get placeholders(){return this.placeholderInfo.placeholders}get pyBlocks(){return this.placeholderInfo.pyBlocks}get otherBlocks(){return this.placeholderInfo.otherBlocks}get maxIndexNumber(){let{placeholders:e}=this;return e.reduce((t,i)=>Math.max(t,i.index),0)}get first(){var o,s;let{placeholders:e,variables:t}=this,[i,r]=oW(e.filter(a=>!a.transform),a=>a.index!==0);if(i.length){let a=Math.min.apply(null,i.map(u=>u.index)),l=i.filter(u=>u.index==a);return(o=l.find(u=>u.primary))!=null?o:l[0]}return t.length?t[0]:(s=r.find(a=>a.primary))!=null?s:r[0]}insertSnippet(e,t,i,r){let o=t instanceof ot?t.index:this.maxIndexNumber+1,[s,a]=i,l=r?oD(r):void 0,u=new Fa(!!r,l).parse(e,!0),c=u.maxIndexNumber+1,h=new Map;for(let p of u.placeholders){let m=p.index;p.isFinalTabstop?p.index=c+o:p.index=p.index+o,h.set(m,p.index)}r&&u.pyBlocks.forEach(p=>{p.update(h)});let d=new Map;this.walk(p=>{if(p instanceof ot&&p.index>o){let m=p.index;p.index=p.index+c,d.set(m,p.index)}return!0}),this.hasPython&&this.walk(p=>(p instanceof cs&&p.update(d),!0));let g=u.first,f=u.children.slice();return s&&f.unshift(new Ct(s)),a&&f.push(new Ct(a)),this.replace(t,f),g}async update(e,t,i){this.resetMarker(t,i),this.hasPython&&await this.updatePythonCodes(e,t)}deleteText(e,t){let i=0,r,o=e+t,s=0;if(this.walk(d=>{let g=d.len();return d instanceof Ct&&e>=i&&i+g>=o?(r=d,s=e-i,!1):(i+=g,!0)}),!r)return!1;let a=r.parent,l=r.value,u=l.slice(0,s)+l.slice(s+t),c=a.children.slice(),h=c.indexOf(r);return c.splice(h,1,new Ct(u)),a.replaceChildren(c),!0}resetMarker(e,t){let i;e instanceof ot?i=this.placeholders.filter(r=>r.index==e.index):i=this.variables.filter(r=>r.name==e.name);for(let r of i){let o=r.transform?r.transform.resolve(t):t;r.setOnlyChild(new Ct(o||""))}this.synchronizeParents(i),this.reset()}onPlaceholderUpdate(e){let t=e.toString(),i;e instanceof ot?(this.values[e.index]=t,i=this.placeholders.filter(r=>r.index==e.index)):i=this.variables.filter(r=>r.name==e.name);for(let r of i){if(r===e)continue;let o=r.transform?r.transform.resolve(t):t;r.setOnlyChild(new Ct(o||""))}this.synchronizeParents(i)}synchronizeParents(e){let t=[];e.forEach(i=>{let r=i.parent;r instanceof ot&&!t.includes(r)&&t.push(r)}),t.forEach(i=>{this.onPlaceholderUpdate(i)})}offset(e){let t=0,i=!1;return this.walk(r=>r===e?(i=!0,!1):(t+=r.len(),!0)),i?t:-1}fullLen(e){let t=0;return jV([e],i=>(t+=i.len(),!0)),t}getTextBefore(e,t){let i="",r=o=>{let s=o.parent;if(!s)return;let a="";for(let l of s.children){if(l===o)break;a=a+l.toString()}i=a+i,s!=t&&r(s)};return r(e),i}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof ot&&t.push(i),i=i.parent;return t}async resolveVariables(e){let t=[];this.walk(i=>(i instanceof So&&!i.resolved&&t.push(i),!0)),t.length&&(await Promise.all(t.map(i=>i.resolve(e))),this.synchronizeParents(t))}appendChild(e){return this.reset(),super.appendChild(e)}replace(e,t){e.replaceChildren(t),(e instanceof ot||e instanceof So)&&this.onPlaceholderUpdate(e),this.reset()}reset(){this._placeholders=void 0,this._values=void 0}toTextmateString(){return this.children.reduce((e,t)=>e+t.toTextmateString(),"")}clone(){let e=new ep(this.ultisnip);return e._children=this.children.map(t=>t.clone()),e}walk(e){jV(this.children,e)}},Fa=class{constructor(e,t){this.ultisnip=e;this.matchCode=t;this._scanner=new A_}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static isPlainText(e){let t=new Fa().parse(e.replace(/\$0$/,""),!1);return t.children.length==1&&t.children[0]instanceof Ct}text(e){return this.parse(e,!1).toString()}parse(e,t){this._scanner.text(e),this._token=this._scanner.next();let i=new ep(this.ultisnip);for(;this._parse(i););let r=new Map,o=[],s=[],a=!1;i.walk(c=>(c instanceof ot&&(c.index==0&&(a=!0),c.children.some(h=>h instanceof ot)?s.push(c):!r.has(c.index)&&c.children.length>0?(c.primary=!0,r.set(c.index,c.toString())):o.push(c)),!0));let l=s.map(c=>c.index);for(let c of o)if(r.has(c.index)){let h=r.get(c.index),d=new Ct(c.transform?c.transform.resolve(h):h);c.setOnlyChild(d)}else if(!l.includes(c.index))if(c.transform){let h=new Ct(c.transform.resolve(""));c.setOnlyChild(h)}else c.primary=!0,r.set(c.index,"");let u=()=>{let c=new Set;for(let h of s)if(h.children.every(d=>!(d instanceof ot)||r.has(d.index))){let d=h.toString();r.set(h.index,d);for(let g of o.filter(f=>f.index==h.index)){let f=new Ct(g.transform?g.transform.resolve(d):d);g.setOnlyChild(f)}c.add(h.index)}s=s.filter(h=>!c.has(h.index)),!(s.length==0||!c.size)&&u()};return u(),!a&&t&&i.appendChild(new ot(0)),i}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e,t=!1){if(this._token.type===14)return!1;let i=this._token,r;for(;this._token.type!==e||t&&(r==null?void 0:r.type)===5;)if(t&&(r=this._token),this._token=this._scanner.next(),this._token.type===14)return!1;let o=this._scanner.value.substring(i.pos,this._token.pos);return this._token=this._scanner.next(),o}_parse(e){return this._parseEscaped(e)||this._parseCodeBlock(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||this.ultisnip&&this._accept(3,!0)||this.ultisnip&&this._accept(17,!0)||t,e.appendChild(new Ct(t)),!0):!1}_parseTabstopOrVariableName(e){let t,i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new ot(Number(t)):new So(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);let o=new ot(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Ct("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else if(o.index>0&&this._accept(7)){let s=new zf;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(s),this._accept(4)))return e.appendChild(o),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseChoiceElement(e){let t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let r;if((r=this._accept(5,!0))?r=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||r:r=this._accept(void 0,!0),!r)return this._backTo(t),!1;i.push(r)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new Ct(i.join(""))),!0)}_parseComplexVariable(e){let t,i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);let o=new So(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(o),!0;if(!this._parse(o))return e.appendChild(new Ct("${"+t+":")),o.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(o)?(e.appendChild(o),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(o),!0):this._backTo(i)}_parseTransform(e){let t=new sD;t.ultisnip=this.ultisnip===!0;let i="",r="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,t.appendChild(new Ct(s));continue}if(!(this._parseFormatString(t)||this._parseConditionString(t)||this._parseAnything(t)))return!1}let o=!1;for(;!this._accept(4);){if(this._token.type!==14){let s=this._accept(void 0,!0);s=="a"?o=!0:(q0e.includes(s)||H0e.error(`Unknown regex option: ${s}`),r+=s);continue}return!1}try{o&&(t.ascii=!0),this.ultisnip&&(i=IV(i)),t.regexp=new RegExp(i,r)}catch{return!1}return e.transform=t,!0}_parseConditionString(e){if(!this.ultisnip)return!1;let t=this._token;if(!this._accept(15))return!1;if(!this._accept(13))return this._backTo(t),!1;let i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!this._accept(1))return this._backTo(t),!1;let r=this._until(16,!0);if(r){let o=0;for(;o!/^\s*$/.test(u));let a=s[0]?s[0].match(/^\s*/)[0]:"";a.length&&s.every(u=>u.startsWith(a))&&(s=s.map(u=>u.slice(a.length))),a==" "&&s[0].startsWith(a)&&(s[0]=s[0].slice(1));let l=new cs(o+s.join(` -`),"python");e.appendChild(l)}return!0}}return this._backTo(t),!1}_parseAnything(e){if(this._token.type!==14){let t=this._scanner.tokenText(this._token);return e.appendChild(new Ct(t)),this._accept(void 0),!0}return!1}},Y0e=[":","(",")","{","}"]});function M_(n,e){let{range:t,newText:i}=n,r=e.length,o=i.length;if(r===0||o===0)return n;let{start:s,end:a}=t,l=0;for(let d=1;d<=Math.min(o,r)&&i[d-1]===e[d-1];d++)l=d;let u=0,c=Math.min(o-l,r-l);if(c>0)for(let d=1;d<=c&&i[o-d]===e[r-d];d++)u=d;let h=u==0?i.slice(l):i.slice(l,-u);return l>0&&(s=_i(s,i.slice(0,l))),u>0&&(a=_i(t.start,e.slice(0,-u))),Ni.TextEdit.replace(Ni.Range.create(s,a),h)}function OV(n,e,t){let i=Ni.Range.create(n,_i(n,t));return ht(e,i)==0}function MV(n,e,t){var o;if(t.lines.length=0;s--){let a=(o=t.lines[s])!=null?o:"";if(s===n.line){let l=e.lines[s].slice(0,n.character);if(!a.startsWith(l)){r=!1;break}}else if(a!==e.lines[s]){r=!1;break}}return r}function NV(n,e,t){let i=e.lines.length;if(t.lines.length{let l=s.match(/^\s*/)[0],u=l,c=l.startsWith(" ");return c&&t.insertSpaces?u=r.repeat(l.length):!c&&!t.insertSpaces&&(u=r.repeat(l.length/o)),(a==0||s.length==0?"":e)+u+s.slice(l.length)}),i.join(` -`)}function qV(n){return!!(/^\s/.test(n)||n.indexOf(` -`)!==-1)}var Ni,BQe,lD,N_=_(()=>{"use strict";Ni=x(q());Sc();wt();Ar();j_();aD();BQe=H()("snippets-snipet"),lD=class{constructor(e,t,i,r){this.snippetString=e;this.position=t;this.nvim=i;this.resolver=r}async init(e,t=!1){let i=e?oD(e):void 0,o=new Fa(!!e,i).parse(this.snippetString,!0);this.tmSnippet=o,await this.resolve(e),this.synchronize(),t||(this.nvim.call("coc#compat#del_var",["coc_selected_text"],!0),this.nvim.call("coc#compat#del_var",["coc_last_placeholder"],!0))}async resolve(e){let{snippet:t}=this.tmSnippet,{resolver:i,nvim:r}=this;if(i&&await t.resolveVariables(i),e&&e.noPython!==!0){let o=[];t.hasPython&&(o=FV(e)),await t.evalCodeBlocks(r,o)}}getRanges(e){let t=e.marker;if(e.value.length==0)return[];let r=this._placeholders.filter(l=>l.index==e.index).map(l=>l.range),o=this.tmSnippet.enclosingPlaceholders(t),s,a=t.parent;if(t instanceof ot){let l=t.index;s=this.tmSnippet.placeholders.filter(u=>u.index==l&&u.parent==a)}else{let l=t.name;s=this.tmSnippet.variables.filter(u=>u.name==l&&u.parent==a)}return o.forEach(l=>{let u=this._placeholders.filter(c=>c.index==l.index&&c.marker!==l);if(!!u.length)for(let c of s){let h=this.tmSnippet.getTextBefore(c,l);u.forEach(d=>{if(d.transform)r.push(d.range);else{let g=d.range.start;r.push(Ni.Range.create(_i(g,h),_i(g,h+c.toString())))}})}}),r.filter(l=>!Tt(l))}getSortedPlaceholders(e){let t=e?[e]:[],i=this._placeholders.filter(r=>r!==e&&!r.transform);return i.sort((r,o)=>r.primary!==o.primary?r.primary?-1:1:r.index==0||o.index==0?r.index==0?1:-1:r.index-o.index),t.push(...i),t}get hasPython(){return this.tmSnippet.pyBlocks.length>0}resetStartPosition(e){this.position=e,this.synchronize()}get start(){return Object.assign({},this.position)}get range(){return Ni.Range.create(this.position,_i(this.position,this._text))}get text(){return this._text}get finalCount(){return this._placeholders.filter(e=>e.index==0).length}get placeholders(){return this._placeholders.map(e=>e.marker)}get firstPlaceholder(){let e=0;for(let t of this._placeholders)t.index==0||t.transform||(e==0||t.indext.marker===e)}getPlaceholder(e){let t=this._placeholders.filter(r=>r.index==e&&!r.transform),i=t.find(r=>r.primary)||t[0];return i!=null?i:t[0]}getPrevPlaceholder(e){if(e<=1)return;let t=this._placeholders.filter(r=>r.index1;){e=e-1;let r=t.filter(o=>o.index==e);if(r.length){i=r.find(o=>o.primary)||r[0];break}}return i}getNextPlaceholder(e){let t=this._placeholders.filter(s=>!s.transform),i,r=t.map(s=>s.index),o=Math.max.apply(null,r);for(let s=e+1;s<=o+1;s++){let a=s==o+1?0:s,l=t.filter(u=>u.index==a);if(l.length){i=l.find(u=>u.primary)||l[0];break}}return i}getPlaceholderByRange(e){return this._placeholders.find(t=>Pi(e,t.range))}async insertSnippet(e,t,i,r){if(r){let{start:s,end:a}=e.range;this.nvim.setVar("coc_last_placeholder",{current_text:e.value,start:{line:s.line,col:s.character,character:s.character},end:{line:a.line,col:a.character,character:a.character}},!0)}let o=this.tmSnippet.insertSnippet(t,e.marker,i,r);return await this.resolve(r),this.synchronize(),o}getNewText(e,t){let{before:i,after:r}=e;if(!!t.startsWith(i)&&!(t.length{this.tmSnippet=l,this.synchronize()});let u=Ni.Range.create(o,_i(o,a));if(await this.tmSnippet.update(this.nvim,s,i),r.isCancellationRequested)return;this.synchronize();let c=this._placeholders.find(d=>d.marker==s),h=c?c.before:a;return{text:this._text,delta:Wb(t,Ni.TextEdit.replace(u,h))}}removeText(e,t){let i=this.tmSnippet.deleteText(e,t);return i&&this.synchronize(),i}synchronize(){let e=this.tmSnippet,{line:t,character:i}=this.position,r=In.create("untitled:/1","snippet",0,e.toString()),{placeholders:o,variables:s,maxIndexNumber:a}=e,l=new Map,u=a+1;this._placeholders=[...o,...s].map(c=>{let h=e.offset(c),d=r.positionAt(h),g={line:t+d.line,character:d.line==0?i+d.character:d.character},f;if(c instanceof So){let w=c.name;l.has(w)?f=l.get(w):(l.set(w,u),f=u,u=u+1)}else f=c.index;let p=c.toString(),m=_i(d,p);return{index:f,value:p,marker:c,transform:!!c.transform,range:Ni.Range.create(g,_i(g,p)),before:r.getText(Ni.Range.create(Ni.Position.create(0,0),d)),after:r.getText(Ni.Range.create(m,Ni.Position.create(r.lineCount,0))),primary:c instanceof ot&&c.primary===!0}}),this._text=this.tmSnippet.toString()}}});function tp(n){return n<10?"0"+n:n.toString()}function YV(n){let e,t,i,r=n.split(",");for(let o of r){if(e&&t&&i)break;if(!o.includes(":"))continue;let[s,a]=o.split(":");s.includes("s")?e=a:s.includes("e")?t=a:!i&&s==""&&(i=a)}return{start:e,end:t,single:i}}function J0e(n){if(n.endsWith("%s"))return n.slice(0,-2).trim()}var ip,WQe,uD,WV=_(()=>{"use strict";ip=x(require("path"));Ne();De();WQe=H()("snippets-variable");uD=class{constructor(e,t){this.nvim=e;this.workspaceFolder=t;this._variableToValue={};let i=new Date,r=i.getFullYear().toString();Object.assign(this._variableToValue,{CURRENT_YEAR:r,CURRENT_YEAR_SHORT:r.slice(-2),CURRENT_MONTH:tp(i.getMonth()+1),CURRENT_DATE:tp(i.getDate()),CURRENT_HOUR:tp(i.getHours()),CURRENT_MINUTE:tp(i.getMinutes()),CURRENT_SECOND:tp(i.getSeconds()),CURRENT_DAY_NAME:i.toLocaleString("en-US",{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.toLocaleString("en-US",{weekday:"short"}),CURRENT_MONTH_NAME:i.toLocaleString("en-US",{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.toLocaleString("en-US",{month:"short"}),TM_FILENAME:null,TM_FILENAME_BASE:null,TM_DIRECTORY:null,TM_FILEPATH:null,YANK:null,TM_LINE_INDEX:null,TM_LINE_NUMBER:null,TM_CURRENT_LINE:null,TM_CURRENT_WORD:null,TM_SELECTED_TEXT:null,VISUAL:null,CLIPBOARD:null,RELATIVE_FILEPATH:null,RANDOM:null,RANDOM_HEX:null,UUID:null,BLOCK_COMMENT_START:null,BLOCK_COMMENT_END:null,LINE_COMMENT:null,WORKSPACE_NAME:null,WORKSPACE_FOLDER:null})}async resolveValue(e){let{nvim:t}=this;if(["TM_FILENAME","TM_FILENAME_BASE","TM_DIRECTORY","TM_FILEPATH"].includes(e)){let i=await t.eval('expand("%:p")');if(e==="TM_FILENAME")return ip.default.basename(i);if(e==="TM_FILENAME_BASE")return ip.default.basename(i,ip.default.extname(i));if(e==="TM_DIRECTORY")return ip.default.dirname(i);if(e==="TM_FILEPATH")return i}if(e==="YANK")return await t.call("getreg",['""']);if(e==="TM_LINE_INDEX")return(await t.call("line",["."])-1).toString();if(e==="TM_LINE_NUMBER")return(await t.call("line",["."])).toString();if(e==="TM_CURRENT_LINE")return await t.call("getline",["."]);if(e==="TM_CURRENT_WORD")return await t.eval("expand('')");if(e==="TM_SELECTED_TEXT"||e=="VISUAL")return await t.eval("get(g:,'coc_selected_text', v:null)");if(e==="CLIPBOARD")return await t.eval("@*");if(e==="RANDOM")return Math.random().toString().slice(-6);if(e==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(e==="UUID")return re();if(["RELATIVE_FILEPATH","WORKSPACE_NAME","WORKSPACE_FOLDER"].includes(e)){let i=await t.eval('expand("%:p")'),r=this.workspaceFolder.getWorkspaceFolder(B.file(i));if(e==="RELATIVE_FILEPATH")return this.workspaceFolder.getRelativePath(i);if(e==="WORKSPACE_NAME")return r.name;if(e==="WORKSPACE_FOLDER")return B.parse(r.uri).fsPath}if(e==="LINE_COMMENT"){let i=await t.eval("&commentstring"),r=J0e(i);if(r)return r;let o=await t.eval("&comments"),{single:s}=YV(o);return s!=null?s:""}if(["BLOCK_COMMENT_START","BLOCK_COMMENT_END"].includes(e)){let i=await t.eval("&comments"),{start:r,end:o}=YV(i);if(e==="BLOCK_COMMENT_START")return r!=null?r:"";if(e==="BLOCK_COMMENT_END")return o!=null?o:""}}async resolve(e){let t=e.name,i=this._variableToValue[t];if(i!=null)return i.toString();if(this._variableToValue.hasOwnProperty(t)){let r=await this.resolveValue(t);return!r&&e.children.length?e.toString():r==null?"":r.toString()}return e.children.length?e.toString():t}}});var Bi,ds,B_,cD,ZV=_(()=>{"use strict";Bi=x(q());no();Vt();wt();_e();Ee();K();aD();N_();WV();ds=H()("snippets-session"),B_="snippets",cD=class{constructor(e,t,i=!1,r=!1){this.nvim=e;this.document=t;this.enableHighlight=i;this.preferComplete=r;this.mutex=new ei;this._applying=!1;this._isActive=!1;this._snippet=null;this._onCancelEvent=new Bi.Emitter;this.onCancel=this._onCancelEvent.event;this.disposable=t.onDocumentChange(async o=>{if(this._applying||!this._isActive)return;let s=o.contentChanges;s.length!==0&&await this.synchronize({version:o.textDocument.version,change:s[0]})})}async start(e,t,i=!0,r){var l;let{document:o}=this,s=this.getReplacePlaceholder(t),a=[];if(s){let u=this.snippet.range,c=o.textDocument.getText(u),h=BV(s.value,s.range,t);this.current=await this.snippet.insertSnippet(s,e,h,r);let d=M_({range:u,newText:this.snippet.text},c);a.push(d)}else{let u=new uD(this.nvim,y.workspaceFolderControl),c=new lD(e,t.start,this.nvim,u);if(await c.init(r),this._snippet=c,this.current=(l=c.firstPlaceholder)==null?void 0:l.marker,a.push(Bi.TextEdit.replace(t,c.text)),e.replace(/\$0$/,"").endsWith(` -`)){let h=o.getline(t.start.line),d=h.slice(t.end.character);if(d.length){let g=t.end.character,f=d.match(/^\s*/)[0].length,p=Bi.Range.create(t.end.line,g,t.end.line,g+f);a.push(Bi.TextEdit.replace(p,h.match(/^\s*/)[0]))}}}if(await this.applyEdits(a),this.textDocument=o.textDocument,this.activate(),i&&this.current){let u=this.snippet.getPlaceholderByMarker(this.current);await this.selectPlaceholder(u,!0)}return this._isActive}async applyEdits(e){this._applying=!0,await this.document.applyEdits(e),this._applying=!1}getReplacePlaceholder(e){if(!this.snippet)return;let t=this.findPlaceholder(e);if(!(!t||t.index==0))return t}activate(){this._isActive||(this._isActive=!0,this.nvim.call("coc#snippet#enable",[this.preferComplete?1:0],!0))}deactivate(){this.cancel(),this._isActive&&(this.disposable.dispose(),this._isActive=!1,this.current=null,this.nvim.call("coc#snippet#disable",[],!0),this.enableHighlight&&this.nvim.call("coc#highlight#clear_highlight",[this.bufnr,B_,0,-1],!0),this._onCancelEvent.fire(void 0),ds.debug(`session ${this.bufnr} cancelled`))}get isActive(){return this._isActive}get bufnr(){return this.document.bufnr}async nextPlaceholder(){await this.forceSynchronize();let e=this.placeholder;if(!e)return;let t=this.snippet.getNextPlaceholder(e.index);t&&await this.selectPlaceholder(t)}async previousPlaceholder(){await this.forceSynchronize();let e=this.placeholder;if(!e)return;let t=this.snippet.getPrevPlaceholder(e.index);t&&await this.selectPlaceholder(t)}async selectCurrentPlaceholder(e=!0){if(await this.forceSynchronize(),!this.snippet)return;let t=this.snippet.getPlaceholderByMarker(this.current);t&&await this.selectPlaceholder(t,e)}async selectPlaceholder(e,t=!0){let{nvim:i,document:r}=this;if(!r||!e)return;let{start:o,end:s}=e.range,a=s.character-o.character,l=G(r.getline(o.line).slice(0,o.character))+1,u=this.current=e.marker;if(u instanceof ot&&u.choice&&u.choice.options.length){let c=u.choice.options.map(h=>h.value);await i.call("coc#snippet#show_choices",[o.line+1,l,a,c]),t&&i.call("coc#util#do_autocmd",["CocJumpPlaceholder"],!0)}else{let c=this.snippet.finalCount;await this.select(e,t),this.highlights(e),e.index==0&&(c==1?(ds.info("Jump to final placeholder, cancelling snippet session"),this.deactivate()):i.call("coc#snippet#disable",[],!0))}}highlights(e,t=!0){if(!this.enableHighlight)return;let i=this.document.buffer;this.nvim.pauseNotification(),i.clearNamespace(B_);let r=this.snippet.getRanges(e);r.length&&i.highlightRanges(B_,"CocSnippetVisual",r),this.nvim.resumeNotification(t,!0)}async select(e,t=!0){let{range:i,value:r}=e,{nvim:o}=this;r.length>0?await o.call("coc#snippet#select",[i.start,i.end,r]):await o.call("coc#snippet#move",[i.start]),t&&o.call("coc#util#do_autocmd",["CocJumpPlaceholder"],!0),o.redrawVim()}async checkPosition(){if(!this.isActive)return;let e=await k.getCursorPosition();this.snippet&&ht(e,this.snippet.range)!=0&&(ds.info("Cursor insert out of range, cancelling snippet session"),this.deactivate())}findPlaceholder(e){let{placeholder:t}=this;return t&&Pi(e,t.range)?t:this.snippet.getPlaceholderByRange(e)||null}async synchronize(e){this.cancel(),await this.mutex.use(()=>{let t=this.textDocument?this.textDocument.version:-1;return e&&(this.document.version!=e.version||e.version-t!==1)&&(e=void 0),this._synchronize(e?e.change:void 0)})}async _synchronize(e){let{document:t,textDocument:i}=this;if(!t.attached||!this._isActive)return;let r=Date.now(),o=t.textDocument;if(o.version==i.version||Me(i.lines,o.lines))return;let{range:s,text:a}=this.snippet;e&&!Pi(e.range,s)&&(e=void 0);let l=NV(s.end,i,o);if(!l){ds.info("Content change after snippet, cancel snippet session"),this.deactivate();return}if(!MV(s.start,i,o)){let v=o.getText(Bi.Range.create(Bi.Position.create(0,0),l));if(v.endsWith(a)){let w=o.positionAt(v.length-a.length);this.snippet.resetStartPosition(w),this.textDocument=o,ds.info("Content change before snippet, reset snippet position");return}ds.info("Before and snippet body changed, cancel snippet session"),this.deactivate();return}let c=this.tokenSource=new Bi.CancellationTokenSource,h=await k.getCursorPosition();if(c.token.isCancellationRequested||t.hasChanged)return;let d,g,f=o.getText(Bi.Range.create(s.start,l)),p=this.placeholder;if(e){for(let v of this.snippet.getSortedPlaceholders(p))if(Pi(e.range,v.range)){d=v,g=this.snippet.getNewText(v,f);break}if(!d&&e.text.length==0&&!Tt(e.range)&&Y2(e.range)){let v=e.range.end.character-e.range.start.character,w=o.getText(Bi.Range.create(s.start,e.range.start)).length;if(this.snippet.removeText(w,v)){this.textDocument=o;return}}}else for(let v of this.snippet.getSortedPlaceholders(p))if(!(Ce(h,v.range.start)<0)&&(g=this.snippet.getNewText(v,f),g!=null&&OV(v.range.start,h,g))){d=v;break}if(!d&&f.endsWith(a)){let v=_i(s.start,f.slice(0,-a.length));this.snippet.resetStartPosition(v),this.textDocument=o,ds.info("Content change before snippet, reset snippet position");return}if(!d){ds.info("Unable to find changed placeholder, cancel snippet session"),this.deactivate();return}let m=await this.snippet.updatePlaceholder(d,h,g,c.token);if(!(m==null||c.token.isCancellationRequested)){if(t.hasChanged){c.cancel(),c.dispose();return}if(c.dispose(),this.current=d.marker,m.text!==f){let v=M_({range:Bi.Range.create(this.snippet.start,l),newText:m.text},f);await this.applyEdits([v]);let{delta:w}=m;(w.line!=0||w.character!=0)&&this.nvim.call("coc#cursor#move_to",[h.line+w.line,h.character+w.character],!0),this.highlights(d,!1),this.nvim.redrawVim()}else this.highlights(d);ds.debug("update cost:",Date.now()-r,m.delta),this.textDocument=this.document.textDocument}}async forceSynchronize(){this.cancel(),await this.document.patchChange(),(await this.mutex.acquire())()}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null)}get placeholder(){if(!(!this.snippet||!this.current))return this.snippet.getPlaceholderByMarker(this.current)}get snippet(){return this._snippet}static async resolveSnippet(e,t,i){let r=await k.getCursorPosition(),o=await e.line,s;i&&(s=Object.assign({range:Bi.Range.create(r,r),line:o},i));let a=new uD(e,y.workspaceFolderControl),l=new lD(t,r,e,a);return await l.init(s,!0),l.text}}});var Yr,H_=_(()=>{"use strict";Yr=class{constructor(e){this._tabstop=1;this.value=e||""}static isSnippetString(e){return e instanceof Yr?!0:e?typeof e.value=="string":!1}static _escape(e){return e.replace(/\$|}|\\/g,"\\$&")}appendText(e){return this.value+=Yr._escape(e),this}appendTabstop(e=this._tabstop++){return this.value+="$",this.value+=e,this}appendPlaceholder(e,t=this._tabstop++){if(typeof e=="function"){let i=new Yr;i._tabstop=this._tabstop,e(i),this._tabstop=i._tabstop,e=i.value}else e=Yr._escape(e);return this.value+="${",this.value+=t,this.value+=":",this.value+=e,this.value+="}",this}appendChoice(e,t=this._tabstop++){let i=e.map(r=>r.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=t,this.value+="|",this.value+=i,this.value+="|}",this}appendVariable(e,t){if(typeof t=="function"){let i=new Yr;i._tabstop=this._tabstop,t(i),this._tabstop=i._tabstop,t=i.value}else typeof t=="string"&&(t=t.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=e,t&&(this.value+=":",this.value+=t),this.value+="}",this}}});var eu,mKe,JV,Ut,tu=_(()=>{"use strict";eu=x(q());ge();Vt();wt();Ee();K();ZV();N_();H_();mKe=H()("snippets-manager"),JV=class{constructor(){this.sessionMap=new Map;this.disposables=[];P.on("InsertCharPre",()=>{var e;(e=this.session)==null||e.cancel()},null,this.disposables),k.onDidChangeActiveTextEditor(e=>{if(!this.statusItem)return;this.getSession(e.document.bufnr)?this.statusItem.show():this.statusItem.hide()},null,this.disposables),P.on("InsertEnter",async e=>{let t=this.getSession(e);t&&await t.checkPosition()},null,this.disposables),y.onDidCloseTextDocument(e=>{let t=this.getSession(e.bufnr);t&&t.deactivate()},null,this.disposables),y.onDidChangeConfiguration(e=>{(e.affectsConfiguration("suggest")||e.affectsConfiguration("coc.preferences"))&&this.init()},null,this.disposables)}get nvim(){return y.nvim}init(){this.statusItem||(this.statusItem=k.createStatusBarItem(0));let e=y.getConfiguration("coc.preferences");this.statusItem.text=e.get("snippetStatusText","SNIP"),this.highlight=e.get("snippetHighlight",!1);let t=y.getConfiguration("suggest");this.preferComplete=t.get("preferCompleteThanJumpPlaceholder",!1)}async insertSnippet(e,t=!0,i,r,o){let{bufnr:s}=y,a=y.getAttachedDocument(s);if(i&&!Pi(i,eu.Range.create(0,0,a.lineCount+1,0)))throw new Error("Unable to insert snippet, invalid range.");let l;if(P.pumvisible&&this.nvim.call("coc#pum#close",[],!0),!i){let f=await k.getCursorPosition();i=eu.Range.create(f,f)}let u=a.getline(i.start.line),c=Yr.isSnippetString(e)?e.value:e,h=await this.normalizeInsertText(a.uri,c,u,r),d=this.getSession(s);d&&d.cancel(),o!=null&&(l=Object.assign({range:_r(i),line:u},o),!Tt(i)&&h.includes("`!p")&&(this.nvim.call("coc#cursor#move_to",[i.start.line,i.start.character],!0),await a.applyEdits([{range:i,newText:""}]),i.end=eu.Position.create(i.start.line,i.start.character))),d?(await d.forceSynchronize(),d=this.getSession(s)):await a.patchChange(!0),d||(d=new cD(this.nvim,a,this.highlight,this.preferComplete),d.onCancel(()=>{this.sessionMap.delete(s),this.statusItem.hide()}));let g=await d.start(h,i,t,l);return g?(this.statusItem.show(),this.sessionMap.set(s,d)):(this.statusItem.hide(),this.sessionMap.delete(s)),g}async selectCurrentPlaceholder(e=!0){let{session:t}=this;if(t)return await t.selectCurrentPlaceholder(e)}async nextPlaceholder(){let{session:e}=this;return e?await e.nextPlaceholder():(this.nvim.call("coc#snippet#disable",[],!0),this.statusItem.hide()),""}async previousPlaceholder(){let{session:e}=this;return e?await e.previousPlaceholder():(this.nvim.call("coc#snippet#disable",[],!0),this.statusItem.hide()),""}cancel(){let e=this.getSession(y.bufnr);if(e)return e.deactivate();this.nvim.call("coc#snippet#disable",[],!0),this.statusItem&&this.statusItem.hide()}get session(){return this.getSession(y.bufnr)}getSession(e){return this.sessionMap.get(e)}jumpable(){let{session:e}=this;return e?e.placeholder!=null&&e.placeholder.index!=0:!1}async editsInsideSnippet(e){let t=this.getSession(y.bufnr);if(!t||!t.snippet)return!1;await t.forceSynchronize();let i=t.snippet.range;return!!e.some(r=>Dc(r.range,i))}async resolveSnippet(e,t){if(t){let i=this.getSession(y.bufnr);t.noPython=i!=null&&i.snippet.hasPython}return await cD.resolveSnippet(this.nvim,e,t)}async normalizeInsertText(e,t,i,r){let o="";if(r===eu.InsertTextMode.asIs||!qV(t))o=t;else{let s=i.match(/^\s*/)[0],a=k.activeTextEditor?k.activeTextEditor.options:await y.getFormatOptions(e);o=HV(t,s,a)}return o}dispose(){this.cancel();for(let e of this.disposables)e.dispose()}},Ut=new JV});var $V,np,iu,To,hD=_(()=>{"use strict";De();$V=x(require("path"));(e=>{function n(t){return typeof t.label=="string"}e.is=n})(np||(np={}));iu=(i=>(i[i.None=0]="None",i[i.Collapsed=1]="Collapsed",i[i.Expanded=2]="Expanded",i))(iu||{}),To=class{constructor(e,t=0){this.collapsibleState=t;B.isUri(e)?(this.resourceUri=e,this.label=$V.default.basename(e.path),this.id=e.toString()):this.label=e}}});var q_=_(()=>{"use strict";hD()});function $0e(n){return Array.isArray(n)&&n.every(e=>typeof e=="string")}function X0e(n){return typeof n>"u"||$0e(n)}var XV,rp,UV=_(()=>{"use strict";XV=x(q());rp=class{constructor(e){if(this._prevLine=0,this._prevChar=0,this._dataIsSortedAndDeltaEncoded=!0,this._data=[],this._dataLen=0,this._tokenTypeStrToInt=new Map,this._tokenModifierStrToInt=new Map,this._hasLegend=!1,e){this._hasLegend=!0;for(let t=0,i=e.tokenTypes.length;t"u"))return typeof o>"u"&&(o=0),this._pushEncoded(e,t,i,r,o);if(XV.Range.is(e)&&typeof t=="string"&&X0e(i))return this._push(e,t,i);throw new Error("Illegal argument")}_push(e,t,i){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(e.start.line!==e.end.line)throw new Error("`range` cannot span multiple lines");if(!this._tokenTypeStrToInt.has(t))throw new Error("`tokenType` is not in the provided legend");let r=e.start.line,o=e.start.character,s=e.end.character-e.start.character,a=this._tokenTypeStrToInt.get(t),l=0;if(i)for(let u of i){if(!this._tokenModifierStrToInt.has(u))throw new Error("`tokenModifier` is not in the provided legend");let c=this._tokenModifierStrToInt.get(u);l|=1<>>0}this._pushEncoded(r,o,s,a,l)}_pushEncoded(e,t,i,r,o){if(this._dataIsSortedAndDeltaEncoded&&(e0&&(s-=this._prevLine,s===0&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=i,this._data[this._dataLen++]=r,this._data[this._dataLen++]=o,this._prevLine=e,this._prevChar=t}static _sortAndDeltaEncode(e){let t=[],i=e.length/5|0;for(let a=0;a{let u=e[5*a],c=e[5*l];if(u===c){let h=e[5*a+1],d=e[5*l+1];return h-d}return u-c});let r=new Array(e.length),o=0,s=0;for(let a=0;a{"use strict";wi();ge();Se();Fy();$o();lw();WP();ra();EG();Zf();mo();K();Ee();vo();rD();tu();H_();Vl();fc();wo();no();De();var se=x(q());Ir();P_();V();q_();UV();GV.exports={Uri:B,NullLogger:VP,SettingMonitor:E_,LanguageClient:Wf,CancellationTokenSource:se.CancellationTokenSource,ProgressType:se.ProgressType,RequestType:se.RequestType,RequestType0:se.RequestType0,NotificationType:se.NotificationType,NotificationType0:se.NotificationType0,Highligher:Ri,Mru:ca,Emitter:se.Emitter,SnippetString:Yr,BasicList:Xt,Mutex:ei,TreeItem:To,SemanticTokensBuilder:rp,FloatFactory:ci,RelativePattern:pw,UniquenessLevel:se.UniquenessLevel,MonikerKind:se.MonikerKind,PatternType:yg,SourceType:vg,MessageLevel:Tb,ConfigurationTarget:kb,ServiceStat:wg,FileType:Eb,State:ww,ClientState:Dw,CloseAction:t_,ErrorAction:e_,TransportKind:Fw,MessageTransports:gh,RevealOutputChannelOn:vw,MarkupKind:se.MarkupKind,DiagnosticTag:se.DiagnosticTag,DocumentHighlightKind:se.DocumentHighlightKind,SymbolKind:se.SymbolKind,SignatureHelpTriggerKind:se.SignatureHelpTriggerKind,FileChangeType:se.FileChangeType,CodeActionKind:se.CodeActionKind,Diagnostic:se.Diagnostic,DiagnosticSeverity:se.DiagnosticSeverity,CompletionItemKind:se.CompletionItemKind,InsertTextFormat:se.InsertTextFormat,Location:se.Location,LocationLink:se.LocationLink,CancellationToken:se.CancellationToken,Position:se.Position,Range:se.Range,TextEdit:se.TextEdit,Disposable:se.Disposable,Event:se.Event,workspace:y,window:k,CompletionTriggerKind:se.CompletionTriggerKind,snippetManager:Ut,events:P,services:Mi,commands:oe,sources:rt,languages:O,diagnosticManager:It,extensions:ve,listManager:Di,TreeItemCollapsibleState:iu,fetch:hh,download:Of,ansiparse:ug,disposeAll:J,concurrent:rg,watchFile:ac,wait:vt,runCommand:eo,isRunning:pH,executable:ng}});function G0e(n){return()=>{throw new Error(`process.${n}() is not allowed in extension sandbox`)}}function Q0e(){let n=e=>e==="coc.nvim"?QV():this.require(e);return n.resolve=e=>ko._resolveFilename(e,this),n.main=process.mainModule,n.extensions=ko._extensions,n.cache=ko._cache,n}function K0e(n){return function(e,t){let i=Q0e.call(this),r=zV.default.dirname(t),o=e.replace(/^\#\!.*/,""),s=ko.wrap(o),a=dD.runInContext(s,n,{filename:t}),l=[this.exports,i,this,t,r];return a.apply(this.exports,l)}}function z0e(n,e){let t=new ko(n);t.paths=ko._nodeModulePaths(n);let i=dD.createContext({module:t,Buffer,console:{debug:(...r)=>{e.debug.apply(e,r)},log:(...r)=>{e.info.apply(e,r)},error:(...r)=>{e.error.apply(e,r)},info:(...r)=>{e.info.apply(e,r)},warn:(...r)=>{e.warn.apply(e,r)}}});tJ(i,global),i.Reflect=Reflect,i.require=function(o){let s=ko.prototype._compile;ko.prototype._compile=K0e(i);let a=i.module.require(o);return ko.prototype._compile=s,a},i.process=new process.constructor;for(let r of Object.keys(process))i.process[r]=process[r];return U0e.forEach(r=>{i.process[r]=G0e(r)}),i.process.chdir=()=>{},i.process.umask=r=>{if(typeof r<"u")throw new Error("Cannot use process.umask() to change mask (read-only)");return process.umask()},i}function eee(n,e,t=!1){if(t||!KV.default.existsSync(e))return{activate:()=>{},deactivate:null};let i=z0e(e,VV(`extension:${n}`));delete ko._cache[require.resolve(e)];let r=i.require(e),o=r&&r.activate||r;return typeof o!="function"?{activate:()=>{},deactivate:null}:{activate:o,deactivate:typeof r.deactivate=="function"?r.deactivate:null}}var KV,zV,dD,VV,tze,ko,U0e,tee=_(()=>{"use strict";KV=x(require("fs")),zV=x(require("path")),dD=x(require("vm"));es();VV=H(),tze=VV("util-factoroy"),ko=require("module"),U0e=["reallyExit","abort","umask","setuid","setgid","setgroups","_fatalException","exit","kill"]});var lee={};Ds(lee,{ExtensionType:()=>aee,Extensions:()=>Y_,default:()=>ve});var iee,bt,nee,Ie,ree,gD,oee,see,tn,aee,Y_,ve,vo=_(()=>{"use strict";iee=x(Ei()),bt=x(Rn()),nee=x(k0());Tg();Ie=x(require("path")),ree=x(tf()),gD=x(q());De();oee=x(tg());wi();Dk();ge();Bk();$o();GJ();TG();kG();V();so();Sx();tee();$e();Kn();Ee();K();see=H(),tn=see("extensions"),aee=(r=>(r[r.Global=0]="Global",r[r.Local=1]="Local",r[r.SingleFile=2]="SingleFile",r[r.Internal=3]="Internal",r))(aee||{}),Y_=class{constructor(){this.extensions=new Map;this.disabled=new Set;this._onDidLoadExtension=new gD.Emitter;this._onDidActiveExtension=new gD.Emitter;this._onDidUnloadExtension=new gD.Emitter;this._additionalSchemes={};this.activated=!1;this.disposables=[];this.ready=!0;this.onDidLoadExtension=this._onDidLoadExtension.event;this.onDidActiveExtension=this._onDidActiveExtension.event;this.onDidUnloadExtension=this._onDidUnloadExtension.event;let e=global.__TEST__?Ie.default.join(__dirname,"__tests__"):process.env.COC_DATA_HOME,t=this.root=Ie.default.join(e,"extensions");if(this.checkRoot(t)){let r=Ie.default.join(t,"db.json");this.db=new Nc(r)}}checkRoot(e){try{bt.default.existsSync(e)||bt.default.mkdirpSync(e);let t=bt.default.statSync(e);if(t.isFile())tn.info(`Trying to delete ${e}`),bt.default.unlinkSync(e),bt.default.mkdirpSync(e);else if(!t.isDirectory())return console.error(`Data home ${e} it not a valid directory`),!1;let i=Ie.default.join(e,"package.json");bt.default.existsSync(i)||bt.default.writeFileSync(i,'{"dependencies":{}}',"utf8")}catch(t){return console.error(`Unexpected error when check data home: ${t}`),!1}return!0}get outputChannel(){return this._outputChannel?this._outputChannel:(this._outputChannel=k.createOutputChannel("extensions"),this._outputChannel)}async init(){let e=this.db.fetch("extension")||{},t=Object.keys(e);for(let o of t)e[o].disabled==!0&&this.disabled.add(o);if(process.env.COC_NO_PLUGINS)return;let i=await this.globalExtensionStats(),r=await this.localExtensionStats(i.map(o=>o.id));i=i.concat(r),this.memos=new fw(Ie.default.resolve(this.root,"../memos.json")),i.map(o=>{let s=o.isLocal?1:0;try{this.createExtension(o.root,o.packageJSON,s)}catch(a){tn.error(`Error on create ${o.root}:`,a)}}),await this.loadFileExtensions(),oe.register({id:"extensions.forceUpdateAll",execute:async()=>{let o=await this.cleanExtensions();tn.info(`Force update extensions: ${o}`),await this.installExtensions(o)}},!1,"remove all global extensions and install them"),y.onDidRuntimePathChange(async o=>{for(let s of o)s&&this.checkDirectory(s)===!0&&await this.loadExtension(s)},null,this.disposables)}getExtensionsInfo(){let e=[];for(let[t,i]of this.extensions.entries()){let{directory:r,filepath:o}=i;r||(r=o),i.type,r&&e.push({name:t,filepath:o,directory:r.endsWith(Ie.default.sep)?r:r+Ie.default.sep})}return e}activateExtensions(){this.activated=!0;for(let o of this.extensions.values()){let{id:s,packageJSON:a}=o.extension;this.setupActiveEvents(s,a).logError()}let e=new ci(y.nvim);if(P.on("CursorMoved",(0,iee.debounce)(async o=>{if(this.installBuffer&&o==this.installBuffer.bufnr){let s=await y.nvim.call("line",["."]),a=this.installBuffer.getMessages(s-1),l=a&&a.length?[{content:a.join(` -`),filetype:"txt"}]:[];await e.show(l,{modes:["n"]})}},500)),global.__TEST__)return;this.checkExtensions();let t=y.getConfiguration("coc.preferences"),i=t.get("extensionUpdateCheck","never"),r=t.get("silentAutoupdate",!0);if(i!="never"){let o=new Date,s=new Date(o.getFullYear(),o.getMonth(),o.getDate()-(i=="daily"?0:7)),a=this.db.fetch("lastUpdate");if(a&&Number(a)>s.getTime())return;this.outputChannel.appendLine("Start auto update..."),this.updateExtensions(!1,r).logError()}}async updateExtensions(e,t=!1){if(!this.npm)return;let i=await this.getLockedList(),r=await this.globalExtensionStats();r=r.filter(l=>![...i,...this.disabled].includes(l.id)),this.db.push("lastUpdate",Date.now()),t&&k.showMessage("Updating extensions, checkout output:///extensions for details.","more");let o=this.installBuffer=new af(!0,e,t?this.outputChannel:void 0);o.setExtensions(r.map(l=>l.id)),await o.show(y.nvim);let s=gw(this.npm,this.modulesFolder);await rg(r,l=>{let{id:u}=l;o.startProgress([u]);let c=l.exotic?l.uri:null,h=s(u);return h.on("message",(d,g)=>{o.addMessage(u,d,g)}),h.update(c).then(d=>{o.finishProgress(u,!0),d&&this.loadExtension(d).logError()},d=>{o.addMessage(u,d.message),o.finishProgress(u,!1)})},t?1:3)}checkExtensions(){let{globalExtensions:e}=y.env;if(e&&e.length){let t=this.filterGlobalExtensions(e);this.installExtensions(t)}}get installer(){return gw(this.npm,this.modulesFolder)}async installExtensions(e=[]){let{npm:t}=this;if(!t||!e.length)return;e=oa(e);let i=this.installBuffer=new af;i.setExtensions(e),await i.show(y.nvim);let r=gw(this.npm,this.modulesFolder);await rg(e,s=>{i.startProgress([s]);let a=r(s);return a.on("message",(l,u)=>{i.addMessage(s,l,u)}),a.install().then(l=>{i.finishProgress(s,!0);let u=Ie.default.join(this.modulesFolder,l);this.loadExtension(u).logError(),s.match(/(.+)@([^/]+)$/)!=null&&this.lockExtension(l,!0)},l=>{i.addMessage(s,l.message),i.finishProgress(s,!1),tn.error(`Error on install ${s}`,l)})})}getMissingExtensions(){let e=this.loadJson()||{dependencies:{}},t=[];for(let i of Object.keys(e.dependencies)){let r=Ie.default.join(this.modulesFolder,i);if(!bt.default.existsSync(r)){let o=e.dependencies[i];o.startsWith("http")?t.push(o):t.push(i)}}return t}get npm(){let e=y.getConfiguration("npm").get("binPath","npm");e=y.expand(e);for(let t of[e,"yarnpkg","yarn","npm"])try{return oee.default.sync(t)}catch{continue}return k.showMessage("Can't find npm or yarn in your $PATH","error"),null}get all(){return Array.from(this.extensions.values()).map(e=>e.extension).filter(e=>!this.isDisabled(e.id))}getExtension(e){return this.extensions.get(e)}getExtensionState(e){if(this.isDisabled(e))return"disabled";let i=this.extensions.get(e);if(!i)return"unknown";let{extension:r}=i;return r.isActive?"activated":"loaded"}async getExtensionStates(){let e=await this.localExtensionStats([]),t=await this.globalExtensionStats();return e.concat(t.filter(i=>e.find(r=>r.id==i.id)==null))}async getLockedList(){let e=await this.db.fetch("extension");return e=e||{},Object.keys(e).filter(t=>e[t].locked===!0)}async lockExtension(e,t){let i=`extension.${e}.locked`,r=await this.db.fetch(i);t=t===void 0?!r:t,t?this.db.push(i,!0):this.db.delete(i)}async toggleExtension(e){let t=this.getExtensionState(e);if(t==null)return;t=="activated"&&await this.deactivate(e);let i=`extension.${e}.disabled`;if(this.db.push(i,t!="disabled"),t!="disabled")this.disabled.add(e),await this.unloadExtension(e);else{this.disabled.delete(e);let r=Ie.default.join(this.modulesFolder,e);bt.default.existsSync(r)&&await this.loadExtension(r)}await vt(200)}async reloadExtension(e){let t=this.extensions.get(e);if(!t){k.showMessage(`Extension ${e} not registered`,"error");return}if(t.type==3){k.showMessage(`Can't reload internal extension "${t.id}"`,"warning");return}t.type==2?await this.loadExtensionFile(t.filepath):t.directory?await this.loadExtension(t.directory):k.showMessage(`Can't reload extension ${t.id}`,"warning")}async cleanExtensions(){let e=this.modulesFolder;if(!bt.default.existsSync(e))return[];let t=this.globalExtensions,i=[];for(let r of t){let o=Ie.default.join(e,r),s=await bt.default.lstat(o);!s||s&&s.isSymbolicLink()||(await this.unloadExtension(r),await bt.default.remove(o),i.push(r))}return i}async uninstallExtension(e){try{if(!e.length)return;let[t,i]=ny(e,a=>this.globalExtensions.includes(a));i.length&&k.showMessage(`Extensions ${i} not global extensions, can't uninstall!`,"warning");let r=this.loadJson()||{dependencies:{}};for(let a of t){await this.unloadExtension(a),delete r.dependencies[a];let l=Ie.default.join(this.modulesFolder,a);bt.default.existsSync(l)&&await bt.default.remove(l)}let o={dependencies:{}};Object.keys(r.dependencies).sort().forEach(a=>{o.dependencies[a]=r.dependencies[a]});let s=Ie.default.join(this.root,"package.json");bt.default.writeFileSync(s,JSON.stringify(o,null,2),{encoding:"utf8"}),k.showMessage(`Removed: ${t.join(" ")}`)}catch(t){k.showMessage(`Uninstall failed: ${t}`,"error")}}isDisabled(e){return this.disabled.has(e)}has(e){return this.extensions.has(e)}isActivated(e){let t=this.extensions.get(e);return!!(t&&t.extension.isActive)}async loadExtension(e){if(Array.isArray(e)){for(let t of e)await this.loadExtension(t);return!0}try{let t=Ie.default.dirname(e),i=Ie.default.normalize(t)!=Ie.default.normalize(this.modulesFolder),r=Ie.default.join(e,"package.json"),o=JSON.parse(bt.default.readFileSync(r,"utf8")),{name:s}=o;return this.isDisabled(s)?!1:(await this.unloadExtension(s),this.createExtension(e,Object.freeze(o),i?1:0),!0)}catch(t){return k.showMessage(`Error on load extension from "${e}": ${t}`,"error"),tn.error(`Error on load extension from ${e}`,t),!1}}async loadFileExtensions(){if(!process.env.COC_VIMCONFIG)return;let e=Ie.default.join(process.env.COC_VIMCONFIG,"coc-extensions");if(!bt.default.existsSync(e))return;let t=await bt.default.readdir(e);t=t.filter(i=>i.endsWith(".js"));for(let i of t)await this.loadExtensionFile(Ie.default.join(e,i))}loadedExtensions(){return Array.from(this.extensions.keys())}async watchExtension(e){let t=this.extensions.get(e);if(!t){k.showMessage(`extension ${e} not found`,"error");return}if(e.startsWith("single-"))k.showMessage(`watching ${t.filepath}`),this.disposables.push(ac(t.filepath,async()=>{await this.loadExtensionFile(t.filepath),k.showMessage(`reloaded ${e}`)}));else{let i=y.getWatchmanPath();if(!i){k.showMessage("watchman not found","error");return}let r=await aa.createClient(i,t.directory);if(!r){k.showMessage("Can't create watchman client, check output:///watchman");return}k.showMessage(`watching ${t.directory}`),this.disposables.push(r),r.subscribe("**/*.js",async()=>{await this.reloadExtension(e),k.showMessage(`reloaded ${e}`)}).then(o=>{this.disposables.push(o)},o=>{})}}async loadExtensionFile(e){let t=Ie.default.basename(e),i=Ie.default.basename(e,".js"),r="single-"+i;if(this.isDisabled(r))return;let o=Ie.default.dirname(e),s={name:r,main:t,engines:{coc:"^0.0.79"}},a=Ie.default.join(o,i+".json"),l=await qt(a);if(l&&l.isFile()){let u=await vc(a,"utf8"),c=JSON.parse(u);if(c){let h=["activationEvents","contributes"];for(let d of h)c[d]&&(s[d]=c[d])}}await this.unloadExtension(r),this.createExtension(o,s,2)}async activate(e){if(this.isDisabled(e))throw new Error(`Extension ${e} is disabled!`);let t=this.extensions.get(e);if(!t)throw new Error(`Extension ${e} not registered!`);let{extension:i}=t;return i.isActive?!0:(await Promise.resolve(i.activate()),i.isActive?(this._onDidActiveExtension.fire(i),!0):!1)}async deactivate(e){let t=this.extensions.get(e);return t?(await Promise.resolve(t.deactivate()),!0):!1}async call(e,t,i){let r=this.extensions.get(e);if(!r)throw new Error(`extension ${e} not registered`);let{extension:o}=r;o.isActive||await this.activate(e);let{exports:s}=o;if(!s||!s.hasOwnProperty(t))throw new Error(`method ${t} not found on extension ${e}`);return await Promise.resolve(s[t].apply(null,i))}getExtensionApi(e){let t=this.extensions.get(e);if(!t)return null;let{extension:i}=t;return i.isActive?i.exports:null}registerExtension(e,t){let{id:i,packageJSON:r}=e;this.extensions.set(i,{id:i,type:3,extension:e,deactivate:t,isLocal:!0});let{contributes:o}=r;if(o){let{configuration:s}=o;if(s&&s.properties){let{properties:a}=s,l={};for(let u of Object.keys(a)){let c=a[u].default;c!=null&&(l[u]=c)}y.configurations.extendsDefaults(l)}}this._onDidLoadExtension.fire(e),this.setupActiveEvents(i,r).logError()}get globalExtensions(){let e=this.loadJson();return!e||!e.dependencies?[]:Object.keys(e.dependencies)}async globalExtensionStats(){let e=this.loadJson();if(!e||!e.dependencies)return[];let{modulesFolder:t}=this;return(await Promise.all(Object.keys(e.dependencies).map(r=>new Promise(async o=>{try{let s=e.dependencies[r],a=Ie.default.join(t,r),l=this.checkDirectory(a);if(l instanceof Error)return k.showMessage(`Unable to load global extension at ${a}: ${l.message}`,"error"),tn.error(`Error on load ${a}`,l),o(null);let u=await vc(Ie.default.join(a,"package.json"),"utf8");a=await bt.default.realpath(a);let c=JSON.parse(u),h=c&&c.version||"",d=c&&c.description||"",g=nee.default.isValid(s)?s:"";o({id:r,isLocal:!1,version:h,description:d,exotic:/^https?:/.test(s),uri:g.replace(/\.git(#master)?$/,""),root:a,state:this.getExtensionState(r),packageJSON:Object.freeze(c)})}catch(s){tn.error(s),o(null)}})))).filter(r=>r!=null)}async localExtensionStats(e){let i=(await y.nvim.eval('join(globpath(&runtimepath, "", 0, 1), ",")')).split(",");return(await Promise.all(i.map(o=>new Promise(async s=>{try{if(this.checkDirectory(o)!==!0)return s(null);let l=Ie.default.join(o,"package.json"),u=await vc(l,"utf8"),c=JSON.parse(u),h=this.extensions.get(c.name);if(h&&!h.isLocal)return tn.info(`Extension "${c.name}" in runtimepath already loaded.`),s(null);if(e.includes(c.name))return tn.info(`Skipped load vim plugin from "${o}", "${c.name}" already global extension.`),s(null);let d=c&&c.version||"",g=c&&c.description||"";s({id:c.name,isLocal:!0,version:d,description:g,exotic:!1,root:o,state:this.getExtensionState(c.name),packageJSON:Object.freeze(c)})}catch(a){tn.error(a),s(null)}})))).filter(o=>o!=null)}loadJson(){let{root:e}=this,t=Ie.default.join(e,"package.json");if(!bt.default.existsSync(t))return null;let i=[],r=bt.default.readFileSync(t,"utf8"),o=kc(r,i,{allowTrailingComma:!0});return i&&i.length>0&&(k.showMessage(`Error on parse ${t}`,"error"),y.nvim.call("coc#util#open_file",["edit",t],!0)),o}get schemes(){return this._additionalSchemes}addSchemeProperty(e,t){this._additionalSchemes[e]=t,y.configurations.extendsDefaults({[e]:t.default})}async setupActiveEvents(e,t){let{activationEvents:i}=t;if(!this.canActivate(e))return;if(!i||Array.isArray(i)&&i.includes("*")){await this.activate(e).catch(a=>{k.showMessage(`Error on activate extension ${e}: ${a.message}`),this.outputChannel.appendLine(`Error on activate extension ${e}. -${a.message} - ${a.stack}`)});return}let r=[],o=!1,s=()=>{if(!o)return o=!0,J(r),new Promise(a=>{if(!this.canActivate(e))return this.outputChannel.appendLine(`Extension ${e} is disabled or not loaded.`),a();this.activate(e).then(()=>{a()},l=>{k.showMessage(`Error on activate extension ${e}: ${l.message}`),this.outputChannel.appendLine(`Error on activate extension ${e}:${l.message} - ${l.stack}`),a()})})};for(let a of i){let l=a.split(":"),u=l[0];if(u=="onLanguage"){if(y.languageIds.has(l[1])||y.filetypes.has(l[1])){await s();return}y.onDidOpenTextDocument(c=>{let h=y.getDocument(c.bufnr);(c.languageId==l[1]||h.filetype==l[1])&&s()},null,r)}else if(u=="onCommand")oe.onCommandList.push(l[1]),P.on("Command",async c=>{c==l[1]&&(await s(),await vt(500))},null,r);else if(u=="workspaceContains"){let c=async()=>{let d=y.workspaceFolders.map(g=>B.parse(g.uri).fsPath);for(let g of d)for(let f of l[1].split(/\s+/))if(await A2(g,f))return await s(),!0;return!1};if(y.onDidChangeWorkspaceFolders(c,null,r),await c())return}else if(u=="onFileSystem"){for(let c of y.documents)if(B.parse(c.uri).scheme==l[1]){await s();return}y.onDidOpenTextDocument(c=>{B.parse(c.uri).scheme==l[1]&&s()},null,r)}else k.showMessage(`Unsupported event ${a} of ${e}`,"error")}}createExtension(e,t,i){let r=t.name,o=!1,s,a=Ie.default.join(e,t.main||"index.js"),l,u=[],c,h={activate:()=>{if(s)return s;let g={subscriptions:u,extensionPath:e,globalState:this.memos.createMemento(`${r}|global`),workspaceState:this.memos.createMemento(`${r}|${y.rootPath}`),asAbsolutePath:f=>Ie.default.join(e,f),storagePath:Ie.default.join(this.root,`${r}-data`),logger:see(r)};if(!l)try{let f=!(t.engines||{}).hasOwnProperty("coc");l=eee(r,a,f)}catch(f){tn.error(`Error on createExtension ${r} from ${a}`,f);return}return s=new Promise((f,p)=>{try{Promise.resolve(l.activate(g)).then(m=>{o=!0,c=m,f(m)},m=>{tn.error(`Error on active extension ${r}: ${m.message}`,m),p(m)})}catch(m){tn.error(`Error on active extension ${r}: ${m}`,m instanceof Error?m.stack:m),p(m)}}),s}};Object.defineProperties(h,{id:{get:()=>r,enumerable:!0},packageJSON:{get:()=>t,enumerable:!0},extensionPath:{get:()=>e,enumerable:!0},isActive:{get:()=>o,enumerable:!0},exports:{get:()=>{if(!o)throw new Error(`Invalid access to exports, extension "${r}" not activated`);return c},enumerable:!0}}),this.extensions.set(r,{id:r,type:i,isLocal:i==1,extension:h,directory:e,filepath:a,deactivate:()=>{if(!!o&&(s=void 0,c=void 0,o=!1,J(u),u.splice(0,u.length),u=[],l&&l.deactivate))try{return Promise.resolve(l.deactivate()).catch(g=>{tn.error(`Error on ${r} deactivate: `,g)})}catch(g){tn.error(`Error on ${r} deactivate: `,g)}}});let{contributes:d}=t;if(d){let{configuration:g,rootPatterns:f,commands:p}=d;if(g&&g.properties){let{properties:m}=g,v={};for(let w of Object.keys(m)){let D=m[w].default;D!=null&&(v[w]=D)}y.configurations.extendsDefaults(v)}if(f&&f.length)for(let m of f)y.workspaceFolderControl.addRootPattern(m.filetype,m.patterns);if(p&&p.length)for(let m of p)oe.titles.set(m.command,m.title)}this._onDidLoadExtension.fire(h),this.activated&&this.setupActiveEvents(r,t).logError()}filterGlobalExtensions(e){let t=new Map;e.forEach(s=>{let a=this.getExtensionName(s);a&&t.set(a,s)});let i=this.loadJson(),r=[],o=[];if(i&&i.dependencies)for(let s of Object.keys(i.dependencies)){let a=i.dependencies[s];typeof a=="string"&&bt.default.existsSync(Ie.default.join(this.modulesFolder,s,"package.json"))&&(o.push(s),/^https?:/.test(a)&&r.push(a))}for(let s of t.keys()){if(this.disabled.has(s)||this.extensions.has(s)){t.delete(s);continue}(/^https?:/.test(s)&&r.some(a=>a.startsWith(s))||o.includes(s))&&t.delete(s)}return Array.from(t.values())}getExtensionName(e){return/^https?:/.test(e)||!e.includes("@")?e:e.replace(/@[\d.]+$/,"")}get modulesFolder(){return Ie.default.join(this.root,global.__TEST__?"":"node_modules")}canActivate(e){return!this.disabled.has(e)&&this.extensions.has(e)}async unloadExtension(e){this.extensions.get(e)&&(await this.deactivate(e),this.extensions.delete(e),this._onDidUnloadExtension.fire(e))}checkDirectory(e){try{let t=Ie.default.join(e,"package.json");if(!bt.default.existsSync(t))throw new Error("package.json not found");let i=JSON.parse(bt.default.readFileSync(t,"utf8")),{name:r,engines:o,main:s}=i;if(!r||!o)throw new Error("can't find name & engines in package.json");if(!o||!Lt(o))throw new Error(`invalid engines in ${t}`);if(s&&!bt.default.existsSync(Ie.default.join(e,s)))throw new Error(`main file ${s} not found, you may need to build the project.`);let a=Object.keys(o);if(!a.includes("coc")&&!a.includes("vscode"))throw new Error("Engines in package.json doesn't have coc or vscode");if(a.includes("coc")){let l=o.coc.replace(/^\^/,">=");if(!ree.default.satisfies(y.version,l))throw new Error(`Please update coc.nvim, ${i.name} requires coc.nvim ${o.coc}`)}return!0}catch(t){return t}}dispose(){J(this.disposables)}},ve=new Y_});var uee,Pze,V0e,fD,cee=_(()=>{"use strict";uee=x(q());De();ge();$e();Pze=H()("sources-keywords"),V0e=10*1024,fD=class{constructor(e){this.doc=e;this._words=new Set;this._gitIgnored=!1;this.parse();let t=B.parse(e.uri);t.scheme==="file"&&j2(t.fsPath).then(i=>{this._gitIgnored=i})}get bufnr(){return this.doc.bufnr}get gitIgnored(){return this._gitIgnored}get words(){return this._words}parse(){if(!this.doc.attached||P.completing)return;let{textDocument:e}=this.doc,{version:t,lineCount:i}=e;if(this.version===t||P.insertMode&&this.lineCount==i&&e.length>V0e)return;this.cancel();let r=this.tokenSource=new uee.CancellationTokenSource;this.doc.matchWords(r.token).then(o=>{o!=null&&(this._words=o,this.lineCount=i,this.version=t)})}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=null)}onChange(e){e.contentChanges.length!=0&&this.parse()}dispose(){this.cancel(),this._words.clear()}}});var Bze,dr,Sh=_(()=>{"use strict";Ir();_e();K();Bze=H()("sources-source"),dr=class{constructor(e){this._disabled=!1;this.nvim=y.nvim,this.name=e.name,this.filepath=e.filepath||"",this.sourceType=e.sourceType||0,this.isSnippet=!!e.isSnippet,this.defaults=e}get priority(){return this.getConfig("priority",1)}get triggerOnly(){let e=this.defaults.triggerOnly;return typeof e=="boolean"?e:!this.triggerCharacters&&!this.triggerPatterns?!1:Array.isArray(this.triggerPatterns)&&this.triggerPatterns.length!=0}get triggerCharacters(){return this.getConfig("triggerCharacters",null)}get optionalFns(){return this.defaults.optionalFns||[]}get triggerPatterns(){let e=this.getConfig("triggerPatterns",null);return!e||e.length==0?null:e.map(t=>typeof t=="string"?new RegExp(t+"$"):t)}get shortcut(){let e=this.getConfig("shortcut","");return e||this.name.slice(0,3)}get enable(){return this._disabled?!1:this.getConfig("enable",!0)}get filetypes(){return this.getConfig("filetypes",null)}get disableSyntaxes(){return this.getConfig("disableSyntaxes",[])}getConfig(e,t){let i=y.getConfiguration(`coc.source.${this.name}`);return t=this.defaults.hasOwnProperty(e)?this.defaults[e]:t,i.get(e,t)}toggle(){this._disabled=!this._disabled}get firstMatch(){return this.getConfig("firstMatch",!0)}get menu(){return""}fixStartcol(e,t){let{col:i,input:r,line:o,bufnr:s}=e,a=tt(o,0,i),l=y.getDocument(s);if(!l)return i;let{chars:u}=l;for(let c=a.length-1;c>=0;c--){let h=a[c];if(!u.isKeywordChar(h)&&!t.includes(h))break;r=`${h}${r}`,i=i-1}return e.col=i,e.input=r,i}async shouldComplete(e){let{disableSyntaxes:t}=this;if(e.synname&&t&&t.length){let r=(e.synname||"").toLowerCase();if(t.findIndex(o=>r.includes(o.toLowerCase()))!==-1)return!1}let i=this.defaults.shouldComplete;return typeof i=="function"?await Promise.resolve(i.call(this,e)):!0}async refresh(){let e=this.defaults.refresh;typeof e=="function"&&await Promise.resolve(e.call(this))}async onCompleteDone(e,t){let i=this.defaults.onCompleteDone;typeof i=="function"&&await Promise.resolve(i.call(this,e,t))}async doComplete(e,t){let i=this.defaults.doComplete;return typeof i=="function"?await Promise.resolve(i.call(this,e,t)):null}async onCompleteResolve(e,t,i){let r=this.defaults.onCompleteResolve;typeof r=="function"&&await Promise.resolve(r.call(this,e,t,i))}}});function iTe(n,e){let t=e[0];if(t.textEdit==null)return;let i=be.InsertReplaceEdit.is(t.textEdit)?t.textEdit.replace:t.textEdit.range,{character:r}=i.start;for(let o=1;op)u=d.slice(p,h.start.character)+u;else{let m=d.slice(h.start.character,p);m.length&&u.startsWith(m)&&(u=u.slice(m.length))}if(p=Ui(d,f-1),h.end.character>p){let m=d.slice(p,h.end.character);u.endsWith(m)&&(u=u.slice(0,-m.length))}}}else s&&(u=s);if(o==be.InsertTextFormat.Snippet&&u&&u.includes("$")){let d=new Fa().text(u);l=d?hee(d,t):i}else l=(c=hee(u,t))!=null?c:i;return l!=null?l:""}function hee(n,e,t=2){if(n!=null){if(e.length===0)return n;for(let i=t;i{"use strict";be=x(q());wi();tu();aD();us();_e();Ee();K();eTe=H()("source-language"),tTe={[be.CompletionItemKind.Text]:"CocSymbolText",[be.CompletionItemKind.Method]:"CocSymbolMethod",[be.CompletionItemKind.Function]:"CocSymbolFunction",[be.CompletionItemKind.Constructor]:"CocSymbolConstructor",[be.CompletionItemKind.Field]:"CocSymbolField",[be.CompletionItemKind.Variable]:"CocSymbolVariable",[be.CompletionItemKind.Class]:"CocSymbolClass",[be.CompletionItemKind.Interface]:"CocSymbolInterface",[be.CompletionItemKind.Module]:"CocSymbolModule",[be.CompletionItemKind.Property]:"CocSymbolProperty",[be.CompletionItemKind.Unit]:"CocSymbolUnit",[be.CompletionItemKind.Value]:"CocSymbolValue",[be.CompletionItemKind.Enum]:"CocSymbolEnum",[be.CompletionItemKind.Keyword]:"CocSymbolKeyword",[be.CompletionItemKind.Snippet]:"CocSymbolSnippet",[be.CompletionItemKind.Color]:"CocSymbolColor",[be.CompletionItemKind.File]:"CocSymbolFile",[be.CompletionItemKind.Reference]:"CocSymbolReference",[be.CompletionItemKind.Folder]:"CocSymbolFolder",[be.CompletionItemKind.EnumMember]:"CocSymbolEnumMember",[be.CompletionItemKind.Constant]:"CocSymbolConstant",[be.CompletionItemKind.Struct]:"CocSymbolStruct",[be.CompletionItemKind.Event]:"CocSymbolEvent",[be.CompletionItemKind.Operator]:"CocSymbolOperator",[be.CompletionItemKind.TypeParameter]:"CocSymbolTypeParameter"},pD=class{constructor(e,t,i,r,o,s,a,l){this.name=e;this.shortcut=t;this.provider=i;this.documentSelector=r;this.triggerCharacters=o;this.allCommitCharacters=s;this.completeConfig=l;this._enabled=!0;this.completeItems=[];this.priority=typeof a=="number"?a:l.priority}get enable(){return this._enabled}toggle(){this._enabled=!this._enabled}shouldCommit(e,t){let i=this.completeItems[e.index];return i?[...this.allCommitCharacters,...i.commitCharacters||[]].includes(t):!1}async doComplete(e,t){let{triggerCharacter:i,input:r,bufnr:o}=e;this.completeItems=[];let s=this.getTriggerKind(e),a=this.getPosition(e),l={triggerKind:s,option:e};s==be.CompletionTriggerKind.TriggerCharacter&&(l.triggerCharacter=i);let u=y.getAttachedDocument(o),c=await Promise.resolve(this.provider.provideCompletionItems(u.textDocument,a,t,l));if(!c||t.isCancellationRequested)return null;let h=Array.isArray(c)?c:c.items;if(!h||h.length==0)return null;this.completeItems=h;let d=iTe(e.line,h),g=Object.assign({},e),f,p=typeof c.isIncomplete=="boolean"?c.isIncomplete:!1;d==null&&r.length>0&&this.triggerCharacters.includes(e.triggerCharacter)&&(h.every(v=>{var w;return((w=v.insertText)!=null?w:v.label).startsWith(e.input)})||(d=e.col+G(e.input))),d!=null&&(f=d{let D=this.convertVimCompleteItem(v,g,f);return D.index=w,D});return{startcol:d,isIncomplete:p,items:m}}async onCompleteResolve(e,t,i){let{index:r}=e,o=this.completeItems[r];if(!o||e.resolved)return;if(typeof this.provider.resolveCompletionItem=="function"){let c=await Promise.resolve(this.provider.resolveCompletionItem(o,i));if(i.isCancellationRequested||!c)return;Object.assign(o,c)}e.resolved=!0;let{documentation:a,detail:l}=o;if(!a&&!l)return;let u=[];if(l&&!e.detailShown&&l!=e.word&&(l=l.replace(/\n\s*/g," "),l.length)){let c=/^[\w-\s.,\t\n]+$/.test(l);u.push({filetype:c?"txt":t.filetype,content:l})}a&&(typeof a=="string"?u.push({filetype:"txt",content:a}):a.value&&u.push({filetype:a.kind=="markdown"?"markdown":"txt",content:a.value})),e.documentation=u}async onCompleteDone(e,t){let i=this.completeItems[e.index];if(!i)return;typeof e.line=="string"&&Object.assign(t,{line:e.line});let r=y.getAttachedDocument(t.bufnr);await r.patchChange(!0);let o=Array.isArray(i.additionalTextEdits)&&i.additionalTextEdits.length>0;o&&await Ut.editsInsideSnippet(i.additionalTextEdits)&&Ut.cancel();let s=r.version,a=await this.applyTextEdit(r,o,i,e.word,t);o&&(await r.applyEdits(i.additionalTextEdits,r.version!=s,!a),a&&await Ut.selectCurrentPlaceholder()),i.command&&(oe.has(i.command.command)?await oe.execute(i.command):eTe.warn(`Command "${i.command.command}" not registered to coc.nvim`))}async applyTextEdit(e,t,i,r,o){var w,D;let{line:s,linenr:a,colnr:l,col:u}=o,c=await k.getCursorPosition();if(c.line!=a-1)return;let{textEdit:h}=i,d=e.getline(a-1),g=Ui(s,l-1);if(!h&&i.insertText&&(h={range:be.Range.create(c.line,Ui(s,u),c.line,g),newText:i.insertText}),!h)return!1;let f=h.newText,p=be.InsertReplaceEdit.is(h)?h.replace:h.range,m=oTe(s,d,p);m&&(g+=m),p.end.characterg&&(p.end.character+=c.character-g);let v=i.insertTextFormat===be.InsertTextFormat.Snippet;if(v&&this.completeConfig.snippetsSupport===!1&&(v=!1,f=r),v){let S=((w=i.data)==null?void 0:w.ultisnip)===!0?{}:(D=i.data)==null?void 0:D.ultisnip;return await Ut.insertSnippet(f,!t,p,i.insertTextMode,S||void 0)}return await e.applyEdits([be.TextEdit.replace(p,f)],!1,c),!1}getTriggerKind(e){let{triggerCharacters:t}=this,i=t.includes(e.triggerCharacter),r=be.CompletionTriggerKind.Invoked;return e.triggerForInComplete?r=be.CompletionTriggerKind.TriggerForIncompleteCompletions:i&&(r=be.CompletionTriggerKind.TriggerCharacter),r}convertVimCompleteItem(e,t,i){var g,f,p,m,v,w,D,S;let{detailMaxLength:r,detailField:o,invalidInsertCharacters:s,labels:a,defaultKindText:l}=this.completeConfig,u=e.additionalTextEdits!=null&&e.additionalTextEdits.length>0,c=e.insertTextFormat===be.InsertTextFormat.Snippet||u,h=typeof e.label=="string"?e.label.trim():(g=e.insertText)!=null?g:"",d={word:rTe(e,t,s),abbr:h,kind:nTe(e.kind,a,l),kindHighlight:(f=tTe[e.kind])!=null?f:"CocSymbolDefault",sortText:(p=e.sortText)!=null?p:null,sourceScore:(m=e.score)!=null?m:null,filterText:(v=e.filterText)!=null?v:h,preselect:e.preselect===!0,deprecated:e.deprecated===!0||((w=e.tags)==null?void 0:w.includes(be.CompletionItemTag.Deprecated)),isSnippet:c,dup:((D=e.data)==null?void 0:D.dup)==0?0:1};if(d.line=t.line,i&&(d.filterText.startsWith(i)||e.textEdit&&yo(Cn(i),e.textEdit.newText)&&(d.filterText=e.textEdit.newText.replace(/\r?\n/g,"")),!e.textEdit&&!d.word.startsWith(i)&&(d.word=`${i}${d.word}`)),d.word==""&&(d.empty=1),o=="abbr"&&e.detail){let L=e.detail.replace(/\r?\n\s*/g," ");G(d.abbr+L){"use strict";us();_e();K();Ee();Sh();r5e=H()("sources-source-vim"),mD=class extends dr{async callOptionalFunc(e,t){if(!this.optionalFns.includes(e))return null;let r=`coc#source#${this.name}#${e}`,o;try{o=await this.nvim.call(r,t)}catch(s){return k.showMessage(`Vim error from source ${this.name}: ${s}`,"error"),null}return o}async shouldComplete(e){return await super.shouldComplete(e)?this.optionalFns.includes("should_complete")?!!await this.callOptionalFunc("should_complete",[e]):!0:!1}async refresh(){await this.callOptionalFunc("refresh",[])}async onCompleteDone(e,t){!this.optionalFns.includes("on_complete")||await this.callOptionalFunc("on_complete",[e])}onEnter(e){if(!this.optionalFns.includes("on_enter"))return;let t=y.getDocument(e);if(!t)return;let{filetypes:i}=this;i&&!i.includes(t.filetype)||this.callOptionalFunc("on_enter",[{bufnr:e,uri:t.uri,languageId:t.filetype}]).logError()}async doComplete(e,t){let{col:i,input:r,line:o,colnr:s}=e,a=await this.callOptionalFunc("get_startcol",[e]);if(t.isCancellationRequested)return;if(a){if(a<0)return null;a=Number(a),(isNaN(a)||a<0)&&(a=i),a!==i&&(r=tt(o,a,s-1),e=Object.assign({},e,{col:a,changed:i-a,input:r}))}let l=await this.nvim.callAsync("coc#util#do_complete",[this.name,e]);if(!l||l.length==0||t.isCancellationRequested)return null;if(this.firstMatch&&r.length){let c=r[0];l=l.filter(h=>{let d=h.filterText?h.filterText[0]:h.word[0];return Jf(c,d)})}l=l.map(c=>{if(typeof c=="string")return{word:c,menu:this.menu,isSnippet:this.isSnippet};let h=c.menu?c.menu+" ":"";return c.menu=`${h}${this.menu}`,c.isSnippet=this.isSnippet,c});let u={items:l};return a&&(u.startcol=a),u}}});var pee={};Ds(pee,{default:()=>bD,regist:()=>sTe});function sTe(n,e){return n.set("around",new bD(e)),fee.Disposable.create(()=>{n.delete("around")})}var fee,c5e,bD,mee=_(()=>{"use strict";fee=x(q());V();us();Sh();c5e=H()("sources-around"),bD=class extends dr{constructor(e){super({name:"around",filepath:__filename});this.keywords=e}async filterWords(e,t,i,r){let o=!1,{input:s}=t,a=t.word,l=s[0],u=s.length>1,c=t.input.length,h=l.charCodeAt(0),d=h>=97&&h<=122,g=u?Cn(s):[],f=!0,p=!0,m=Date.now();for(let v of e){let w=v.length;if(w15){if(await Vr(),i.isCancellationRequested)return;m=Date.now()}let D=d?v[0].toLowerCase():v[0];if(u){if(D.charCodeAt(0)===h&&yo(g,v)&&(r.push(v),r.length==100)){o=!0;break}}else if(D.charCodeAt(0)===h&&(r.push(v),r.length==100)){o=!0;break}}return o}async doComplete(e,t){let{bufnr:i,input:r}=e;if(r.length===0||(await Vr(),t.isCancellationRequested))return null;let o=this.keywords.getItem(i),s=o==null?void 0:o.words;if(!s)return null;let a=[],l=await this.filterWords(s,e,t,a);return t.isCancellationRequested?null:{isIncomplete:l,items:a.map(u=>({word:u,menu:this.menu}))}}}});var yee={};Ds(yee,{default:()=>yD,regist:()=>aTe});function aTe(n,e){return n.set("buffer",new yD(e)),bee.Disposable.create(()=>{n.delete("buffer")})}var bee,p5e,yD,vee=_(()=>{"use strict";bee=x(q());V();us();Sh();p5e=H()("sources-buffer"),yD=class extends dr{constructor(e){super({name:"buffer",filepath:__filename});this.keywords=e}get ignoreGitignore(){return this.getConfig("ignoreGitignore",!0)}async getWords(e,t,i,r){let{ignoreGitignore:o}=this,s=!1,a=t.input[0],l=t.input.length,u=l>1,c=a.charCodeAt(0),h=c>=97&&c<=122,d=u?Cn(t.input):[],g=Date.now();for(let f of this.keywords.items){if(r.size==100)break;if(!(f.bufnr===e||o&&f.gitIgnored))for(let p of f.words){if(Date.now()-g>15){if(await Vr(),i.isCancellationRequested)return;g=Date.now()}if(p.length({word:a,menu:this.menu}))}}}});var xee={};Ds(xee,{default:()=>wD,regist:()=>cTe});function cTe(n){return n.set("file",new wD),Cee.Disposable.create(()=>{n.delete("file")})}var vD,wee,Tn,Dee,Cee,lTe,uTe,wD,See=_(()=>{"use strict";vD=x(require("fs")),wee=x(Vn()),Tn=x(require("path")),Dee=x(require("util")),Cee=x(q());Sh();$e();_e();sc();K();lTe=H()("sources-file"),uTe=/(?:\.{0,2}|~|\$HOME|([\w]+)|[a-zA-Z]:|)(\/|\\+)(?:[\u4E00-\u9FA5\u00A0-\u024F\w .@()-]+(\/|\\+))*(?:[\u4E00-\u9FA5\u00A0-\u024F\w .@()-])*$/,wD=class extends dr{constructor(){super({name:"file",filepath:__filename})}get triggerCharacters(){let e=this.getConfig("triggerCharacters",[]);return Xi?e:e.filter(t=>t!="\\")}resolveEnvVariables(e){let t=e;return t=t.replace(/%([^%]+)%/g,(i,r)=>process.env[r]),t=t.replace(/\$([A-Z_]+[A-Z0-9_]*)|\${([A-Z0-9_]*)}/gi,(i,r,o)=>process.env[r||o]),t}getPathOption(e){let{line:t,colnr:i}=e,r=tt(t,0,i-1);if(r=this.resolveEnvVariables(r),!r||r.endsWith("//"))return null;let o=r.match(uTe);if(o&&o.length){let s=y.expand(o[0]),a=o[0].match(/[^/\\]*$/)[0];return{pathstr:s,part:o[1],startcol:i-a.length-1,input:a}}return null}async getFileItem(e,t){let i=Tn.default.join(e,t),r=await qt(i);if(r){let o=r.isDirectory()?t+"/":t;return{word:t,abbr:o}}return null}filterFiles(e){let t=this.getConfig("ignoreHidden",!0),i=this.getConfig("ignorePatterns",[]);return e.filter(r=>{if(r==null||t&&r.startsWith("."))return!1;for(let o of i)if((0,wee.default)(r,o,{dot:!0}))return!1;return!0})}async getItemsFromRoot(e,t){let i=[],r=/[\\/]$/.test(e)?e:Tn.default.dirname(e),o=Tn.default.isAbsolute(e)?r:Tn.default.join(t,r);try{let s=await qt(o);if(s&&s.isDirectory()){let a=await Dee.default.promisify(vD.default.readdir)(o);a=this.filterFiles(a);let l=await Promise.all(a.map(u=>this.getFileItem(o,u)));i=i.concat(l)}return i=i.filter(a=>a!=null),i}catch(s){return lTe.error("Error on list files:",s),i}}get trimSameExts(){return this.getConfig("trimSameExts",[])}async doComplete(e){let{col:t,filepath:i}=e,r=this.getPathOption(e);if(!r)return null;let{pathstr:o,part:s,startcol:a,input:l}=r;if(av.word[0]===m)),{items:f.map(v=>{let w=Tn.default.extname(v.word);return v.word=p&&w===h?v.word.replace(h,""):v.word,{word:`${u}${v.word}`,abbr:`${u}${v.abbr}`,menu:this.menu}})}}}});var Pee={};Ds(Pee,{Sources:()=>W_,default:()=>rt});var kee,DD,Eee,st,Tee,W_,rt,mo=_(()=>{"use strict";kee=x(require("fs")),DD=x(require("path")),Eee=x(require("util")),st=x(q());ge();vo();Ir();V();so();$e();_e();cee();Ee();K();Sh();dee();gee();Tee=H()("sources"),W_=class{constructor(){this.sourceMap=new Map;this.disposables=[];this.remoteSourcePaths=[]}init(){this.loadCompleteConfig(),this.keywords=y.registerBufferSync(e=>new fD(e)),y.onDidChangeConfiguration(e=>{e.affectsConfiguration("suggest")&&this.loadCompleteConfig()},null,this.disposables),this.createNativeSources(),this.createRemoteSources(),P.on("InsertLeave",()=>{for(let e of this.keywords.items)e.parse()},this,this.disposables),P.on("BufEnter",this.onDocumentEnter,this,this.disposables),y.onDidRuntimePathChange(e=>{for(let t of e)t&&this.createVimSources(t)},null,this.disposables)}getShortcut(e){let t=this.sourceMap.get(e);return t?t.shortcut:""}loadCompleteConfig(){var o,s,a,l,u,c,h,d,g,f,p,m,v,w,D,S,L,j,I,W,A,M,F,N,Z;let e=y.getConfiguration("suggest"),t=e.get("completionItemKindLabels",{}),i=new Map([[st.CompletionItemKind.Text,(o=t.text)!=null?o:"v"],[st.CompletionItemKind.Method,(s=t.method)!=null?s:"f"],[st.CompletionItemKind.Function,(a=t.function)!=null?a:"f"],[st.CompletionItemKind.Constructor,typeof t.constructor=="function"?"f":(l=t["constructor"])!=null?l:""],[st.CompletionItemKind.Field,(u=t.field)!=null?u:"m"],[st.CompletionItemKind.Variable,(c=t.variable)!=null?c:"v"],[st.CompletionItemKind.Class,(h=t.class)!=null?h:"C"],[st.CompletionItemKind.Interface,(d=t.interface)!=null?d:"I"],[st.CompletionItemKind.Module,(g=t.module)!=null?g:"M"],[st.CompletionItemKind.Property,(f=t.property)!=null?f:"m"],[st.CompletionItemKind.Unit,(p=t.unit)!=null?p:"U"],[st.CompletionItemKind.Value,(m=t.value)!=null?m:"v"],[st.CompletionItemKind.Enum,(v=t.enum)!=null?v:"E"],[st.CompletionItemKind.Keyword,(w=t.keyword)!=null?w:"k"],[st.CompletionItemKind.Snippet,(D=t.snippet)!=null?D:"S"],[st.CompletionItemKind.Color,(S=t.color)!=null?S:"v"],[st.CompletionItemKind.File,(L=t.file)!=null?L:"F"],[st.CompletionItemKind.Reference,(j=t.reference)!=null?j:"r"],[st.CompletionItemKind.Folder,(I=t.folder)!=null?I:"F"],[st.CompletionItemKind.EnumMember,(W=t.enumMember)!=null?W:"m"],[st.CompletionItemKind.Constant,(A=t.constant)!=null?A:"v"],[st.CompletionItemKind.Struct,(M=t.struct)!=null?M:"S"],[st.CompletionItemKind.Event,(F=t.event)!=null?F:"E"],[st.CompletionItemKind.Operator,(N=t.operator)!=null?N:"O"],[st.CompletionItemKind.TypeParameter,(Z=t.typeParameter)!=null?Z:"T"]]),r=e.get("detailField","preview");this.completeConfig=Object.assign(this.completeConfig||{},{labels:i,detailField:r,defaultKindText:t.default||"",priority:e.get("languageSourcePriority",99),snippetsSupport:e.get("snippetsSupport",!0),detailMaxLength:e.get("detailMaxLength",100),invalidInsertCharacters:e.get("invalidInsertCharacters",["(","<","{","[","\r",` -`])})}get nvim(){return y.nvim}createNativeSources(){this.disposables.push((mee(),Ha(pee)).regist(this.sourceMap,this.keywords)),this.disposables.push((vee(),Ha(yee)).regist(this.sourceMap,this.keywords)),this.disposables.push((See(),Ha(xee)).regist(this.sourceMap))}createLanguageSource(e,t,i,r,o,s,a){let l=new pD(e,t,r,i,o||[],a||[],s,this.completeConfig);return Tee.debug("created service source",e),this.sourceMap.set(e,l),{dispose:()=>{this.sourceMap.delete(e)}}}async createVimSourceExtension(e,t){let i=DD.default.basename(t,".vim");try{await e.command(`source ${t}`);let r=await e.call("coc#util#remote_fns",i);for(let c of["init","complete"])if(!r.includes(c))return k.showMessage(`${c} not found for source ${i}`,"error"),null;let o=await e.call(`coc#source#${i}#init`,[]),s={name:`coc-source-${i}`,engines:{coc:">= 0.0.1"},activationEvents:o.filetypes?o.filetypes.map(c=>`onLanguage:${c}`):["*"],contributes:{configuration:{properties:{[`coc.source.${i}.enable`]:{type:"boolean",default:!0},[`coc.source.${i}.firstMatch`]:{type:"boolean",default:!!o.firstMatch},[`coc.source.${i}.triggerCharacters`]:{type:"number",default:o.triggerCharacters||[]},[`coc.source.${i}.priority`]:{type:"number",default:o.priority||9},[`coc.source.${i}.shortcut`]:{type:"string",default:o.shortcut||i.slice(0,3).toUpperCase(),description:"Shortcut text shown in complete menu."},[`coc.source.${i}.disableSyntaxes`]:{type:"array",default:[],items:{type:"string"}},[`coc.source.${i}.filetypes`]:{type:"array",default:o.filetypes||null,description:"Enabled filetypes.",items:{type:"string"}}}}}},a=new mD({name:i,filepath:t,sourceType:1,optionalFns:r.filter(c=>!["init","complete"].includes(c))}),l=!1,u={id:s.name,packageJSON:s,exports:void 0,extensionPath:t,activate:()=>(l=!0,this.addSource(a),Promise.resolve())};Object.defineProperty(u,"isActive",{get:()=>l}),ve.registerExtension(u,()=>{l=!1,this.removeSource(a)})}catch(r){k.showMessage(`Error on create vim source ${i}: ${r}`,"error")}}createRemoteSources(){let{runtimepath:e}=y.env,t=e.split(",");for(let i of t)this.createVimSources(i).logError()}async createVimSources(e){if(this.remoteSourcePaths.includes(e))return;this.remoteSourcePaths.push(e);let t=DD.default.join(e,"autoload/coc/source"),i=await qt(t);if(i&&i.isDirectory()){let r=await Eee.default.promisify(kee.default.readdir)(t);r=r.filter(s=>s.endsWith(".vim"));let o=r.map(s=>DD.default.join(t,s));if(o.length==0)return;await Promise.all(o.map(s=>this.createVimSourceExtension(this.nvim,s)))}}get names(){return Array.from(this.sourceMap.keys())}get sources(){return Array.from(this.sourceMap.values())}has(e){return this.names.findIndex(t=>t==e)!=-1}getSource(e){return e&&this.sourceMap.get(e)||null}shouldCommit(e,t){if(!e||!e.source)return!1;let i=this.getSource(e.source);return i&&i.sourceType==2&&typeof i.shouldCommit=="function"?i.shouldCommit(e,t):!1}getCompleteSources(e){let{filetype:t}=e,i=tt(e.line,0,e.colnr-1),r=e.input==""&&!!e.triggerCharacter,o=Vm(e.filepath,e.bufnr,"",y.env.isCygwin);return r?this.getTriggerSources(i,t,o):this.getNormalSources(e.filetype,o)}getNormalSources(e,t){let i=e.split(".");return this.sources.filter(r=>{let{filetypes:o,triggerOnly:s,documentSelector:a,enable:l}=r;return!(!l||s||o&&!Mg(o,i)||a&&i.every(u=>y.match(a,{uri:t,languageId:u})==0))})}checkTrigger(e,t,i){let{triggerCharacters:r,triggerPatterns:o}=e;return!!((r==null?void 0:r.length)>0&&r.includes(i)||(o==null?void 0:o.length)>0&&o.findIndex(s=>s.test(t))!==-1)}shouldTrigger(e,t,i){return this.getTriggerSources(e,t,i).length>0}getTriggerSources(e,t,i,r=[]){if(!e)return[];let o=e[e.length-1],s=t.split(".");return this.sources.filter(a=>{let{filetypes:l,enable:u,documentSelector:c,name:h}=a;return r.includes(h)||!u||l&&!Mg(l,s)||c&&s.every(d=>y.match(c,{uri:i,languageId:d})==0)?!1:this.checkTrigger(a,e,o)})}addSource(e){let{name:t}=e;return this.names.includes(t)&&Tee.warn(`Recreate source ${t}`),this.sourceMap.set(t,e),st.Disposable.create(()=>{this.sourceMap.delete(t)})}removeSource(e){let t=typeof e=="string"?e:e.name;this.sourceMap.delete(t)}async refresh(e){for(let t of this.sources)(!e||t.name==e)&&typeof t.refresh=="function"&&await Promise.resolve(t.refresh())}toggleSource(e){if(!e)return;let t=this.getSource(e);!t||typeof t.toggle=="function"&&t.toggle()}sourceStats(){let e=[],t=this.sources;for(let i of t)e.push({name:i.name,priority:i.priority,triggerCharacters:i.triggerCharacters||[],shortcut:i.shortcut||"",filetypes:i.filetypes||[],filepath:i.filepath||"",type:i.sourceType==0?"native":i.sourceType==1?"remote":"service",disabled:!i.enable});return e}onDocumentEnter(e){let{sources:t}=this;for(let i of t)i.enable&&typeof i.onEnter=="function"&&i.onEnter(e)}createSource(e){if(!e.name||!e.doComplete)throw new Error("name and doComplete required for createSource");let t=new dr(Object.assign({sourceType:2},e));return this.addSource(t)}dispose(){J(this.disposables)}},rt=new W_});var Eo,$7e,_ee,O,Se=_(()=>{"use strict";Eo=x(q());Vl();VZ();iJ();rJ();sJ();aJ();uJ();hJ();gJ();pJ();bJ();vJ();DJ();xJ();TJ();EJ();_J();LJ();IJ();AJ();MJ();BJ();qJ();WJ();JJ();$k();V();$7e=H()("languages"),_ee=class{constructor(){this._onDidSemanticTokensRefresh=new Eo.Emitter;this._onDidInlayHintRefresh=new Eo.Emitter;this.onDidSemanticTokensRefresh=this._onDidSemanticTokensRefresh.event;this.onDidInlayHintRefresh=this._onDidInlayHintRefresh.event;this.onTypeFormatManager=new zy;this.documentLinkManager=new Zy;this.documentColorManager=new Yy;this.foldingRangeManager=new $y;this.renameManager=new ev;this.formatManager=new Xy;this.codeActionManager=new My;this.workspaceSymbolsManager=new sv;this.formatRangeManager=new Uy;this.hoverManager=new Gy;this.signatureManager=new rv;this.documentSymbolManager=new Jy;this.documentHighlightManager=new Wy;this.definitionManager=new qy;this.declarationManager=new By;this.typeDefinitionManager=new ov;this.referenceManager=new Vy;this.implementationManager=new Qy;this.codeLensManager=new Ny;this.selectionRangeManager=new tv;this.callHierarchyManager=new Ay;this.semanticTokensManager=new iv;this.semanticTokensRangeManager=new nv;this.linkedEditingManager=new Ky;this.inlayHintManager=new uv}hasFormatProvider(e){return!!(this.formatManager.hasProvider(e)||this.formatRangeManager.hasProvider(e))}registerOnTypeFormattingEditProvider(e,t,i){return this.onTypeFormatManager.register(e,t,i)}registerCompletionItemProvider(e,t,i,r,o=[],s,a){return i=typeof i=="string"?[{language:i}]:i,(mo(),Ha(Pee)).default.createLanguageSource(e,t,i,r,o,s,a)}registerCodeActionProvider(e,t,i,r){return this.codeActionManager.register(e,t,i,r)}registerHoverProvider(e,t){return this.hoverManager.register(e,t)}registerSelectionRangeProvider(e,t){return this.selectionRangeManager.register(e,t)}registerSignatureHelpProvider(e,t,i){return this.signatureManager.register(e,t,i)}registerDocumentSymbolProvider(e,t,i){return this.documentSymbolManager.register(e,t,i)}registerFoldingRangeProvider(e,t){return this.foldingRangeManager.register(e,t)}registerDocumentHighlightProvider(e,t){return this.documentHighlightManager.register(e,t)}registerCodeLensProvider(e,t){return this.codeLensManager.register(e,t)}registerDocumentLinkProvider(e,t){return this.documentLinkManager.register(e,t)}registerDocumentColorProvider(e,t){return this.documentColorManager.register(e,t)}registerDefinitionProvider(e,t){return this.definitionManager.register(e,t)}registerDeclarationProvider(e,t){return this.declarationManager.register(e,t)}registerTypeDefinitionProvider(e,t){return this.typeDefinitionManager.register(e,t)}registerImplementationProvider(e,t){return this.implementationManager.register(e,t)}registerReferencesProvider(e,t){return this.referenceManager.register(e,t)}registerRenameProvider(e,t){return this.renameManager.register(e,t)}registerWorkspaceSymbolProvider(e){return arguments.length>1&&typeof arguments[1].provideWorkspaceSymbols=="function"&&(e=arguments[1]),this.workspaceSymbolsManager.register(e)}registerDocumentFormatProvider(e,t,i=0){return this.formatManager.register(e,t,i)}registerDocumentRangeFormatProvider(e,t,i=0){return this.formatRangeManager.register(e,t,i)}registerCallHierarchyProvider(e,t){return this.callHierarchyManager.register(e,t)}registerDocumentSemanticTokensProvider(e,t,i){let r=setTimeout(()=>{this._onDidSemanticTokensRefresh.fire(e)},500),o=this.semanticTokensManager.register(e,t,i,()=>{clearTimeout(r),this._onDidSemanticTokensRefresh.fire(e)});return Eo.Disposable.create(()=>{clearTimeout(r),o.dispose()})}registerDocumentRangeSemanticTokensProvider(e,t,i){return this._onDidSemanticTokensRefresh.fire(e),this.semanticTokensRangeManager.register(e,t,i)}registerInlayHintsProvider(e,t){let i=[];return i.push(this.inlayHintManager.register(e,t)),this._onDidInlayHintRefresh.fire(e),typeof t.onDidChangeInlayHints=="function"&&t.onDidChangeInlayHints(()=>{this._onDidInlayHintRefresh.fire(e)},null,i),Eo.Disposable.create(()=>{J(i),this._onDidInlayHintRefresh.fire(e)})}registerLinkedEditingRangeProvider(e,t){return this.linkedEditingManager.register(e,t)}shouldTriggerSignatureHelp(e,t){return this.signatureManager.shouldTrigger(e,t)}async getHover(e,t,i){return await this.hoverManager.provideHover(e,t,i)}async getSignatureHelp(e,t,i,r){return await this.signatureManager.provideSignatureHelp(e,t,i,r)}async getDefinition(e,t,i){return this.definitionManager.hasProvider(e)?await this.definitionManager.provideDefinition(e,t,i):null}async getDefinitionLinks(e,t,i){return this.definitionManager.hasProvider(e)?await this.definitionManager.provideDefinitionLinks(e,t,i):null}async getDeclaration(e,t,i){return this.declarationManager.hasProvider(e)?await this.declarationManager.provideDeclaration(e,t,i):null}async getTypeDefinition(e,t,i){return this.typeDefinitionManager.hasProvider(e)?await this.typeDefinitionManager.provideTypeDefinition(e,t,i):null}async getImplementation(e,t,i){return this.implementationManager.hasProvider(e)?await this.implementationManager.provideReferences(e,t,i):null}async getReferences(e,t,i,r){return this.referenceManager.hasProvider(e)?await this.referenceManager.provideReferences(e,i,t,r):null}async getDocumentSymbol(e,t){return await this.documentSymbolManager.provideDocumentSymbols(e,t)}getDocumentSymbolMetadata(e){return this.documentSymbolManager.getMetaData(e)}async getSelectionRanges(e,t,i){return await this.selectionRangeManager.provideSelectionRanges(e,t,i)}async getWorkspaceSymbols(e,t){return e=e||"",await this.workspaceSymbolsManager.provideWorkspaceSymbols(e,t)}async resolveWorkspaceSymbol(e,t){return await this.workspaceSymbolsManager.resolveWorkspaceSymbol(e,t)}async prepareRename(e,t,i){return await this.renameManager.prepareRename(e,t,i)}async provideRenameEdits(e,t,i,r){return await this.renameManager.provideRenameEdits(e,t,i,r)}async provideDocumentFormattingEdits(e,t,i){if(!this.formatManager.hasProvider(e)){if(!this.formatRangeManager.hasProvider(e))return null;let o=e.positionAt(e.getText().length),s=Eo.Range.create(Eo.Position.create(0,0),o);return await this.provideDocumentRangeFormattingEdits(e,s,t,i)}return await this.formatManager.provideDocumentFormattingEdits(e,t,i)}async provideDocumentRangeFormattingEdits(e,t,i,r){return this.formatRangeManager.hasProvider(e)?await this.formatRangeManager.provideDocumentRangeFormattingEdits(e,t,i,r):null}async getCodeActions(e,t,i,r){return await this.codeActionManager.provideCodeActions(e,t,i,r)}async getDocumentHighLight(e,t,i){return await this.documentHighlightManager.provideDocumentHighlights(e,t,i)}async getDocumentLinks(e,t){return this.documentLinkManager.hasProvider(e)?await this.documentLinkManager.provideDocumentLinks(e,t)||[]:null}async resolveDocumentLink(e,t){return await this.documentLinkManager.resolveDocumentLink(e,t)}async provideDocumentColors(e,t){return await this.documentColorManager.provideDocumentColors(e,t)}async provideFoldingRanges(e,t,i){return this.foldingRangeManager.hasProvider(e)?await this.foldingRangeManager.provideFoldingRanges(e,t,i):null}async provideColorPresentations(e,t,i){return await this.documentColorManager.provideColorPresentations(e,t,i)}async getCodeLens(e,t){return await this.codeLensManager.provideCodeLenses(e,t)}async resolveCodeLens(e,t){return e.command!=null?e:await this.codeLensManager.resolveCodeLens(e,t)}async resolveCodeAction(e,t){return await this.codeActionManager.resolveCodeAction(e,t)}async provideDocumentOnTypeEdits(e,t,i,r){return this.onTypeFormatManager.onCharacterType(e,t,i,r)}canFormatOnType(e,t){return this.onTypeFormatManager.getProvider(t,e)!=null}async prepareCallHierarchy(e,t,i){return this.callHierarchyManager.prepareCallHierarchy(e,t,i)}async provideIncomingCalls(e,t,i){return this.callHierarchyManager.provideCallHierarchyIncomingCalls(e,t,i)}async provideOutgoingCalls(e,t,i){return this.callHierarchyManager.provideCallHierarchyOutgoingCalls(e,t,i)}getLegend(e,t){return t?this.semanticTokensRangeManager.getLegend(e):this.semanticTokensManager.getLegend(e)}hasSemanticTokensEdits(e){return this.semanticTokensManager.hasSemanticTokensEdits(e)}async provideDocumentSemanticTokens(e,t){return this.semanticTokensManager.provideDocumentSemanticTokens(e,t)}async provideDocumentSemanticTokensEdits(e,t,i){return this.semanticTokensManager.provideDocumentSemanticTokensEdits(e,t,i)}async provideDocumentRangeSemanticTokens(e,t,i){return this.semanticTokensRangeManager.provideDocumentRangeSemanticTokens(e,t,i)}async provideInlayHints(e,t,i){return this.inlayHintManager.provideInlayHints(e,t,i)}async resolveInlayHint(e,t){return this.inlayHintManager.resolveInlayHint(e,t)}hasLinkedEditing(e){return this.linkedEditingManager.hasProvider(e)}async provideLinkedEdits(e,t,i){return this.linkedEditingManager.provideLinkedEditingRanges(e,t,i)}createDiagnosticCollection(e){return It.create(e)}hasProvider(e,t){switch(e){case"formatOnType":return this.onTypeFormatManager.hasProvider(t);case"rename":return this.renameManager.hasProvider(t);case"onTypeEdit":return this.onTypeFormatManager.hasProvider(t);case"documentLink":return this.documentLinkManager.hasProvider(t);case"documentColor":return this.documentColorManager.hasProvider(t);case"foldingRange":return this.foldingRangeManager.hasProvider(t);case"format":return this.formatManager.hasProvider(t)||this.formatRangeManager.hasProvider(t);case"codeAction":return this.codeActionManager.hasProvider(t);case"workspaceSymbols":return this.workspaceSymbolsManager.hasProvider();case"formatRange":return this.formatRangeManager.hasProvider(t);case"hover":return this.hoverManager.hasProvider(t);case"signature":return this.signatureManager.hasProvider(t);case"documentSymbol":return this.documentSymbolManager.hasProvider(t);case"documentHighlight":return this.documentHighlightManager.hasProvider(t);case"definition":return this.definitionManager.hasProvider(t);case"declaration":return this.declarationManager.hasProvider(t);case"typeDefinition":return this.typeDefinitionManager.hasProvider(t);case"reference":return this.referenceManager.hasProvider(t);case"implementation":return this.implementationManager.hasProvider(t);case"codeLens":return this.codeLensManager.hasProvider(t);case"selectionRange":return this.selectionRangeManager.hasProvider(t);case"callHierarchy":return this.callHierarchyManager.hasProvider(t);case"semanticTokens":return this.semanticTokensManager.hasProvider(t);case"semanticTokensRange":return this.semanticTokensRangeManager.hasProvider(t);case"linkedEditing":return this.linkedEditingManager.hasProvider(t);case"inlayHint":return this.inlayHintManager.hasProvider(t);default:throw new Error(`Invalid provider name: ${e}`)}}},O=new _ee});var Ree,z7e,CD,Lee=_(()=>{"use strict";Ree=x(q());ge();V();z7e=H()("model-dialog"),CD=class{constructor(e,t){this.nvim=e;this.config=t;this.disposables=[];this._onDidClose=new Ree.Emitter;this.onDidClose=this._onDidClose.event;P.on("BufWinLeave",i=>{i==this.bufnr&&(this.dispose(),t.callback&&t.callback(-1))},null,this.disposables),P.on("FloatBtnClick",(i,r)=>{if(i==this.bufnr){this.dispose();let o=t==null?void 0:t.buttons.filter(s=>s.disabled!=!0);t.callback&&t.callback(o[r].index)}},null,this.disposables)}get lines(){return[...this.config.content.split(/\r?\n/)]}async show(e){let{nvim:t}=this,{title:i,close:r,highlights:o,buttons:s}=this.config,a=this.config.borderhighlight||e.floatBorderHighlight,l=this.config.highlight||e.floatHighlight,u={maxwidth:e.maxWidth||80};i&&(u.title=i),(r||typeof r>"u")&&(u.close=1),e.maxHeight&&(u.maxHeight=e.maxHeight),e.maxWidth&&(u.maxWidth=e.maxWidth),l&&(u.highlight=l),o&&(u.highlights=o),a&&(u.borderhighlight=[a]),s&&(u.buttons=s.filter(h=>!h.disabled).map(h=>h.text)),e.rounded&&(u.rounded=1),Array.isArray(u.buttons)&&(u.getchar=1);let c=await t.call("coc#dialog#create_dialog",[this.lines,u]);if(!c)throw new Error("Unable to open dialog window.");this.bufnr=c[1],t.command("redraw",!0)}get winid(){return this.bufnr?this.nvim.call("bufwinid",[this.bufnr]):Promise.resolve(null)}dispose(){this._onDidClose.fire(),this.bufnr=void 0,J(this.disposables),this.disposables=[]}}});var Z_,r9e,nu,J_=_(()=>{"use strict";Z_=x(q());ge();V();r9e=H()("model-input"),nu=class{constructor(e,t){this.nvim=e;this.disposables=[];this.accepted=!1;this._dimension=[0,0,0,0];this._onDidFinish=new Z_.Emitter;this._onDidChange=new Z_.Emitter;this.onDidFinish=this._onDidFinish.event;this.onDidChange=this._onDidChange.event;this._input=t,this.disposables.push(this._onDidFinish),this.disposables.push(this._onDidChange);let i;Object.defineProperty(this,"title",{set:s=>{i=s,this._winid&&e.call("coc#dialog#change_title",[this._winid,s],!0)},get:()=>i});let r=!1;Object.defineProperty(this,"loading",{set:s=>{r=s,this._winid&&e.call("coc#dialog#change_loading",[this._winid,s],!0)},get:()=>r});let o;Object.defineProperty(this,"borderhighlight",{set:s=>{o=s,this._winid&&e.call("coc#dialog#change_border_hl",[this._winid,s],!0)},get:()=>o}),P.on("BufWinLeave",s=>{s==this._bufnr&&(this._winid=void 0,this.dispose())},null,this.disposables),P.on("PromptInsert",(s,a)=>{a==this._bufnr&&(this._input=s,this.accepted=!0,this.dispose())},null,this.disposables),P.on("TextChangedI",(s,a)=>{s==this._bufnr&&(this._input=a.line,this._onDidChange.fire(a.line))},null,this.disposables)}get dimension(){let{_dimension:e}=this;return{width:e[0],height:e[1],row:e[2],col:e[3]}}get bufnr(){return this._bufnr}get winid(){return this._winid}get value(){return this._input}async show(e,t){var r;this.title=e,this.borderhighlight=(r=t.borderhighlight)!=null?r:"CocFloating",this.loading=!1;let i=await this.nvim.call("coc#dialog#create_prompt_win",[e,this._input,t]);if(!i)throw new Error("Unable to open input window");return this._bufnr=i[0],this._winid=i[1],this._dimension=i[2],!0}dispose(){this._onDidFinish.fire(this.accepted?this._input:null),this._winid&&this.nvim.call("coc#float#close",[this._winid],!0),this._winid=void 0,this._bufnr=void 0,J(this.disposables)}}});var $_,Ia,xD=_(()=>{"use strict";$_=process.env.VIM_NODE_RPC=="1",Ia=class{constructor(e,t,i,r,o=0){this.nvim=e;this.winid=t;this.bufnr=i;this.linecount=r;this._currIndex=o}get currIndex(){return this._currIndex}get valid(){return this.nvim.call("coc#float#valid",[this.winid]).then(e=>!!e)}close(){this.nvim.call("coc#float#close",[this.winid],!0)}refreshScrollbar(){$_||this.nvim.call("coc#float#nvim_scrollbar",[this.winid],!0)}execute(e){this.nvim.call("coc#compat#execute",[this.winid,e],!0)}async scrollForward(){let{nvim:e,bufnr:t,winid:i}=this,o=await e.createBuffer(t).length,s;if($_)s=await e.eval(`get(popup_getpos(${i}), 'lastline', 0)`);else{let a=await e.call("getwininfo",[i]);if(!a||!a.length)return;s=a[0].botline}s>=o||s==0||(e.pauseNotification(),this.setCursor(s-1),this.execute("silent! noa setl scrolloff=0"),this.execute(`normal! ${s}Gzt`),this.refreshScrollbar(),e.command("redraw",!0),e.resumeNotification(!1,!0))}async scrollBackward(){let{nvim:e,winid:t}=this,i;if($_)i=await e.eval(`get(popup_getpos(${t}), 'firstline', 0)`);else{let r=await e.call("getwininfo",[t]);if(!r||!r.length)return;i=r[0].topline}i!=1&&(e.pauseNotification(),this.setCursor(i-1),this.execute(`normal! ${i}Gzb`),this.refreshScrollbar(),e.command("redraw",!0),e.resumeNotification(!1,!0))}setCursor(e,t=!1){let{nvim:i,bufnr:r,winid:o,linecount:s}=this;e<0?e=0:e>s-1&&(e=s-1),this._currIndex=e,i.call("coc#dialog#set_cursor",[o,r,e+1],!0),t&&(this.refreshScrollbar(),i.command("redraw",!0))}}});function ru(n){return n?typeof n.text=="string":!1}var Fee,hTe,SD,Iee=_(()=>{"use strict";Fee=x(q());ge();V();_e();xD();hTe=H()("model-menu");SD=class{constructor(e,t,i){this.nvim=e;this.config=t;this.currIndex=0;this.contentHeight=0;this.disposables=[];this.keyMappings=new Map;this.shortcutIndexes=new Set;this._disposed=!1;this._onDidClose=new Fee.Emitter;this.onDidClose=this._onDidClose.event;this.total=t.items.length,i&&i.onCancellationRequested(()=>{var r;this.win?(r=this.win)==null||r.close():(this._onDidClose.fire(-1),this.dispose())}),this.disposables.push(this._onDidClose),this.addKeymappings()}attachEvents(){P.on("InputChar",this.onInputChar.bind(this),null,this.disposables),P.on("BufWinLeave",e=>{e==this.bufnr&&(this._onDidClose.fire(-1),this.dispose())},null,this.disposables)}addKeymappings(){let{nvim:e}=this;this.addKeys(["",""],()=>{this._onDidClose.fire(-1),this.dispose()}),this.addKeys(["\r",""],()=>{this.selectCurrent()});let t=s=>{var a;!this.win||(e.pauseNotification(),this.setCursor(s+this.contentHeight),(a=this.win)==null||a.refreshScrollbar(),e.command("redraw",!0),e.resumeNotification(!1,!0))};this.addKeys("",async()=>{var s;await((s=this.win)==null?void 0:s.scrollForward())}),this.addKeys("",async()=>{var s;await((s=this.win)==null?void 0:s.scrollBackward())}),this.addKeys(["j","","",""],()=>{let s=this.currIndex==this.total-1?0:this.currIndex+1;t(s)}),this.addKeys(["k","","",""],()=>{let s=this.currIndex==0?this.total-1:this.currIndex-1;t(s)}),this.addKeys(["g"],()=>{t(0)}),this.addKeys(["G"],()=>{t(this.total-1)});let i,r,o=s=>{this.isDisabled(s)||(this._onDidClose.fire(s),this.dispose())};this.addKeys(["0","1","2","3","4","5","6","7","8","9"],s=>{i&&clearTimeout(i);let a=parseInt(s,10);if(!(isNaN(a)||a>this.total)&&!(r==null&&a==0)){if(r){let l=r*10+a;r=void 0,o(l-1);return}if(this.total<10||a*10>this.total){o(a-1);return}i=setTimeout(async()=>{o(a-1)},200),r=a}}),this.config.shortcuts&&this.addShortcuts(o)}addShortcuts(e){let{items:t}=this.config;t.map(r=>ru(r)?r.text:r).forEach((r,o)=>{if(r.length){let s=r[0];A0(s.charCodeAt(0))&&!this.keyMappings.has(s)&&(this.shortcutIndexes.add(o),this.addKeys(s,()=>{e(o)}))}})}isDisabled(e){let{items:t}=this.config,i=t[e];return!!(ru(i)&&i.disabled)}async show(e={}){let{nvim:t,shortcutIndexes:i}=this,{title:r,items:o,borderhighlight:s,position:a,content:l}=this.config,u={};r&&(u.title=r),a==="center"&&(u.relative="editor"),e.maxHeight&&(u.maxHeight=e.maxHeight),e.maxWidth&&(u.maxWidth=e.maxWidth),e.floatHighlight&&(u.highlight=e.floatHighlight),s?u.borderhighlight=s:e.floatBorderHighlight&&(u.borderhighlight=e.floatBorderHighlight),e.rounded&&(u.rounded=1),typeof l=="string"&&(u.content=l);let c=[],h=o.map((g,f)=>{let p=ru(g)?g.text:g,m=f<99?`${f+1}. `:"";return i.has(f)&&c.push({lnum:f,hlGroup:e.shortcutHighlight||"MoreMsg",colStart:G(m),colEnd:G(m)+1}),m+p.trim()});h.forEach((g,f)=>{let p=o[f];ru(p)&&p.disabled&&c.push({hlGroup:"CocDisabled",lnum:f,colStart:0,colEnd:G(g)})}),c.length&&(u.highlights=c),e.confirmKey&&e.confirmKey!=""&&this.addKeys(e.confirmKey,()=>{this.selectCurrent()});let d=await t.call("coc#dialog#create_menu",[h,u]);if(!d)throw new Error("Unable to create menu window");t.command("redraw",!0),!this._disposed&&(this.win=new Ia(t,d[0],d[1],h.length+d[2],d[2]),this.bufnr=d[1],this.contentHeight=d[2],this.attachEvents(),t.call("coc#prompt#start_prompt",["menu"],!0))}selectCurrent(){if(this.isDisabled(this.currIndex)){let e=this.config.items[this.currIndex];e.disabled.reason&&this.nvim.outWriteLine(`Item disabled: ${e.disabled.reason}`);return}this._onDidClose.fire(this.currIndex),this.dispose()}get buffer(){return this.bufnr?this.nvim.createBuffer(this.bufnr):void 0}dispose(){var e;this._disposed=!0,J(this.disposables),this.shortcutIndexes.clear(),this.keyMappings.clear(),this.nvim.call("coc#prompt#stop_prompt",["menu"],!0),(e=this.win)==null||e.close(),this.bufnr=void 0,this.win=void 0}async onInputChar(e,t){if(e!="menu"||!this.win)return;let i=this.keyMappings.get(t);i?await Promise.resolve(i(t)):hTe.warn(`Ignored key press: ${t}`)}setCursor(e){!this.win||(this.currIndex=e-this.contentHeight,this.win.setCursor(e))}addKeys(e,t){if(Array.isArray(e))for(let i of e)this.keyMappings.set(i,t);else this.keyMappings.set(e,t)}}});var b9e,ou,X_=_(()=>{"use strict";ge();V();b9e=H()("model-notification"),ou=class{constructor(e,t,i=!0){this.nvim=e;this.config=t;this.disposables=[];this._disposed=!1;i&&(P.on("BufWinLeave",r=>{r==this.bufnr&&(this.dispose(),t.callback&&t.callback(-1))},null,this.disposables),P.on("FloatBtnClick",(r,o)=>{if(r==this.bufnr){this.dispose();let s=t==null?void 0:t.buttons.filter(a=>a.disabled!=!0);t.callback&&t.callback(s[o].index)}},null,this.disposables))}get lines(){return this.config.content?this.config.content.split(/\r?\n/):[]}async show(e){let{nvim:t}=this,{buttons:i,kind:r,title:o}=this.config,s=Object.assign({},e);if(s.kind=r!=null?r:"",o&&(s.title=o),e.broder&&(s.borderhighlight=r?`CocNotification${r[0].toUpperCase()}${r.slice(1)}`:e.highlight),Array.isArray(i)){let l=i.filter(u=>!u.disabled).map(u=>u.text);l.length&&(s.actions=l)}let a=await t.call("coc#notify#create",[this.lines,s]);if(!a)throw new Error("Unable to create notification window");this._winid=a[0],this.bufnr=a[1]}get winid(){return this._winid}dispose(){if(this._disposed)return;this._disposed=!0;let{winid:e}=this;e&&(this.nvim.call("coc#notify#close",[e],!0),this.nvim.redrawVim()),this.bufnr=void 0,this._winid=void 0,J(this.disposables)}}});var jee,dTe,gTe,TD,Aee=_(()=>{"use strict";jee=x(q());ge();V();_e();xD();dTe=H()("model-dialog"),gTe=process.env.VIM_NODE_RPC=="1",TD=class{constructor(e,t,i){this.nvim=e;this.config=t;this.picked=new Set;this.disposables=[];this.keyMappings=new Map;this._onDidClose=new jee.Emitter;this.onDidClose=this._onDidClose.event;for(let r=0;r{var r;(r=this.win)==null||r.close()}),this.disposables.push(this._onDidClose),this.addKeymappings()}get currIndex(){return this.win?this.win.currIndex:0}attachEvents(){P.on("InputChar",this.onInputChar.bind(this),null,this.disposables),P.on("BufWinLeave",e=>{e==this.bufnr&&(this._onDidClose.fire(void 0),this.bufnr=void 0,this.win=void 0,this.dispose())},null,this.disposables),P.on("FloatBtnClick",(e,t)=>{if(e==this.bufnr){if(t==0){let i=Array.from(this.picked);this._onDidClose.fire(i.length?i:void 0)}else this._onDidClose.fire(void 0);this.dispose()}},null,this.disposables)}addKeymappings(){let{nvim:e}=this,t=i=>{this.picked.has(i)?this.picked.delete(i):this.picked.add(i)};this.addKeys("",async()=>{if(gTe||!this.win)return;let[i,r,o]=await e.eval("[v:mouse_winid,v:mouse_lnum,v:mouse_col]");if(global.hasOwnProperty("__TEST__")){let s=await e.getVar("mouse_position");i=s[0],r=s[1],o=s[2]}e.pauseNotification(),i==this.win.winid&&(o<=3?(t(r-1),this.changeLine(r-1)):this.setCursor(r-1)),e.call("win_gotoid",[i],!0),e.call("cursor",[r,o],!0),e.call("coc#float#nvim_float_click",[],!0),e.command("redraw",!0),await e.resumeNotification()}),this.addKeys(["",""],()=>{this._onDidClose.fire(void 0),this.dispose()}),this.addKeys("",()=>{if(this.picked.size==0)this._onDidClose.fire(void 0);else{let i=Array.from(this.picked);this._onDidClose.fire(i)}this.dispose()}),this.addKeys(["j","","",""],()=>{this.win.setCursor(this.currIndex+1,!0)}),this.addKeys(["k","","",""],()=>{this.win.setCursor(this.currIndex-1,!0)}),this.addKeys(["g"],()=>{this.win.setCursor(0,!0)}),this.addKeys(["G"],()=>{this.win.setCursor(this.total-1,!0)}),this.addKeys(" ",async()=>{let i=this.currIndex;t(i),e.pauseNotification(),this.changeLine(i),this.setCursor(this.currIndex+1),e.command("redraw",!0),await e.resumeNotification()}),this.addKeys("",async()=>{var i;await((i=this.win)==null?void 0:i.scrollForward())}),this.addKeys("",async()=>{var i;await((i=this.win)==null?void 0:i.scrollBackward())})}async show(e={}){let{nvim:t}=this,{title:i,items:r}=this.config,o={close:1,cursorline:1};if(e.maxHeight&&(o.maxHeight=e.maxHeight),e.maxWidth&&(o.maxWidth=e.maxWidth),i&&(o.title=i),e.floatHighlight&&(o.highlight=e.floatHighlight),e.floatBorderHighlight&&(o.borderhighlight=[e.floatBorderHighlight]),e.pickerButtons){let u=e.pickerButtonShortcut;o.buttons=["Submit"+(u?" ":""),"Cancel"+(u?" ":"")]}e.rounded&&(o.rounded=1),e.confirmKey&&e.confirmKey!=""&&this.addKeys(e.confirmKey,()=>{this._onDidClose.fire(void 0),this.dispose()});let s=[],a=[];for(let u=0;u{"use strict";X_();kD=x(q());ge();fTe=H()("model-progress"),ED=class extends ou{constructor(e,t){super(e,{kind:"progress",title:t.title,buttons:t.cancellable?[{index:1,text:"Cancel"}]:void 0},!1);this.option=t;this._onDidFinish=new kD.Emitter;this.onDidFinish=this._onDidFinish.event;this.disposables.push(this._onDidFinish),P.on("BufWinLeave",i=>{i==this.bufnr&&(this.tokenSource&&this.tokenSource.cancel(),this._onDidFinish.fire(void 0),this.dispose())},null,this.disposables)}async show(e){let{task:t}=this.option,i=this.tokenSource=new kD.CancellationTokenSource;this.disposables.push(i);let r=0;this.config.buttons||!e.disabled?await super.show(e):fTe.warn('progress window disabled by "notification.disabledProgressSources"'),t({report:o=>{if(!this.winid)return;let{nvim:s}=this;o.increment&&(r+=o.increment,s.call("coc#window#set_var",[this.winid,"percent",`${r}%`],!0)),o.message&&s.call("coc#window#set_var",[this.winid,"message",o.message.replace(/\r?\n/g," ")],!0)}},i.token).then(o=>{this._disposed||(this._onDidFinish.fire(o),this.dispose())},o=>{this.nvim.echoError(o),!this._disposed&&(this._onDidFinish.fire(void 0),this.dispose())})}}});var Nee=b((I9e,U_)=>{var ja={};typeof U_>"u"?window.eastasianwidth=ja:U_.exports=ja;ja.eastAsianWidth=function(n){var e=n.charCodeAt(0),t=n.length==2?n.charCodeAt(1):0,i=e;return 55296<=e&&e<=56319&&56320<=t&&t<=57343&&(e&=1023,t&=1023,i=e<<10|t,i+=65536),i==12288||65281<=i&&i<=65376||65504<=i&&i<=65510?"F":i==8361||65377<=i&&i<=65470||65474<=i&&i<=65479||65482<=i&&i<=65487||65490<=i&&i<=65495||65498<=i&&i<=65500||65512<=i&&i<=65518?"H":4352<=i&&i<=4447||4515<=i&&i<=4519||4602<=i&&i<=4607||9001<=i&&i<=9002||11904<=i&&i<=11929||11931<=i&&i<=12019||12032<=i&&i<=12245||12272<=i&&i<=12283||12289<=i&&i<=12350||12353<=i&&i<=12438||12441<=i&&i<=12543||12549<=i&&i<=12589||12593<=i&&i<=12686||12688<=i&&i<=12730||12736<=i&&i<=12771||12784<=i&&i<=12830||12832<=i&&i<=12871||12880<=i&&i<=13054||13056<=i&&i<=19903||19968<=i&&i<=42124||42128<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||55216<=i&&i<=55238||55243<=i&&i<=55291||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65106||65108<=i&&i<=65126||65128<=i&&i<=65131||110592<=i&&i<=110593||127488<=i&&i<=127490||127504<=i&&i<=127546||127552<=i&&i<=127560||127568<=i&&i<=127569||131072<=i&&i<=194367||177984<=i&&i<=196605||196608<=i&&i<=262141?"W":32<=i&&i<=126||162<=i&&i<=163||165<=i&&i<=166||i==172||i==175||10214<=i&&i<=10221||10629<=i&&i<=10630?"Na":i==161||i==164||167<=i&&i<=168||i==170||173<=i&&i<=174||176<=i&&i<=180||182<=i&&i<=186||188<=i&&i<=191||i==198||i==208||215<=i&&i<=216||222<=i&&i<=225||i==230||232<=i&&i<=234||236<=i&&i<=237||i==240||242<=i&&i<=243||247<=i&&i<=250||i==252||i==254||i==257||i==273||i==275||i==283||294<=i&&i<=295||i==299||305<=i&&i<=307||i==312||319<=i&&i<=322||i==324||328<=i&&i<=331||i==333||338<=i&&i<=339||358<=i&&i<=359||i==363||i==462||i==464||i==466||i==468||i==470||i==472||i==474||i==476||i==593||i==609||i==708||i==711||713<=i&&i<=715||i==717||i==720||728<=i&&i<=731||i==733||i==735||768<=i&&i<=879||913<=i&&i<=929||931<=i&&i<=937||945<=i&&i<=961||963<=i&&i<=969||i==1025||1040<=i&&i<=1103||i==1105||i==8208||8211<=i&&i<=8214||8216<=i&&i<=8217||8220<=i&&i<=8221||8224<=i&&i<=8226||8228<=i&&i<=8231||i==8240||8242<=i&&i<=8243||i==8245||i==8251||i==8254||i==8308||i==8319||8321<=i&&i<=8324||i==8364||i==8451||i==8453||i==8457||i==8467||i==8470||8481<=i&&i<=8482||i==8486||i==8491||8531<=i&&i<=8532||8539<=i&&i<=8542||8544<=i&&i<=8555||8560<=i&&i<=8569||i==8585||8592<=i&&i<=8601||8632<=i&&i<=8633||i==8658||i==8660||i==8679||i==8704||8706<=i&&i<=8707||8711<=i&&i<=8712||i==8715||i==8719||i==8721||i==8725||i==8730||8733<=i&&i<=8736||i==8739||i==8741||8743<=i&&i<=8748||i==8750||8756<=i&&i<=8759||8764<=i&&i<=8765||i==8776||i==8780||i==8786||8800<=i&&i<=8801||8804<=i&&i<=8807||8810<=i&&i<=8811||8814<=i&&i<=8815||8834<=i&&i<=8835||8838<=i&&i<=8839||i==8853||i==8857||i==8869||i==8895||i==8978||9312<=i&&i<=9449||9451<=i&&i<=9547||9552<=i&&i<=9587||9600<=i&&i<=9615||9618<=i&&i<=9621||9632<=i&&i<=9633||9635<=i&&i<=9641||9650<=i&&i<=9651||9654<=i&&i<=9655||9660<=i&&i<=9661||9664<=i&&i<=9665||9670<=i&&i<=9672||i==9675||9678<=i&&i<=9681||9698<=i&&i<=9701||i==9711||9733<=i&&i<=9734||i==9737||9742<=i&&i<=9743||9748<=i&&i<=9749||i==9756||i==9758||i==9792||i==9794||9824<=i&&i<=9825||9827<=i&&i<=9829||9831<=i&&i<=9834||9836<=i&&i<=9837||i==9839||9886<=i&&i<=9887||9918<=i&&i<=9919||9924<=i&&i<=9933||9935<=i&&i<=9953||i==9955||9960<=i&&i<=9983||i==10045||i==10071||10102<=i&&i<=10111||11093<=i&&i<=11097||12872<=i&&i<=12879||57344<=i&&i<=63743||65024<=i&&i<=65039||i==65533||127232<=i&&i<=127242||127248<=i&&i<=127277||127280<=i&&i<=127337||127344<=i&&i<=127386||917760<=i&&i<=917999||983040<=i&&i<=1048573||1048576<=i&&i<=1114109?"A":"N"};ja.characterLength=function(n){var e=this.eastAsianWidth(n);return e=="F"||e=="W"||e=="A"?2:1};function Mee(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}ja.length=function(n){for(var e=Mee(n),t=0,i=0;i=e-(l==2?1:0))if(r+l<=t)i+=a;else break;r+=l}return i}});var Hee=b((j9e,Bee)=>{"use strict";Bee.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var G_=b((A9e,qee)=>{var pTe=cg(),mTe=Nee(),bTe=Hee();qee.exports=function(e,t={}){if(typeof e!="string"||e.length===0||(t=de({ambiguousIsNarrow:!0},t),e=pTe(e),e.length===0))return 0;e=e.replace(bTe()," ");let i=t.ambiguousIsNarrow?1:2,r=0;for(let o of e){let s=o.codePointAt(0);if(s<=31||s>=127&&s<=159||s>=768&&s<=879)continue;switch(mTe.eastAsianWidth(o)){case"F":case"W":r+=2;break;case"A":r+=i;break;default:r+=1}}return r}});var Yee,PD,Z9e,op,Wee=_(()=>{"use strict";Yee=x(G_()),PD=x(q());ge();V();$f();_e();J_();xD();Z9e=H()("model-quickpick"),op=class{constructor(e,t){this.nvim=e;this.config=t;this.disposables=[];this._changed=!1;this._onDidFinish=new PD.Emitter;this._onDidChangeSelection=new PD.Emitter;this._onDidChangeValue=new PD.Emitter;this.onDidFinish=this._onDidFinish.event;this.onDidChangeSelection=this._onDidChangeSelection.event;this.onDidChangeValue=this._onDidChangeValue.event;var r;let i=(r=t.items)!=null?r:[];Object.defineProperty(this,"items",{set:o=>{this._changed=!0,i=o,this.filterItems("")},get:()=>i}),Object.defineProperty(this,"activeItems",{set:o=>{this._changed=!0,this.filteredItems=o,this.showFilteredItems()},get:()=>this.filteredItems}),Object.defineProperty(this,"title",{set:o=>{this.input&&(this.input.title=o)},get:()=>this.input?this.input.title:t.title}),Object.defineProperty(this,"loading",{set:o=>{this.input&&(this.input.loading=o)},get:()=>this.input?this.input.loading:!1})}get value(){var e;return this.input?this.input.value:(e=this.config.value)!=null?e:""}get currIndex(){return this.win?this.win.currIndex:0}get buffer(){return this.bufnr?this.nvim.createBuffer(this.bufnr):void 0}setCursor(e){var t;(t=this.win)==null||t.setCursor(e,!0)}attachEvents(e){P.on("BufWinLeave",t=>{t==this.bufnr&&this.dispose()},null,this.disposables),P.on("PromptKeyPress",async(t,i)=>{var r,o;t==e&&(i=="C-f"?await((r=this.win)==null?void 0:r.scrollForward()):i=="C-b"?await((o=this.win)==null?void 0:o.scrollBackward()):["C-j","C-n","down"].includes(i)?this.setCursor(this.currIndex+1):["C-k","C-p","up"].includes(i)?this.setCursor(this.currIndex-1):this.config.canSelectMany&&i=="C-@"&&this.toggePicked(this.currIndex))},null,this.disposables)}async show(e={}){let{nvim:t,items:i}=this,{title:r,canSelectMany:o,value:s}=this.config,a=[],l=[],u=[];for(let m=0;m{if(this._onDidChangeValue.fire(m),this._changed){this._changed=!1;return}this.filterItems(m)},this),c.onDidFinish(this.onFinish,this);let h=Math.max(40,Math.min(80,a.reduce((m,v)=>Math.max(m,(0,Yee.default)(v)),0)));await c.show(r!=null?r:"",{position:"center",marginTop:10,border:[1,1,0,1],list:!0,minWidth:h,maxWidth:e.maxWidth||80,rounded:!!e.rounded,highlight:e.floatHighlight,borderhighlight:e.floatBorderHighlight}),this.selectedItems=u;let d={lines:a,rounded:!!e.rounded};d.highlights=l,e.floatHighlight&&(d.highlight=e.floatHighlight),e.floatBorderHighlight&&(d.borderhighlight=e.floatBorderHighlight);let g=this.config.maxHeight||e.maxHeight;g&&(d.maxHeight=g);let f=await t.call("coc#dialog#create_list",[c.winid,c.dimension,d]);if(!f)throw new Error("Unable to open list window.");this.filteredItems=i,this.win=new Ia(t,f[0],f[1],a.length),this.win.refreshScrollbar(),this.bufnr=f[1];let p=o||u.length==0?0:i.indexOf(u[0]);this.setCursor(p),this.attachEvents(c.bufnr)}filterItems(e){let{items:t,win:i,selectedItems:r}=this;if(!i)return;let{canSelectMany:o}=this.config,s=[],a=[],l=0,u=[];for(let c of t){let h=this.toFilterText(c);if(e.length>0&&!Dh(e,h))continue;let d=r.includes(c),g=o?`[${d?"x":" "}] ${c.label}`:c.label;if(c.description){let p=G(g);g=g+` ${c.description}`,a.push({hlGroup:"Comment",lnum:l,colStart:p,colEnd:G(g)})}zl(e,h).forEach(p=>{let m=Ae(h,p);a.push({hlGroup:"CocSearch",colStart:m,colEnd:m+1,lnum:l})}),u.push(c),s.push(g),l+=1}this.filteredItems=u,this.win.linecount=s.length,this.nvim.call("coc#dialog#update_list",[this.win.winid,this.win.bufnr,s,a],!0),this.setCursor(0)}showFilteredItems(){let{win:e,input:t,filteredItems:i}=this;if(!e)return;let{canSelectMany:r}=this.config,o=[],s=[],a=0,l=[];for(let u of i){let c=this.toFilterText(u),h=r?`[${u.picked?"x":" "}] ${u.label}`:u.label;if(u.picked&&l.push(u),u.description){let g=G(h);h=h+` ${u.description}`,s.push({hlGroup:"Comment",lnum:a,colStart:g,colEnd:G(h)})}zl(t.value,c).forEach(g=>{let f=Ae(c,g);s.push({hlGroup:"CocSearch",colStart:f,colEnd:f+1,lnum:a})}),o.push(h),a+=1}this.selectedItems=l,this.win.linecount=o.length,this.nvim.call("coc#dialog#update_list",[this.win.winid,this.win.bufnr,o,s],!0),this.setCursor(r||l.length==0?0:i.indexOf(l[0]))}onFinish(e){if(e==null){this._onDidChangeSelection.fire([]),this._onDidFinish.fire(null);return}let t=this.getSelectedItems();this.config.canSelectMany||this._onDidChangeSelection.fire(t),this._onDidFinish.fire(t)}getSelectedItems(){let{win:e}=this,{canSelectMany:t}=this.config;if(t)return this.selectedItems;let i=this.filteredItems[e.currIndex];return i==null?[]:[i]}toggePicked(e){let{nvim:t,filteredItems:i,selectedItems:r}=this,o=i[e];if(!o)return;let s=r.indexOf(o);s!=-1?r.splice(s,1):r.push(o);let a=s==-1?"x":" ";t.pauseNotification(),this.win.execute(`normal! ^1lr${a}`),this.win.setCursor(this.win.currIndex+1),t.resumeNotification(!0,!0),this._onDidChangeSelection.fire(r)}toFilterText(e){let{label:t,description:i}=e,{canSelectMany:r}=this.config,o=`${r?" ":""}${t.replace(/\r?\n/,"")}`;return this.matchOnDescription?o+" "+(i!=null?i:""):o}dispose(){var e,t;this.bufnr=void 0,(e=this.input)==null||e.dispose(),(t=this.win)==null||t.close(),this._onDidFinish.dispose(),this._onDidChangeSelection.dispose(),J(this.disposables)}}});var _D,Th,RD,Zee=_(()=>{"use strict";ge();_D=x(q());V();Th="filter",RD=class{constructor(e,t){this.nvim=e;this._activated=!1;this.history=[];this.disposables=[];this._onDidUpdate=new _D.Emitter;this._onDidExit=new _D.Emitter;this._onDidKeyPress=new _D.Emitter;this.onDidKeyPress=this._onDidKeyPress.event;this.onDidUpdate=this._onDidUpdate.event;this.onDidExit=this._onDidExit.event;this.text="",P.on("InputChar",(i,r)=>{if(!(i!==Th||!this._activated)){if(!t.includes(r)){if(r.length==1){this.text=this.text+r,this._onDidUpdate.fire(this.text);return}if(r==""||r==""){this.text=this.text.slice(0,-1),this._onDidUpdate.fire(this.text);return}if(r==""){this.text="",this._onDidUpdate.fire(this.text);return}if(r==""){let o=this.history.indexOf(this.text),s=this.history[o+1]||this.history[0];s&&(this.text=s,this._onDidUpdate.fire(this.text));return}if(r==""){let o=this.history.indexOf(this.text),s=this.history[o-1]||this.history[this.history.length-1];s&&(this.text=s,this._onDidUpdate.fire(this.text))}if(r==""||r==""){this.deactivate();return}}this._onDidKeyPress.fire(r)}},null,this.disposables)}active(){this._activated||(this._activated=!0,this.text="",this.nvim.call("coc#prompt#start_prompt",[Th],!0))}deactivate(e){if(!this._activated)return;this.nvim.call("coc#prompt#stop_prompt",[Th],!0),this._activated=!1;let{text:t}=this;this.text="",this._onDidExit.fire(e),t&&!this.history.includes(t)&&this.history.push(t)}get activated(){return this._activated}dispose(){this.deactivate(),this.history=[],this._onDidKeyPress.dispose(),this._onDidUpdate.dispose(),this._onDidExit.dispose(),J(this.disposables)}}});var $ee={};Ds($ee,{default:()=>su});var Hi,Jee,Q_,K_,z_,su,LD=_(()=>{"use strict";Hi=x(q());wi();ge();$o();V();$f();no();Vt();_e();Ee();K();Zee();hD();Jee=H()("BasicTreeView"),Q_="tree",K_=3e3,z_=1,su=class{constructor(e,t){this.viewId=e;this.opts=t;this._selection=[];this._onDispose=new Hi.Emitter;this._onDidRefrash=new Hi.Emitter;this._onDidExpandElement=new Hi.Emitter;this._onDidCollapseElement=new Hi.Emitter;this._onDidChangeSelection=new Hi.Emitter;this._onDidChangeVisibility=new Hi.Emitter;this.onDidRefrash=this._onDidRefrash.event;this.onDispose=this._onDispose.event;this.onDidExpandElement=this._onDidExpandElement.event;this.onDidCollapseElement=this._onDidCollapseElement.event;this.onDidChangeSelection=this._onDidChangeSelection.event;this.onDidChangeVisibility=this._onDidChangeVisibility.event;this.retryTimers=0;this.renderedItems=[];this.nodesMap=new Map;this.mutex=new ei;this.disposables=[];this.lineState={titleCount:0,messageCount:0};this.loadConfiguration(),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),t.enableFilter&&(this.filter=new RD(this.nvim,[this.keys.selectNext,this.keys.selectPrevious,this.keys.invoke])),this.tooltipFactory=new ci(y.nvim),this.provider=t.treeDataProvider,this.leafIndent=t.disableLeafIndent!==!0,this.winfixwidth=t.winfixwidth!==!1,this.autoWidth=t.autoWidth===!0;let i;Object.defineProperty(this,"message",{set:a=>{i=a?a.replace(/\r?\n/g," "):void 0,this.updateHeadLines()},get:()=>i});let r=e.replace(/\r?\n/g," ");Object.defineProperty(this,"title",{set:a=>{r=a?a.replace(/\r?\n/g," "):void 0,this.updateHeadLines()},get:()=>r});let o;Object.defineProperty(this,"description",{set:a=>{o=a?a.replace(/\r?\n/g," "):void 0,this.updateHeadLines()},get:()=>o});let s;Object.defineProperty(this,"filterText",{set:a=>{let{titleCount:l,messageCount:u}=this.lineState,c=l+u;if(a!=null){let h=[{lnum:c,colStart:G(a),colEnd:G(a)+1,hlGroup:"Cursor"}];this.renderedItems=[],this.updateUI([a+" "],h,c,-1,!0),this.doFilter(a)}else s!=null&&this.updateUI([],[],c,c+1);s=a},get:()=>s}),this.provider.onDidChangeTreeData&&this.provider.onDidChangeTreeData(this.onDataChange,this,this.disposables),P.on("BufUnload",a=>{if(a!=this.bufnr)return;let l=this.winid!=null;this.winid=void 0,this.bufnr=void 0,l&&this._onDidChangeVisibility.fire({visible:!1}),this.dispose()},null,this.disposables),P.on("WinClosed",a=>{this.winid==a&&(this.winid=void 0,this._onDidChangeVisibility.fire({visible:!1}))},null,this.disposables),P.on("BufWinLeave",(a,l)=>{a==this.bufnr&&l==this.winid&&(this.winid=void 0,this._onDidChangeVisibility.fire({visible:!1}))},null,this.disposables),k.onDidTabClose(a=>{this._targetTabId===a&&this.dispose()},null,this.disposables),P.on("CursorHold",async a=>{a==this.bufnr&&await this.onHover()},null,this.disposables),P.on(["CursorMoved","BufEnter"],()=>{this.cancelResolve()},null,this.disposables),P.on("WinEnter",a=>{var d;if(a!=this.windowId||!((d=this.filter)!=null&&d.activated))return;let l=this.nvim.createBuffer(this.bufnr),u=this.startLnum-1,c=this.filterText?this.filterText.length:0,h=Hi.Range.create(u,c,u,c+1);l.highlightRanges(Q_,"Cursor",[h]),this.nvim.call("coc#prompt#start_prompt",[Th],!0),this.redraw()},null,this.disposables),P.on("WinLeave",a=>{var u;if(a!=this.windowId||!((u=this.filter)!=null&&u.activated))return;let l=this.nvim.createBuffer(this.bufnr);this.nvim.call("coc#prompt#stop_prompt",[Th],!0),l.clearNamespace(Q_,this.startLnum-1,this.startLnum)},null,this.disposables),this.disposables.push(this._onDidChangeVisibility,this._onDidChangeSelection,this._onDidCollapseElement,this._onDidExpandElement),this.filter&&(this.filter.onDidExit(a=>{this.nodesMap.clear(),this.filterText=void 0,this.itemsToFilter=void 0,a&&typeof this.provider.getParent=="function"?(this.renderedItems=[],this.reveal(a,{focus:!0})):(this.clearSelection(),this.render())}),this.filter.onDidUpdate(a=>{this.filterText=a}),this.filter.onDidKeyPress(async a=>{var c,h;let l=this.renderedItems;if(!(l!=null&&l.length))return;let u=this.selection[0];if(a==""||a==this.keys.selectPrevious){let d=l.findIndex(p=>p.node==u),g=d==-1||d==0?l.length-1:d-1,f=(c=l[g])==null?void 0:c.node;f&&this.selectItem(f,!0)}if(a==""||a==this.keys.selectNext){let d=l.findIndex(p=>p.node==u),g=d==-1||d==l.length-1?0:d+1,f=(h=l[g])==null?void 0:h.node;f&&this.selectItem(f,!0)}if(a==""||a==this.keys.invoke){if(!u)return;await this.invokeCommand(u),this.filter.deactivate(u)}}))}get windowId(){return this.winid}get targetTabnr(){return k.getTabNumber(this._targetTabId)}get targetWinId(){return this._targetWinId}get targetBufnr(){return this._targetBufnr}get startLnum(){let e=this.filterText==null?0:1;return this.lineState.messageCount+this.lineState.titleCount+e}get nvim(){return y.nvim}loadConfiguration(e){if(!e||e.affectsConfiguration("tree")){let t=y.getConfiguration("tree");this.config={openedIcon:t.get("openedIcon"," "),closedIcon:t.get("closedIcon"," ")},this.keys={close:t.get("key.close"),invoke:t.get("key.invoke"),toggle:t.get("key.toggle"),actions:t.get("key.actions"),collapseAll:t.get("key.collapseAll"),toggleSelection:t.get("key.toggleSelection"),activeFilter:t.get("key.activeFilter"),selectNext:t.get("key.selectNext"),selectPrevious:t.get("key.selectPrevious")},e&&this.render()}}async doFilter(e){let t=[],i=0,r=await this.mutex.acquire();try{if(!this.itemsToFilter){let l=[],u=async h=>{for(let d of h){l.push(d);let g=await Promise.resolve(this.provider.getChildren(d));g!=null&&g.length&&await u(g)}},c=await Promise.resolve(this.provider.getChildren());await u(c),this.itemsToFilter=l}for(let l of this.itemsToFilter){let u=await this.getTreeItem(l),c=np.is(u.label)?u.label.label:u.label;if(!e||Dh(e,c)){let h=e?zl(e,c):[];u.collapsibleState=0,u.label={label:c,highlights:e?n4(h):[]};let{line:d,highlights:g}=this.getRenderedLine(u,i,0);t.push({level:0,node:l,line:d,index:i,score:e?wh(e,c):0,highlights:g}),i+=1}}t.sort((l,u)=>l.score!=u.score?u.score-l.score:l.index-u.index);let o=this.startLnum,s=[],a=this.renderedItems=t.map((l,u)=>(s.push(...l.highlights.map(c=>(c.lnum=o+u,c))),delete l.index,delete l.score,delete l.highlights,l));this.updateUI(a.map(l=>l.line),s,o,-1,!0),a.length?this.selectItem(a[0].node,!0):this.clearSelection(),this.redraw(),r()}catch(o){r(),Jee.error("Error on tree filter:",o)}}async onHover(){let{nvim:e}=this,t=await e.call("line",["."]),i=this.getElementByLnum(t-1);if(!i)return;let r=this.nodesMap.get(i);if(!r)return;let o=r.item;if(!r.resolved&&(o=await this.resolveItem(i,o),!o)||!o.tooltip||!this.bufnr)return;let a={filetype:Hi.MarkupContent.is(o.tooltip)&&o.tooltip.kind==Hi.MarkupKind.Markdown?"markdown":"txt",content:Hi.MarkupContent.is(o.tooltip)?o.tooltip.value:o.tooltip};await this.tooltipFactory.show([a],{modes:["n"]})}async onClick(e){let{nvim:t}=this,[i,r]=await t.eval("[getline('.'),col('.')]"),o=tt(i,0,r-1),s=i[o.length];if(!s)return;let{openedIcon:a,closedIcon:l}=this.config;/^\s*$/.test(o)&&[a,l].includes(s)?await this.toggleExpand(e):await this.invokeCommand(e)}async invokeCommand(e){let t=this.nodesMap.get(e);if(!t)return;this.selectItem(e);let i=t.item;if(!(!i.command&&(i=await this.resolveItem(e,i),!i))){if(!i.command)throw new Error("Failed to resolve command from TreeItem.");await oe.execute(i.command)}}async invokeActions(e){if(this.selectItem(e),typeof this.provider.resolveActions!="function"){await k.showWarningMessage("No actions");return}let t=this.nodesMap.get(e),i=await Promise.resolve(this.provider.resolveActions(t.item,e));if(!i||i.length==0){await k.showWarningMessage("No actions available");return}let r=i.map(s=>s.title),o=await k.showMenuPicker(r,"Choose action");o!=-1&&await Promise.resolve(i[o].handler(e))}async onDataChange(e){var i;if((i=this.filter)!=null&&i.activated){this.itemsToFilter=void 0,await this.doFilter(this.filterText);return}if(this.clearSelection(),!e){await this.render();return}let t=await this.mutex.acquire();try{let r=this.renderedItems,o=r.findIndex(s=>s.node===e);if(o!=-1&&this.bufnr){let a=r[o].level,l=0;for(let d=o;da)&&(l+=1)}let u=[],c=[],h=o+this.startLnum;await this.appendTreeNode(e,a,h,u,c),r.splice(o,l,...u),this.updateUI(u.map(d=>d.line),c,h,h+l)}t()}catch(r){let o=`Error on tree refresh: ${r}`;Jee.error(o,r),this.nvim.errWriteLine("[coc.nvim] "+o),t()}}async resolveItem(e,t){if(typeof this.provider.resolveTreeItem=="function"){let i=this.resolveTokenSource=new Hi.CancellationTokenSource,r=i.token;if(t=await Promise.resolve(this.provider.resolveTreeItem(t,e,r)),i.dispose(),this.resolveTokenSource=void 0,r.isCancellationRequested)return}return this.nodesMap.set(e,{item:t,resolved:!0}),t}get visible(){return this.bufnr?this.winid!=null:!1}get valid(){return typeof this.bufnr=="number"}get selection(){return this._selection.slice()}async checkLines(){if(!this.bufnr)return;let t=await this.nvim.createBuffer(this.bufnr).lines,{titleCount:i,messageCount:r}=this.lineState;t=t.slice(i+r);let o=this.renderedItems.map(s=>s.line);return Me(t,o)}async toggleExpand(e){let t=this.nodesMap.get(e);if(!t)return;let i=t.item,r=this.getItemLnum(e),o=r-this.startLnum,s=this.renderedItems[o];if(!s||i.collapsibleState==0){if(typeof this.provider.getParent=="function"){let c=await Promise.resolve(this.provider.getParent(e));c&&(await this.toggleExpand(c),this.focusItem(c))}return}let a=0;if(i.collapsibleState==2){let c=s.level;for(let h=o+1;hc.line),u,r,r+a+1),this.refreshSigns(),i.collapsibleState==1?this._onDidCollapseElement.fire({element:e}):this._onDidExpandElement.fire({element:e})}toggleSelection(e){let t=this._selection.findIndex(i=>i===e);t!==-1?this.unselectItem(t):this.selectItem(e)}clearSelection(){if(!this.bufnr)return;this._selection=[],this.nvim.createBuffer(this.bufnr).unplaceSign({group:"CocTree"}),this._onDidChangeSelection.fire({selection:[]})}selectItem(e,t,i){let{nvim:r}=this;if(!this.bufnr||!y.env.sign)return;let o=this.getItemLnum(e);if(o==null)return;let s=r.createBuffer(this.bufnr),a=this._selection.includes(e);!this.opts.canSelectMany||t?this._selection=[e]:a||this._selection.push(e),r.pauseNotification(),(!this.opts.canSelectMany||t)&&s.unplaceSign({group:"CocTree"}),r.call("coc#compat#execute",[this.winid,`normal! ${o+1}G`],!0),s.placeSign({id:K_+o,lnum:o+1,name:"CocTreeSelected",group:"CocTree"}),i||this.redraw(),r.resumeNotification(!1,!0),a||this._onDidChangeSelection.fire({selection:this._selection})}unselectItem(e){let t=this._selection[e],i=this.getItemLnum(t);if(i==null||!this.bufnr||!y.env.sign)return;this._selection.splice(e,1),this.nvim.createBuffer(this.bufnr).unplaceSign({group:"CocTree",id:K_+i}),this._onDidChangeSelection.fire({selection:this._selection})}focusItem(e){if(!this.winid)return;let t=this.getItemLnum(e);t!=null&&this.nvim.call("coc#compat#execute",[this.winid,`exe ${t+1}`],!0)}getElementByLnum(e){let t=this.renderedItems[e-this.startLnum];return t?t.node:void 0}getItemLnum(e){let t=this.renderedItems.findIndex(i=>i.node===e);if(t!=-1)return this.startLnum+t}async getTreeItem(e){let t,i=!1,r=this.nodesMap.get(e);r!=null&&(t=r.item,i=r.resolved);let o=await Promise.resolve(this.provider.getTreeItem(e));if(o.id&&!t){for(let s of this.nodesMap.values())if(s.item.id===o.id){i=s.resolved,t=s.item;break}}return t&&t.collapsibleState!=0&&o.collapsibleState!=0&&(o.collapsibleState=t.collapsibleState),this.nodesMap.set(e,{item:o,resolved:i}),o}getRenderedLine(e,t,i){let{openedIcon:r,closedIcon:o}=this.config,s=[],{label:a,deprecated:l,description:u}=e,c=" ".repeat(i),h=(g,f)=>{let p=G(c);s.push({lnum:t,hlGroup:f,colStart:p,colEnd:p+G(g)})};switch(e.collapsibleState){case 2:{h(r,"CocTreeOpenClose"),c+=r+" ";break}case 1:{h(o,"CocTreeOpenClose"),c+=o+" ";break}default:c+=this.leafIndent?" ":""}if(e.icon){let{text:g,hlGroup:f}=e.icon;h(g,f),c+=g+" "}if(np.is(a)&&Array.isArray(a.highlights)){let g=G(c);for(let f of a.highlights)s.push({lnum:t,hlGroup:"CocSearch",colStart:g+f[0],colEnd:g+f[1]})}let d=typeof a=="string"?a:a.label;return l&&h(d,"CocDeprecatedHighlight"),c+=d,u&&u.indexOf(` -`)==-1&&(c+=" ",h(u,"CocTreeDescription"),c+=u),{line:c,highlights:s}}async appendTreeNode(e,t,i,r,o){let s=1,a=await this.getTreeItem(e),l=this.getRenderedLine(a,i,t);if(o.push(...l.highlights),r.push({level:t,line:l.line,node:e}),a.collapsibleState==2){let u=t+1,c=await Promise.resolve(this.provider.getChildren(e))||[];for(let h of c){let d=await this.appendTreeNode(h,u,i+s,r,o);s=s+d}}return s}updateUI(e,t,i=0,r=-1,o=!1){if(!this.bufnr)return;let{nvim:s,winid:a}=this,l=s.createBuffer(this.bufnr);if(s.pauseNotification(),l.setOption("modifiable",!0,!0),l.setLines(e,{start:i,end:r,strictIndexing:!1},!0),this.autoWidth&&this.nvim.call("coc#window#adjust_width",[a],!0),t.length){let u=r==-1?-1:i+e.length;s.call("coc#highlight#update_highlights",[this.bufnr,Q_,t,i,u],!0)}l.setOption("modifiable",!1,!0),o||this.redraw(),s.resumeNotification(!1,!0)}async reveal(e,t={}){var l;if((l=this.filter)!=null&&l.activated)return;let i=this.getItemLnum(e)!=null,{select:r,focus:o,expand:s}=t,a=e;if(typeof this.provider.getParent!="function")throw new Error("missing getParent function from provider for reveal.");if(!i)for(;a;){let u=await Promise.resolve(this.provider.getParent(a));if(u){let c=await this.getTreeItem(u);c.collapsibleState=2,a=u}else break}if(s){let u=await this.getTreeItem(e);if(u.collapsibleState==0)return;if(u.collapsibleState=2,typeof s=="number"&&s>1){let c=Math.min(s,2),h=await Promise.resolve(this.provider.getChildren(e));for(;(h==null?void 0:h.length)>0;){let d=[];for(let g of h){let f=await this.getTreeItem(g);if(f.collapsibleState!=0&&(f.collapsibleState=2,c>1)){let p=await Promise.resolve(this.provider.getChildren(g));d.push(...p)}}h=d,c=c-1}}}(!i||s)&&await this.render(),r!==!1&&this.selectItem(e),o&&this.focusItem(e)}updateHeadLines(e=!1){let{titleCount:t,messageCount:i}=this.lineState,r=e?-1:t+i,o=[],s=[];try{if(this.message&&(s.push({hlGroup:"MoreMsg",colStart:0,colEnd:G(this.message),lnum:0}),o.push(this.message),o.push("")),this.title){if(s.push({hlGroup:"CocTreeTitle",colStart:0,colEnd:G(this.title),lnum:o.length}),this.description){let a=G(this.title)+1;s.push({hlGroup:"Comment",colStart:a,colEnd:a+G(this.description),lnum:o.length})}o.push(this.title+(this.description?" "+this.description:""))}this.lineState.messageCount=this.message?2:0,this.lineState.titleCount=this.title?1:0,this.updateUI(o,s,0,r),e||this.refreshSigns()}catch(a){this.nvim.echoError(a)}}refreshSigns(){let{selection:e,nvim:t,bufnr:i}=this;if(!e.length||!i||!y.env.sign)return;let r=t.createBuffer(i);t.pauseNotification(),r.unplaceSign({group:"CocTree"});for(let o of e){let s=this.getItemLnum(o);s!=null&&r.placeSign({id:K_+s,lnum:s+1,name:"CocTreeSelected",group:"CocTree"})}t.resumeNotification(!1,!0)}async render(){if(!this.bufnr)return;let e=await this.mutex.acquire();try{let t=[],i=[],{startLnum:r}=this,o=await Promise.resolve(this.provider.getChildren()),s=0,a=r,l=[];if(!(o!=null&&o.length))this.message="No results";else{this.message=="No results"&&(this.message="");for(let c of o)a+=await this.appendTreeNode(c,s,a,l,i)}t.push(...l.map(c=>c.line)),this.renderedItems=l;let u=this.startLnum-r;u&&i.forEach(c=>c.lnum=c.lnum+u),this.updateUI(t,i,this.startLnum,-1),this._onDidRefrash.fire(),this.retryTimers=0,e()}catch(t){this.renderedItems=[],this.nodesMap.clear(),this.lineState={titleCount:0,messageCount:1},e();let i=`${t}`.replace(/\r?\n/g," ");if(this.updateUI([i],[{hlGroup:"WarningMsg",colStart:0,colEnd:G(i),lnum:0}]),this.retryTimers==5)return;this.timer=setTimeout(()=>{this.retryTimers=this.retryTimers+1,this.render()},500)}}async show(e="belowright 30vs"){if(this._creating)return!1;this._creating=!0;let{nvim:t}=this,i=this.winid,[r,o,s,a]=await t.eval(`[bufnr("%"),win_getid(),tabpagenr(),bufloaded(${this.bufnr||-1})]`);this._targetBufnr=r,this._targetWinId=o,this._targetTabId=k.getTabId(s),a||(this.bufnr=void 0);let l=await t.call("coc#window#find",["cocViewId",this.viewId]);if(this.bufnr&&l!==-1&&await t.call("winbufnr",[l])==this.bufnr){this._creating=!1;return}if(t.pauseNotification(),this.bufnr)l!=-1?(t.call("win_gotoid",[l],!0),t.command(`b ${this.bufnr}`,!0)):t.command(`silent keepalt ${e} ${this.bufname}`,!0);else{let h=z_;z_=z_+1,l!=-1?(t.call("win_gotoid",[l],!0),t.command(`silent edit +setl\\ buftype=nofile CocTree${h}`,!0)):t.command(`silent keepalt ${e} +setl\\ buftype=nofile CocTree${h}`,!0)}t.command(`setl bufhidden=${this.opts.bufhidden||"wipe"} nolist nonumber norelativenumber foldcolumn=0`,!0),t.command(`setl signcolumn=${this.opts.canSelectMany?"yes":"no"}${this.winfixwidth?" winfixwidth":""}`,!0),t.command("setl nocursorline nobuflisted wrap undolevels=-1 filetype=coctree nomodifiable noswapfile",!0),t.command(`let w:cocViewId = "${this.viewId.replace(/"/g,'\\"')}"`,!0),t.call("bufname",["%"],!0),t.call("bufnr",["%"],!0),t.call("win_getid",[],!0);let u=await t.resumeNotification();this.bufnr||this.registerKeymaps();let c=u[0];return this.bufname=c[c.length-3],this.bufnr=c[c.length-2],this.winid=c[c.length-1],i||this._onDidChangeVisibility.fire({visible:!0}),i&&i!==this.winid&&t.call("coc#window#close",[i],!0),this._creating=!1,this.updateHeadLines(!0),this.render(),!0}registerLocalKeymap(e,t,i,r=!1){this.disposables.push(y.registerLocalKeymap(e,t,async()=>{let o=await this.nvim.call("line",["."]),s=this.getElementByLnum(o-1);await Promise.resolve(i(s))},r))}registerKeymaps(){let{toggleSelection:e,actions:t,close:i,invoke:r,toggle:o,collapseAll:s,activeFilter:a}=this.keys,{nvim:l}=this,u=(c,h,d)=>{this.registerLocalKeymap(c,h,async g=>{g&&!this.nodesMap.has(g)||await Promise.resolve(d(g))},!0)};this.disposables.push(y.registerLocalKeymap("n","",()=>{l.call("win_gotoid",[this._targetWinId],!0)},!0)),u("n","",async c=>{c&&await this.onClick(c)}),this.filter&&a&&u("n",a,async()=>{this.nvim.command(`exe ${this.startLnum}`,!0),this.filter.active(),this.filterText=""}),e&&u("n",e,async c=>{c&&this.toggleSelection(c)}),r&&u("n",r,async c=>{c&&await this.invokeCommand(c)}),t&&u("n",t,async c=>{c&&await this.invokeActions(c)}),o&&u("n",o,async c=>{c&&await this.toggleExpand(c)}),s&&u("n",s,async()=>{for(let c of this.nodesMap.values()){let h=c.item;h.collapsibleState==2&&(h.collapsibleState=1)}await this.render()}),i&&u("n",i,async()=>{this.hide()})}hide(){let{winid:e}=this;!e||(this.nvim.call("coc#window#close",[e],!0),this.redraw(),this.winid=void 0,this._onDidChangeVisibility.fire({visible:!1}))}redraw(){var e;(y.isVim||((e=this.filter)==null?void 0:e.activated))&&this.nvim.command("redraw",!0)}cancelResolve(){this.resolveTokenSource&&(this.resolveTokenSource.cancel(),this.resolveTokenSource=void 0)}dispose(){var t;if(!this.provider)return;this.timer&&clearTimeout(this.timer),this.cancelResolve();let{bufnr:e}=this;this.winid&&this._onDidChangeVisibility.fire({visible:!1}),e&&this.nvim.command(`silent! bwipeout! ${e}`,!0),this.winid=void 0,this.bufnr=void 0,(t=this.filter)==null||t.dispose(),this._selection=[],this.itemsToFilter=[],this.tooltipFactory.dispose(),this.renderedItems=[],this.nodesMap.clear(),this.provider=void 0,this._onDispose.fire(),this._onDispose.dispose(),J(this.disposables)}}});function Xee(){return vTe++}function V_(n){return[n.hlGroup,n.lnum,n.colStart,n.colEnd,n.combine?1:0,n.start_incl?1:0,n.end_incl?1:0]}function DTe(n,e){let t=[n.hlGroup,n.lnum,n.colStart,n.colEnd];return Me(t,e.slice(0,4))}var eR,kh,FD,cet,yTe,vTe,wTe,Uee,k,Ee=_(()=>{"use strict";eR=x(require("fs")),kh=x(require("path")),FD=x(q());De();yb();$2();xb();ge();Se();Lee();ra();J_();Iee();X_();Aee();Oee();Wee();Uk();Ir();V();$e();no();Vt();sc();K();cet=H()("window"),yTe=kh.default.dirname(__dirname),vTe=3e3,wTe=["formatOnType","rename","onTypeEdit","documentLink","documentColor","foldingRange","format","codeAction","formatRange","hover","signature","documentSymbol","documentHighlight","definition","declaration","typeDefinition","reference","implementation","codeLens","selectionRange","callHierarchy","semanticTokens","semanticTokensRange","linkedEditing"];Uee=class{constructor(){this.mutex=new ei;this.tabIds=[];this.terminalManager=new wb;this._onDidTabClose=new FD.Emitter;this.onDidTabClose=this._onDidTabClose.event}init(e){for(let t=1;t<=e.tabCount;t++)this.tabIds.push(Xee());P.on("TabNew",t=>{this.tabIds.splice(t-1,0,Xee())}),P.on("TabClosed",t=>{let i=this.tabIds[t-1];this.tabIds.splice(t-1,1),i&&this._onDidTabClose.fire(i)})}getTabNumber(e){if(!!this.tabIds.includes(e))return this.tabIds.indexOf(e)+1}getTabId(e){return this.tabIds[e-1]}get nvim(){return y.nvim}dispose(){var e;this.terminalManager.dispose(),(e=this.statusLine)==null||e.dispose()}get activeTextEditor(){return y.editors.activeTextEditor}get visibleTextEditors(){return y.editors.visibleTextEditors}get onDidChangeActiveTextEditor(){return y.editors.onDidChangeActiveTextEditor}get onDidChangeVisibleTextEditors(){return y.editors.onDidChangeVisibleTextEditors}get terminals(){return this.terminalManager.terminals}get onDidOpenTerminal(){return this.terminalManager.onDidOpenTerminal}get onDidCloseTerminal(){return this.terminalManager.onDidCloseTerminal}async createTerminal(e){return await this.terminalManager.createTerminal(this.nvim,e)}showMessage(e,t="more"){let{messageLevel:i}=this,r="Error",o=2;switch(t){case"more":o=0,r="MoreMsg";break;case"warning":o=1,r="WarningMsg";break}o>=i&&Q2(this.nvim,e,r)}async runTerminalCommand(e,t,i=!1){return t=t||y.cwd,await this.nvim.callAsync("coc#ui#run_terminal",{cmd:e,cwd:t,keepfocus:i?1:0})}async openTerminal(e,t={}){return await this.nvim.call("coc#ui#open_terminal",de({cmd:e},t))}async showQuickpick(e,t="Choose by number"){return await this.showMenuPicker(e,{title:t,position:"center"})}async showQuickPick(e,t,i=FD.CancellationToken.None){this.checkDialog("showQuickPick"),t=t||{};let r=await Promise.resolve(e),o=r.some(s=>typeof s=="string");if(!i.isCancellationRequested)return await this.mutex.use(()=>new Promise((s,a)=>{var u;if(i.isCancellationRequested)return s(void 0);let l=new op(this.nvim,{items:r.map(c=>typeof c=="string"?{label:c}:c),title:(u=t.title)!=null?u:"",canSelectMany:t.canPickMany});l.matchOnDescription=t.matchOnDescription,l.onDidFinish(c=>{if(c==null)return s(void 0);let h=o?c.map(d=>d.label):c;if(t.canPickMany)return s(h);s(h[0])}),l.show(this.dialogPreference).catch(a)}))}async createQuickPick(e){return this.checkDialog("createQuickPick"),await this.mutex.use(async()=>{let t=new op(this.nvim,e);return await t.show(this.dialogPreference),t})}async showMenuPicker(e,t,i){return y.env.dialog?await this.mutex.use(async()=>{if(i&&i.isCancellationRequested)return-1;t=t||{},typeof t=="string"&&(t={title:t});let r=new SD(this.nvim,de({items:e},t),i),o=new Promise(s=>{r.onDidClose(a=>{s(a)})});return await r.show(this.dialogPreference),await o}):await this.mutex.use(async()=>{var c,h;let o=(typeof t=="string"?t:(h=t.title)!=null?h:((c=t.content)!=null?c:"")+"Choose by number")+":",s=[],a=1;for(let d of e)ru(d)&&d.disabled||(s.push(`${a}. ${ru(d)?d.text:d}`),a++);let l=await this.nvim.callAsync("coc#ui#quickpick",[o,s.map(d=>d.trim())]),u=parseInt(l,10);return isNaN(u)||u<=0||u>e.length?-1:u-1})}async openLocalConfig(){let e=await this.nvim.call("expand",["%:p"]),t=await this.nvim.eval("&filetype");if(!e||!kh.default.isAbsolute(e))throw new Error("current buffer doesn't have valid file path.");let i=y.getWorkspaceFolder(B.file(e).toString());if(!i){let l=y.getConfiguration("coc.preferences").get("rootPatterns",[]);throw y.getConfiguration("workspace").get("ignoredFiletypes",[]).includes(t)?new Error("Can't resolve workspace folder for current file, current filetype exclude for workspace folder resolve."):new Error(`Can't resolve workspace folder for current file, consider create one of ${l.join(", ")} in your project root.`)}let r=B.parse(i.uri).fsPath,o=kh.default.join(r,".vim");if(!eR.default.existsSync(o)){if(!await this.showPrompt(`Would you like to create folder'${r}/.vim'?`))return;eR.default.mkdirSync(o)}let s=kh.default.join(o,Pr);await this.nvim.call("coc#util#open_file",["edit",s])}async showPrompt(e){return await this.mutex.use(()=>Cb(this.nvim,e))}async showDialog(e){return this.checkDialog("showDialog"),await this.mutex.use(async()=>{let t=new CD(this.nvim,e);return await t.show(this.dialogPreference),t})}async requestInput(e,t,i){let{nvim:r}=this,o=y.getConfiguration("coc.preferences");return y.env.dialog&&o.get("promptInput",!0)&&!Xi?await this.mutex.use(async()=>{let s=new nu(r,t!=null?t:"");return await s.show(e,Object.assign(this.inputPreference,i!=null?i:{})),await new Promise(a=>{s.onDidFinish(l=>{a(l)})})}):await this.mutex.use(async()=>{let s=await y.callAsync("input",[e+": ",t||""]);return r.command("normal! :",!0),s})}async createInputBox(e,t,i){this.checkDialog("createInputBox");let r=new nu(this.nvim,t!=null?t:"");return await r.show(e,Object.assign(this.inputPreference,i)),r}createStatusBarItem(e=0,t={}){if(!y.env){let i=()=>{};return{text:"",show:i,dispose:i,hide:i,priority:0,isProgress:!1}}return this.statusLine||(this.statusLine=new cv(this.nvim)),this.statusLine.createStatusBarItem(e,t.progress||!1)}createOutputChannel(e){return Uo.create(e,this.nvim)}showOutputChannel(e,t){let r=y.getConfiguration("workspace").get("openOutputCommand","vs");Uo.show(e,r,t)}async echoLines(e,t=!1){let{nvim:i}=this,r=y.env.cmdheight;e.length>r&&t&&(e=e.slice(0,r));let o=y.env.columns-12;if(e=e.map(s=>(s=s.replace(/\n/g," "),t&&(s=s.slice(0,o)),s)),t&&e.length==r){let s=e[e.length-1];e[r-1]=`${s.length==o?s.slice(0,-4):s} ...`}await i.call("coc#ui#echo_lines",[e])}getCursorPosition(){return Db(this.nvim)}async moveTo(e){await X2(this.nvim,e,y.env.isVim)}getSelectedRange(e){return K2(this.nvim,e)}async selectRange(e){await z2(this.nvim,e,this.nvim.isVim)}getOffset(){return U2(this.nvim)}getCursorScreenPosition(){return G2(this.nvim)}async showPickerDialog(e,t,i){return this.checkDialog("showPickerDialog"),await this.mutex.use(async()=>{if(i&&i.isCancellationRequested)return;let r=typeof e[0]=="string",o=new TD(this.nvim,{title:t,items:r?e.map(u=>({label:u})):e},i),s=new Promise(u=>{o.onDidClose(c=>{u(c)})});await o.show(this.dialogPreference);let a=await s;return a==null?void 0:e.filter((u,c)=>a.includes(c))})}async showInformationMessage(e,...t){let i=Error().stack;return await this._showMessage("Info",e,t,i)}async showWarningMessage(e,...t){let i=Error().stack;return await this._showMessage("Warning",e,t,i)}async showErrorMessage(e,...t){let i=Error().stack;return await this._showMessage("Error",e,t,i)}async showMessagePicker(e,t,i,r){let o=r.map(a=>typeof a=="string"?a:a.title),s=await this.showMenuPicker(o,{position:"center",content:t,title:e.replace(/\r?\n/," "),borderhighlight:i});return r[s]}async _showMessage(e,t,i,r){if(!this.enableMessageDialog)return await this.showConfirm(t,i,e);if(i.length>0){let a=this.parseSource(r);return await this.showMessagePicker(`Choose action (${a})`,t,`Coc${e}Float`,i)}let o=typeof i[0]=="string"?i:i.map(a=>a.title),s=await this.createNotification(e.toLowerCase(),t,o,r);return s==-1?void 0:i[s]}async showNotification(e){this.checkDialog("showNotification");let t=Error().stack;await new ou(this.nvim,e).show(this.getNotificationPreference(t))}async showConfirm(e,t,i){if(!t||t.length==0){let a=i=="Info"?"more":i=="Error"?"error":"warning";this.showMessage(e,a);return}let o=(typeof t[0]=="string"?t.slice():t.map(a=>a.title)).map((a,l)=>`${l+1}${a}`),s=await this.nvim.callAsync("coc#util#with_callback",["confirm",[e,o.join(` -`),0,i]]);return t[s-1]}async withProgress(e,t){this.checkDialog("withProgress");let i=Error().stack,r=new ED(this.nvim,{task:t,title:e.title,cancellable:e.cancellable}),s=y.getConfiguration("notification").get("minProgressWidth",30),a=new Promise(l=>{r.onDidFinish(l)});return await r.show(Object.assign(this.getNotificationPreference(i,e.source),{minWidth:s})),await a}createTreeView(e,t){let i=(LD(),Ha($ee)).default;return new i(e,t)}async diffHighlights(e,t,i,r,o){let s=[e,t];Array.isArray(r)&&s.push(r[0],r[1]);let a=await this.nvim.call("coc#highlight#get_highlights",s);if(!a||(o==null?void 0:o.isCancellationRequested))return null;i.sort((m,v)=>m.lnum-v.lnum);let l=[],u=y.has("nvim-0.5.1")||y.isVim,c=[],h=[],d=0,g=i.length-1,f=0,p=new Map;if(a.forEach(m=>{f=Math.max(f,m[1]);let v=p.get(m[1]);v?v.push(m):p.set(m[1],[m])}),a.length>0){let m=Array.isArray(r)?r[0]:0;for(let v=m;v<=f;v++){let w=p.get(v)||[],D=[];for(let S=d;S<=g;S++){let L=i[S];if(L.lnum==v)d=S+1,D.push(L);else{d=S;break}}D.length==0?w.length&&(u?c.push(...w.map(S=>S[4])):l.push(v)):w.length==0?h.push(...D.map(S=>V_(S))):(D.length!=w.length||!D.every((S,L)=>DTe(S,w[L])))&&(u?c.push(...w.map(S=>S[4])):l.push(v),h.push(...D.map(S=>V_(S))))}}for(let m=d;m<=g;m++)h.push(V_(i[m]));return{remove:l,add:h,removeMarkers:c}}async applyDiffHighlights(e,t,i,r,o=!1){let{nvim:s}=this,{remove:a,add:l,removeMarkers:u}=r;a.length===0&&l.length===0&&u.length===0||(s.pauseNotification(),u.length&&s.call("coc#highlight#del_markers",[e,t,u],!0),a.length&&s.call("coc#highlight#clear",[e,t,a],!0),l.length&&s.call("coc#highlight#set",[e,t,l,i],!0),o?s.resumeNotification(!0,!0):await s.resumeNotification(!0))}async bufferCheck(){let e=await y.document,t;if(e.attached||(e.enabled?e.buftype!==""&&e.buftype!=="acwrite"?t=`Document not attached with buftype '${e.buftype}'`:t="Document not attached, file size exceed coc.preferences.maxFileSize":t="Document not attached, b:coc_enabled is 0"),t){await this.showDialog({title:"Buffer check result",content:t,highlight:"WarningMsg"});return}let i=new Ri;i.addLine("Provider state","Title"),i.addLine("");for(let r of wTe){let o=O.hasProvider(r,e.textDocument);i.addTexts([{text:"-",hlGroup:"Comment"},{text:" "},o?{text:"\u2713",hlGroup:"CocListFgGreen"}:{text:"\u2717",hlGroup:"CocListFgRed"},{text:" "},{text:r,hlGroup:o?"Normal":"CocFadeOut"}])}await this.showDialog({title:"Buffer check result",content:i.content,highlights:i.highlights})}createNotification(e,t,i,r){return new Promise((o,s)=>{let a={kind:e,content:t,buttons:i.map((u,c)=>({text:u,index:c})),callback:u=>{o(u)}};new ou(this.nvim,a).show(this.getNotificationPreference(r)).catch(s)})}parseSource(e,t=2){let i=e.split(/\r?\n/).slice(t)[0];if(!i)return;i=i.replace(/^\s*at\s*/,"");let r;if(i.endsWith(")")){let a=i.match(/(\((.*?):\d+:\d+\))$/);a&&(r=a[2])}else{let a=i.match(/(.*?):\d+:\d+$/);a&&(r=a[1])}if(!r)return;let o=(vo(),Ha(lee)).default.getExtensionsInfo(),s=o.find(a=>ii(a.filepath,r));if(s)return s.name.startsWith("single")?kh.default.basename(s.filepath):s.name;if(s=o.find(a=>Oe(a.directory,r)),s)return s.name;if(Oe(yTe,r))return"coc.nvim"}get dialogPreference(){let e=y.getConfiguration("dialog");return{rounded:e.get("rounded",!0),maxWidth:e.get("maxWidth"),maxHeight:e.get("maxHeight"),floatHighlight:e.get("floatHighlight"),floatBorderHighlight:e.get("floatBorderHighlight"),pickerButtons:e.get("pickerButtons"),pickerButtonShortcut:e.get("pickerButtonShortcut"),confirmKey:e.get("confirmKey"),shortcutHighlight:e.get("shortcutHighlight")}}get inputPreference(){let e=y.getConfiguration("dialog");return{rounded:e.get("rounded",!0),maxWidth:e.get("maxWidth"),highlight:e.get("floatHighlight"),borderhighlight:e.get("floatBorderHighlight")}}getNotificationPreference(e,t){t||(t=this.parseSource(e));let i=y.getConfiguration("notification"),r=i.get("disabledProgressSources",[]),o=Array.isArray(r)&&(r.includes("*")||r.includes(t));return{broder:i.get("border",!0),focusable:i.get("focusable",!0),marginRight:i.get("marginRight",10),timeout:i.get("timeout",10),maxWidth:i.get("maxWidth"),maxHeight:i.get("maxHeight"),highlight:i.get("highlightGroup"),winblend:i.get("winblend"),disabled:o,source:t}}checkDialog(e){if(!y.env.dialog)throw new Error(`API window.${e} requires vim >= 8.2.0750 or neovim >= 0.4.0, please upgrade your vim`)}get enableMessageDialog(){return y.env.dialog?y.getConfiguration("coc.preferences").get("enableMessageDialog",!1):!1}get messageLevel(){switch(y.getConfiguration("coc.preferences").get("messageLevel","more")){case"error":return 2;case"warning":return 1;default:return 0}}},k=new Uee});function Eh(n){switch(n){case Pt.DiagnosticSeverity.Warning:return"Warning";case Pt.DiagnosticSeverity.Information:return"Information";case Pt.DiagnosticSeverity.Hint:return"Hint";default:return"Error"}}function Gee(n){switch(n){case Pt.DiagnosticSeverity.Warning:return"W";case Pt.DiagnosticSeverity.Information:return"I";case Pt.DiagnosticSeverity.Hint:return"I";default:return"E"}}function au(n){if(n!=null)switch(n){case"hint":return Pt.DiagnosticSeverity.Hint;case"information":return Pt.DiagnosticSeverity.Information;case"warning":return Pt.DiagnosticSeverity.Warning;case"error":return Pt.DiagnosticSeverity.Error;default:return Pt.DiagnosticSeverity.Hint}}function tR(n){switch(n){case Pt.DiagnosticSeverity.Error:return"CocError";case Pt.DiagnosticSeverity.Warning:return"CocWarning";case Pt.DiagnosticSeverity.Information:return"CocInfo";case Pt.DiagnosticSeverity.Hint:return"CocHint";default:return"CocError"}}function Qee(n,e,t){var l,u;let{start:i,end:r}=e.range,o=e.source||"coc.nvim",s=e.message.split(` -`)[0],a=Eh(e.severity).slice(0,1).toUpperCase();return{bufnr:n,lnum:i.line+1,end_lnum:r.line+1,col:Array.isArray(t)?Ae((l=t[i.line])!=null?l:"",i.character)+1:i.character+1,end_col:Array.isArray(t)?Ae((u=t[r.line])!=null?u:"",r.character)+1:r.character+1,text:`[${o}${e.code?" "+e.code:""}] ${s} [${a}]`,type:a}}function ID(n,e){if((n.severity||1)!=(e.severity||1))return(n.severity||1)-(e.severity||1);let t=Ce(n.range.start,e.range.start);return t!=0?t:n.source>e.source?1:-1}function Kee(n){let e=n.tags||[];if(e.includes(Pt.DiagnosticTag.Deprecated))return"CocDeprecatedHighlight";if(e.includes(Pt.DiagnosticTag.Unnecessary))return"CocUnusedHighlight";switch(n.severity){case Pt.DiagnosticSeverity.Warning:return"CocWarningHighlight";case Pt.DiagnosticSeverity.Information:return"CocInfoHighlight";case Pt.DiagnosticSeverity.Hint:return"CocHintHighlight";default:return"CocErrorHighlight"}}function zee(n,e){let t=[],{range:i}=e;for(let r of n){let o=r.range;if(!Dc(i,o)){if(Ce(o.start,i.end)>0){let s=Zb(o.start,e),a=Zb(o.end,e);s.line>=0&&s.character>=0&&a.line>=0&&a.character>=0&&(r.range=Pt.Range.create(s,a))}t.push(r)}}return t}var Pt,iR=_(()=>{"use strict";Pt=x(q());wt();_e();Ar()});var rte,Ph,ket,Vee,ete,tte,ite,nte,nR,ote=_(()=>{"use strict";rte=x(Ei()),Ph=x(q());ge();wt();K();iR();ket=H()("diagnostic-buffer"),Vee="CocDiagnostic",ete="diagnostic",tte=["CocErrorHighlight","CocWarningHighlight","CocInfoHighlight","CocHintHighlight","CocDeprecatedHighlight","CocUnusedHighlight"],ite=global.__TEST__?10:500,nte=global.__TEST__?"MockAleResults":"ale#other_source#ShowResults",nR=class{constructor(e,t,i,r){this.nvim=e;this.doc=t;this.config=i;this.onRefresh=r;this.diagnosticsMap=new Map;this._disposed=!1;this._dirty=!1;this._changeTs=0;this.refreshHighlights=(0,rte.debounce)(this._refresh.bind(this),ite)}get dirty(){return this._dirty}get bufnr(){return this.doc.bufnr}get uri(){return this.doc.uri}onChange(e){let t=e.contentChanges;if(t.length>0){this._changeTs=Date.now();let i=Ph.TextEdit.replace(t[0].range,t[0].text);for(let[r,o]of this.diagnosticsMap.entries())if(o.length){let s=zee(o,i);this.diagnosticsMap.set(r,s)}}this.refreshHighlights()}onTextChange(){this._dirty=!0,this.refreshHighlights.clear()}get displayByAle(){return this.config.displayByAle}clearHighlight(e){this.buffer.clearNamespace(ete+e)}clearSigns(e){this.buffer.unplaceSign({group:Vee+e})}get diagnostics(){let e=[];for(let t of this.diagnosticsMap.values())e.push(...t);return e}get buffer(){return this.nvim.createBuffer(this.bufnr)}refreshAle(e,t){let i=t.map(r=>{let o=r.range;return{text:r.message,code:r.code,lnum:o.start.line+1,col:o.start.character+1,end_lnum:o.end.line+1,end_col:o.end.character,type:Gee(r.severity)}});this.nvim.call(nte,[this.bufnr,"coc"+e,i],!0)}async update(e,t){let{diagnosticsMap:i}=this,r=i.get(e)||[];if(!this._dirty&&t.length==0&&r.length==0)return;if(i.set(e,t),this._dirty||Date.now()-this._changeTs{this.diagnosticsMap.delete(s)}),this.onRefresh(this.diagnostics)}}updateLocationList(e,t){if(!this.config.locationlistUpdate||e==-1||t!=="Diagnostics of coc")return;let i=this.toLocationListItems(this.diagnostics);this.nvim.call("setloclist",[e,[],"r",{title:"Diagnostics of coc",items:i}],!0)}toLocationListItems(e){let{locationlistLevel:t}=this.config,i=[],r=this.doc.textDocument.lines;e.sort(ID);for(let o of e)t&&o.severity&&o.severity>t||i.push(Qee(this.bufnr,o,r));return i}addSigns(e,t){let{enableSign:i,signLevel:r}=this.config;if(!i)return;let o=Vee+e,s=[],a=new Map;for(let l of t){let{range:u,severity:c}=l;if(!c||r&&c>r)continue;let h=u.start.line,d=a.get(h)||[];if(d.includes(c))continue;d.push(c),a.set(h,d);let g=this.config.signPriority+4-c;s.push({name:tR(c),lnum:h+1,priority:g})}this.nvim.call("coc#ui#update_signs",[this.bufnr,o,s],!0)}setDiagnosticInfo(){let e=[0,0,0,0],t={error:0,warning:0,information:0,hint:0,lnums:e};for(let r of this.diagnosticsMap.values())for(let o of r){let s=o.range.start.line+1;switch(o.severity){case Ph.DiagnosticSeverity.Warning:t.warning=t.warning+1,e[1]=e[1]?Math.min(e[1],s):s;break;case Ph.DiagnosticSeverity.Information:t.information=t.information+1,e[2]=e[2]?Math.min(e[2],s):s;break;case Ph.DiagnosticSeverity.Hint:t.hint=t.hint+1,e[3]=e[3]?Math.min(e[3],s):s;break;default:e[0]=e[0]?Math.min(e[0],s):s,t.error=t.error+1}}this.nvim.createBuffer(this.bufnr).setVar("coc_diagnostic_info",t,!0),this.nvim.call("coc#util#do_autocmd",["CocDiagnosticChange"],!0)}showVirtualText(e,t){let{config:i}=this,{virtualText:r,virtualTextLevel:o}=i;if(!r)return;let{virtualTextSrcId:s,virtualTextPrefix:a,virtualTextCurrentLineOnly:l}=this.config,{diagnostics:u,buffer:c}=this;if(l){if(t&&this.bufnr!=t)return;u=u.filter(h=>{let{start:d,end:g}=h.range;return d.line<=e-1&&g.line>=e-1})}u.sort(ID),c.clearNamespace(s);for(let h=u.length-1;h>=0;h--){let d=u[h];if(o&&d.severity&&d.severity>o)continue;let{line:g}=d.range.start,f=tR(d.severity)+"VirtualText",p=d.message.split(/\n/).map(m=>m.trim()).filter(m=>m.length>0).slice(0,this.config.virtualTextLines).join(this.config.virtualTextLineSeparator);if(y.has("nvim-0.5.1")){let m={virt_text:[[a+p,f]]};i.virtualTextAlignRight||typeof i.virtualTextWinCol=="number"&&(m.virt_text_win_col=i.virtualTextWinCol),c.setExtMark(s,g,0,m)}else c.setVirtualText(s,g,[[a+p,f]],{})}}updateHighlights(e,t){if(!t.length)this.clearHighlight(e);else{let i=this.getHighlightItems(t),r=this.config.highlightPriority;this.buffer.updateHighlights(ete+e,i,{priority:r})}}async _refresh(){if(!this._dirty)return;let e=await this.getDiagnosticInfo();!e||e.winid==-1||this.diagnosticsMap.size==0||this.refresh(this.diagnosticsMap,e)}getHighlightItems(e){let t=y.getDocument(this.uri);if(!t)return[];let i=[];for(let r of e.slice(0,this.config.highlighLimit)){let o=Kee(r);t.addHighlights(i,o,r.range)}return i.sort((r,o)=>r.lnum!=o.lnum?r.lnum-o.lnum:r.colStart!=o.colStart?r.colStart-o.colStart:tte.indexOf(o.hlGroup)-tte.indexOf(r.hlGroup)),i}clear(){let{nvim:e}=this,t=Array.from(this.diagnosticsMap.keys());if(this.refreshHighlights.clear(),this.diagnosticsMap.clear(),this.displayByAle)for(let i of t)this.nvim.call(nte,[this.bufnr,i,[]],!0);else{e.pauseNotification(),this.buffer.deleteVar("coc_diagnostic_info");for(let i of t)this.clearHighlight(i),this.clearSigns(i);this.config.virtualText&&this.buffer.clearNamespace(this.config.virtualTextSrcId),e.resumeNotification(!0,!0)}}getDiagnosticsAt(e,t){let i=[];for(let r of this.diagnosticsMap.values())t?i.push(...r.filter(o=>q2(e.line,o.range))):i.push(...r.filter(o=>ht(e,o.range)==0));return i.sort(ID),i}async isEnabled(){return this._disposed?!1:await this.nvim.createBuffer(this.bufnr).getVar("coc_diagnostic_disable")!=1}dispose(){this.clear(),this._disposed=!0,this.refreshHighlights.clear()}}});var gs,Iet,CTe,jD,ste=_(()=>{"use strict";gs=x(q());De();K();so();Iet=H()("diagnostic-collection"),CTe=[gs.DiagnosticTag.Deprecated,gs.DiagnosticTag.Unnecessary],jD=class{constructor(e,t){this.name=e;this.onDispose=t;this.diagnosticsMap=new Map;this._onDidDiagnosticsChange=new gs.Emitter;this.onDidDiagnosticsChange=this._onDidDiagnosticsChange.event}set(e,t){let i=new Map;if(Array.isArray(e))for(let r of e){let[o,s]=r,a=y.getDocument(o);o=a?a.uri:o,s==null?s=[]:s=(i.get(o)||[]).concat(s),i.set(o,s)}else{let r=y.getDocument(e),o=r?r.uri:e;i.set(o,t||[])}for(let r of i){let[o,s]=r;o=B.parse(o).toString(),s.forEach(a=>{a.range=a.range||gs.Range.create(0,0,0,0),a.message=a.message||"",a.source=a.source||this.name,!a.severity&&Array.isArray(a.tags)&&Mg(a.tags,CTe)&&(a.severity=gs.DiagnosticSeverity.Hint)}),this.diagnosticsMap.set(o,s),this._onDidDiagnosticsChange.fire(o)}}delete(e){this.diagnosticsMap.delete(e),this._onDidDiagnosticsChange.fire(e)}clear(){let e=Array.from(this.diagnosticsMap.keys());e=e.filter(t=>this.diagnosticsMap.get(t).length>0),this.diagnosticsMap.clear();for(let t of e)this._onDidDiagnosticsChange.fire(t)}forEach(e,t){for(let i of this.diagnosticsMap.keys()){let r=this.diagnosticsMap.get(i);e.call(t,i,r,this)}}entries(){return this.diagnosticsMap.entries()}get(e){let t=this.diagnosticsMap.get(e);return t==null?[]:t.slice()}has(e){return this.diagnosticsMap.has(e)}dispose(){this.clear(),this.onDispose&&this.onDispose(),this._onDidDiagnosticsChange.dispose()}}});var ate,Yt,xTe,lte,It,Vl=_(()=>{"use strict";ate=x(Ei()),Yt=x(q());De();ge();$o();V();$e();wt();_e();Ee();K();ote();ste();iR();xTe=H()("diagnostic-manager"),lte=class{constructor(){this.enabled=!0;this._onDidRefresh=new Yt.Emitter;this.onDidRefresh=this._onDidRefresh.event;this.collections=[];this.disposables=[]}init(){this.setConfiguration(),y.isNvim&&this.nvim.createNamespace("coc-diagnostic-virtualText").then(r=>{this.config.virtualTextSrcId=r}).logError(),y.onDidChangeConfiguration(this.setConfiguration,this,this.disposables),this.floatFactory=new ci(this.nvim),this.buffers=y.registerBufferSync(r=>{if(!this.enabled)return;let o=new nR(this.nvim,r,this.config,a=>{this._onDidRefresh.fire({diagnostics:a,uri:o.uri,bufnr:o.bufnr}),o.bufnr===y.bufnr&&this.config.messageTarget==="float"&&this.getCurrentDiagnostics().then(l=>this.showFloat(l))}),s=this.getDiagnostics(r.uri);return Object.keys(s).length>0&&o.reset(s),o}),y.onDidCloseTextDocument(r=>{for(let o of this.collections)o.delete(r.uri)},null,this.disposables);let e;P.on("CursorMoved",r=>{this.config.enableMessage=="always"&&(e&&clearTimeout(e),e=setTimeout(async()=>{let o=this.buffers.getItem(r);!o||o.dirty||await this.echoMessage(!0)},this.config.messageDelay))},null,this.disposables);let t=(0,ate.default)(async(r,o)=>{if(!this.config.virtualTextCurrentLineOnly||P.insertMode&&!this.config.refreshOnInsertMode)return;let s=this.buffers.getItem(r);s&&await s.isEnabled()&&s.showVirtualText(o[0])},global.__TEST__?10:100);this.disposables.push(Yt.Disposable.create(()=>{t.clear()})),P.on("CursorMoved",t,null,this.disposables),P.on("InsertLeave",async()=>{if(!(this.config.refreshOnInsertMode||!this.autoRefresh))for(let r of this.buffers.items)r.dirty&&r.refreshHighlights()},null,this.disposables),P.on("BufWinEnter",r=>{let o=this.buffers.getItem(r);o&&o.dirty&&o.refreshHighlights()},null,this.disposables),this.clearTimers=()=>{e&&clearTimeout(e),e=void 0,t.clear()},P.on("InsertEnter",this.clearTimers,this,this.disposables);let i=y.configurations.errorItems;this.setConfigurationErrors(i),y.configurations.onError(r=>{this.setConfigurationErrors(r)},null,this.disposables)}defineSigns(){let{nvim:e}=this,{enableHighlightLineNumber:t,enableSign:i}=this.config;if(!!i){e.pauseNotification();for(let r of["Error","Warning","Info","Hint"]){let o=this.config[r.toLowerCase()+"Sign"],s=`sign define Coc${r} linehl=Coc${r}Line`;o&&(s+=` texthl=Coc${r}Sign text=${o}`),t&&(s+=` numhl=Coc${r}Sign`),e.command(s,!0)}e.resumeNotification(!1,!0)}}async setLocationlist(e){if(!this.enabled)throw new Error("Diagnostic not enabled.");let t=this.buffers.getItem(e);if(!t)throw new Error(`buffer ${e} not attached.`);let i=[];for(let a of Object.values(this.getDiagnostics(t.uri)))i.push(...a);let r=t.toLocationListItems(i),o=await this.nvim.call("getloclist",[0,{title:1}]),s=o.title&&o.title.indexOf("Diagnostics of coc")!=-1?"r":" ";await this.nvim.call("setloclist",[0,[],s,{title:"Diagnostics of coc",items:r}])}setConfigurationErrors(e){let t=this.create("config");if(e!=null&&e.length){let i=B.parse(e[0].location.uri).fsPath;k.showErrorMessage(`Error detected for config file ${i}, please check diagnostics list.`);let r=new Map;for(let o of e){let{uri:s}=o.location,a=r.get(s)||[];a.push(Yt.Diagnostic.create(o.location.range,o.message,Yt.DiagnosticSeverity.Error)),r.set(s,a)}t.set(Array.from(r))}else t.clear()}create(e){let t=this.getCollectionByName(e);return t||(t=new jD(e,()=>{let i=this.collections.findIndex(r=>r==t);i!==-1&&this.collections.splice(i,1)}),this.collections.push(t),t.onDidDiagnosticsChange(i=>{let r=this.buffers.getItem(i);!this.autoRefresh||!r||r.update(e,this.getDiagnosticsByCollection(i,t))}),t)}getSortedRanges(e,t){let i=this.getCollections(e),r=[],o=t?au(t):0;for(let s of i){let a=s.get(e);if(o)a=a.filter(u=>u.severity==o);else{let u=this.config.level;u&&u!(c.severity&&c.severity>u)))}let l=a.map(u=>u.range);r.push(...l)}return r.sort((s,a)=>s.start.line!=a.start.line?s.start.line-a.start.line:s.start.character-a.start.character),r}getDiagnostics(e){let t={},i=this.getCollections(e);for(let r of i)!r||(t[r.name]=this.getDiagnosticsByCollection(e,r));return t}getDiagnosticsByCollection(e,t){let{level:i,showUnused:r,showDeprecated:o}=this.config,s=t.get(e)||[];return s.length&&(s=s.filter(a=>{var l,u;return!(i&&a.severity&&a.severity>i||!r&&((l=a.tags)==null?void 0:l.includes(Yt.DiagnosticTag.Unnecessary))||!o&&((u=a.tags)==null?void 0:u.includes(Yt.DiagnosticTag.Deprecated)))}),s.sort((a,l)=>Ce(a.range.start,l.range.start))),s}getDiagnosticsInRange(e,t){let i=this.getCollections(e.uri),r=[];for(let o of i){let s=o.get(e.uri);if(!!s)for(let a of s)Dl(a.range,t)&&r.push(a)}return r}async preview(){let e=await this.getCurrentDiagnostics();if(e.length==0){this.nvim.command("pclose",!0);return}let t=[];for(let i of e){let{source:r,code:o,severity:s,message:a}=i,l=Eh(s)[0];t.push(`[${r}${o?" "+o:""}] [${l}]`),t.push(...a.split(/\r?\n/)),t.push("")}this.nvim.call("coc#ui#preview_info",[t,"txt"],!0)}async jumpPrevious(e){let t=await this.nvim.buffer,i=this.buffers.getItem(t.id);if(!i)return;let r=await k.getCursorPosition(),o=this.getSortedRanges(i.uri,e),s;for(let a=o.length-1;a>=0;a--){let l=o[a].end;if(Ce(l,r)<0){s=o[a].start;break}else a==0&&await this.nvim.getOption("wrapscan")&&(s=o[o.length-1].start)}if(s){if(await k.moveTo(s),this.config.enableMessage=="never")return;await this.echoMessage(!1)}}async jumpNext(e){let t=await this.nvim.buffer,i=this.buffers.getItem(t.id);if(!i)return;let r=await k.getCursorPosition(),o=this.getSortedRanges(i.uri,e),s;for(let a=0;a<=o.length-1;a++){let l=o[a].start;if(Ce(l,r)>0){s=o[a].start;break}else a==o.length-1&&await this.nvim.getOption("wrapscan")&&(s=o[0].start)}if(s){if(await k.moveTo(s),this.config.enableMessage=="never")return;await this.echoMessage(!1)}}async getDiagnosticList(){var i,r;let e=[],{level:t}=this.config;for(let o of this.collections)for(let[s,a]of o.entries()){if(a.length==0)continue;let l=B.parse(s),u=y.getDocument(s),c=u&&u.attached?u.textDocument.lines:void 0;if(!c&&l.scheme==="file")try{let h=a.reduce((d,g)=>Math.max(g.range.end.line,d),0);c=await ta(l.fsPath,0,h)}catch{}for(let h of a){if(h.severity&&h.severity>t)continue;let{start:d,end:g}=h.range,f={file:l.fsPath,lnum:d.line+1,end_lnum:g.line+1,col:Array.isArray(c)?Ae((i=c[d.line])!=null?i:"",d.character)+1:d.character+1,end_col:Array.isArray(c)?Ae((r=c[g.line])!=null?r:"",g.character)+1:g.character+1,code:h.code,source:h.source||o.name,message:h.message,severity:Eh(h.severity),level:h.severity||0,location:Yt.Location.create(s,h.range)};e.push(f)}}return e.sort((o,s)=>o.level!==s.level?o.level-s.level:o.file!==s.file?o.file>s.file?1:-1:o.lnum!=s.lnum?o.lnum-s.lnum:o.col-s.col),e}getDiagnosticsAt(e,t,i=!1,r=!1){let o=this.buffers.getItem(e);if(!o)return[];let s=Yt.Position.create(t[0],t[1]),a=o.getDiagnosticsAt(s,this.config.checkCurrentLine);return this.config.checkCurrentLine||a.length||i&&(s=Yt.Position.create(t[0],t[1]+1),a=o.getDiagnosticsAt(s,!1),a.length)||r&&t[1]==0&&(s=Yt.Position.create(t[0]+1,0),a=o.getDiagnosticsAt(s,!1)),a}async getCurrentDiagnostics(){let[e,t,i,r]=await this.nvim.eval(`[bufnr("%"),coc#cursor#position(),col('.')==col('$')-1,line('.')==line('$')]`);return this.getDiagnosticsAt(e,t,i==1,r==1)}async echoMessage(e=!1){let t=this.config;if(!this.enabled||t.displayByAle)return;let i=t.messageTarget=="float",r=await this.getCurrentDiagnostics();if(t.messageLevel&&(r=r.filter(o=>o.severity&&o.severity<=t.messageLevel)),i)await this.showFloat(r);else{if(e&&P.insertMode)return;let o=[];r.forEach(s=>{let{source:a,code:l,severity:u,message:c}=s,h=Eh(u)[0],d=l?" "+l:"",g=t.format.replace("%source",a).replace("%code",d).replace("%severity",h).split("%message").join(c);o.push(g)}),o.length&&(await this.nvim.command('echo ""'),await k.echoLines(o,e))}}async showFloat(e){if(this.config.messageTarget!=="float")return;let{config:t}=this;if(e.length==0){this.floatFactory.close();return}if(P.insertMode)return;let i="",r=[];if(Object.keys(t.filetypeMap).length>0){let s=y.getDocument(y.bufnr),a=s?s.filetype:"",l=t.filetypeMap.default||"";i=t.filetypeMap[a]||(l=="bufferType"?a:l)}e.forEach(s=>{var p;let{source:a,code:l,severity:u,message:c}=s,h=Eh(u)[0],d=l?" "+l:"",g=t.format.replace("%source",a).replace("%code",d).replace("%severity",h).split("%message").join(c),f="Error";if(i==="")switch(u){case Yt.DiagnosticSeverity.Hint:f="Hint";break;case Yt.DiagnosticSeverity.Warning:f="Warning";break;case Yt.DiagnosticSeverity.Information:f="Info";break}else f=i;r.push({filetype:f,content:g}),(p=s.codeDescription)!=null&&p.href&&r.push({filetype:"txt",content:s.codeDescription.href})});let o=this.floatFactory.applyFloatConfig({modes:["n"],maxWidth:80},this.config.floatConfig);xTe.debug("floatConfig:",o),await this.floatFactory.show(r,o)}async jumpRelated(){let t=(await this.getCurrentDiagnostics()).find(r=>r.relatedInformation!=null),i=t?t.relatedInformation.map(r=>r.location):[];i.length==1?await y.jumpTo(i[0].uri,i[0].range.start):i.length>1?await y.showLocations(i):k.showWarningMessage("No related information found.")}reset(){this.clearTimers&&this.clearTimers(),this.buffers.reset();for(let e of this.collections)e.dispose();this.collections=[]}dispose(){var e;this.clearTimers&&this.clearTimers(),this.buffers.dispose();for(let t of this.collections)t.dispose();(e=this.floatFactory)==null||e.close(),this.collections=[],J(this.disposables)}get nvim(){return y.nvim}setConfiguration(e){if(e&&!e.affectsConfiguration("diagnostic"))return;let t=y.getConfiguration("diagnostic"),i=t.get("messageTarget","float");i=="float"&&!y.env.floating&&!y.env.textprop&&(i="echo");let r=t.get("enableHighlightLineNumber",!0);y.isNvim||(r=!1),this.config=Object.assign(this.config||{},{floatConfig:t.get("floatConfig",{}),messageTarget:i,enableHighlightLineNumber:r,highlighLimit:t.get("highlighLimit",1e3),highlightPriority:t.get("highlightPriority"),autoRefresh:t.get("autoRefresh",!0),checkCurrentLine:t.get("checkCurrentLine",!1),enableSign:y.env.sign&&t.get("enableSign",!0),locationlistUpdate:t.get("locationlistUpdate",!0),enableMessage:t.get("enableMessage","always"),messageDelay:t.get("messageDelay",200),virtualText:t.get("virtualText",!1)&&this.nvim.hasFunction("nvim_buf_set_virtual_text"),virtualTextAlignRight:y.has("nvim-0.5.1")&&t.get("virtualTextAlignRight",!1),virtualTextWinCol:y.has("nvim-0.5.1")?t.get("virtualTextWinCol",null):null,virtualTextCurrentLineOnly:t.get("virtualTextCurrentLineOnly",!0),virtualTextPrefix:t.get("virtualTextPrefix"," "),virtualTextLineSeparator:t.get("virtualTextLineSeparator"," \\ "),virtualTextLines:t.get("virtualTextLines",3),displayByAle:t.get("displayByAle",!1),level:au(t.get("level","hint")),locationlistLevel:au(t.get("locationlistLevel")),signLevel:au(t.get("signLevel")),virtualTextLevel:au(t.get("virtualTextLevel")),messageLevel:au(t.get("messageLevel")),signPriority:t.get("signPriority",10),errorSign:t.get("errorSign",">>"),warningSign:t.get("warningSign",">>"),infoSign:t.get("infoSign",">>"),hintSign:t.get("hintSign",">>"),refreshOnInsertMode:t.get("refreshOnInsertMode",!1),filetypeMap:t.get("filetypeMap",{}),showUnused:t.get("showUnused",!0),showDeprecated:t.get("showDeprecated",!0),format:t.get("format","[%source%code] [%severity] %message")}),this.enabled=t.get("enable",!0),this.defineSigns()}getCollectionByName(e){return this.collections.find(t=>t.name==e)}getCollections(e){return this.collections.filter(t=>t.has(e))}toggleDiagnostic(e){let t=e==null?this.enabled:e==0;this.enabled=!t;for(let i of this.buffers.items)this.enabled?this.refreshBuffer(i.uri):i.clear()}async toggleDiagnosticBuffer(e,t){if(!this.enabled)return;e=e||y.bufnr;let i=this.buffers.getItem(e);if(i){let r=t==null?await i.isEnabled():t==0;await this.nvim.call("setbufvar",[e,"coc_diagnostic_disable",r?1:0]),r?i.clear():this.refreshBuffer(e)}}get autoRefresh(){return this.enabled&&this.config.autoRefresh}async refreshBuffer(e,t){let i=this.buffers.getItem(e);return i?(await i.reset(this.getDiagnostics(i.uri),t),!0):!1}refresh(e){let t;if(!e)t=this.buffers.items;else{let i=this.buffers.getItem(e);t=i?[i]:[]}for(let i of t)this.refreshBuffer(i.uri,!0)}},It=new lte});var Aa,utt,ute,cte,oe,wi=_(()=>{"use strict";Aa=x(q());De();Vl();tu();V();Ee();K();ge();utt=H()("commands"),ute=class{constructor(e,t,i,r=!1){this.id=e;this.impl=t;this.thisArg=i;this.internal=r}execute(...e){let{impl:t,thisArg:i}=this;return t.apply(i,e||[])}dispose(){this.thisArg=null,this.impl=null}},cte=class{constructor(){this.commands=new Map;this.titles=new Map;this.onCommandList=[]}init(e,t){this.mru=y.createMru("commands"),this.register({id:"vscode.open",execute:async i=>{e.call("coc#ui#open_url",i.toString(),!0)}},!0),this.register({id:"workbench.action.reloadWindow",execute:async()=>{e.command("CocRestart",!0)}},!0),this.register({id:"editor.action.insertSnippet",execute:async(i,r)=>{let o=r===!0?{}:r;return await Ut.insertSnippet(i.newText,!0,i.range,Aa.InsertTextMode.adjustIndentation,o||void 0)}},!0),this.register({id:"editor.action.doCodeAction",execute:async i=>{await t.cocAction("doCodeAction",i)}},!0),this.register({id:"editor.action.triggerSuggest",execute:async()=>{let i=y.getDocument(y.bufnr);i&&await i.synchronize(),e.call("coc#pum#refresh",[],!0)}},!0),this.register({id:"editor.action.triggerParameterHints",execute:async()=>{let i=y.getDocument(y.bufnr);i&&await i.synchronize(),await t.cocAction("showSignatureHelp")}},!0),this.register({id:"editor.action.addRanges",execute:async i=>{await t.cocAction("addRanges",i)}},!0),this.register({id:"editor.action.restart",execute:async()=>{await vt(30),e.command("CocRestart",!0)}},!0),this.register({id:"editor.action.showReferences",execute:async(i,r,o)=>{await y.showLocations(o)}},!0),this.register({id:"editor.action.rename",execute:async(i,r)=>{await y.jumpTo(i,r),await t.cocAction("rename")}},!0),this.register({id:"editor.action.format",execute:async()=>{await t.cocAction("format")}},!0),this.register({id:"workspace.refactor",execute:async i=>{let r=i.filter(o=>Aa.Location.is(o));await t.getHandler().refactor.fromLocations(r)}},!0),this.register({id:"workspace.clearWatchman",execute:async()=>{(await k.runTerminalCommand("watchman watch-del-all")).success&&k.showMessage("Cleared watchman watching directories.")}},!1,"run watch-del-all for watchman to free up memory."),this.register({id:"workspace.workspaceFolders",execute:async()=>{let r=y.workspaceFolders.map(o=>B.parse(o.uri).fsPath);await k.echoLines(r)}},!1,"show opened workspaceFolders."),this.register({id:"workspace.renameCurrentFile",execute:async()=>{await y.renameCurrent()}},!1,"change current filename to a new name and reload it."),this.register({id:"extensions.toggleAutoUpdate",execute:async()=>{let i=y.getConfiguration("coc.preferences");i.get("extensionUpdateCheck","daily")=="never"?(i.update("extensionUpdateCheck","daily",!0),k.showMessage("Extension auto update enabled.","more")):(i.update("extensionUpdateCheck","never",!0),k.showMessage("Extension auto update disabled.","more"))}},!1,"toggle auto update of extensions."),this.register({id:"workspace.diagnosticRelated",execute:()=>It.jumpRelated()},!1,"jump to related locations of current diagnostic."),this.register({id:"workspace.showOutput",execute:async i=>{if(i)k.showOutputChannel(i);else{let r=y.channelNames;if(r.length==0)return;if(r.length==1)k.showOutputChannel(r[0]);else{let o=await k.showQuickpick(r);if(o==-1)return;let s=r[o];k.showOutputChannel(s)}}}},!1,"open output buffer to show output from languageservers or extensions."),this.register({id:"document.showIncomingCalls",execute:async()=>{await t.cocAction("showIncomingCalls")}},!1,"show incoming calls in tree view."),this.register({id:"document.showOutgoingCalls",execute:async()=>{await t.cocAction("showOutgoingCalls")}},!1,"show outgoing calls in tree view."),this.register({id:"document.echoFiletype",execute:async()=>{let i=await e.call("bufnr","%"),r=y.getDocument(i);!r||await k.echoLines([r.filetype])}},!1,"echo the mapped filetype of the current buffer"),this.register({id:"document.renameCurrentWord",execute:async()=>{let i=await e.call("bufnr","%"),r=y.getDocument(i);if(!r)return;let o=await t.cocAction("getWordEdit");if(!o){k.showMessage("Invalid position","warning");return}let s=[],{changes:a,documentChanges:l}=o;if(a){let u=a[r.uri];u&&(s=u.map(c=>c.range))}else if(l)for(let u of l)Aa.TextDocumentEdit.is(u)&&u.textDocument.uri==r.uri&&(s=u.edits.map(c=>c.range));s.length&&await t.cocAction("addRanges",s)}},!1,"rename word under cursor in current buffer by use multiple cursors."),this.register({id:"document.jumpToNextSymbol",execute:async()=>{let i=await y.document;if(!i)return;let r=await t.cocAction("symbolRanges");if(!r)return;let{textDocument:o}=i,s=await k.getOffset();r.sort((a,l)=>a.start.line!=l.start.line?a.start.line-l.start.line:a.start.character-l.start.character);for(let a=0;a<=r.length-1;a++)if(o.offsetAt(r[a].start)>s){await k.moveTo(r[a].start);return}await k.moveTo(r[0].start)}},!1,"Jump to next symbol highlight position."),this.register({id:"workspace.undo",execute:async()=>{await y.files.undoWorkspaceEdit()}},!1,"Undo previous workspace edit"),this.register({id:"workspace.redo",execute:async()=>{await y.files.redoWorkspaceEdit()}},!1,"Redo previous workspace edit"),this.register({id:"workspace.inspectEdit",execute:async()=>{await y.files.inspectEdit()}},!1,"Inspect previous workspace edit in new tab"),this.register({id:"workspace.openLocation",execute:async(i,r,o)=>{i&&await e.call("win_gotoid",[i]),await y.jumpTo(r.uri,r.range.start,o)}},!0),this.register({id:"document.jumpToPrevSymbol",execute:async()=>{let i=await y.document;if(!i)return;let r=await t.cocAction("symbolRanges");if(!r)return;let{textDocument:o}=i,s=await k.getOffset();r.sort((a,l)=>a.start.line!=l.start.line?a.start.line-l.start.line:a.start.character-l.start.character);for(let a=r.length-1;a>=0;a--)if(o.offsetAt(r[a].end){await t.cocAction("bufferCheck")}},!1,"Check providers for current buffer.")}get commandList(){let e=[];for(let t of this.commands.values())t.internal||e.push(t);return e}dispose(){for(let e of this.commands.values())e.dispose();this.commands.clear()}execute(e){var t;return this.executeCommand(e.command,...(t=e.arguments)!=null?t:[])}register(e,t=!1,i){for(let r of Array.isArray(e.id)?e.id:[e.id])this.registerCommand(r,e.execute,e,t),i&&this.titles.set(r,i);return e}has(e){return this.commands.has(e)}unregister(e){let t=this.commands.get(e);!t||(t.dispose(),this.commands.delete(e))}registerCommand(e,t,i,r=!1){return e.startsWith("_")&&(r=!0),this.commands.set(e,new ute(e,t,i,r)),Aa.Disposable.create(()=>{this.commands.delete(e)})}executeCommand(e,...t){let i=this.commands.get(e);if(!i)throw new Error(`Command: ${e} not found`);return Promise.resolve(i.execute.apply(i,t))}async fireCommand(e,...t){await P.fire("Command",[e]);let i=Date.now(),r=await this.executeCommand(e,...t);return t.length==0&&await this.addRecent(e,P.lastChangeTs>i),r}async addRecent(e,t){await this.mru.add(e),t&&await y.nvim.command('silent! call repeat#set("\\(coc-command-repeat)", -1)')}async repeatCommand(){let t=(await this.mru.load())[0];t&&(await this.executeCommand(t),await y.nvim.command('silent! call repeat#set("\\(coc-command-repeat)", -1)'))}},oe=new cte});Sx();var zte=x(WM()),Vte=x(lx());ge();var Kte=require("events"),fR=x(q());wi();var Dte=x(q());De();ge();mo();V();_e();K();var Oa=x(q());V();us();_e();so();us();_e();function rR(n,e,t=1){return n===e?1/t:e+32===n?.5/t:0}function hte(n,e){if(!(e.length==0||n.length=r)return;let o=t[0],s=t.slice(1);if(!U6(o)){let d=rW(n,o,e);if(d==-1)return;let g=d==0?5:1,f=_h(n,d+1,s,[...i,d]);return f===void 0?void 0:[g+f[0],f[1]]}let a=i.length==0,l=rR(o,n[e],a?.2:1);if(l>0){let d=_h(n,e+1,s,[...i,e]);return d===void 0?void 0:[l+d[0],d[1]]}let u=new Map,c=vH(n,e+1);if(c!=null){let d=rR(o,c[1],a?.5:1);if(d>0){let g=[...i,c[0]];d===.5&&(d=.75);let f=_h(n,c[0]+1,s,g);f!==void 0&&u.set(d+f[0],f[1])}}for(let d=e+1;d0){let f=_h(n,d+1,s,[...i,d]);f!==void 0&&u.set(g+f[0],f[1]);break}}if(u.size==0){if(i.length>0){let d=i[i.length-1];if(d>0&&n[d]!==o&&n[d-1]===o){let g=i.slice();g.splice(i.length-1,0,d-1);let f=_h(n,d+1,s,g);return f===void 0?void 0:[.5+f[0],f[1]]}}return}let h=Math.max(...u.keys());return[h,u.get(h)]}var Rh=H()("completion-complete"),AD=class{constructor(e,t,i,r,o){this.option=e;this.document=t;this.config=i;this.sources=r;this.nvim=o;this.results=new Map;this._input="";this._completing=!1;this.localBonus=new Map;this.names=[];this.inputOffset=0;this._onDidRefresh=new Oa.Emitter;this.onDidRefresh=this._onDidRefresh.event;this.tokenSource=new Oa.CancellationTokenSource,r.sort((s,a)=>a.priority-s.priority),this.names=r.map(s=>s.name)}fireRefresh(e){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this._onDidRefresh.fire()},e)}get isCompleting(){return this._completing}get input(){return this._input}get isEmpty(){let e=!0;for(let t of this.results.values())if(t.items.length>0){e=!1;break}return e}getIncompleteSources(){let e=[];for(let[t,i]of this.results.entries())i.isIncomplete&&e.push(t);return e}async doComplete(){var u,c;let e=this.tokenSource.token,t=await Promise.all([this.nvim.call("coc#util#synname",[]),this.nvim.call("coc#util#suggest_variables",[this.option.bufnr]),this.document.patchChange()]);if(e.isCancellationRequested)return;this.option.synname=t[0];let i=t[1];if(i.disable)return Rh.warn("suggest cancelled by b:coc_suggest_disable"),!0;if((u=i.disabled_sources)!=null&&u.length&&(this.sources=this.sources.filter(h=>!i.disabled_sources.includes(h.name)),this.sources.length===0))return Rh.warn("suggest cancelled by b:coc_disabled_sources"),!0;if((c=i.blacklist)!=null&&c.length&&i.blacklist.includes(this.option.input))return Rh.warn("suggest cancelled by b:coc_suggest_blacklist"),!0;let{triggerCompletionWait:r,localityBonus:o}=this.config;if(await vt(Math.min(r!=null?r:0,50)),e.isCancellationRequested)return;let{colnr:s,linenr:a,col:l}=this.option;if(o){let h=a-1;this.localBonus=this.document.getLocalifyBonus(Oa.Position.create(h,l-1),Oa.Position.create(h,s))}await this.completeSources(this.sources,!1)}async completeSources(e,t){let{timeout:i}=this.config,{results:r,tokenSource:o}=this,s=this.option.col,a=e.map(g=>g.name),l=a.length;this._completing=!0;let u=o.token,c,h=new Promise(g=>{c=setTimeout(()=>{o.token.isCancellationRequested||(a=a.filter(f=>!d.includes(f)),o.cancel(),Rh.warn(`Complete timeout after ${i}ms`,a),this.nvim.setVar("coc_timeout_sources",a,!0)),g()},typeof i=="number"?i:500)}),d=[];await Promise.race([h,Promise.all(e.map(g=>this.completeSource(g,u).then(()=>{if(d.push(g.name),u.isCancellationRequested||t)return;let f=this.option.col!==s;f&&this.cancel(),f||d.length===l?this.fireRefresh(0):r.has(g.name)&&this.fireRefresh(16)})))]),clearTimeout(c),this._completing=!1}async completeSource(e,t){var o;let i=Object.assign({},this.option),{name:r}=e;try{if(typeof e.shouldComplete=="function"&&(!await Promise.resolve(e.shouldComplete(i))||t.isCancellationRequested))return;let s=(o=e.priority)!=null?o:0,a=Date.now();await new Promise((l,u)=>{Promise.resolve(e.doComplete(i,t)).then(c=>{if(t.isCancellationRequested){l(void 0);return}let h=c?c.items.length:0;Rh.debug(`Source "${r}" finished with ${h} items ${Date.now()-a}ms`),h>0?(c.items.forEach(d=>{var g,f,p,m;d.word=(g=d.word)!=null?g:"",d.abbr=(f=d.abbr)!=null?f:d.word,d.source=r,d.priority=s,d.filterText=(p=d.filterText)!=null?p:d.word,r!=="snippets"&&(d.localBonus=(m=this.localBonus.get(d.filterText))!=null?m:0)}),this.setResult(r,c)):this.results.delete(r),l()},c=>{u(c)})})}catch(s){this.nvim.echoError(s),Rh.error("Complete error:",e.name,s)}}async completeInComplete(e,t){let{document:i}=this;this.cancel(),this.tokenSource=new Oa.CancellationTokenSource;let r=this.tokenSource.token;if(await i.patchChange(!0),r.isCancellationRequested)return;let{input:o,colnr:s,linenr:a}=this.option,l=e[e.length-1];Object.assign(this.option,{input:e,line:i.getline(a-1),colnr:s+(e.length-o.length),triggerCharacter:!l||lc(l)?void 0:l,triggerForInComplete:!0});let u=this.sources.filter(c=>t.includes(c.name));if(await this.completeSources(u,!0),!r.isCancellationRequested)return this.filterItems(e)}filterItems(e){let{results:t,names:i,inputOffset:r}=this;if(r>0&&(e=tt(e,r)),this._input=e,t.size==0)return[];let o=e.length,s=o==0,{maxItemCount:a,defaultSortMethod:l,removeDuplicateItems:u}=this.config,c=[],h=Cn(e),d=new Set;for(let g of i){let f=t.get(g);if(!f)continue;let p=g==="snippets",m=f.items;for(let v=0;vM);else{let A=hte(S,h);W=A==null?0:A[0],A!=null&&(I=A[1])}if(W===0)continue;if(L==S)w.positions=I;else if(I&&I.length>0){let A=L.indexOf(S.slice(0,I[I.length-1]+1));A!==-1&&(w.positions=I.map(M=>M+A))}p&&D===e?w.score=99:w.score=W*(w.sourceScore||1)}d.add(D),c.push(w)}}}return c.sort((g,f)=>{let p=g.sortText,m=f.sortText;if(g.score!==f.score)return f.score-g.score;if(g.priority!==f.priority)return f.priority-g.priority;if(g.localBonus!==f.localBonus)return f.localBonus-g.localBonus;if(g.source===f.source&&p!==m)return p{let{priority:s,source:a}=o,l=s<90,u=r.get(a)||0;return i&&l&&u==i||t&&!l&&u==t?!1:(r.set(a,u+1),!0)})}setResult(e,t){let{results:i}=this,{line:r,colnr:o,col:s}=this.option;if(typeof t.startcol=="number"&&t.startcol!=s){let{startcol:a}=t;ar.content.trim().length>0),e.length===0)this.close();else{let{lines:r,codes:o,highlights:s}=sb(e,{excludeImages:t.excludeImages}),a={codes:o,highlights:s,highlight:(i=t.highlight)!=null?i:"CocFloating",maxWidth:t.maxWidth||80,rounded:t.rounded?1:0,focusable:t.focusable===!0?1:0};t.shadow&&(a.shadow=1),t.border&&(a.border=[1,1,1,1]),t.borderhighlight&&(a.borderhighlight=t.borderhighlight),typeof t.winblend=="number"&&(a.winblend=t.winblend),this.nvim.call("coc#dialog#create_pum_float",[r,a],!0),this.nvim.redrawVim()}}doCompleteResolve(e,t,i){let r=rt.getSource(e.source);return new Promise(o=>{if(r&&typeof r.onCompleteResolve=="function"){let s=setTimeout(()=>{i.token.isCancellationRequested||(i.cancel(),this.close()),STe.warn(`Resolve timeout after 500ms: ${r.name}`),o()},global.__TEST__?100:500);Promise.resolve(r.onCompleteResolve(e,t,i.token)).finally(()=>{clearTimeout(s),o()})}else o()})}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=void 0)}close(){this.nvim.call("coc#pum#close_detail",[],!0)}};var ktt=H()("completion-mru"),MD=class{constructor(e){this.selection=e;this.max=0;this.items=new Map;this.itemsNoPrefex=new Map}getScore(e,t){var o,s;let i=gte(t);return e.length==0?(o=this.itemsNoPrefex.get(i))!=null?o:-1:(this.selection==="recentlyUsedByPrefix"&&(i=`${e}|${i}`),(s=(this.selection==="recentlyUsed"?this.itemsNoPrefex:this.items).get(i))!=null?s:-1)}add(e,t){if(this.selection=="none"||["around","buffer","word"].includes(t.source))return;let i=gte(t);t.word.toLowerCase().startsWith(e.toLowerCase())||(e="");let r=`${e}|${i}`;this.items.set(r,this.max),this.itemsNoPrefex.set(i,this.max),this.max+=1}};function gte(n){var r;let e=n.filterText,t=n.source,i=(r=n.kind)!=null?r:"";return`${e}|${t}|${i}`}var wte=x(G_());mo();_e();mo();_e();var Rtt=H()("completion-util");function fte(n,e,t,i){let{pre:r}=t;if(r.length===0||r[r.length-1]===" "||r.length=0;r--){let o=e[r];if(n.isWord(o)&&(t?o.charCodeAt(0)<255:!0))i+=1;else break}return i==0?"":e.slice(-i)}function bte(n){let{source:e}=n;if(e){let t=rt.getSource(e);return t?[t]:[]}return rt.getCompleteSources(n)}function yte(n,e){let t=0;for(let i=0;io.length&&!/^\s/.test(e.slice(-o.length-1))||!(r.startsWith("~")?e.toLowerCase().endsWith(o):e.endsWith(o)))continue;if(i==""||i=="0"&&(e.length==o.length||/^\s*$/.test(e.slice(0,e.length-o.length))))return!0}return!1}var Att=H()("completion-pum"),ND=class{constructor(e,t,i){this.nvim=e;this.config=t;this.mruLoader=i;this._search=""}get search(){return this._search}get pumConfig(){var i;let{floatConfig:e}=this.config,t={};for(let r of["highlight","winblend","shadow"])r in e&&(t[r]=e[r]);return e.border&&(t.border=[1,1,1,1],t.rounded=e.rounded?1:0,t.borderhighlight=(i=e.borderhighlight)!=null?i:"CocFloating"),t}stringWidth(e){return(0,wte.default)(e,{ambiguousIsNarrow:this.config.ambiguousIsNarrow})}show(e,t,i){var W;this._search=t;let{noselect:r,fixInsertedWord:o,enablePreselect:s,selection:a,floatConfig:l,virtualText:u}=this.config,c=pte(i);c.length===0&&(o=!1);let h=r||!s?-1:e.findIndex(A=>A.preselect);h!==-1&&t.length>0&&((W=e[h].word)!=null&&W.startsWith(t)||(h=-1));let d=-1,g=0,f=0,p=0,m=0,v=!r&&h==-1&&a!="none";for(let A=0;Ad&&(d=N,h=A)}let F=rt.getShortcut(M.source);g=Math.max(this.stringWidth(this.getAbbr(M)),g),M.kind&&(p=1),M.menu&&(f=Math.max(this.stringWidth(M.menu),f)),F&&(m=Math.max(this.stringWidth(F)+2,m))}!r&&h==-1&&(h=0);let w={input:t,index:h,bufnr:i.bufnr,line:i.linenr,col:i.col,virtualText:u,words:e.map(A=>TTe(o,t,A.word,c))},D=[],S=[],L=0,j={border:!!l.border,menuWidth:f,abbrWidth:g,kindWidth:p,shortcutWidth:m};this.adjustAbbrWidth(j);for(let A=0;Ai?r.slice(0,i-1)+".":r}adjustAbbrWidth(e){let{formatItems:t,pumwidth:i}=this.config,r=0;for(let o of t)o=="abbr"?r+=e.abbrWidth+1:o=="menu"&&e.menuWidth?r+=e.menuWidth+1:o=="kind"&&e.kindWidth?r+=e.kindWidth+1:o=="shortcut"&&e.shortcutWidth&&(r+=e.shortcutWidth+1);r0){let f=e.positions.filter(m=>m0){let d=G(a);a+=this.fillWidth((u=e.menu)!=null?u:"",r.menuWidth+1),e.menu&&t.push({hlGroup:"CocPumMenu",lnum:i,colStart:d,colEnd:d+G(e.menu)})}break}case"kind":if(r.kindWidth>0){let d=G(a);a+=this.fillWidth((c=e.kind)!=null?c:"",r.kindWidth+1),e.kind&&e.kindHighlight&&t.push({hlGroup:e.kindHighlight,lnum:i,colStart:d,colEnd:d+G(e.kind)})}break;case"shortcut":if(r.shortcutWidth>0){let d=G(a),g=rt.getShortcut(e.source);a+=this.fillWidth(g?`[${g}]`:"",r.shortcutWidth+1),g&&t.push({hlGroup:"CocPumShortcut",lnum:i,colStart:d,colEnd:d+G(g)+2})}break}return a}fillWidth(e,t){let i=t-this.stringWidth(e);return i<=0?e:e+" ".repeat(i)}};function TTe(n,e,t,i){return!n||t.length<=i.length||!t.endsWith(i)||t.length0;){let o=e.shift(),s=o;for(;e.length>0;){let a=e[0];if(a-s==1)s=a,e.shift();else break}r.push({hlGroup:"CocPumSearch",lnum:i,colStart:t+Ae(n,o),colEnd:t+Ae(n,s+1)})}return r}var BD=H()("completion"),Cte=class{constructor(){this._activated=!1;this.disposables=[];this.complete=null}init(){this.nvim=y.nvim,this.getCompleteConfig(),this.mru=new MD(this.config.selection),this.pum=new ND(this.nvim,this.config,this.mru),y.onDidChangeConfiguration(this.getCompleteConfig,this,this.disposables),this.floating=new OD(y.nvim),this.config.autoTrigger!=="none"&&y.nvim.call("coc#ui#check_pum_keymappings",[],!0),P.on("CursorMovedI",(e,t,i)=>{var r;if(this.triggerTimer&&clearTimeout(this.triggerTimer),!(i||!this.option||e!==this.option.bufnr)){if(this.option.linenr===t[0]){let o=y.getDocument(e).getline(t[0]-1),s=Ui(o,t[1]-1),a=Ui(o,this.option.col);if(a{this.stop(!0)},null,this.disposables),P.on("CompleteStop",(e,t)=>{this.stop(!1,e,t)},null,this.disposables),P.on("InsertEnter",this.onInsertEnter,this,this.disposables),P.on("TextChangedI",this.onTextChangedI,this,this.disposables),P.on("TextChangedP",this.onTextChangedP,this,this.disposables),P.on("MenuPopupChanged",async e=>{var r;if(!this.option)return;this.popupEvent=e,this.floating.cancel();let t=this.selectedItem;if(!t||!e.move&&((r=this.complete)==null?void 0:r.isCompleting))return;let i=this.config.floatConfig;await this.floating.resolveItem(t,i,this.option)},null,this.disposables)}get option(){return this.complete?this.complete.option:null}get isActivated(){return this._activated}get inserted(){return this.popupEvent!=null&&this.popupEvent.inserted}get document(){return this.option?y.getDocument(this.option.bufnr):null}get selectedItem(){if(!(!this.popupEvent||!this.activeItems))return this.activeItems[this.popupEvent.index]}getCompleteConfig(e){var r;if(e&&!e.affectsConfiguration("suggest"))return;let t=y.getConfiguration("suggest");function i(o,s){return t.get(o,s)}this.config=Object.assign((r=this.config)!=null?r:{},{ambiguousIsNarrow:y.env.ambiguousIsNarrow,pumwidth:y.env.pumwidth||15,noselect:i("noselect",!1),enablePreselect:i("enablePreselect",!0),formatItems:i("formatItems",["abbr","menu","kind","shortcut"]),autoTrigger:i("autoTrigger","always"),virtualText:i("virtualText",!1),selection:i("selection","recentlyUsed"),floatConfig:i("floatConfig",{}),defaultSortMethod:i("defaultSortMethod","length"),removeDuplicateItems:i("removeDuplicateItems",!1),acceptSuggestionOnCommitCharacter:i("acceptSuggestionOnCommitCharacter",!1),triggerCompletionWait:i("triggerCompletionWait",0),labelMaxLength:i("labelMaxLength",200),triggerAfterInsertEnter:i("triggerAfterInsertEnter",!1),maxItemCount:i("maxCompleteItemCount",50),timeout:i("timeout",500),minTriggerInputLength:i("minTriggerInputLength",1),snippetIndicator:i("snippetIndicator","~"),fixInsertedWord:i("fixInsertedWord",!0),localityBonus:i("localityBonus",!0),highPrioritySourceLimit:i("highPrioritySourceLimit",null),lowPrioritySourceLimit:i("lowPrioritySourceLimit",null),ignoreRegexps:i("ignoreRegexps",[]),asciiCharactersOnly:i("asciiCharactersOnly",!1)})}async startCompletion(e,t){let i=y.getAttachedDocument(e.bufnr);if(e.filetype=i.filetype,BD.debug("trigger completion with",e),this.stop(!0),this.pretext=tt(e.line,0,e.colnr-1),t=t!=null?t:bte(e),!t||t.length===0)return;let r=this.complete=new AD(e,i,this.config,t,this.nvim);this._activated=!0,P.completing=!0,r.onDidRefresh(async()=>{if(this.triggerTimer!=null&&clearTimeout(this.triggerTimer),r.isEmpty){this.stop(!1);return}this.inserted||await this.filterResults()}),await r.doComplete()&&this.stop(!1)}showCompletion(e,t){let{option:i}=this;!i||(e.length==0?this.stop(!0):(this.activeItems=e,this.pum.show(e,t,i)))}async onTextChangedP(e,t){this.option&&e===this.option.bufnr&&(this.pretext=t.pre)}async onTextChangedI(e,t){if(!y.isAttached(e)||this.config.autoTrigger==="none")return;let{option:i}=this;if(!t.insertChar&&i){let s=tt(i.line,0,i.col);if(this.selectedItem){if(s+this.popupEvent.word==t.pre){this.pretext=t.pre;return}}else if(s+this.pum.search==t.pre)return}if(i&&t.pre.match(/^\s*/)[0]!==i.line.match(/^\s*/)[0]){await this.triggerCompletion(this.document,t);return}if(i&&fte(e,this.pretext,t,i)&&(this.stop(!0),!t.insertChar)||t.pre===this.pretext)return;this.triggerTimer&&clearTimeout(this.triggerTimer);let r=this.pretext=t.pre,o=y.getDocument(e);if(t.insertChar&&this.config.acceptSuggestionOnCommitCharacter&&this.selectedItem){let s=r.slice(-1),a=this.selectedItem;if(rt.shouldCommit(a,s)){BD.debug("commit by commit character.");let{linenr:l,col:u,line:c,colnr:h}=this.option;this.stop(!0);let{word:d}=a,g=`${c.slice(0,u)}${d}${t.insertChar}${c.slice(h-1)}`;await this.nvim.call("coc#util#setline",[l,g]);let f=u+d.length+2;await this.nvim.call("cursor",[l,f]),await o.patchChange();return}}if(t.insertChar&&!lc(t.insertChar)){let s=o.getVar("disabled_sources",[]),a=rt.getTriggerSources(r,o.filetype,o.uri,s);if(a.length>0){await this.triggerCompletion(o,t,a);return}}if(!this.complete){if(!t.insertChar)return;await this.triggerCompletion(o,t);return}if(t.insertChar&&this.complete.isEmpty){this.triggerTimer=setTimeout(async()=>{await this.triggerCompletion(o,t)},200);return}await this.filterResults()}async triggerCompletion(e,t,i){let{minTriggerInputLength:r,asciiCharactersOnly:o}=this.config,{pre:s}=t;if(!i&&!this.shouldTrigger(e,s))return!1;let a=mte(e,s,o),l={input:a,line:t.line,filetype:e.filetype,linenr:t.lnum,col:t.col-1-G(a),colnr:t.col,bufnr:e.bufnr,word:a+yte(e,t.line.slice(s.length)),changedtick:t.changedtick,indentkeys:e.indentkeys,synname:"",filepath:e.schema==="file"?B.parse(e.uri).fsPath:"",triggerCharacter:s.length?s.slice(-1):void 0};return i==null&&a.length0&&l.input.length>0&&this.config.ignoreRegexps.some(c=>{if(new RegExp(c).test(l.input))return BD.warn(`Suggest disabled by ignore regexp: ${c}`),!0})?!1:(await this.startCompletion(l,i),!0)}stop(e,t="",i){var c;if(!this._activated)return;let r=t==="confirm"||((c=this.popupEvent)==null?void 0:c.inserted)&&t!="cancel";this._activated=!1,i=i!=null?i:this.pretext;let o=this.document,s=this.complete.input,a=this.complete.option,l=this.selectedItem;P.completing=!1,this.cancel();let u=!1;l&&r&&(this.mru.add(s,l),u=i&&vte(a.indentkeys,i)),e&&this.nvim.call("coc#pum#_close",[],!0),!(!o||!o.attached)&&(o._forceSync(),t=="confirm"&&l&&this.confirmCompletion(l,a).then(()=>{u&&this.nvim.call("coc#complete_indent",[],!0)}))}async confirmCompletion(e,t){let i=new Dte.CancellationTokenSource,{token:r}=i;await this.floating.doCompleteResolve(e,t,i),!r.isCancellationRequested&&await this.doCompleteDone(e,t)}async doCompleteDone(e,t){let i=rt.getSource(e.source);i&&typeof i.onCompleteDone=="function"&&await Promise.resolve(i.onCompleteDone(e,t))}async onInsertEnter(e){if(!this.config.triggerAfterInsertEnter||this.config.autoTrigger!=="always"||!y.isAttached(e))return;let t=await this.nvim.call("coc#util#change_info");if(t.pre=tt(t.line,0,t.col-1),!t.pre)return;let i=y.getDocument(e);await this.triggerCompletion(i,t)}shouldTrigger(e,t){let{autoTrigger:i}=this.config;return i=="none"?!1:rt.shouldTrigger(t,e.filetype,e.uri)?!0:i==="always"}getResumeInput(){let{option:e,pretext:t,document:i}=this;if(!e||!i)return null;let r=Buffer.from(t,"utf8");if(r.lengthr}};var lp=H()("cursors-session"),YD=class{constructor(e,t){this.nvim=e;this.doc=t;this._onDidCancel=new fs.Emitter;this._onDidUpdate=new fs.Emitter;this.onDidCancel=this._onDidCancel.event;this.onDidUpdate=this._onDidUpdate.event;this.disposables=[];this.ranges=[];this.activated=!0;this.changing=!1;t.buffer.setVar("coc_cursors_activated",1,!0),this.loadConfig();let{cancelKey:i,nextKey:r,previousKey:o}=this.config;this.disposables.push(y.registerLocalKeymap("n",i,()=>{this.cancel()})),this.disposables.push(y.registerLocalKeymap("n",r,async()=>{let s=this.ranges.map(u=>u.range),a=await k.getCursorPosition();for(let u of s)if(Ce(u.start,a)>0){await k.moveTo(u.start);return}let l=this.config.wrapscan;s.length&&l&&await k.moveTo(s[0].start)})),this.disposables.push(y.registerLocalKeymap("n",o,async()=>{let s=this.ranges.map(u=>u.range),a=await k.getCursorPosition();for(let u=s.length-1;u>=0;u--){let c=s[u];if(Ce(c.end,a)<0){await k.moveTo(c.start);return}}let l=this.config.wrapscan;s.length&&l&&await k.moveTo(s[s.length-1].start)})),this.doc.onDocumentChange(async s=>{await this.onChange(s),this.activated&&!this.changing&&this._onDidUpdate.fire()},this,this.disposables)}loadConfig(){let e=y.getConfiguration("cursors",this.doc.uri);this.config={nextKey:e.get("nextKey",""),previousKey:e.get("previousKey",""),cancelKey:e.get("cancelKey",""),wrapscan:e.get("wrapscan",!0)}}addRange(e){let{ranges:t}=this,i=t.findIndex(r=>Dl(r.range,e));i!==-1?t.splice(i,1):(this.createRange(e),t.sort((r,o)=>Ce(r.range.start,o.range.start))),this.ranges.length==0?this.cancel():this.doHighlights()}addRanges(e){this.doc._forceSync(),this.ranges=this.ranges.filter(t=>!e.some(i=>Dc(i,t.range)));for(let t of e)this.createRange(t);return this.ranges.sort((t,i)=>Ce(t.range.start,i.range.start)),this.doHighlights(),!0}createRange(e){let{textDocument:t}=this.doc,{line:i,character:r}=e.start,o=t.getText(e);this.ranges.push(new Lh(i,r,o))}async onChange(e){if(!this.activated||this.changing)return;if(e.contentChanges.length===0){this.doHighlights();return}let t=e.contentChanges[0],{text:i,range:r}=t,o=this.ranges.filter(s=>!(!Dl(r,s.range)||mb(r,s.range)&&(i.includes(` -`)||!Tt(r))));if(Tt(r)&&o.length>0&&(o=o.slice(0,1)),o.length==0)lp.debug("no affected ranges"),this.ranges.forEach(s=>{s.adjustFromEdit({range:r,newText:i})}),this.doHighlights();else if(o.length==1&&Pi(r,o[0].range)){if(lp.debug("affected single range"),i.includes(` -`)){this.cancel();return}await this.applySingleEdit(o[0],{range:r,newText:i})}else if(!i.length||!this.validChange(r,i)){lp.debug("filter affected ranges.");let s=this.ranges.filter(a=>!o.includes(a));s.length>0?(this.ranges=s,s.forEach(a=>{a.adjustFromEdit({range:r,newText:i})}),this.doHighlights()):this.cancel()}else{lp.debug("Check undo & redo");let s=this.ranges[0],a=this.ranges[this.ranges.length-1],l=e.originalLines.slice(s.line,a.line+1),u=this.doc.textDocument.lines.slice(s.line,a.line+1);this.applyComposedEdit(l,u)}}validChange(e,t){if(na(fs.TextEdit.replace(e,t))!=0||!Pi(e,this.range))return!1;let i=this.ranges[0],r=this.ranges[this.ranges.length-1];return!(e.start.line!=i.position.line||e.end.line!=r.position.line)}get range(){let e=this.ranges[0],t=this.ranges[this.ranges.length-1];return fs.Range.create(e.position,t.range.end)}doHighlights(){let{nvim:e,ranges:t,doc:i}=this,r=i.buffer,o=[];t.forEach(s=>{i.addHighlights(o,"CocCursorRange",s.range,{combine:!1,start_incl:!0,end_incl:!0})}),o.sort((s,a)=>s.lnum!=a.lnum?s.lnum-a.lnum:s.colStart!=a.colStart?s.colStart-a.colStart:0),r.updateHighlights("cursors",o,{priority:4096}),e.redrawVim()}get currentRanges(){return this.ranges.map(e=>e.range)}cancel(){if(!this.activated)return;lp.debug("cursors cancel");let{nvim:e,doc:t}=this,i=t.buffer;this.activated=!1,this.ranges=[],e.pauseNotification(),i.clearNamespace("cursors"),i.setVar("coc_cursors_activated",0,!0),e.resumeNotification(!0,!0),this._onDidUpdate.fire(),this._onDidCancel.fire()}dispose(){!this.doc||(this._onDidCancel.dispose(),this._onDidUpdate.dispose(),J(this.disposables),this.ranges=[],this.doc=null)}async applySingleEdit(e,t){let{doc:i,ranges:r}=this;r.filter(u=>u!==e&&u.position.line==e.position.line).forEach(u=>u.adjustFromEdit(t));let s=qD(e,t.range,t.newText),a=sp(s);r.forEach(u=>u.applyChange(s));let l=r.filter(u=>u!==e).map(u=>u.textEdit);if(this.changing=!0,await i.applyEdits(l,!0,!0),this.changing=!1,a!=0)for(let u of r){let c=ap(u,this.ranges,e);u.move(c*a)}this.doHighlights()}applyComposedEdit(e,t){var v,w,D;let i=(0,Fh.default)(e[0],t[0]),r=this.ranges[0],o=r.position.character,s=r.position.line,a=r.text.length,l=i[0];if(o>0&&(l[0]!=Fh.default.EQUAL||!l[1].startsWith(e[0].slice(0,o))))return this.cancel(),!1;let u=0,c=!1,h=[];for(let S=0;S0&&(j=j.slice(o)),L==Fh.default.EQUAL){if(u+=j.length,u>a)break}else if(L==Fh.default.DELETE){let I=u;if(u+=j.length,u>a){c=!0;break}h.push({offset:I,remove:j})}else{let I=i[S-1];I&&I[0]==Fh.default.DELETE?h[h.length-1].add=j:h.push({offset:u,add:j})}}if(c||!h.length)return this.cancel(),!1;let d=In.create("file:///1","",0,e.join(` -`)),g;if(h.length==1)g={offset:h[0].offset,remove:h[0].remove?h[0].remove.length:0,insert:(v=h[0].add)!=null?v:""};else if(ETe(h,a))g={prepend:[h[0].remove?h[0].remove.length:0,(w=h[0].add)!=null?w:""],append:[h[1].remove?h[1].remove.length:0,(D=h[1].add)!=null?D:""]};else{let S=r.text,L="",j="",I=h[0].offset;for(let W of h){if(W.offset>I+L.length){let A=S.slice(I+L.length,W.offset);L+=A,j+=A}W.add&&(j+=W.add),W.remove&&(L+=W.remove)}g={offset:I,remove:L.length,insert:j}}let f=this.ranges.map(S=>{let L=S.position.line-s,{start:j,end:I}=S.range,W=fs.Range.create(L,j.character,L,I.character);return S.applyChange(g),fs.TextEdit.replace(W,S.text)});if(In.applyEdits(d,f)!==t.join(` -`))return this.cancel(),!1;let m=sp(g);if(m!=0)for(let S of this.ranges){let L=ap(S,this.ranges);S.move(L*m)}return this.doHighlights(),!0}};function ETe(n,e){return!(n.length!=2||n[0].offset!=0||n[1].offset+(n[1].remove?n[1].remove.length:0)!==e)}var Rit=H()("cursors"),WD=class{constructor(e){this.nvim=e;this.sessionsMap=new Map;this.disposables=[];y.onDidCloseTextDocument(t=>{let i=this.getSession(t.bufnr);!i||(this.sessionsMap.delete(t.bufnr),i.cancel())},null,this.disposables)}cancel(e){let t=y.getDocument(e);if(!t)return;let i=this.getSession(t.bufnr);i&&i.cancel()}getSession(e){return this.sessionsMap.get(e)}async isActivated(){let e=await this.nvim.call("bufnr",["%"]);return this.sessionsMap.get(e)!=null}async select(e,t,i){let r=y.getAttachedDocument(e),{nvim:o}=this,s=this.createSession(r),a=await k.getCursorPosition(),l;if(t=="operator"){await o.command(`normal! ${i=="line"?"'[":"`["}`);let u=await k.getCursorPosition();await o.command(`normal! ${i=="line"?"']":"`]"}`);let c=await k.getCursorPosition();await k.moveTo(a);let h=Ce(u,c);if(h==0)return;h>=0&&([u,c]=[c,u]);let d=r.getline(c.line);c.character(coc-cursors-${t})", -1)`)}else if(t=="position"){let u=r.getline(a.line);a.character>=u.length?l=Ih.Range.create(a.line,u.length-1,a.line,u.length):l=Ih.Range.create(a.line,a.character,a.line,a.character+1),s.addRange(l),await o.command(`silent! call repeat#set("\\(coc-cursors-${t})", -1)`)}else if(t=="range"){await o.call("eval",'feedkeys("\\", "in")');let u=await k.getSelectedRange(i);if(!u)return;let c=i==""?xte(r,u):sR(r,u);for(let h of c)s.addRange(h)}else throw new Error(`select kind "${t}" not supported`)}createSession(e){let{bufnr:t}=e,i=this.getSession(t);return i||(i=new YD(this.nvim,e),this.sessionsMap.set(t,i),i.onDidCancel(()=>{i.dispose(),this.sessionsMap.delete(t)}),i)}async addRanges(e){let{nvim:t}=this,i=await t.call("bufnr",["%"]),r=y.getAttachedDocument(i);return this.createSession(r).addRanges(e)}reset(){for(let e of this.sessionsMap.values())e.cancel();this.sessionsMap.clear()}};Vl();ge();vo();var CC=x(q());ge();Se();V();Ee();K();var jh=x(q());wi();Vl();Se();Ee();K();var Nit=H()("handler-codeActions"),ZD=class{constructor(e,t){this.nvim=e;this.handler=t;t.addDisposable(oe.registerCommand("editor.action.organizeImport",async i=>{await this.organizeImport(i)})),oe.titles.set("editor.action.organizeImport","run organize import code action.")}async codeActionRange(e,t,i){let{doc:r}=await this.handler.getCurrentState();await r.synchronize();let o=r.getline(t-1),s=jh.Range.create(e-1,0,t-1,o.length),a=await this.getCodeActions(r,s,i?[i]:null);if(a=a.filter(c=>!c.disabled),!a||a.length==0){k.showMessage(`No${i?" "+i:""} code action available`,"warning");return}let l=await k.showMenuPicker(a.map(c=>c.title),"Choose action"),u=a[l];u&&await this.applyCodeAction(u)}async organizeImport(e){let{doc:t}=await this.handler.getCurrentState();if(e&&t.bufnr!=e)return;await t.synchronize();let i=await this.getCodeActions(t,void 0,[jh.CodeActionKind.SourceOrganizeImports]);if(i&&i.length){await this.applyCodeAction(i[0]);return}throw new Error("Organize import action not found.")}async getCodeActions(e,t,i){t=t||jh.Range.create(0,0,e.lineCount,0);let o={diagnostics:It.getDiagnosticsInRange(e.textDocument,t)};i&&Array.isArray(i)&&(o.only=i);let s=await this.handler.withRequestToken("code action",a=>O.getCodeActions(e.textDocument,t,o,a));return!s||s.length==0?[]:(s.sort((a,l)=>a.isPreferred&&!l.isPreferred?-1:l.isPreferred&&!a.isPreferred||a.disabled&&!l.disabled?1:l.disabled&&!a.disabled?-1:0),s)}get floatActions(){return y.floatSupported?y.getConfiguration("coc.preferences").get("floatActions",!0):!1}async doCodeAction(e,t){let{doc:i}=await this.handler.getCurrentState(),r;e&&(r=await k.getSelectedRange(e)),await i.synchronize();let o=await this.getCodeActions(i,r,Array.isArray(t)?t:null);if(typeof t=="string"?o=o.filter(l=>l.title==t||l.command&&l.command.title==t):Array.isArray(t)&&(o=o.filter(l=>t.some(u=>l.kind&&l.kind.startsWith(u)))),!o||o.length==0){k.showMessage(`No${t?" "+t:""} code action available`,"warning");return}if(t&&o.length==1&&!o[0].disabled){await this.applyCodeAction(o[0]);return}this.floatActions||(o=o.filter(l=>!l.disabled));let s=this.floatActions?await k.showMenuPicker(o.map(l=>({text:l.title,disabled:l.disabled})),"Choose action"):await k.showQuickpick(o.map(l=>l.title)),a=o[s];a&&await this.applyCodeAction(a)}async getCurrentCodeActions(e,t){let{doc:i}=await this.handler.getCurrentState(),r;return e&&(r=await k.getSelectedRange(e)),(await this.getCodeActions(i,r,t)).filter(s=>!s.disabled)}async doQuickfix(){let e=await this.getCurrentCodeActions("line",[jh.CodeActionKind.QuickFix]);if(!e||e.length==0)throw new Error("No quickfix action available");await this.applyCodeAction(e[0]),this.nvim.command('silent! call repeat#set("\\(coc-fix-current)", -1)',!0)}async applyCodeAction(e){if(e.disabled)throw new Error(`Action "${e.title}" is disabled: ${e.disabled.reason}`);if(!e.providerId)throw new Error("providerId not found with codeAction");let t=await this.handler.withRequestToken("resolve codeAction",o=>O.resolveCodeAction(e,o)),{edit:i,command:r}=t;i&&await y.applyEdit(i),r&&await oe.execute(r)}};ge();V();K();var Ste=x(Ei()),lR=x(q());wi();Se();Ee();K();var $it=H()("codelens-buffer"),JD=class{constructor(e,t,i){this.nvim=e;this.document=t;this.config=i;this.resolveCodeLens=(0,Ste.default)(()=>{this._resolveCodeLenses()},global.__TEST__?20:200),this.fetchCodeLenses()}get bufnr(){return this.document.bufnr}onChange(e){e.contentChanges.length===0&&this.codeLenses!=null?this._resolveCodeLenses():(this.cancel(),this.fetchCodeLenses())}get currentCodeLens(){var e;return(e=this.codeLenses)==null?void 0:e.codeLenses}get enabled(){var e;return(e=this.document)!=null&&e.attached?this.config.enabled&&O.hasProvider("codeLens",this.document.textDocument):!1}async forceFetch(){!this.enabled||(await this.document.synchronize(),this.cancel(),await this.fetchCodeLenses())}async fetchCodeLenses(){var t;if(!this.enabled)return;if(this.cancel(),!(((t=this.codeLenses)==null?void 0:t.version)==this.document.version)){let{textDocument:i}=this.document,r=i.version,s=(this.tokenSource=new lR.CancellationTokenSource).token,a=await O.getCodeLens(i,s);if(a=Array.isArray(a)?a.filter(l=>l!=null):[],this.tokenSource=void 0,s.isCancellationRequested||a.length==0)return;this.codeLenses={version:r,codeLenses:a}}await this._resolveCodeLenses()}async _resolveCodeLenses(){if(!this.enabled||!this.codeLenses||this.isChanged||!y.has("nvim-0.4.0"))return;let{codeLenses:e}=this.codeLenses,[t,i,r]=await this.nvim.eval("[bufnr('%'),line('w0'),line('w$')]");if(!(this.isChanged||t!=this.bufnr)){if(this.resolveTokenSource&&this.resolveTokenSource.cancel(),e=e.filter(o=>{let s=o.range.start.line+1;return s>=i&&s<=r}),e.length){let s=(this.resolveTokenSource=new lR.CancellationTokenSource).token;if(await Promise.all(e.map(a=>O.resolveCodeLens(a,s))),this.resolveTokenSource=void 0,s.isCancellationRequested||this.isChanged)return}this.nvim.pauseNotification(),this.clear(i-1,r),this.setVirtualText(e),this.nvim.resumeNotification(!1,!0)}}get isChanged(){if(!this.codeLenses||this.document.dirty)return!0;let{version:e}=this.codeLenses;return this.document.textDocument.version!==e}setVirtualText(e){let{document:t}=this;if(!t||!e.length)return;let i=new Map,{position:r}=this.config;for(let o of e){let{range:s,command:a}=o;if(!a)continue;let{line:l}=s.start;i.has(l)?i.get(l).push(o):i.set(l,[o])}for(let o of i.keys()){let a=i.get(o).map(h=>h.command);a=a.filter(h=>h&&h.title);let l=[],u=a.length;for(let h=0;h0&&l.unshift([g,"Normal"]),h.setExtMark(c,o,0,{virt_lines:[l],virt_lines_above:!0})}else h.setExtMark(c,o,0,{hl_mode:"combine",virt_text:l,virt_text_pos:r})}else this.nvim.call("nvim_buf_set_virtual_text",[this.bufnr,c,o,l,{}],!0)}}clear(e=0,t=-1){let{srcId:i}=this.config;if(!i)return;this.nvim.createBuffer(this.bufnr).clearNamespace(i,e,t)}async doAction(e){var i;let t=PTe(e,(i=this.codeLenses)==null?void 0:i.codeLenses);if(t.length==1)await oe.execute(t[0]);else if(t.length>1){let r=await k.showMenuPicker(t.map(o=>o.title));r!=-1&&await oe.execute(t[r])}}cancel(){this.resolveCodeLens.clear(),this.resolveTokenSource&&(this.resolveTokenSource.cancel(),this.resolveTokenSource.dispose(),this.resolveTokenSource=null),this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null)}dispose(){this.cancel(),this.codeLenses=void 0}};function PTe(n,e){if(!(e!=null&&e.length))return[];let t=[];for(let i of e){let{range:r,command:o}=i;!o||n==r.start.line&&t.push(o)}return t}var Vit=H()("codelens"),$D=class{constructor(e){this.nvim=e;this.disposables=[];this.setConfiguration(),this.nvim.createNamespace("coc-codelens").then(t=>{this.config.srcId=t}).logError(),y.onDidChangeConfiguration(this.setConfiguration,this,this.disposables),this.buffers=y.registerBufferSync(t=>{if(t.buftype=="")return new JD(e,t,this.config)}),this.disposables.push(this.buffers),this.listen()}listen(){P.on("CursorMoved",e=>{let t=this.buffers.getItem(e);t&&t.resolveCodeLens()},null,this.disposables),P.on("CursorHold",async e=>{let t=this.buffers.getItem(e);t&&await t.forceFetch()},this,this.disposables)}async checkProvider(){for(let e of this.buffers.items)await e.forceFetch()}setConfiguration(e){if(e&&!e.affectsConfiguration("codeLens"))return;let t=y.getConfiguration("codeLens"),i=this.nvim.hasFunction("nvim_buf_set_virtual_text")&&t.get("enable",!1);this.config=Object.assign(this.config||{},{enabled:i,position:t.get("position","top"),separator:t.get("separator","\u2023"),subseparator:t.get("subseparator"," ")})}async doAction(){let[e,t]=await this.nvim.eval('[bufnr("%"),line(".")-1]'),i=this.buffers.getItem(e);await(i==null?void 0:i.doAction(t))}dispose(){J(this.disposables)}};var _te=x(q());wi();vo();Se();V();function uR(n){return n.length==1?`0${n}`:n}function up(n){let e=_Te(n);return`${uR(e.red.toString(16))}${uR(e.green.toString(16))}${uR(e.blue.toString(16))}`}function _Te(n){let{red:e,green:t,blue:i}=n;return{red:Math.round(e*255),green:Math.round(t*255),blue:Math.round(i*255)}}function Tte(n){let e=[n.red,n.green,n.blue],t=[];for(let r=0;r{this.doHighlight().logError()},global.hasOwnProperty("__TEST__")?10:300),this.highlight()}get enabled(){let{filetypes:e}=this.config,t=y.getDocument(this.bufnr);return t?e.includes("*")?!0:O.hasProvider("documentColor",t.textDocument)?e.includes(t.filetype):!1:!1}onChange(){this.cancel(),this.highlight()}get buffer(){return this.nvim.createBuffer(this.bufnr)}get colors(){return this._colors}hasColor(){return this._colors.length>0}async doHighlight(){if(!this.enabled)return;let{nvim:e}=this,t=y.getDocument(this.bufnr);this.tokenSource=new Pte.CancellationTokenSource;let{token:i}=this.tokenSource,r;if(r=await O.provideDocumentColors(t.textDocument,i),i.isCancellationRequested)return;r=r||[],r.sort((a,l)=>Ce(a.range.start,l.range.start)),this._colors=r;let o=[];r.forEach(a=>{let l=RTe(a.color);t.addHighlights(o,l,a.range,{combine:!1})});let s=await k.diffHighlights(this.bufnr,kte,o);i.isCancellationRequested||!s||(e.pauseNotification(),this.defineColors(r),e.resumeNotification(!1,!0),await k.applyDiffHighlights(this.bufnr,kte,this.config.highlightPriority,s,!0))}defineColors(e){for(let t of e){let i=up(t.color);this.usedColors.has(i)||(this.nvim.command(`hi BG${i} guibg=#${i} guifg=#${Tte(t.color)?"ffffff":"000000"}`,!0),this.usedColors.add(i))}}hasColorAtPosition(e){return this.colors.some(t=>ht(e,t.range)==0)}clearHighlight(){this.highlight.clear(),this._colors=[],this.buffer.clearNamespace("color")}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null)}dispose(){this._colors=[],this.highlight.clear(),this.cancel()}};function RTe(n){return`BG${up(n)}`}var Tnt=H()("colors-index"),UD=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.setConfiguration();let i=new Set;this.highlighters=y.registerBufferSync(r=>new XD(this.nvim,r.bufnr,this.config,i)),ve.onDidActiveExtension(()=>{this.highlightAll()},null,this.disposables),y.onDidChangeConfiguration(this.setConfiguration,this,this.disposables),this.disposables.push(oe.registerCommand("editor.action.pickColor",()=>this.pickColor())),oe.titles.set("editor.action.pickColor","pick color from system color picker when possible."),this.disposables.push(oe.registerCommand("editor.action.colorPresentation",()=>this.pickPresentation())),oe.titles.set("editor.action.colorPresentation","change color presentation.")}setConfiguration(e){if(!e||e.affectsConfiguration("colors")){let t=y.getConfiguration("colors");this.config=Object.assign(this.config||{},{filetypes:t.get("filetypes",[]),highlightPriority:t.get("highlightPriority",1e3)})}}async pickPresentation(){let{doc:e}=await this.handler.getCurrentState();this.handler.checkProvier("documentColor",e.textDocument);let t=await this.getColorInformation(e.bufnr);if(!t)return k.showMessage("Color not found at current position","warning");let i=new _te.CancellationTokenSource,r=await O.provideColorPresentations(t,e.textDocument,i.token);if(!(r!=null&&r.length))return;let o=await k.showMenuPicker(r.map(c=>c.label),"choose color:");if(o==-1)return;let s=r[o],{textEdit:a,additionalTextEdits:l,label:u}=s;a||(a={range:t.range,newText:u}),await e.applyEdits([a]),l&&await e.applyEdits(l)}async pickColor(){let{doc:e}=await this.handler.getCurrentState();this.handler.checkProvier("documentColor",e.textDocument);let t=await this.getColorInformation(e.bufnr);if(!t)return k.showMessage("Color not found at current position","warning");let{color:i}=t,r=[(i.red*255).toFixed(0),(i.green*255).toFixed(0),(i.blue*255).toFixed(0)],o=await this.nvim.call("coc#color#pick_color",[r]);if(!o)return;let s=up({red:o[0]/65535,green:o[1]/65535,blue:o[2]/65535,alpha:1});await e.applyEdits([{range:t.range,newText:`#${s}`}])}isEnabled(e){let t=this.highlighters.getItem(e);return t!=null&&t.enabled===!0}clearHighlight(e){let t=this.highlighters.getItem(e);t&&t.clearHighlight()}hasColor(e){let t=this.highlighters.getItem(e);return t?t.hasColor():!1}hasColorAtPosition(e,t){let i=this.highlighters.getItem(e);return i?i.hasColorAtPosition(t):!1}highlightAll(){for(let e of this.highlighters.items)e.highlight()}async doHighlight(e){let t=this.highlighters.getItem(e);t&&await t.doHighlight()}async getColorInformation(e){let t=this.highlighters.getItem(e);if(!t)return null;let i=await k.getCursorPosition();for(let r of t.colors){let{range:o}=r,{start:s,end:a}=o;if(i.line==s.line&&i.character>=s.character&&i.character<=a.character)return r}return null}dispose(){this.highlighters.dispose(),J(this.disposables)}};wi();rD();var _nt=H()("handler-commands"),GD=class{constructor(e,t){this.nvim=e;this.env=t;for(let i of t.vimCommands)this.addVimCommand(i)}addVimCommand(e){let t=`vim.${e.id}`;oe.registerCommand(t,()=>{this.nvim.command(e.cmd,!0),this.nvim.redrawVim()}),e.title&&oe.titles.set(t,e.title)}getCommandList(){return oe.commandList.map(e=>e.id)}async repeat(){await oe.repeatCommand()}async runCommand(e,...t){if(e)return await oe.fireCommand(e,...t);await Di.start(["commands"])}getCommands(){let e=oe.commandList,t=[],{titles:i}=oe;for(let r of e)t.push({id:r.id,title:i.get(r.id)||""});return t}};Se();var QD=class{constructor(e,t){this.nvim=e;this.handler=t}async fold(e){let{doc:t,winid:i}=await this.handler.getCurrentState();this.handler.checkProvier("foldingRange",t.textDocument),await t.synchronize();let r=this.nvim.createWindow(i),o=await this.nvim.eval("&foldlevel"),s=await this.handler.withRequestToken("foldingrange",a=>O.provideFoldingRanges(t.textDocument,{},a),!0);if(!s||!s.length)return!1;e&&(s=s.filter(a=>a.kind==e)),s.sort((a,l)=>l.startLine-a.startLine),this.nvim.pauseNotification(),r.setOption("foldmethod","manual",!0),this.nvim.command("normal! zE",!0);for(let a of s){let{startLine:l,endLine:u}=a,c=`${l+1}, ${u+1}fold`;this.nvim.command(c,!0)}return r.setOption("foldenable",!0,!0),r.setOption("foldlevel",o,!0),await this.nvim.resumeNotification(!0),!0}};var ps=x(q());wi();ge();Se();tu();_e();Ee();K();var cR=H()("handler-format"),Rte=new Map([["<",">"],[">","<"],["{","}"],["[","]"],["(",")"]]),KD=class{constructor(e,t){this.nvim=e;this.handler=t;this.loadPreferences(),t.addDisposable(y.onDidChangeConfiguration(this.loadPreferences,this)),t.addDisposable(y.onWillSaveTextDocument(o=>{let{languageId:s}=o.document,a=this.preferences.formatOnSaveFiletypes;if(a.includes(s)||a.includes("*")){let l=async()=>{if(!O.hasFormatProvider(o.document)){cR.warn(`Format provider not found for ${o.document.uri}`);return}let u=await y.getFormatOptions(o.document.uri),c=new ps.CancellationTokenSource,h,d=new Promise(p=>{h=setTimeout(()=>{cR.warn(`Format on save ${o.document.uri} timeout after 0.5s`),c.cancel(),p(void 0)},500)}),g=O.provideDocumentFormattingEdits(o.document,u,c.token),f=await Promise.race([d,g]);return clearTimeout(h),Array.isArray(f)?f:void 0};o.waitUntil(l())}}));let i,r;t.addDisposable(P.on("Enter",async o=>{i=Date.now(),r=o})),t.addDisposable(P.on("CursorMovedI",async o=>{o==r&&Date.now()-i<100&&(r=void 0,await this.handleEnter(o))})),t.addDisposable(P.on("TextInsert",async(o,s,a)=>{P.pumvisible||await this.tryFormatOnType(a,o)})),t.addDisposable(oe.registerCommand("editor.action.formatDocument",async o=>{let s=o?y.getDocument(o):(await this.handler.getCurrentState()).doc;await this.documentFormat(s)})),oe.titles.set("editor.action.formatDocument","Format Document")}loadPreferences(e){if(!e||e.affectsConfiguration("coc.preferences")){let t=y.getConfiguration("coc.preferences");this.preferences={formatOnType:t.get("formatOnType",!1),formatOnSaveFiletypes:t.get("formatOnSaveFiletypes",[]),formatOnTypeFiletypes:t.get("formatOnTypeFiletypes",[]),bracketEnterImprove:t.get("bracketEnterImprove",!0)}}}async tryFormatOnType(e,t,i=!1){if(!e||lc(e)||!this.preferences.formatOnType||Ut.getSession(t)!=null)return;let r=y.getDocument(t);if(!r||!r.attached||r.isCommandLine)return;let o=this.preferences.formatOnTypeFiletypes;if(o.length&&!o.includes(r.filetype)&&!o.includes("*"))return;if(!O.hasProvider("formatOnType",r.textDocument)){cR.warn(`Format on type provider not found for buffer: ${r.uri}`);return}if(!O.canFormatOnType(e,r.textDocument))return;let s,a=await this.handler.withRequestToken("Format on type",async l=>{s=await k.getCursorPosition();let u=r.getline(s.line-1);if(!(i&&/^\s*$/.test(u)))return await r.synchronize(),await O.provideDocumentOnTypeEdits(e,r.textDocument,s,l)});!a||!a.length||await r.applyEdits(a,!1,!0)}async formatCurrentBuffer(){let{doc:e}=await this.handler.getCurrentState();return await this.documentFormat(e)}async formatCurrentRange(e){let{doc:t}=await this.handler.getCurrentState();return await this.documentRangeFormat(t,e)}async documentFormat(e){if(await e.synchronize(),!O.hasFormatProvider(e.textDocument))throw new Error(`Format provider not found for buffer: ${e.bufnr}`);let t=await y.getFormatOptions(e.uri),i=await this.handler.withRequestToken("format",r=>O.provideDocumentFormattingEdits(e.textDocument,t,r));return i&&i.length>0?(await e.applyEdits(i,!1,!0),!0):!1}async handleEnter(e){let{nvim:t}=this,{bracketEnterImprove:i}=this.preferences;if(await this.tryFormatOnType(` -`,e),i){let r=await t.call("line",".")-1,o=y.getDocument(e);if(!o)return;await o.patchChange();let s=o.getline(r-1),a=o.getline(r),l=s[s.length-1];if(l&&Rte.has(l)){let u=a.trim()[0];if(u&&Rte.get(l)==u){let c=[],h=await y.getFormatOptions(o.uri),d=h.insertSpaces?" ".repeat(h.tabSize):" ",g=a.match(/^\s*/)[0],f=ps.Position.create(r-1,s.length);if(o.filetype=="vim"){let p=` -`+g+d;c.push({range:ps.Range.create(r,g.length,r,g.length),newText:" \\ "}),p=p+"\\ ",c.push({range:ps.Range.create(f,f),newText:p}),await o.applyEdits(c),await k.moveTo(ps.Position.create(r,p.length-1))}else await t.eval(`feedkeys("\\O", 'in')`)}}}}async documentRangeFormat(e,t){this.handler.checkProvier("formatRange",e.textDocument),await e.synchronize();let i;if(t){if(i=await k.getSelectedRange(t),!i)return-1}else{let[s,a,l]=await this.nvim.eval("[v:lnum,v:count,mode()]");if(a==0||l=="i"||l=="R")return-1;i=ps.Range.create(s-1,0,s-1+a,0)}let r=await y.getFormatOptions(e.uri),o=await this.handler.withRequestToken("Format range",s=>O.provideDocumentRangeFormattingEdits(e.textDocument,i,r,s));return o&&o.length>0?(await e.applyEdits(o,!1,!0),0):-1}};var lu=x(q());ge();Se();V();K();var Gnt=H()("documentHighlight"),zD=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.highlights=new Map;P.on(["CursorMoved","CursorMovedI"],()=>{this.cancel(),this.clearHighlights()},null,this.disposables),this.getConfiguration(),y.onDidChangeConfiguration(this.getConfiguration,this,this.disposables)}getConfiguration(e){let t=y.getConfiguration("documentHighlight");(!e||e.affectsConfiguration("documentHighlight"))&&(this.config=Object.assign(this.config||{},{priority:t.get("priority",-1),timeout:t.get("timeout",300)}))}isEnabled(e,t){let i=y.getDocument(e);return!(!i||!i.attached||t||!O.hasProvider("documentHighlight",i.textDocument))}clearHighlights(){if(this.highlights.size!=0){for(let e of this.highlights.keys())this.nvim.createWindow(e).clearMatchGroup("^CocHighlight");this.highlights.clear()}}async highlight(){let{nvim:e}=this;this.cancel();let[t,i,r,o]=await e.eval(`[bufnr("%"),win_getid(),coc#cursor#position(),get(b:,'coc_cursors_activated',0)]`);if(!this.isEnabled(t,o))return;let s=y.getDocument(t),a=await this.getHighlights(s,lu.Position.create(r[0],r[1]));if(!a)return;let l={};for(let c of a){if(!c.range)continue;let h=c.kind==lu.DocumentHighlightKind.Text?"CocHighlightText":c.kind==lu.DocumentHighlightKind.Read?"CocHighlightRead":"CocHighlightWrite";l[h]=l[h]||[],l[h].push(c.range)}let u=e.createWindow(i);e.pauseNotification(),u.clearMatchGroup("^CocHighlight");for(let c of Object.keys(l))u.highlightRanges(c,l[c],this.config.priority,!0);e.resumeNotification(!0,!0),this.highlights.set(i,a)}async getSymbolsRanges(){let{doc:e,position:t}=await this.handler.getCurrentState();this.handler.checkProvier("documentHighlight",e.textDocument);let i=await this.getHighlights(e,t);return i?i.map(r=>r.range):null}hasHighlights(e){return this.highlights.get(e)!=null}async getHighlights(e,t){let r=e.getline(t.line)[t.character];if(!r||!e.isWord(r))return null;await e.synchronize(),this.cancel();let o=this.tokenSource=new lu.CancellationTokenSource,s=this.timer=setTimeout(()=>{o.token.isCancellationRequested||o.cancel()},this.config.timeout),a=await O.getDocumentHighLight(e.textDocument,t,o.token);return clearTimeout(s),o.token.isCancellationRequested?null:a}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null)}dispose(){this.timer&&clearTimeout(this.timer),this.cancel(),this.highlights.clear(),J(this.disposables)}};var Lte=x(require("fs")),gr=x(q());De();Se();$o();V();$e();K();var rrt=H()("handler-hover"),VD=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.documentLines=[];this.hasProvider=!1;this.excludeImages=!0;this.loadConfiguration(),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),this.hoverFactory=new ci(e),this.disposables.push(this.hoverFactory)}registerProvider(){if(this.hasProvider)return;this.hasProvider=!0;let{nvim:e}=this,t={onDidChange:null,provideTextDocumentContent:async()=>(e.pauseNotification(),e.command("setlocal conceallevel=2 nospell nofoldenable wrap",!0),e.command("setlocal bufhidden=wipe nobuflisted",!0),e.command("setfiletype markdown",!0),e.command(`if winnr('j') != winnr('k') | exe "normal! z${Math.min(this.documentLines.length,this.config.previewMaxHeight)}\\ | endif"`,!0),await e.resumeNotification(),this.documentLines.join(` -`))};this.disposables.push(y.registerTextDocumentContentProvider("coc",t))}loadConfiguration(e){if(!e||e.affectsConfiguration("hover")){let t=y.getConfiguration("hover"),i=t.get("target","float");this.config={floatConfig:t.get("floatConfig",{}),autoHide:t.get("autoHide",!0),target:i=="float"&&!y.floatSupported?"preview":i,previewMaxHeight:t.get("previewMaxHeight",12)},this.config.target=="preview"&&this.registerProvider();let r=y.getConfiguration("coc.preferences");this.excludeImages=r.get("excludeImageLinksInMarkdownDocument",!0)}}async onHover(e){let{doc:t,position:i,winid:r}=await this.handler.getCurrentState();e=="preview"&&this.registerProvider(),this.handler.checkProvier("hover",t.textDocument),await t.synchronize();let o=await this.handler.withRequestToken("hover",a=>O.getHover(t.textDocument,i,a),!0);if(o==null||!o.length)return!1;let s=o.find(a=>gr.Range.is(a.range));if(s!=null&&s.range){let a=this.nvim.createWindow(r);a.highlightRanges("CocHoverRange",[s.range],99,!0),this.timer=setTimeout(()=>{a.clearMatchGroup("CocHoverRange"),this.nvim.redrawVim()},500)}return await this.previewHover(o,e),!0}async definitionHover(e){let{doc:t,position:i,winid:r}=await this.handler.getCurrentState();e=="preview"&&this.registerProvider(),this.handler.checkProvier("hover",t.textDocument),await t.synchronize();let o=await this.handler.withRequestToken("hover",l=>O.getHover(t.textDocument,i,l),!0);if(!(o!=null&&o.length))return!1;let s=await this.handler.withRequestToken("definitionHover",l=>O.getDefinitionLinks(t.textDocument,i,l),!1);if(s!=null&&s.length)for(let l of s){if(!l.targetRange)continue;let{start:u,end:c}=l.targetRange,h=c.line-u.line>=100?u.line+100:c.character==0?c.line-1:c.line,d=await FTe(l.targetUri,u.line,h);if(d.length){let g=d[0].match(/^\s*/)[0];g&&(d=d.map(f=>f.startsWith(g)?f.substring(g.length):f)),o.push({content:d.join(` -`),filetype:t.filetype})}}let a=o.find(l=>gr.Hover.is(l)&&gr.Range.is(l.range));if(a!=null&&a.range){let l=this.nvim.createWindow(r);l.highlightRanges("CocHoverRange",[a.range],99,!0),this.timer=setTimeout(()=>{l.clearMatchGroup("CocHoverRange"),this.nvim.redrawVim()},500)}return await this.previewHover(o,e),!0}async previewHover(e,t){let i=[];t=t||this.config.target;let r=t==="preview";for(let s of e){if(LTe(s)){i.push(s);continue}let{contents:a}=s;if(Array.isArray(a))for(let l of a)typeof l=="string"?cp(i,l,"markdown",r):cp(i,l.value,l.language,r);else gr.MarkedString.is(a)?typeof a=="string"?cp(i,a,"markdown",r):cp(i,a.value,a.language,r):gr.MarkupContent.is(a)&&cp(i,a.value,ig(a)?"markdown":"txt",r)}if(t=="float"){let s=this.hoverFactory.applyFloatConfig({modes:["n"],autoHide:this.config.autoHide,excludeImages:this.excludeImages,maxWidth:80},this.config.floatConfig);await this.hoverFactory.show(i,s);return}let o=i.reduce((s,a)=>{let l=a.content.split(/\r?\n/);return s.length>0&&s.push(""),s.push(...l),s},[]);if(t=="echo"){let s=o.join(` -`).trim();await this.nvim.call("coc#ui#echo_hover",[s])}else this.documentLines=o,await this.nvim.command("noswapfile pedit coc://document")}async getHover(){let e=[],{doc:t,position:i}=await this.handler.getCurrentState();this.handler.checkProvier("hover",t.textDocument),await t.synchronize();let r=new gr.CancellationTokenSource,o=await O.getHover(t.textDocument,i,r.token);if(Array.isArray(o))for(let s of o){let{contents:a}=s;Array.isArray(a)?a.forEach(l=>{e.push(typeof l=="string"?l:l.value)}):gr.MarkupContent.is(a)?e.push(a.value):e.push(typeof a=="string"?a:a.value)}return e=e.filter(s=>s!=null&&s.length>0),e}dispose(){this.timer&&clearTimeout(this.timer),J(this.disposables)}};function cp(n,e,t,i=!1){let r=e.trim();!r.length||(i&&t!=="markdown"&&(r="``` "+t+` -`+r+"\n```"),n.push({content:r,filetype:t}))}function LTe(n){return n?typeof n.filetype=="string"&&typeof n.content=="string":!1}async function FTe(n,e,t){let i=y.getDocument(n);if(i)return i.getLines(e,t+1);let r=B.parse(n).fsPath;return Lte.default.existsSync(r)?await ta(r,e,t):[]}var uu=x(q());ge();Se();$o();V();wt();Ee();K();var frt=H()("handler-links"),ITe=/CocAction(Async)?\(["']openLink["']\)/,eC=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.setConfiguration(),y.onDidChangeConfiguration(this.setConfiguration,this,this.disposables),this.floatFactory=new ci(e),P.on("CursorHold",async()=>{!this._tooltip||!e.hasFunction("nvim_get_keymap")||await this.showTooltip()},null,this.disposables),P.on(["CursorMoved","InsertEnter"],()=>{this.cancel()},null,this.disposables)}setConfiguration(e){if(!e||e.affectsConfiguration("links")){let t=y.getConfiguration("links");this._tooltip=t.get("tooltip",!1)}}async showTooltip(){let{nvim:e,floatFactory:t}=this,r=(await e.getKeymap("n")).find(u=>ITe.test(u.rhs)),o=r?r.lhs:void 0,s=await this.getCurrentLink();if(!s||!s.target)return;let a="";if(s.tooltip&&(a=s.tooltip+" "),o&&(a+=`Press "${o}" to open link`),!a.length)return;let l={content:a,filetype:"txt"};await t.show([l],{autoHide:!0})}async getLinks(){try{let{doc:e}=await this.handler.getCurrentState();if(!O.hasProvider("documentLink",e.textDocument))return[];let t=this.tokenSource=new uu.CancellationTokenSource,i=await O.getDocumentLinks(e.textDocument,t.token);return t.token.isCancellationRequested?[]:i}catch{return[]}}async openLink(e){if(!e.target)throw new Error("Failed to resolve link target");await y.openResource(e.target)}async getCurrentLink(){let e=await this.getLinks(),t=await k.getCursorPosition();if(e&&e.length){for(let a of e)if(ht(t,a.range)==0){if(!a.target){let l=this.tokenSource=this.tokenSource||new uu.CancellationTokenSource;if(a=await O.resolveDocumentLink(a,this.tokenSource.token),!a.target||l.token.isCancellationRequested)continue}return a}}let i=await this.nvim.call("getline",["."]),r=/\w+?:\/\/[^)\]'" ]+/g,o,s;for(;(o=r.exec(i))!==null;){let a=o.index;if(a<=t.character&&a+o[0].length>=t.character){s=uu.DocumentLink.create(uu.Range.create(t.line,a,t.line,a+o[0].length),o[0]);break}}return s}async openCurrentLink(){let e=await this.getCurrentLink();return e?(await this.openLink(e),!0):!1}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=null)}dispose(){var e;(e=this.floatFactory)==null||e.dispose(),J(this.disposables)}};var Wr=x(q());De();Se();Zf();K();var xrt=H()("handler-hover"),tC=class{constructor(e,t){this.nvim=e;this.handler=t}async request(e,t){let{doc:i,position:r}=await this.handler.getCurrentState();return this.handler.checkProvier(e,i.textDocument),await i.synchronize(),await this.handler.withRequestToken(e,o=>t(i.textDocument,r,o),!0)}async definitions(){let{doc:e,position:t}=await this.handler.getCurrentState();this.handler.checkProvier("definition",e.textDocument),await e.synchronize();let i=new Wr.CancellationTokenSource;return O.getDefinition(e.textDocument,t,i.token)}async declarations(){let{doc:e,position:t}=await this.handler.getCurrentState();this.handler.checkProvier("declaration",e.textDocument),await e.synchronize();let i=new Wr.CancellationTokenSource;return O.getDeclaration(e.textDocument,t,i.token)}async typeDefinitions(){let{doc:e,position:t}=await this.handler.getCurrentState();this.handler.checkProvier("typeDefinition",e.textDocument),await e.synchronize();let i=new Wr.CancellationTokenSource;return O.getTypeDefinition(e.textDocument,t,i.token)}async implementations(){let{doc:e,position:t}=await this.handler.getCurrentState();this.handler.checkProvier("implementation",e.textDocument),await e.synchronize();let i=new Wr.CancellationTokenSource;return O.getImplementation(e.textDocument,t,i.token)}async references(e){let{doc:t,position:i}=await this.handler.getCurrentState();this.handler.checkProvier("reference",t.textDocument),await t.synchronize();let r=new Wr.CancellationTokenSource;return O.getReferences(t.textDocument,{includeDeclaration:!e},i,r.token)}async gotoDefinition(e){let t=await this.request("definition",(i,r,o)=>O.getDefinition(i,r,o));return await this.handleLocations(t,e),t?t.length>0:!1}async gotoDeclaration(e){let t=await this.request("declaration",(i,r,o)=>O.getDeclaration(i,r,o));return await this.handleLocations(t,e),t?Array.isArray(t)?t.length>0:!0:!1}async gotoTypeDefinition(e){let t=await this.request("typeDefinition",(i,r,o)=>O.getTypeDefinition(i,r,o));return await this.handleLocations(t,e),t?t.length>0:!1}async gotoImplementation(e){let t=await this.request("implementation",(i,r,o)=>O.getImplementation(i,r,o));return await this.handleLocations(t,e),t?t.length>0:!1}async gotoReferences(e,t=!0){let i=await this.request("reference",(r,o,s)=>O.getReferences(r,{includeDeclaration:t},o,s));return await this.handleLocations(i,e),i?i.length>0:!1}async getTagList(){let{doc:e,position:t}=await this.handler.getCurrentState(),i=await this.nvim.call("expand","");if(!i||!O.hasProvider("definition",e.textDocument))return null;let r=new Wr.CancellationTokenSource,o=await O.getDefinition(e.textDocument,t,r.token);return!o||!o.length?null:o.map(s=>{let a=B.parse(s.uri),l=a.scheme=="file"?a.fsPath:a.toString();return{name:i,cmd:`keepjumps ${s.range.start.line+1} | normal ${s.range.start.character+1}|`,filename:l}})}async findLocations(e,t,i,r){let{doc:o,position:s}=await this.handler.getCurrentState();i=i||{},Object.assign(i,{textDocument:{uri:o.uri},position:s});let a=await Mi.sendRequest(e,t,i);a=a||[];let l=[];if(Array.isArray(a))l=a;else if(a.hasOwnProperty("location")&&a.hasOwnProperty("children")){let u=c=>{if(l.push(c.location),c.children&&c.children.length)for(let h of c.children)u(h)};u(a)}return await this.handleLocations(l,r),l?l.length>0:!1}async handleLocations(e,t){if(!e)return;let i=Array.isArray(e)?e:[e];i=i.map(o=>Wr.LocationLink.is(o)?Wr.Location.create(o.targetUri,o.targetRange):o);let r=i.length;if(r!=0)if(r==1&&t!==!1){let{uri:o,range:s}=i[0];await y.jumpTo(o,s.start,t)}else await y.showLocations(i)}dispose(){}};var Oh=x(q());De();ge();Se();V();$e();Ar();K();var Ah=x(_g()),hp=x(require("path")),Qe=x(q());Sc();De();ra();V();$e();es();no();Vt();wt();_e();Ar();Ee();K();Vt();var iC=class{constructor(){this.stack=[]}add(e){let t=new Map;for(let i of e)t.set(i.lnum,i);this.stack.push(t)}checkInsert(e){if(!this.stack.length)return;let t=this.stack[this.stack.length-1],i=Array.from(t.keys()).sort((r,o)=>r-o);if(!!Me(i,e))return this.stack.pop(),Array.from(t.values())}};var jTe=H()("handler-refactorBuffer"),Zr="\u3000",nC=class{constructor(e,t,i,r,o){this.bufnr=e;this.srcId=t;this.nvim=i;this.config=r;this.opts=o;this._disposed=!1;this._fileItems=[];this.mutex=new ei;this.disposables=[];this.matchIds=new Set;this.changing=!1;this.changes=new iC,this.disposables.push(y.registerLocalKeymap("n","",this.splitOpen.bind(this),!0)),r.showMenu&&this.disposables.push(y.registerLocalKeymap("n",r.showMenu,this.showMenu.bind(this),!0)),y.onDidChangeTextDocument(this.onDocumentChange,this,this.disposables)}async showMenu(){let e=await k.showMenuPicker(["Tab open","Remove block"]);if(e==-1)return;let t=await this.searchCurrentRange();if(!!t){if(e==0){let r=(await this.nvim.eval("strpart(getline('.'), 0 ,col('.') - 1)")).length,o=this.getAbsolutePath(t.filepath);this.nvim.call("coc#util#jump",["tabe",o,[t.line,r]],!0)}if(e==1){let i=this.getDeleteRange(t);await this.document.applyEdits([Qe.TextEdit.del(i)])}}}get fileItems(){return this._fileItems}getFileItem(e){let t=B.parse(e).fsPath;return this._fileItems.find(i=>ii(i.filepath,t))}getFileRange(e){for(let t of this._fileItems)for(let i of t.ranges)if(i.lnum==e)return Object.assign(zi(i,["highlights"]),{filepath:t.filepath});throw new Error(`File range not found at lnum: ${e}`)}onChange(e){if(this.changing)return;if(e.contentChanges.length===0){this.highlightLineNr(),this.nvim.redrawVim();return}let{nvim:t}=this;e=OTe(e);let i=e.contentChanges[0],{original:r}=e;i.range.end.line>2&&t.call("setbufvar",[e.bufnr,"&modified",1],!0);let{range:o,text:s}=i;if(na(Qe.TextEdit.replace(o,s))==0)return;let l=[Qe.TextEdit.replace(o,s)],u=[];if(!Tt(o)&&!s.includes("\u3000")){let c=o.start.line,h=[],d=r.split(/\r?\n/);for(let g=0;g1&&f.includes("\u3000")&&h.push(c+g+1)}if(h.length){let g=h.map(f=>this.getFileRange(f));for(let f of this._fileItems)f.ranges=f.ranges.filter(p=>!h.includes(p.lnum));this.changes.add(g)}}else if(Tt(o)&&s.includes("\u3000")){let c=s.split(/\r?\n/),h=[],d=o.start.line;for(let g=0;g1&&f.includes("\u3000")&&h.push(d+g+1)}if(h.length){let g=this.changes.checkInsert(h);g&&(u=g)}}else s.includes("\u3000")&&(l=this.diffChanges(r,s),l.forEach(c=>{c.range=H2(c.range,o.start)}));this.adjustLnums(l),t.pauseNotification(),this.highlightLineNr(),t.resumeNotification(!0,!0),u.length&&u.forEach(c=>{this._fileItems.find(d=>d.filepath==c.filepath).ranges.push(c)})}diffChanges(e,t){let i=[],r=(0,Ah.default)(e,t),o=0,s=In.create("file:///1","",0,e);for(let a=0;a=c.start+c.lines.length)continue;if(r.end.line!l.includes(c))),this._fileItems=this._fileItems.filter(u=>u.ranges&&u.ranges.length>0),a.length&&(this.adjustLnums(a),this.changing=!0,await this.document.applyEdits(a),this.changing=!1),this.nvim.pauseNotification(),this.highlightLineNr(),this.buffer.setOption("modified",!1,!0),await this.nvim.resumeNotification(!0)}adjustLnums(e){for(let t of this._fileItems)for(let i of t.ranges){let r=i.lnum-1;i.lnum+=GT(Qe.Position.create(r,0),e)}}async getFileChanges(){let e=[],t=await this.buffer.lines;t.push(Zr);let i=[],r,o;for(let s=0;s1){let l=a.match(/^\u3000(.*)/);l&&(r=this.getAbsolutePath(l[1].replace(/\s+$/,"")),o=s+1,i=[])}}else i.push(a)}return e}async splitOpen(){let{nvim:e}=this,i=await e.createWindow(this.opts.fromWinid).valid,o=(await e.eval("strpart(getline('.'), 0 ,col('.') - 1)")).length,s=await this.searchCurrentRange();if(s){let a=this.getAbsolutePath(s.filepath);e.pauseNotification(),i?(e.call("win_gotoid",[this.opts.fromWinid],!0),this.nvim.call("coc#util#jump",["edit",a,[s.line,o]],!0)):this.nvim.call("coc#util#jump",["belowright vs",a,[s.line,o]],!0),e.command("normal! zz",!0),await e.resumeNotification(!0),i||(this.opts.fromWinid=await e.call("win_getid"))}}async searchCurrentRange(){let{nvim:e}=this,t=await e.eval('getline(1,line("."))'),i=t.length;for(let r=0;rATe(S,p)));let{lines:m,start:v,end:w,highlights:D}=d;m||(m=await this.getLines(c.filepath,v,w)),h.push({lines:m,lnum:g,start:v,highlights:D}),s.addLines(m)}if(h.length){let d={filepath:c.filepath,ranges:h},g=this._fileItems.find(f=>f.filepath==c.filepath);g?g.ranges.push(...d.ranges):this._fileItems.push(d)}}let{nvim:l,buffer:u}=this;if(this.changing=!0,l.pauseNotification(),s.render(u,o),this.highlightLineNr(),u.setOption("modified",!1,!0),u.setOption("undolevels",1e3,!0),o==2&&a.length){let c=a[0].start;l.call("coc#cursor#move_to",[c.line,c.character],!0)}await l.resumeNotification(!0),await i.patchChange(),this.changing=!1,await k.cursors.addRanges(a)}catch(o){this.changing=!1,jTe.error("Error on add file item:",o)}r()}findRange(e,t){let r=this.fileItems.find(o=>ii(this.getAbsolutePath(o.filepath),e)).ranges.find(o=>o.lnum==t);if(!r)throw new Error(`File range not found at lnum: ${t}`);return r}async save(){let{nvim:e}=this,t=this.document,{buffer:i}=t;await t.patchChange();let r=await this.getFileChanges();if(!r)return;r.sort((a,l)=>a.lnum-l.lnum);let o=[];for(let a=0;a0&&a.ranges.forEach(c=>{c.start+=GT(Qe.Position.create(c.start,0),u)})}return e.pauseNotification(),i.setOption("modified",!1,!0),this.config.saveToFile&&e.command("silent noa wa",!0),this.highlightLineNr(),await e.resumeNotification(),!0}async getLines(e,t,i){let r=B.file(e).toString(),o=y.getDocument(r);return o?o.getLines(t,i):await ta(e,t,i-1)}getAbsolutePath(e){return hp.default.isAbsolute(e)?e:hp.default.join(this.opts.cwd,e)}highlightLineNr(){let{fileItems:e,nvim:t,srcId:i,bufnr:r}=this,{winid:o,cwd:s}=this.opts,a={};if(i){t.call("nvim_buf_clear_namespace",[r,i,0,-1],!0);for(let l of e)for(let u of l.ranges){let c=u.start+u.lines.length,h=`${u.start+1}:${c}`;a[u.lnum]=[u.start+1,c],t.call("nvim_buf_set_virtual_text",[r,i,u.lnum-1,[[h,"LineNr"]],{}],!0)}}else{this.matchIds.size&&(t.call("coc#highlight#clear_matches",[o,Array.from(this.matchIds)],!0),this.matchIds.clear());let l=2e3;for(let u of e){let c=`${s?hp.default.relative(s,u.filepath):u.filepath}`,h=G(c)+1;for(let d of u.ranges){let g=d.start+d.lines.length,f=`:${d.start+1}:${g}`;for(let p=0;p1?u[u.length-2]:"";if(c==""&&d.startsWith(Zr)&&h==d&&s.start.character==0&&s.end.character==0){r=h+` -`+u.slice(0,-2).join(` -`)+` -`;let{start:g,end:f}=s;l[0].range=Qe.Range.create(g.line-1,0,f.line-1,0)}}else if(Tt(s)&&s.start.character!=0){let u=a.split(/\r?\n/),c=u[u.length-1],h=o[s.start.line].slice(0,s.start.character);if(c.startsWith(Zr)&&h==c){l[0].text=h+u.slice(0,-1).join(` -`)+` -`;let{start:d,end:g}=s;l[0].range=Qe.Range.create(d.line,0,g.line,0)}}return{contentChanges:l,bufnr:t,textDocument:i,original:r,originalLines:o}}var Fte=require("child_process"),Ite=require("events"),hR=x(require("path")),jte=x(require("readline"));Kr();ra();fc();no();Ee();var MTe=H()("handler-search"),NTe=["--color","ansi","--colors","path:fg:black","--colors","line:fg:green","--colors","match:fg:red","--no-messages","--heading","-n"],BTe="\x1B",Ate=class extends Ite.EventEmitter{start(e,t,i){this.process=(0,Fte.spawn)(e,t,{cwd:i}),this.process.on("error",c=>{this.emit("error",c.message)});let r=jte.default.createInterface(this.process.stdout),o,s,a=[],l=[],u=!0;r.on("line",c=>{if(c.includes(BTe)){let h=ug(c);if(h[0].foreground=="black"){s={filepath:hR.default.join(i,h[0].text),ranges:[]};return}if(h[0].foreground=="green"){let g=parseInt(h[0].text,10)-1,f=h[0].text.length+1;u&&(o=g,u=!1);let p="";for(let v of h){if(v.foreground=="red"){let w=g-o,D=p.length-f;l.push(He.create(w,D,w,D+v.text.length))}p+=v.text}let m=p.slice(f);a.push(m)}}else{let h=c.trim().length==0;s&&(h||c.trim()=="--")&&s.ranges.push({lines:a,highlights:l,start:o}),h&&(this.emit("item",s),s=null),a=[],l=[],u=!0}}),r.on("close",()=>{s&&(a.length&&s.ranges.push({lines:a,highlights:l,start:o}),this.emit("item",s)),a=l=s=null,this.emit("end")})}dispose(){this.process&&this.process.kill()}},rC=class{constructor(e,t="rg"){this.nvim=e;this.cmd=t}run(e,t,i){let{nvim:r,cmd:o}=this,{afterContext:s,beforeContext:a}=i.config,l=["-A",s.toString(),"-B",a.toString()].concat(NTe,e),u=HTe(e);u&&l.pop(),l.push("--",u?hR.default.isAbsolute(u)?u:`./${u.replace(/^\.\//,"")}`:"./"),this.task=new Ate,this.task.start(o,l,t);let c=new ei,h=0,d=0,g=Date.now(),f=[],p=async()=>{if(f.length==0)return;let m=f.slice();f=[];let v=await c.acquire();try{await i.addFileItems(m)}catch(w){MTe.error(w)}v()};return new Promise((m,v)=>{let w=setInterval(p,300);this.task.on("item",async D=>{h++,d=d+D.ranges.reduce((S,L)=>S+L.highlights.length,0),f.push(D)}),this.task.on("error",D=>{clearInterval(w),k.showMessage(`Error on command "${o}": ${D}`,"error"),this.task=null,v(new Error(D))}),this.task.on("end",async()=>{clearInterval(w);try{await p(),(await c.acquire())(),this.task.removeAllListeners(),this.task=null;let S=i.buffer;if(S){if(r.pauseNotification(),h==0)S.setLines(["No match found"],{start:1,end:2,strictIndexing:!1},!0),S.addHighlight({line:1,srcId:-1,colEnd:-1,colStart:0,hlGroup:"Error"}),S.setOption("modified",!1,!0);else{let L=new Ri;L.addText("Files","MoreMsg"),L.addText(": "),L.addText(`${h} `,"Number"),L.addText("Matches","MoreMsg"),L.addText(": "),L.addText(`${d} `,"Number"),L.addText("Duration","MoreMsg"),L.addText(": "),L.addText(`${Date.now()-g}ms`,"Number"),L.render(S,1,2)}S.setOption("modified",!1,!0),r.resumeNotification(!1,!0)}}catch(D){v(D);return}m()})})}abort(){var e;(e=this.task)==null||e.dispose()}};function HTe(n){if(n.length<2)return;let e=n.length;if(!n[e-1].startsWith("-")&&!n[e-2].startsWith("-"))return n[e-1]}var fot=H()("handler-refactor"),qTe="__coc_refactor__",YTe=0,oC=class{constructor(e,t){this.nvim=e;this.handler=t;this.buffers=new Map;this.disposables=[];this._onCreate=new Oh.Emitter;this.onCreate=this._onCreate.event;this.setConfiguration(),y.onDidChangeConfiguration(this.setConfiguration,this,this.disposables),P.on("BufUnload",i=>{let r=this.buffers.get(i);r&&(r.dispose(),this.buffers.delete(i))},null,this.disposables),y.onDidChangeTextDocument(i=>{let r=this.buffers.get(i.bufnr);r&&r.onChange(i)},null,this.disposables)}async init(){y.isNvim&&this.nvim.hasFunction("nvim_create_namespace")&&(this.srcId=await this.nvim.createNamespace("coc-refactor"))}has(e){return this.buffers.has(e)}setConfiguration(e){if(e&&!e.affectsConfiguration("refactor"))return;let t=y.getConfiguration("refactor");this.config=Object.assign(this.config||{},{afterContext:t.get("afterContext",3),beforeContext:t.get("beforeContext",3),openCommand:t.get("openCommand","edit"),saveToFile:t.get("saveToFile",!0),showMenu:t.get("showMenu","")})}async doRefactor(){let{doc:e,position:t}=await this.handler.getCurrentState();if(!O.hasProvider("rename",e.textDocument))throw new Error("Rename provider not found for current buffer");await e.synchronize();let i=await this.handler.withRequestToken("refactor",async r=>{let o=await O.prepareRename(e.textDocument,t,r);if(r.isCancellationRequested)return null;if(o===!1)throw new Error("Provider returns null on prepare, unable to rename at current position");let s=await O.provideRenameEdits(e.textDocument,t,"NewName",r);if(r.isCancellationRequested)return null;if(!s)throw new Error("Provider returns null for rename edits.");return s});i&&await this.fromWorkspaceEdit(i,e.filetype)}async search(e){let t=await this.createRefactorBuffer(),i=await this.nvim.call("getcwd",[]);await new rC(this.nvim).run(e,i,t)}async save(e){let t=this.buffers.get(e);if(t)return await t.save()}getBuffer(e){return this.buffers.get(e)}async createRefactorBuffer(e,t=!1){let{nvim:i}=this,[r,o]=await i.eval("[win_getid(),getcwd()]"),{openCommand:s}=this.config;i.pauseNotification(),i.command(`${s} ${qTe}${YTe++}`,!0),i.command("setl buftype=acwrite nobuflisted bufhidden=wipe nofen wrap conceallevel=2 concealcursor=n",!0),i.command("setl undolevels=-1 nolist nospell noswapfile foldmethod=expr foldexpr=coc#util#refactor_foldlevel(v:lnum)",!0),i.command("setl foldtext=coc#util#refactor_fold_text(v:foldstart)",!0),i.call("setline",[1,["Save current buffer to make changes",Zr]],!0),i.call("matchadd",["Comment","\\%1l"],!0),i.call("matchadd",["Conceal","^\\%u3000"],!0),i.call("matchadd",["Label","^\\%u3000\\zs\\S\\+"],!0),i.command("setl nomod",!0),e&&i.command(`runtime! syntax/${e}.vim`,!0),i.call("coc#util#do_autocmd",["CocRefactorOpen"],!0),await i.resumeNotification();let[a,l]=await i.eval('[bufnr("%"),win_getid()]'),u={fromWinid:r,winid:l,cwd:o};await y.document;let c=new nC(a,t?void 0:this.srcId,this.nvim,this.config,u);return this.buffers.set(a,c),c}async fromLines(e){let t=await this.createRefactorBuffer();return await t.buffer.setLines(e,{start:0,end:-1,strictIndexing:!1}),t}async fromLocations(e,t){if(!e||e.length==0)return;let i={},r={changes:i};for(let o of e){let s=i[o.uri]||[];s.push({range:o.range,newText:""}),i[o.uri]=s}return await this.fromWorkspaceEdit(r,t)}async fromWorkspaceEdit(e,t){if(!e||AY(e))return;let i=[],{beforeContext:r,afterContext:o}=this.config,{changes:s,documentChanges:a}=e;if(!s){s={};for(let u of a||[])if(Oh.TextDocumentEdit.is(u)){let{textDocument:c,edits:h}=u;s[c.uri]=h}}for(let u of Object.keys(s)){let c=await this.getLineCount(u),h=s[u],d=[],g=null,f=null,p=[];h.sort((m,v)=>m.range.start.line-v.range.start.line);for(let m of h){let{line:v}=m.range.start,w=Math.max(0,v-r);g!=null&&w({range:s,newText:r}))}}}async rename(e){let{doc:t,position:i}=await this.handler.getCurrentState();this.handler.checkProvier("rename",t.textDocument),await t.synchronize();let r=new dp.CancellationTokenSource().token,o=await O.prepareRename(t.textDocument,i,r);if(o===!1)return k.showWarningMessage("Invalid position for rename"),!1;let s;if(!e){dp.Range.is(o)?(s=t.textDocument.getText(o),await k.moveTo(o.start)):o&&typeof o.placeholder=="string"?s=o.placeholder:s=await this.nvim.eval('expand("")');let l=y.getConfiguration("coc.preferences");e=await k.requestInput("New name",l.get("renameFillCurrent",!0)?s:void 0)}if(e===""&&k.showWarningMessage("Empty word, rename canceled"),!e)return!1;let a=await O.provideRenameEdits(t.textDocument,i,e,r);return r.isCancellationRequested||!a?!1:(await y.applyEdit(a),this.nvim.redrawVim(),!0)}};De();var dR=x(require("fs")),Nte=x(require("path"));vo();Ir();K();tu();var Mte=H()("handler-workspace"),aC=class{constructor(e,t){this.nvim=e;this.handler=t}async openLog(){let e=Mte.logfile;await y.jumpTo(B.file(e).toString())}async doAutocmd(e,t){await y.autocmds.doAutocmd(e,t)}async getConfiguration(e){let t=await y.document;return y.getConfiguration(e,t?t.uri:void 0)}getRootPatterns(e){let t=y.getDocument(e);return t?{buffer:y.workspaceFolderControl.getRootPatterns(t,0),server:y.workspaceFolderControl.getRootPatterns(t,1)||[],global:y.workspaceFolderControl.getRootPatterns(t,2)}:null}async ensureDocument(){let e=await y.document;return e&&!e.isCommandLine&&e.attached}async doKeymap(e,t="",i){return await y.keymaps.doKeymap(e,t,i)}async snippetCheck(e,t){if(e&&!ve.has("coc-snippets"))return this.nvim.echoError("coc-snippets required for check expand status!"),!1;if(t&&Ut.jumpable())return!0;if(e){let i=ve.getExtensionApi("coc-snippets");if(i&&i.hasOwnProperty("expandable")&&await Promise.resolve(i.expandable()))return!0}return!1}async showInfo(){let e=[],t=y.version+"-7a50d4d9 2022-08-01 01:37:29 +0800";e.push("## versions"),e.push("");let r=(await this.nvim.call("execute",["version"])).trim().split(/\r?\n/,2)[0].replace(/\(.*\)/,"").trim();e.push("vim version: "+r+`${y.isVim?" "+y.env.version:""}`),e.push("node version: "+process.version),e.push("coc.nvim version: "+t),e.push("coc.nvim directory: "+Nte.default.dirname(__dirname)),e.push("term: "+(process.env.TERM_PROGRAM||process.env.TERM)),e.push("platform: "+process.platform),e.push(""),e.push("## Log of coc.nvim"),e.push("");let o=Mte.logfile;if(dR.default.existsSync(o)){let a=dR.default.readFileSync(o,{encoding:"utf8"});e.push(...a.split(/\r?\n/))}await this.nvim.command("vnew +setl\\ buftype=nofile\\ bufhidden=wipe\\ nobuflisted"),await(await this.nvim.buffer).setLines(e,{start:0,end:-1,strictIndexing:!1})}};var gR=x(q());Se();Vt();wt();Ee();var lC=class{constructor(e,t){this.nvim=e;this.handler=t;this.selectionRange=null}async getSelectionRanges(){let{doc:e,position:t}=await this.handler.getCurrentState();return this.handler.checkProvier("selectionRange",e.textDocument),await e.synchronize(),await this.handler.withRequestToken("selection ranges",r=>O.getSelectionRanges(e.textDocument,[t],r))}async selectRange(e,t){let{nvim:i}=this,{doc:r}=await this.handler.getCurrentState();this.handler.checkProvier("selectionRange",r.textDocument);let o=[];if(!t&&(!this.selectionRange||!e))return;if(e){let u=await k.getSelectedRange(e);o.push(u.start,u.end)}else{let u=await k.getCursorPosition();o.push(u)}if(!t){let u=gR.Range.create(o[0],o[1]),{selectionRange:c}=this;for(;c&&c.parent&&!Me(c.parent.range,u);)c=c.parent;c&&c.parent&&await k.selectRange(c.range);return}await r.synchronize();let s=await this.handler.withRequestToken("selection ranges",u=>O.getSelectionRanges(r.textDocument,o,u));if(!s||s.length==0)return;await i.eval("mode()")!="n"&&await i.eval(`feedkeys("\\", 'in')`);let l;if(s.length==1)l=s[0];else{let u=o[1]||o[0],c=gR.Range.create(o[0],u);for(l=s[0];l;){if(Me(c,l.range)){l=l.parent;continue}if(ht(o[0],l.range)==0&&ht(u,l.range)==0)break;l=l.parent}}!l||(this.selectionRange=s[0],await k.selectRange(l.range))}};var Bte=x(require("path")),ms=x(q());De();wi();ge();Se();q_();LD();V();es();K();var est=H()("Handler-callHierarchy");function WTe(n){return!!(n&&n.name&&n.kind&&ms.Range.is(n.range)&&n.uri)}var Po=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.highlightWinids=new Set;this.loadConfiguration(),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),this.disposables.push(oe.registerCommand(Po.commandId,async(i,r,o)=>{var l;let{nvim:s}=this;await s.call("win_gotoid",[i]),await y.jumpTo(r.uri,r.selectionRange.start,o);let a=await s.window;if(a.clearMatchGroup(Po.rangesHighlight),a.highlightRanges(Po.rangesHighlight,[r.selectionRange],10,!0),!!((l=r.ranges)!=null&&l.length)){if(r.sourceUri){let u=y.getDocument(r.sourceUri);if(!u)return;let c=await s.call("coc#compat#buf_win_id",[u.bufnr]);if(c==-1)return;c!=a.id&&(a=s.createWindow(c),a.clearMatchGroup(Po.rangesHighlight))}a.highlightRanges(Po.rangesHighlight,r.ranges,100,!0),this.highlightWinids.add(a.id)}},null,!0)),P.on("BufWinEnter",(i,r)=>{this.highlightWinids.has(r)&&(this.highlightWinids.delete(r),e.createWindow(r).clearMatchGroup(Po.rangesHighlight))},null,this.disposables)}loadConfiguration(e){if(!e||e.affectsConfiguration("callHierarchy")){let t=y.getConfiguration("callHierarchy");this.config={splitCommand:t.get("splitCommand"),openCommand:t.get("openCommand"),enableTooltip:t.get("enableTooltip")}}}createProvider(e,t,i,r){let o=new ms.Emitter,s,a,l=()=>{s&&(s.cancel(),s.dispose(),s=null)},u=(h,d)=>{let g=h.children;if(!Array.isArray(g))return;if(g.find(p=>p==d))return h;for(let p of g){let m=u(p,d);if(m)return m}},c={kind:r,onDidChangeTreeData:o.event,getTreeItem:h=>{var g;let d=new To(h.name,h.children?2:1);return this.config.enableTooltip&&(d.tooltip=Bte.default.relative(y.cwd,B.parse(h.uri).fsPath)),d.description=h.detail,d.deprecated=(g=h.tags)==null?void 0:g.includes(ms.SymbolTag.Deprecated),d.icon=this.handler.getIcon(h.kind),d.command={command:Po.commandId,title:"open location",arguments:[t,h,this.config.openCommand]},d},getChildren:async h=>{l(),s=new ms.CancellationTokenSource;let{token:d}=s;if(!h){if(!a&&(a=await this.prepare(e,i,d),!(a!=null&&a.length)))return;for(let f of a){let p=await this.getChildren(e,f,c.kind,d);if(d.isCancellationRequested)break;Array.isArray(p)&&(f.children=p)}return a}if(h.children)return h.children;let g=await this.getChildren(e,h,c.kind,d);return s=null,d.isCancellationRequested?[]:(h.children=g,g)},resolveActions:()=>[{title:"Open in new tab",handler:async h=>{await oe.executeCommand(Po.commandId,t,h,"tabe")}},{title:"Show Incoming Calls",handler:h=>{a=[zi(h,["children","ranges","sourceUri"])],c.kind="incoming",o.fire(void 0)}},{title:"Show Outgoing Calls",handler:h=>{a=[zi(h,["children","ranges","sourceUri"])],c.kind="outgoing",o.fire(void 0)}},{title:"Dismiss",handler:async h=>{let d;for(let f of a)if(d=u(f,h),d)break;if(!d)return;let g=d.children.findIndex(f=>f===h);d.children.splice(g,1),o.fire(d)}}],dispose:()=>{l(),o.dispose(),a=void 0,o=void 0}};return c}async getChildren(e,t,i,r){let o=[];if(i=="incoming"){let s=await O.provideIncomingCalls(e,t,r);s&&(o=s.map(a=>Object.assign(a.from,{ranges:a.fromRanges})))}else{let s=await O.provideOutgoingCalls(e,t,r);s&&(o=s.map(a=>Object.assign(a.to,{ranges:a.fromRanges,sourceUri:t.uri})))}return o}async prepare(e,t,i){this.handler.checkProvier("callHierarchy",e);let r=await O.prepareCallHierarchy(e,t,i);return WTe(r)?[r]:r}async getCallHierarchyItems(e,t){let{doc:i,position:r}=await this.handler.getCurrentState(),o=new ms.CancellationTokenSource;if(!e){await i.synchronize();let a=await this.prepare(i.textDocument,r,o.token);if(e=a?a[0]:void 0,!a)return}let s=t=="incoming"?"provideIncomingCalls":"provideOutgoingCalls";return await O[s](i.textDocument,e,o.token)}async getIncoming(e){return await this.getCallHierarchyItems(e,"incoming")}async getOutgoing(e){return await this.getCallHierarchyItems(e,"outgoing")}async showCallHierarchyTree(e){let{doc:t,position:i,winid:r}=await this.handler.getCurrentState();await t.synchronize();let o=this.createProvider(t.textDocument,r,i,e),s=new su("calls",{treeDataProvider:o});s.title=`${e.toUpperCase()} CALLS`,o.onDidChangeTreeData(a=>{a||(s.title=`${o.kind.toUpperCase()} CALLS`)}),s.onDidChangeVisibility(a=>{a.visible||o.dispose()}),this.disposables.push(s),await s.show(this.config.splitCommand)}dispose(){this.highlightWinids.clear(),J(this.disposables)}},Mh=Po;Mh.commandId="callHierarchy.reveal",Mh.rangesHighlight="CocSelectedRange";wi();ge();Se();$o();ra();V();so();_e();K();var Hte=x(Ei()),Jr=x(q());Se();var cu=class{constructor(){this.ranges=[]}get current(){let e=[];return this.ranges.sort((t,i)=>t[0]-i[0]),this.ranges.forEach(t=>{e.push(t[0],t[1])}),e}clear(){this.ranges=[]}add(e,t){e>t&&([e,t]=[t,e]);let{ranges:i}=this;if(i.length==0)i.push([e,t]);else{i.sort((l,u)=>l[0]-u[0]);let r,o,s=[];for(let l=0;lt||(s.push(l),r==null&&(r=Math.min(e,u[0])),o=Math.max(t,u[1]))}let a=s.length?i.filter((l,u)=>!s.includes(u)):i;this.ranges=a,r!=null&&o!=null?this.ranges.push([r,o]):this.ranges.push([e,t])}}has(e,t){return this.ranges.findIndex(r=>r[0]<=e&&r[1]>=t)!==-1}static mergeSpans(e){let t=[];for(let i of e){let r=t.findIndex(o=>!(i[1]o[1]));if(r==-1)t.push(i);else{let o=t[r];t[r]=[Math.min(i[0],o[0]),Math.max(i[1],o[1])]}}return t}};V();_e();Ee();K();var fst=H()("semanticTokens-buffer"),ZTe=15,Nh="CocSem",_o="semanticTokens",JTe=50,uC=class{constructor(e,t,i){this.nvim=e;this.doc=t;this.config=i;this._dirty=!1;this.regions=new cu;this._onDidRefresh=new Jr.Emitter;this.onDidRefresh=this._onDidRefresh.event;this.highlight=(0,Hte.default)(()=>{this.doHighlight()},JTe),this.highlight()}get bufnr(){return this.doc.bufnr}onChange(){this.highlight()}onTextChange(){this.cancel()}async forceHighlight(){this.previousResults=void 0,this._highlights=void 0,this.clearHighlight(),this.cancel(),await this.doHighlight(!0)}async onShown(){if(this.shouldRangeHighlight)return;let{doc:e}=this;e.dirty||e.version===this._version||await this.doHighlight(!1,!0)}get hasProvider(){let{textDocument:e}=this.doc;return O.hasProvider("semanticTokens",e)||O.hasProvider("semanticTokensRange",e)}get hasLegend(){let{textDocument:e}=this.doc;return O.getLegend(e)!=null||O.getLegend(e,!0)!=null}get rangeProviderOnly(){let{textDocument:e}=this.doc;return!O.hasProvider("semanticTokens",e)&&O.hasProvider("semanticTokensRange",e)}get shouldRangeHighlight(){let{textDocument:e}=this.doc;return O.hasProvider("semanticTokensRange",e)&&this.previousResults==null}get lineCount(){return this.doc.lineCount}get highlights(){if(!!this._highlights&&this._highlights[0]==this.doc.version)return this._highlights[1]}get buffer(){return this.nvim.createBuffer(this.bufnr)}get enabled(){var e;return!this.config.filetypes.length||!y.env.updateHighlight||!((e=this.doc)!=null&&e.attached)||!this.hasLegend||!this.config.filetypes.includes("*")&&!this.config.filetypes.includes(this.doc.filetype)?!1:this.hasProvider}checkState(){if(!y.env.updateHighlight)throw new Error("Can't perform highlight update, highlight update requires vim >= 8.1.1719 or neovim >= 0.5.0");if(!this.doc.attached)throw new Error("Document not attached");let{filetypes:e}=this.config;if(!(e!=null&&e.includes("*"))&&!e.includes(this.doc.filetype))throw new Error(`Semantic tokens highlight not enabled for current filetype: ${this.doc.filetype}`);if(!this.hasProvider)throw new Error("SemanticTokens provider not found, your languageserver may not support it")}async getTokenRanges(e,t,i){let r=0,o=0,s=Date.now(),a=[];for(let l=0;lZTe){if(await Vr(),i.isCancellationRequested)break;s=Date.now()}let u=e[l],c=e[l+1],h=e[l+2],d=t.tokenTypes[e[l+3]],g=t.tokenModifiers.filter((v,w)=>e[l+4]&1<=i))continue;let u={lnum:l,hlGroup:a.hlGroup,colStart:a.range[1],colEnd:a.range[2],combine:a.combine};r.includes(a.tokenType)&&(u.end_incl=!0,u.start_incl=!0),s.push(u)}return s}async doHighlight(e=!1,t=!1){var l;if(this.cancel(),!this.enabled)return;let r=(this.tokenSource=new Jr.CancellationTokenSource).token;if(!t&&(await this.nvim.eval(`get(get(getbufinfo(${this.bufnr}),0,{}),'hidden',0)`)==1||r.isCancellationRequested))return;if(this.shouldRangeHighlight){let u=this.rangeTokenSource=new Jr.CancellationTokenSource;if(await this.doRangeHighlight(u.token),r.isCancellationRequested||this.rangeProviderOnly)return}let{doc:o}=this,s=o.version,a;if(s===((l=this.previousResults)==null?void 0:l.version))if(this._highlights&&this._highlights[0]==s)a=this._highlights[1];else{let u=this.previousResults.tokens,c=O.getLegend(o.textDocument);a=await this.getTokenRanges(u,c,r),a&&(this._highlights=[s,a])}else a=await this.requestAllHighlights(r,e),a&&(this._highlights=[s,a]);if(!(!a||r.isCancellationRequested)){if(!this._dirty||a.length<200){let u=this.toHighlightItems(a),c=await k.diffHighlights(this.bufnr,_o,u,void 0,r);if(r.isCancellationRequested||!c)return;this._dirty=!0,this._version=s;let h=this.config.highlightPriority;await k.applyDiffHighlights(this.bufnr,_o,h,c)}else this.regions.clear(),await this.highlightRegions(r);this._onDidRefresh.fire()}}async waitRefresh(){return new Promise((e,t)=>{let i=setTimeout(()=>{r.dispose(),t(new Error("Timeout after 500ms"))},500),r=this.onDidRefresh(()=>{r.dispose(),clearTimeout(i),e()})})}async doRangeHighlight(e){if(!this.enabled)return;let{version:t}=this.doc,i=await this.requestRangeHighlights(e);if(!i||e.isCancellationRequested)return;let{highlights:r,start:o,end:s}=i;if(this.rangeProviderOnly||!this.previousResults){(!this._highlights||t!==this._highlights[0])&&(this._highlights=[t,[]]);let c=this._highlights[1],h=c.reduce((d,g)=>d.add(g.range[0]),new Set);r.forEach(d=>{h.has(d.range[0])||c.push(d)})}let a=this.toHighlightItems(r),l=this.config.highlightPriority,u=await k.diffHighlights(this.bufnr,_o,a,[o,s],e);u&&(await k.applyDiffHighlights(this.bufnr,_o,l,u,!0),this._dirty=!0)}async highlightRegions(e){let{regions:t,highlights:i,config:r,lineCount:o,bufnr:s}=this;if(!i)return;let a=r.highlightPriority,l=await this.nvim.call("coc#window#visible_ranges",[s]);if(e.isCancellationRequested||l.length===0)return;let u=y.env.lines;l.forEach(c=>{let h=c[0];c[0]=Math.max(0,Math.floor(h-u*1.5)),c[1]=Math.min(o,Math.ceil(c[1]+u*1.5),h+u*2)});for(let[c,h]of cu.mergeSpans(l)){if(t.has(c,h))continue;let d=this.toHighlightItems(i,c,h),g=await k.diffHighlights(s,_o,d,[c,h],e);if(e.isCancellationRequested)break;t.add(c,h),g&&k.applyDiffHighlights(s,_o,a,g,!0)}}async onCursorMoved(){if(this.cancel(!0),!this.enabled||this.doc.dirty)return;let t=(this.rangeTokenSource=new Jr.CancellationTokenSource).token;await vt(global.__TEST__?10:100),!t.isCancellationRequested&&(this.shouldRangeHighlight?await this.doRangeHighlight(t):await this.highlightRegions(t))}async requestRangeHighlights(e){let{nvim:t,doc:i}=this,r=await t.call("coc#window#visible_range",[this.bufnr]);if(!r||e.isCancellationRequested)return null;let o=Math.min(r[0]+y.env.lines*2,r[1]),s=Jr.Range.create(r[0]-1,0,o,0),a=await O.provideDocumentRangeSemanticTokens(i.textDocument,s,e);if(!a||!Jr.SemanticTokens.is(a)||e.isCancellationRequested)return null;let l=O.getLegend(i.textDocument,!0),u=await this.getTokenRanges(a.data,l,e);return e.isCancellationRequested?null:{highlights:u,start:r[0]-1,end:r[1]}}async requestAllHighlights(e,t){let{doc:i}=this,r=O.getLegend(i.textDocument),o=O.hasSemanticTokensEdits(i.textDocument),s=t?null:this.previousResults,a=i.version,l;if(o&&(s==null?void 0:s.resultId)?l=await O.provideDocumentSemanticTokensEdits(i.textDocument,s.resultId,e):l=await O.provideDocumentSemanticTokens(i.textDocument,e),e.isCancellationRequested||l==null)return;let u=[];return Jr.SemanticTokens.is(l)?u=l.data:s&&Array.isArray(l.edits)&&(u=s.tokens,l.edits.forEach(c=>{var h;u.splice(c.start,c.deleteCount?c.deleteCount:0,...(h=c.data)!=null?h:[])})),this.previousResults={resultId:l.resultId,tokens:u,version:a},await this.getTokenRanges(u,r,e)}clearHighlight(){this.buffer.clearNamespace(_o)}abandonResult(){this.previousResults=void 0}cancel(e=!1){this.rangeTokenSource&&(this.rangeTokenSource.cancel(),this.rangeTokenSource.dispose(),this.rangeTokenSource=null),!e&&(this.regions.clear(),this.highlight.clear(),this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null))}dispose(){this.cancel(),this.previousResults=void 0,this._highlights=void 0,this._onDidRefresh.dispose(),this.regions.clear()}};var Est=H()("semanticTokens"),cC="Statement",hC=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.loadConfiguration(),this.floatFactory=new ci(e),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),oe.register({id:"semanticTokens.checkCurrent",execute:async()=>{await this.showHighlightInfo()}},!1,"show semantic tokens highlight information of current buffer"),oe.register({id:"semanticTokens.refreshCurrent",execute:()=>this.highlightCurrent()},!1,"refresh semantic tokens highlight of current buffer."),oe.register({id:"semanticTokens.inspect",execute:()=>this.inspectSemanticToken()},!1,"Inspect semantic token information at cursor position."),oe.register({id:"semanticTokens.clearCurrent",execute:async()=>{(await e.buffer).clearNamespace(_o,0,-1)}},!1,"clear semantic tokens highlight of current buffer"),oe.register({id:"semanticTokens.clearAll",execute:async()=>{let i=await e.buffers;for(let r of i)r.clearNamespace(_o,0,-1)}},!1,"clear semantic tokens highlight of all buffers"),this.highlighters=y.registerBufferSync(i=>new uC(this.nvim,i,this.config)),O.onDidSemanticTokensRefresh(async i=>{let r=await this.nvim.call("coc#window#bufnrs");for(let o of this.highlighters.items){let s=y.getDocument(o.bufnr);!s||!y.match(i,s.textDocument)||(o.abandonResult(),r.includes(o.bufnr)&&o.highlight())}},null,this.disposables),P.on("BufWinEnter",async i=>{let r=this.highlighters.getItem(i);r&&await r.onShown()},null,this.disposables),P.on("CursorMoved",async i=>{let r=this.highlighters.getItem(i);r&&await r.onCursorMoved()},null,this.disposables)}loadConfiguration(e){var t;if(!e||e.affectsConfiguration("semanticTokens")){let i=[];(t=this.config)!=null&&t.highlightGroups?i=this.config.highlightGroups:i=y.env.semanticHighlights||[];let r=y.getConfiguration("semanticTokens");this.config=Object.assign(this.config||{},{highlightGroups:i,filetypes:r.get("filetypes",[]),highlightPriority:r.get("highlightPriority",2048),incrementTypes:r.get("incrementTypes",[]),combinedModifiers:r.get("combinedModifiers",[])})}}async inspectSemanticToken(){var a;let e=await this.getCurrentItem();if(!e||!e.enabled){this.floatFactory.close();return}let[t,i,r]=await this.nvim.call("getcurpos",[]),s=((a=e.highlights)!=null?a:[]).find(l=>{let u=r-1;return l.range[0]===i-1&&u>=l.range[1]&&ug.hlGroup!=null).map(({hlGroup:g})=>g));for(let g of c)r.addTexts([{text:"-",hlGroup:"Comment"},{text:" "},{text:g,hlGroup:g}]);r.addLine(""),r.addLine("Tokens types that current Language Server supported:",cC),r.addLine("");let h=y.getDocument(i.bufnr),d=(l=O.getLegend(h.textDocument))!=null?l:O.getLegend(h.textDocument,!0);if(d.tokenTypes.length){for(let g of[...new Set(d.tokenTypes)]){let f=Nh+hn(g);r.addTexts([{text:"-",hlGroup:"Comment"},{text:" "},{text:f,hlGroup:f}])}r.addLine("")}else r.addLine("No token types supported","Comment"),r.addLine("");if(r.addLine("Tokens modifiers that current Language Server supported:",cC),r.addLine(""),d.tokenModifiers.length){for(let g of[...new Set(d.tokenModifiers)]){let f=Nh+hn(g);r.addTexts([{text:"-",hlGroup:"Comment"},{text:" "},{text:f,hlGroup:f}])}r.addLine("")}else r.addLine("No token modifiers exist","Comment"),r.addLine("")}catch(u){r.addLine(u instanceof Error?u.message:u.toString(),"Error")}t.pauseNotification();let s=o[0][2];r.render(t.createBuffer(s)),t.resumeNotification(!0,!0)}dispose(){this.floatFactory.dispose(),this.highlighters.dispose(),J(this.disposables)}};var gp=x(q());ge();Se();$o();V();_e();K();var Bst=H()("handler-signature"),dC=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.signatureFactory=new ci(e),this.loadConfiguration(),this.disposables.push(this.signatureFactory),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),P.on("CursorMovedI",async(i,r)=>{let o=this.lastPosition;!o||o.bufnr==i&&o.lnum==r[0]&&o.col<=r[1]||this.signatureFactory.close()},null,this.disposables),P.on(["InsertLeave","BufEnter"],()=>{var i;(i=this.tokenSource)==null||i.cancel()},null,this.disposables),P.on("TextChangedI",()=>{this.config.hideOnChange&&this.signatureFactory.close()},null,this.disposables),P.on("TextInsert",async(i,r,o)=>{if(!this.config.trigger)return;let s=this.getTextDocument(i);!s||!O.shouldTriggerSignatureHelp(s.textDocument,o)||await this._triggerSignatureHelp(s,{line:r.lnum-1,character:r.pre.length},!1)},null,this.disposables)}getTextDocument(e){let t=y.getDocument(e);if(!(!t||t.isCommandLine||!t.attached))return t}loadConfiguration(e){if(!e||e.affectsConfiguration("signature")){let t=y.getConfiguration("signature"),i=t.get("target","float");i=="float"&&!y.floatSupported&&(i="echo"),this.config={target:i,floatConfig:t.get("floatConfig",{}),trigger:t.get("enable",!0),wait:Math.max(t.get("triggerSignatureWait",500),200),preferAbove:t.get("preferShownAbove",!0),hideOnChange:t.get("hideOnTextChange",!1)}}}async triggerSignatureHelp(){let{doc:e,position:t}=await this.handler.getCurrentState();return O.hasProvider("signature",e.textDocument)?await this._triggerSignatureHelp(e,t,!0,0):!1}async _triggerSignatureHelp(e,t,i=!0,r=0){var d;(d=this.tokenSource)==null||d.cancel();let o=this.tokenSource=new gp.CancellationTokenSource,s=o.token;s.onCancellationRequested(()=>{o.dispose(),this.tokenSource=void 0});let{target:a}=this.config,l=this.timer=setTimeout(()=>{o.cancel()},this.config.wait);await e.patchChange(!0);let u=await O.getSignatureHelp(e.textDocument,t,s,{isRetrigger:this.signatureFactory.checkRetrigger(e.bufnr),triggerKind:i?gp.SignatureHelpTriggerKind.Invoked:gp.SignatureHelpTriggerKind.TriggerCharacter});if(clearTimeout(l),s.isCancellationRequested)return!1;if(!u||u.signatures.length==0)return this.signatureFactory.close(),!1;let{activeSignature:c,signatures:h}=u;if(c){let[g]=h.splice(c,1);g&&h.unshift(g)}return a=="echo"?this.echoSignature(u):await this.showSignatureHelp(e,t,u,r),!0}async showSignatureHelp(e,t,i,r){let{signatures:o,activeParameter:s}=i,a=null,l=r,u=o.reduce((g,f,p)=>{var D,S,L;let m=null,v=((D=f.activeParameter)!=null?D:typeof s=="number")?s:void 0;v===void 0&&((S=f.parameters)==null?void 0:S.length)>0&&(v=0);let w=f.label.indexOf("(");if(p==0&&typeof v=="number"){let j=(L=f.parameters)==null?void 0:L[v];if(j){let I=f.label.slice(w==-1?0:w);if(a=j.documentation,typeof j.label=="string"){let W=I.slice(0),A=W.match(new RegExp("\\b"+j.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b")),M=A?A.index:W.indexOf(j.label);M!=-1&&(m=[M+w,M+j.label.length+w])}else m=j.label}}if(m==null&&(m=[w+1,w+1]),r==l&&(r=r+m[0]+1),g.push({content:f.label,filetype:e.filetype,active:m}),a){let j=typeof a=="string"?a:a.value;j.trim().length&&g.push({content:j,filetype:ig(f.documentation)?"markdown":"txt"})}if(p==0&&f.documentation){let{documentation:j}=f,I=typeof j=="string"?j:j.value;I.trim().length&&g.push({content:I,filetype:ig(f.documentation)?"markdown":"txt"})}return g},[]),c=e.getline(t.line,!1).slice(0,t.character);this.lastPosition={bufnr:e.bufnr,lnum:t.line+1,col:G(c)+1};let h=y.getConfiguration("coc.preferences").get("excludeImageLinksInMarkdownDocument"),d=this.signatureFactory.applyFloatConfig({preferTop:this.config.preferAbove,autoHide:!1,offsetX:r,modes:["i","ic","s"],excludeImages:h},this.config.floatConfig);await this.signatureFactory.show(u,d)}echoSignature(e){var s;let{signatures:t,activeParameter:i}=e,r=y.env.columns;t=t.slice(0,y.env.cmdheight);let o=[];for(let a of t){let l=[],{label:u}=a;u=u.replace(/\n/g," "),u.length>=r-16&&(u=u.slice(0,r-16)+"...");let c=u.indexOf("(");if(c==-1)l=[{text:u,type:"Normal"}];else{l.push({text:u.slice(0,c),type:"Label"});let h=u.slice(c);if(o.length==0&&i!=null){let d=(s=a.parameters)==null?void 0:s[i];if(d){let g,f;if(typeof d.label=="string"){let p=h.slice(0),m=p.match(new RegExp("\\b"+d.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b")),v=m?m.index:p.indexOf(d.label);v==-1?l.push({text:h,type:"Normal"}):(g=v,f=v+d.label.length)}else[g,f]=d.label,g=g-c,f=f-c;g!=null&&f!=null&&(l.push({text:h.slice(0,g),type:"Normal"}),l.push({text:h.slice(g,f),type:"MoreMsg"}),l.push({text:h.slice(f),type:"Normal"}))}}else l.push({text:h,type:"Normal"})}o.push(l)}this.nvim.callTimer("coc#ui#echo_signatures",[o],!0)}dispose(){J(this.disposables),this.timer&&clearTimeout(this.timer)}};var Bh=x(q());ge();Se();V();Vt();wt();Ee();K();var $te=x(Ei()),Ma=x(q());Se();V();K();var qte=x(q());Gf();wt();function Yte(n){let e=[],t=n.slice();return t.sort(Wte),t.forEach(i=>Zte(e,i,0)),e}function Wte(n,e){let t=n.selectionRange,i=e.selectionRange;return Ce(t.start,i.start)}function Zte(n,e,t){let{name:i,selectionRange:r,detail:o,kind:s,children:a,range:l,tags:u}=e,{start:c}=r||l,h={col:c.character+1,lnum:c.line+1,text:i,level:t,kind:Co(s),range:l,selectionRange:r};if(o&&(h.detail=o),u&&u.includes(qte.SymbolTag.Deprecated)&&(h.deprecated=!0),n.push(h),a&&a.length){a.sort(Wte);for(let d of a)Zte(n,d,t+1)}}function $Te(n){return n&&!n.hasOwnProperty("location")}function Jte(n){return $Te(n[0])}var gC=class{constructor(e,t){this.bufnr=e;this.autoUpdateBufnrs=t;this.disposables=[];this._onDidUpdate=new Ma.Emitter;this.onDidUpdate=this._onDidUpdate.event;this.fetchSymbols=(0,$te.default)(()=>{this._fetchSymbols().logError()},global.hasOwnProperty("__TEST__")?10:500)}async getSymbols(){var t;let e=y.getDocument(this.bufnr);return e?(await e.patchChange(),this.autoUpdateBufnrs.add(this.bufnr),e.version==this.version&&((t=this.symbols)==null?void 0:t.length)?this.symbols:(this.cancel(),await this._fetchSymbols(),this.symbols)):[]}onChange(e){e.contentChanges.length!==0&&(this.cancel(),this.autoUpdateBufnrs.has(this.bufnr)&&this.fetchSymbols())}get textDocument(){var e;return(e=y.getDocument(this.bufnr))==null?void 0:e.textDocument}async _fetchSymbols(){let{textDocument:e}=this;if(!e)return;let{version:t}=e,i=this.tokenSource=new Ma.CancellationTokenSource,{token:r}=i,o=await O.getDocumentSymbol(e,r);if(this.tokenSource=void 0,o==null||r.isCancellationRequested)return;let s;Jte(o)?s=o:s=o.map(a=>{let l=Ma.DocumentSymbol.create(a.name,"",a.kind,a.location.range,a.location.range);return a.deprecated&&(l.tags=[Ma.SymbolTag.Deprecated]),l}),this.version=t,this.symbols=s,this._onDidUpdate.fire(s)}cancel(){this.fetchSymbols.clear(),this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource.dispose(),this.tokenSource=null)}dispose(){this.cancel(),this.symbols=void 0,this._onDidUpdate.dispose(),J(this.disposables)}};var pC=x(q());ge();Se();Ne();var Xte=x(q());wi();V();hD();function XTe(n){return n?typeof n.text=="string"&&typeof n.hlGroup=="string":!1}function UTe(n,e){return n.label===e.label&&n.deprecated===e.deprecated&&n.key===e.key}function GTe(n,e){return n.length!==e.length?!1:n.every((t,i)=>UTe(t,e[i]))}var fC=class{constructor(e){this.opts=e;this.disposables=[];this._onDidChangeTreeData=new Xte.Emitter;this.onDidChangeTreeData=this._onDidChangeTreeData.event;this.invokeCommand=`_invoke_${re()}`,this.disposables.push(oe.registerCommand(this.invokeCommand,async t=>{typeof e.handleClick=="function"?await e.handleClick(t):console.error("Handler not found")},null,!0)),typeof e.resolveActions=="function"&&(this.resolveActions=e.resolveActions.bind(this))}iterate(e,t,i,r){let o=r(e,t,i);if(o===!1)return!1;if(Array.isArray(e.children)){for(let s of e.children)if(this.iterate(s,e,i+1,r)===!1)return!1}return o}updateNodes(e,t,i,r=!0){let o=GTe(e,t),s=(a,l,u)=>{var h,d,g,f,p,m;let c=!1;for(let v of Object.keys(l))["children","key"].includes(v)||(a[v]=l[v]);if(((h=a.children)==null?void 0:h.length)&&!((d=l.children)!=null&&d.length)&&(delete a.children,c=!0),!((g=a.children)!=null&&g.length)&&((f=l.children)==null?void 0:f.length)&&(a.children=l.children,c=!0),c){u&&this._onDidChangeTreeData.fire(a);return}((p=a.children)==null?void 0:p.length)&&((m=l.children)==null?void 0:m.length)&&this.updateNodes(a.children,l.children,a,u)};if(o)for(let a=0;a!l.has(g)&&d.key==c.key):h=a.findIndex((d,g)=>!l.has(g)&&d.label==c.label),h===-1)e[u]=c;else{l.add(h);let d=a[h];s(d,c,!1),e[u]=d}}r&&this._onDidChangeTreeData.fire(i)}}update(e,t){if(!!this.data)return t?(this.data=e||[],this._onDidChangeTreeData.fire(void 0)):this.updateNodes(this.data,e||[],void 0),this.data}getTreeItem(e){var o;let t=e.label,{expandLevel:i}=this.opts,r;if(!((o=e.children)!=null&&o.length))r=new To(t);else if(i&&i>0){let s=this.getLevel(e),a=s&&s<=i?2:1;r=new To(t,a)}else r=new To(t,1);if(r.description=e.description,e.deprecated&&(r.deprecated=!0),e.tooltip&&(r.tooltip=e.tooltip),XTe(e.icon))r.icon=e.icon;else if(typeof this.opts.resolveIcon=="function"){let s=this.opts.resolveIcon(e);s&&(r.icon=s)}return r}async getChildren(e){if(e)return e.children||[];if(this.data)return this.data;let t=await Promise.resolve(this.opts.provideData());if(!Array.isArray(t))throw new Error("Unable to fetch data");return this.data=t,t}getParent(e){if(!this.data)return;let t;for(let i of this.data)if(this.iterate(i,null,0,(o,s)=>{if(o===e)return t=s,!1})===!1)break;return t}getLevel(e){if(!this.data)return;let t=0;for(let i of this.data)if(this.iterate(i,null,1,(o,s,a)=>{if(o===e)return t=a,!1})===!1)break;return t}async resolveTreeItem(e,t,i){if(typeof this.opts.resolveItem=="function"){let r=await Promise.resolve(this.opts.resolveItem(e,t,i));r&&Object.assign(e,r)}return e.command||(e.command={title:`invoke ${t.label}`,command:this.invokeCommand,arguments:[t]}),e}dispose(){this.data=[],this._onDidChangeTreeData.dispose(),typeof this.opts.onDispose=="function"&&this.opts.onDispose(),J(this.disposables)}};LD();V();wt();Ee();K();var kat=H()("symbols-outline"),mC=class{constructor(e,t,i){this.nvim=e;this.buffers=t;this.handler=i;this.treeViewList=[];this.providersMap=new Map;this.sortByMap=new Map;this.disposables=[];this.loadConfiguration(),y.onDidChangeConfiguration(this.loadConfiguration,this,this.disposables),y.onDidCloseTextDocument(async r=>{let{bufnr:o}=r,s=this.providersMap.get(o);!s||await e.call("bufloaded",[o])||(this.providersMap.delete(o),s.dispose())},null,this.disposables),k.onDidChangeActiveTextEditor(async r=>{if(!this.config.checkBufferSwitch)return;this.treeViewList.find(s=>s.visible&&s.targetTabnr==r.tabpagenr)&&(await this.showOutline(r.document.bufnr,r.tabpagenr),await e.command(`noa call win_gotoid(${r.winid})`))},null,this.disposables),P.on("CursorHold",async r=>{if(!this.config.followCursor||!this.providersMap.get(r))return;let s=await e.call("tabpagenr"),a=this.treeViewList.find(u=>u.visible&&u.targetBufnr==r&&u.targetTabnr==s);if(!a)return;let l=await k.getCursorPosition();await this.revealPosition(a,l)},null,this.disposables)}async revealPosition(e,t){let i,r=a=>{if(ht(t,a.range)!=0)return!1;if(i=a,Array.isArray(a.children)){for(let l of a.children)if(l.kind!==pC.SymbolKind.Variable&&r(l))break}return!0},o=this.providersMap.get(e.targetBufnr);if(!o)return;let s=await Promise.resolve(o.getChildren());for(let a of s)if(r(a))break;i&&await e.reveal(i)}loadConfiguration(e){if(!e||e.affectsConfiguration("outline")){let t=y.getConfiguration("outline");this.config={splitCommand:t.get("splitCommand"),switchSortKey:t.get("switchSortKey"),followCursor:t.get("followCursor"),keepWindow:t.get("keepWindow"),expandLevel:t.get("expandLevel"),autoWidth:t.get("autoWidth"),checkBufferSwitch:t.get("checkBufferSwitch"),detailAsDescription:t.get("detailAsDescription"),sortBy:t.get("sortBy"),showLineNumber:t.get("showLineNumber"),codeActionKinds:t.get("codeActionKinds")}}}convertSymbolToNode(e,t){var s;let i=[],{detailAsDescription:r,showLineNumber:o}=this.config;return r&&e.detail&&i.push(e.detail),o&&i.push(`${e.selectionRange.start.line+1}`),{label:e.name,tooltip:r?void 0:e.detail,description:i.join(" "),icon:this.handler.getIcon(e.kind),deprecated:(s=e.tags)==null?void 0:s.includes(pC.SymbolTag.Deprecated),kind:e.kind,range:e.range,selectRange:e.selectionRange,children:Array.isArray(e.children)?e.children.map(a=>this.convertSymbolToNode(a,t)).sort(t):void 0}}setMessage(e,t){let i=this.treeViewList.filter(r=>r.valid&&r.targetBufnr==e);i&&i.forEach(r=>{r.message=t})}convertSymbols(e,t){let i=this.getSortBy(e),r=(o,s)=>i==="name"?o.labelthis.convertSymbolToNode(o,r)).sort(r)}onSymbolsUpdate(e,t){let i=this.providersMap.get(e);i&&i.update(this.convertSymbols(e,t))}createProvider(e){let{nvim:t}=this,i,r=new fC({expandLevel:this.config.expandLevel,provideData:async()=>{let o=this.buffers.getItem(e);if(!o)throw new Error("Document not attached");let s=y.getDocument(e);if(!O.hasProvider("documentSymbol",s.textDocument))throw new Error("Document symbol provider not found");let a=O.getDocumentSymbolMetadata(s.textDocument);a&&a.label&&this.treeViewList.filter(c=>c.valid&&c.targetBufnr==e).forEach(c=>c.description=a.label),this.setMessage(e,"Loading document symbols");let l=await o.getSymbols();if(!l||l.length==0)throw new Error("Empty symbols returned from language server. ");return this.setMessage(e,void 0),this.convertSymbols(e,l)},handleClick:async o=>{let s=await t.call("bufwinnr",[e]);if(s==-1)return;t.pauseNotification(),t.command(`${s}wincmd w`,!0);let a=o.selectRange.start;t.call("coc#cursor#move_to",[a.line,a.character],!0),t.command("normal! zz",!0);let l=t.createBuffer(e);l.highlightRanges("outline-hover","CocHoverRange",[o.selectRange]),t.command("redraw",!0),await t.resumeNotification(),setTimeout(()=>{l.clearNamespace("outline-hover"),t.command("redraw",!0)},global.hasOwnProperty("__TEST__")?10:300)},resolveActions:async(o,s)=>{let a=await t.call("bufwinnr",[e]);if(a==-1)return;let l=y.getDocument(e);return[...(await this.handler.getCodeActions(l,s.range,this.config.codeActionKinds)).map(h=>({title:h.title,handler:async()=>{let d=s.range.start;await t.command(`${a}wincmd w`),await this.nvim.call("coc#cursor#move_to",[d.line,d.character]),await this.handler.applyCodeAction(h)}})),{title:"Visual Select",handler:async h=>{await t.command(`${a}wincmd w`),await k.selectRange(h.range)}}]},onDispose:()=>{i&&i.dispose();for(let o of this.treeViewList)o.provider===r&&o.dispose()}});return r}getSortBy(e){var t;return(t=this.sortByMap.get(e))!=null?t:this.config.sortBy}async showOutline(e,t){this.providersMap.has(e)||this.providersMap.set(e,this.createProvider(e));let i=this.treeViewList.find(o=>o.valid&&o.targetBufnr==e&&o.targetTabnr==t);if(!i){i=new su("OUTLINE",{autoWidth:this.config.autoWidth,bufhidden:"hide",enableFilter:!0,treeDataProvider:this.providersMap.get(e)});let o=this.getSortBy(e);i.description=`${o[0].toUpperCase()}${o.slice(1)}`,this.treeViewList.push(i),i.onDispose(()=>{let s=this.treeViewList.findIndex(a=>a===i);s!==-1&&this.treeViewList.splice(s,1)})}return await i.show(this.config.splitCommand)&&i.registerLocalKeymap("n",this.config.switchSortKey,async()=>{let o=["category","name","position"],s=this.getSortBy(e),a=o.map(d=>({text:d,disabled:d===s})),l=await k.showMenuPicker(a,{title:"Choose sort method"});if(l<0)return;let u=o[l];this.sortByMap.set(e,u),this.treeViewList.filter(d=>d.targetBufnr==e).forEach(d=>{d.description=`${u[0].toUpperCase()}${u.slice(1)}`});let h=this.buffers.getItem(e);h&&h.symbols&&this.onSymbolsUpdate(e,h.symbols)}),i}async show(e){let[t,i,r,o]=await this.nvim.eval('[&filetype,bufnr("%"),tabpagenr(),win_getid()]');if(t==="coctree")return;let s=await k.getCursorPosition(),a=await this.showOutline(i,r);if(e==1||e===void 0&&this.config.keepWindow)await this.nvim.command(`noa call win_gotoid(${o})`);else if(this.config.followCursor){let l=a.onDidRefrash(async()=>{l.dispose(),await this.nvim.eval("&filetype")=="coctree"&&a.visible&&await this.revealPosition(a,s)})}}has(e){return this.providersMap.has(e)}async hide(){let e=await this.nvim.call("coc#window#find",["cocViewId","OUTLINE"]);e!=-1&&await this.nvim.call("coc#window#close",[e])}dispose(){for(let e of this.treeViewList)e.dispose();this.treeViewList=[];for(let e of this.providersMap.values())e.dispose();this.providersMap.clear(),J(this.disposables)}};var bC=class{constructor(e,t){this.nvim=e;this.handler=t;this.disposables=[];this.autoUpdateBufnrs=new Set;this.buffers=y.registerBufferSync(i=>{if(i.buftype!="")return;let r=new gC(i.bufnr,this.autoUpdateBufnrs);return r.onDidUpdate(o=>{!this.outline||this.outline.onSymbolsUpdate(r.bufnr,o)}),r}),this.outline=new mC(e,this.buffers,t),P.on("CursorHold",async i=>{!this.functionUpdate||!this.buffers.getItem(i)||await this.getCurrentFunctionSymbol(i)},null,this.disposables),P.on("InsertEnter",i=>{let r=this.buffers.getItem(i);r&&r.cancel()},null,this.disposables)}get functionUpdate(){return y.getConfiguration("coc.preferences").get("currentFunctionSymbolAutoUpdate",!1)}get labels(){return y.getConfiguration("suggest").get("completionItemKindLabels",{})}async getWorkspaceSymbols(e){this.handler.checkProvier("workspaceSymbols",null);let t=new Bh.CancellationTokenSource;return await O.getWorkspaceSymbols(e,t.token)}async resolveWorkspaceSymbol(e){var i;if((i=e.location)!=null&&i.uri)return e;let t=new Bh.CancellationTokenSource;return await O.resolveWorkspaceSymbol(e,t.token)}async getDocumentSymbols(e){if(!e){let r=await y.document;if(!r||r.isCommandLine||!r.attached)return;await vt(1),e=r.bufnr}let t=this.buffers.getItem(e);if(!t)return;let i=await t.getSymbols();return i?Yte(i):void 0}async getCurrentFunctionSymbol(e){e||(e=await this.nvim.call("bufnr",["%"]));let t=y.getDocument(e);if(!t||!t.attached||!O.hasProvider("documentSymbol",t.textDocument))return;let i=await k.getCursorPosition(),r=await this.getDocumentSymbols(e),o=this.nvim.createBuffer(e);if(!r||r.length===0)return o.setVar("coc_current_function","",!0),this.nvim.call("coc#util#do_autocmd",["CocStatusChange"],!0),"";r=r.filter(a=>["Class","Method","Function","Struct"].includes(a.kind));let s="";for(let a of r.reverse())if(a.range&&ht(i,a.range)==0&&!a.text.endsWith(") callback")){s=a.text;let l=this.labels[a.kind.toLowerCase()];l&&(s=`${l} ${s}`);break}return this.functionUpdate&&(o.setVar("coc_current_function",s,!0),this.nvim.call("coc#util#do_autocmd",["CocStatusChange"],!0)),s}async selectSymbolRange(e,t,i){let{doc:r}=await this.handler.getCurrentState();this.handler.checkProvier("documentSymbol",r.textDocument);let o;if(t)o=await k.getSelectedRange(t);else{let l=await k.getCursorPosition();o=Bh.Range.create(l,l)}let s=await this.getDocumentSymbols(r.bufnr);if(!s||s.length===0){k.showMessage("No symbols found","warning");return}s=s.filter(l=>i.includes(l.kind));let a;for(let l of s.reverse())if(l.range&&!Me(l.range,o)&&Pi(o,l.range)){a=l.range;break}if(e&&a){let{start:l,end:u}=a,c=r.getline(l.line+1),h=r.getline(u.line-1);a=Bh.Range.create(l.line+1,c.match(/^\s*/)[0].length,u.line-1,h.length)}a?await k.selectRange(a):["v","V",""].includes(t)&&await this.nvim.command("normal! gv")}async showOutline(e){await this.outline.show(e)}async hideOutline(){await this.outline.hide()}hasOutline(e){return this.outline.has(e)}dispose(){this.outline.dispose(),this.buffers.dispose(),J(this.disposables)}};Gf();var Ute=x(Ei()),yC=x(q());ge();Se();wt();_e();Ee();K();var QTe=H()("handler-linkedEditing"),vC=class{constructor(e,t){this.nvim=e;this.changing=!1;this.checkPosition=(0,Ute.default)(this._checkPosition,global.__TEST__?10:100),t.addDisposable(P.on("CursorMoved",(i,r)=>{this.cancel(),this.checkPosition(i,r)})),t.addDisposable(P.on("CursorMovedI",(i,r)=>{this.cancel(),this.checkPosition(i,r)})),t.addDisposable(k.onDidChangeActiveTextEditor(()=>{this.cancel(),this.cancelEdit()})),t.addDisposable(P.on("InsertCharPre",(i,r)=>{if(r!==this.bufnr)return;let o=y.getDocument(r);this.wordPattern?new RegExp(this.wordPattern).test(i)||this.cancelEdit():o.isWord(i)||this.cancelEdit()})),t.addDisposable(y.onDidChangeTextDocument(async i=>{await this.onChange(i)}))}cancelEdit(){var e;(e=this.window)==null||e.clearMatchGroup("^CocLinkedEditing"),this.ranges=void 0,this.window=void 0,this.bufnr=void 0}async onChange(e){if(e.bufnr!==this.bufnr||this.changing||!this.ranges)return;if(e.contentChanges.length===0){this.doHighlights();return}let t=e.contentChanges[0],{text:i,range:r}=t,o=this.ranges.filter(s=>!(!Dl(r,s.range)||mb(r,s.range)&&(i.includes(` -`)||!Tt(r))));if(o.length==1&&Pi(r,o[0].range)){if(i.includes(` -`)){this.cancelEdit();return}QTe.debug("affected single range"),await this.applySingleEdit(o[0],{range:r,newText:i})}else this.cancelEdit()}async applySingleEdit(e,t){let{bufnr:i,ranges:r}=this,o=y.getDocument(i);r.filter(c=>c!==e&&c.position.line==e.position.line).forEach(c=>c.adjustFromEdit(t));let a=qD(e,t.range,t.newText),l=sp(a);r.forEach(c=>c.applyChange(a));let u=r.filter(c=>c!==e).map(c=>c.textEdit);if(this.changing=!0,await o.applyEdits(u,!0,!0),this.changing=!1,l!=0)for(let c of r){let h=ap(c,this.ranges,e);c.move(h*l)}this.doHighlights()}doHighlights(){let{window:e,ranges:t}=this;e&&t&&(this.nvim.pauseNotification(),e.clearMatchGroup("^CocLinkedEditing"),e.highlightRanges("CocLinkedEditing",t.map(i=>i.range),99,!0),this.nvim.resumeNotification(!0,!0))}_checkPosition(e,t){if(P.pumvisible||!y.isAttached(e))return;let i=y.getDocument(e);if(!y.getConfiguration("coc.preferences",i.uri).get("enableLinkedEditing",!1)||!O.hasProvider("linkedEditing",i.textDocument))return;let s=Ui(i.getline(t[0]-1),t[1]-1),a=yC.Position.create(t[0]-1,s);if(this.ranges){if(this.ranges.some(l=>ht(a,l.range)==0))return;this.cancelEdit()}this.enable(i,a)}async enable(e,t){let i=e.textDocument,o=(this.tokenSource=new yC.CancellationTokenSource).token,s=await this.nvim.window,a=await O.provideLinkedEdits(i,t,o);if(o.isCancellationRequested||!a||a.ranges.length==0)return;let l=a.ranges.map(u=>new Lh(u.start.line,u.start.character,i.getText(u)));this.wordPattern=a.wordPattern,this.bufnr=e.bufnr,this.window=s,this.ranges=l,this.doHighlights()}cancel(){this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=null)}};ge();Se();K();var Gte=x(Ei()),Hh=x(q());Se();$k();wt();var KTe=global.hasOwnProperty("__TEST__")?10:100,zTe="CocInlayHint",wC=class{constructor(e,t,i){this.nvim=e;this.doc=t;this.config=i;this.regions=new cu;this.currentHints=[];this._onDidRefresh=new Hh.Emitter;this.onDidRefresh=this._onDidRefresh.event;this.render=(0,Gte.default)(()=>{this.renderRange()},KTe),this.render()}get current(){return this.currentHints}clearCache(){this.currentHints=[],this.regions.clear(),this.render.clear()}onChange(){this.clearCache(),this.cancel(),this.render()}cancel(){this.render.clear(),this.tokenSource&&(this.tokenSource.cancel(),this.tokenSource=null)}async renderRange(){if(this.cancel(),!O.hasProvider("inlayHint",this.doc.textDocument))return;this.tokenSource=new Hh.CancellationTokenSource;let e=this.tokenSource.token,t=await this.nvim.call("coc#window#visible_range",[this.doc.bufnr]);if(t==null||this.doc.dirty||e.isCancellationRequested||this.regions.has(t[0],t[1]))return;let i=Hh.Range.create(t[0]-1,0,t[1],0),r=await O.provideInlayHints(this.doc.textDocument,i,e);r==null||e.isCancellationRequested||(this.regions.add(t[0],t[1]),this.currentHints=this.currentHints.filter(o=>ht(o.position,i)!==0),this.currentHints.push(...r),this.setVirtualText(i,r))}setVirtualText(e,t){let{nvim:i,doc:r}=this,o=this.config.srcId,s=r.buffer,a={};for(let l of t){let u=[[lv(l),zTe]];a[l.position.line]===void 0?a[l.position.line]=u:(a[l.position.line].push([" ","Normal"]),a[l.position.line].push(u[0]))}i.pauseNotification(),s.clearNamespace(o,e.start.line,e.end.line+1);for(let l of Object.keys(a))s.setExtMark(o,Number(l),0,{virt_text:a[l],virt_text_pos:"eol",hl_mode:"combine"});i.resumeNotification(!1,!0),this._onDidRefresh.fire()}clearVirtualText(){let e=this.config.srcId;this.doc.buffer.clearNamespace(e)}dispose(){this.cancel()}};var DC=class{constructor(e,t){this.config={};e.createNamespace("coc-inlayHint").then(i=>{this.config.srcId=i}),this.buffers=y.registerBufferSync(i=>{if(!!y.has("nvim-0.5.0"))return new wC(e,i,this.config)}),t.addDisposable(this.buffers),t.addDisposable(O.onDidInlayHintRefresh(async i=>{for(let r of this.buffers.items)y.match(i,r.doc.textDocument)&&(r.clearCache(),O.hasProvider("inlayHint",r.doc.textDocument)?await r.renderRange():r.clearVirtualText())})),t.addDisposable(P.on("CursorMoved",i=>{this.refresh(i)})),t.addDisposable(P.on("WinScrolled",async i=>{let r=await e.call("winbufnr",[i]);r!=-1&&this.refresh(r)}))}getItem(e){return this.buffers.getItem(e)}refresh(e){let t=this.buffers.getItem(e);t&&t.render()}};var Ylt=H()("Handler"),xC=class{constructor(e){this.nvim=e;this.disposables=[];this.requestStatusItem=k.createStatusBarItem(0,{progress:!0}),P.on(["CursorMoved","CursorMovedI","InsertEnter","InsertSnippet","InsertLeave"],()=>{this.requestTokenSource&&(this.requestTokenSource.cancel(),this.requestTokenSource=null)},null,this.disposables),this.labels=y.getConfiguration("suggest").get("completionItemKindLabels",{}),this.fold=new QD(e,this),this.links=new eC(e,this),this.codeLens=new $D(e),this.colors=new UD(e,this),this.format=new KD(e,this),this.symbols=new bC(e,this),this.refactor=new oC(e,this),this.hover=new VD(e,this),this.locations=new tC(e,this),this.signature=new dC(e,this),this.rename=new sC(e,this),this.workspace=new aC(e,this),this.codeActions=new ZD(e,this),this.commands=new GD(e,y.env),this.callHierarchy=new Mh(e,this),this.documentHighlighter=new zD(e,this),this.semanticHighlighter=new hC(e,this),this.selectionRange=new lC(e,this),this.linkedEditingHandler=new vC(e,this),this.inlayHintHandler=new DC(e,this),this.disposables.push({dispose:()=>{this.callHierarchy.dispose(),this.codeLens.dispose(),this.links.dispose(),this.refactor.dispose(),this.signature.dispose(),this.symbols.dispose(),this.hover.dispose(),this.locations.dispose(),this.colors.dispose(),this.documentHighlighter.dispose(),this.semanticHighlighter.dispose()}}),this.refactor.init()}async getCurrentState(){let{nvim:e}=this,[t,[i,r],o,s]=await e.eval("[bufnr('%'),coc#cursor#position(),win_getid(),mode()]");return{doc:y.getAttachedDocument(t),mode:s,position:CC.Position.create(i,r),winid:o}}addDisposable(e){this.disposables.push(e)}checkProvier(e,t){if(!O.hasProvider(e,t))throw new Error(`${e} provider not found for current buffer, your language server doesn't support it.`)}async withRequestToken(e,t,i){this.requestTokenSource&&(this.requestTokenSource.cancel(),this.requestTokenSource.dispose()),this.requestTimer&&clearTimeout(this.requestTimer);let r=this.requestStatusItem;this.requestTokenSource=new CC.CancellationTokenSource;let{token:o}=this.requestTokenSource;o.onCancellationRequested(()=>{r.text=`${e} request canceled`,r.isProgress=!1,this.requestTimer=setTimeout(()=>{r.hide()},500)}),r.isProgress=!0,r.text=`requesting ${e}`,r.show();let s;try{s=await Promise.resolve(t(o))}catch(a){this.nvim.echoError(a)}return this.requestTokenSource&&(this.requestTokenSource.dispose(),this.requestTokenSource=void 0),o.isCancellationRequested?null:(r.hide(),i&&(!s||Array.isArray(s)&&s.length==0)?(k.showMessage(`${e} not found`,"warning"),null):s)}getIcon(e){let{labels:t}=this,i=Co(e),r=typeof t.default=="string"?t.default:i[0].toLowerCase(),o=i=="Unknown"?"":t[i[0].toLowerCase()+i.slice(1)];return(!o||typeof o!="string")&&(o=r),{text:o,hlGroup:i=="Unknown"?"CocSymbolDefault":`CocSymbol${i}`}}async getCodeActions(e,t,i){return(await this.codeActions.getCodeActions(e,t,i)).filter(o=>!o.disabled)}async applyCodeAction(e){await this.codeActions.applyCodeAction(e)}async hasProvider(e){let t=await this.nvim.call("bufnr","%"),i=y.getDocument(t);return i?O.hasProvider(e,i.textDocument):!1}dispose(){this.requestTimer&&clearTimeout(this.requestTimer),J(this.disposables)}};rD();Zf();tu();mo();V();Ee();K();var Qte=H()("plugin"),SC=class extends Kte.EventEmitter{constructor(e){super();this.nvim=e;this._ready=!1;this.actions=new Map;this.disposables=[];this.disposables.push(y.registerTextDocumentContentProvider("output",Uo.getProvider(e))),Object.defineProperty(y,"nvim",{get:()=>this.nvim}),Object.defineProperty(k,"cursors",{get:()=>this.cursors}),y.onDidChangeWorkspaceFolders(()=>{e.setVar("WorkspaceFolders",y.folderPaths,!0)},null,this.disposables),P.on("VimResized",(t,i)=>{y.env&&Object.assign(y.env,{columns:t,lines:i})},null,this.disposables),this.cursors=new WD(e),oe.init(e,this),this.addAction("checkJsonExtension",()=>{ve.has("coc-json")||k.showMessage("Run :CocInstall coc-json for json intellisense","more")}),this.addAction("rootPatterns",t=>this.handler.workspace.getRootPatterns(t)),this.addAction("ensureDocument",()=>this.handler.workspace.ensureDocument()),this.addAction("getConfig",async t=>this.handler.workspace.getConfiguration(t)),this.addAction("doAutocmd",async(t,...i)=>this.handler.workspace.doAutocmd(t,i)),this.addAction("openLog",async()=>this.handler.workspace.openLog()),this.addAction("attach",()=>y.attach()),this.addAction("detach",()=>y.detach()),this.addAction("doKeymap",async(t,i,r)=>this.handler.workspace.doKeymap(t,i,r)),this.addAction("registExtensions",(...t)=>ve.loadExtension(t)),this.addAction("snippetCheck",async(t,i)=>this.handler.workspace.snippetCheck(t,i)),this.addAction("snippetNext",()=>Ut.nextPlaceholder()),this.addAction("snippetPrev",()=>Ut.previousPlaceholder()),this.addAction("snippetCancel",()=>Ut.cancel()),this.addAction("openLocalConfig",()=>k.openLocalConfig()),this.addAction("bufferCheck",()=>k.bufferCheck()),this.addAction("showInfo",()=>this.handler.workspace.showInfo()),this.addAction("hasProvider",t=>this.handler.hasProvider(t)),this.addAction("listNames",()=>Di.names),this.addAction("listDescriptions",()=>Di.descriptions),this.addAction("listLoadItems",t=>Di.loadItems(t)),this.addAction("search",(...t)=>this.handler.refactor.search(t)),this.addAction("cursorsSelect",(t,i,r)=>this.cursors.select(t,i,r)),this.addAction("fillDiagnostics",t=>It.setLocationlist(t)),this.addAction("saveRefactor",t=>this.handler.refactor.save(t)),this.addAction("commandList",()=>this.handler.commands.getCommandList()),this.addAction("selectSymbolRange",(t,i,r)=>this.handler.symbols.selectSymbolRange(t,i,r)),this.addAction("openList",(...t)=>Di.start(t)),this.addAction("listResume",t=>Di.resume(t)),this.addAction("listCancel",()=>Di.cancel(!0)),this.addAction("listPrev",t=>Di.previous(t)),this.addAction("listNext",t=>Di.next(t)),this.addAction("listFirst",t=>Di.first(t)),this.addAction("listLast",t=>Di.last(t)),this.addAction("sendRequest",(t,i,r)=>Mi.sendRequest(t,i,r)),this.addAction("sendNotification",(t,i,r)=>Mi.sendNotification(t,i,r)),this.addAction("registNotification",(t,i)=>Mi.registNotification(t,i)),this.addAction("updateConfig",(t,i)=>y.configurations.updateUserConfig({[t]:i})),this.addAction("links",()=>this.handler.links.getLinks()),this.addAction("openLink",()=>this.handler.links.openCurrentLink()),this.addAction("pickColor",()=>this.handler.colors.pickColor()),this.addAction("colorPresentation",()=>this.handler.colors.pickPresentation()),this.addAction("highlight",()=>this.handler.documentHighlighter.highlight()),this.addAction("fold",t=>this.handler.fold.fold(t)),this.addAction("startCompletion",t=>HD.startCompletion(t)),this.addAction("sourceStat",()=>rt.sourceStats()),this.addAction("refreshSource",t=>rt.refresh(t)),this.addAction("toggleSource",t=>rt.toggleSource(t)),this.addAction("diagnosticRefresh",t=>It.refresh(t)),this.addAction("diagnosticInfo",()=>It.echoMessage()),this.addAction("diagnosticToggle",t=>It.toggleDiagnostic(t)),this.addAction("diagnosticToggleBuffer",(t,i)=>It.toggleDiagnosticBuffer(t,i)),this.addAction("diagnosticNext",t=>It.jumpNext(t)),this.addAction("diagnosticPrevious",t=>It.jumpPrevious(t)),this.addAction("diagnosticPreview",()=>It.preview()),this.addAction("diagnosticList",async()=>It.getDiagnosticList()),this.addAction("findLocations",(t,i,r,o)=>this.handler.locations.findLocations(t,i,r,o)),this.addAction("getTagList",()=>this.handler.locations.getTagList()),this.addAction("jumpDefinition",t=>this.handler.locations.gotoDefinition(t)),this.addAction("definitions",()=>this.handler.locations.definitions()),this.addAction("jumpDeclaration",t=>this.handler.locations.gotoDeclaration(t)),this.addAction("declarations",()=>this.handler.locations.declarations()),this.addAction("jumpImplementation",t=>this.handler.locations.gotoImplementation(t)),this.addAction("implementations",()=>this.handler.locations.implementations()),this.addAction("jumpTypeDefinition",t=>this.handler.locations.gotoTypeDefinition(t)),this.addAction("typeDefinitions",()=>this.handler.locations.typeDefinitions()),this.addAction("jumpReferences",t=>this.handler.locations.gotoReferences(t)),this.addAction("references",t=>this.handler.locations.references(t)),this.addAction("jumpUsed",t=>this.handler.locations.gotoReferences(t,!1)),this.addAction("doHover",t=>this.handler.hover.onHover(t)),this.addAction("definitionHover",t=>this.handler.hover.definitionHover(t)),this.addAction("getHover",()=>this.handler.hover.getHover()),this.addAction("showSignatureHelp",()=>this.handler.signature.triggerSignatureHelp()),this.addAction("documentSymbols",t=>this.handler.symbols.getDocumentSymbols(t)),this.addAction("symbolRanges",()=>this.handler.documentHighlighter.getSymbolsRanges()),this.addAction("selectionRanges",()=>this.handler.selectionRange.getSelectionRanges()),this.addAction("rangeSelect",(t,i)=>this.handler.selectionRange.selectRange(t,i)),this.addAction("rename",t=>this.handler.rename.rename(t)),this.addAction("getWorkspaceSymbols",t=>this.handler.symbols.getWorkspaceSymbols(t)),this.addAction("resolveWorkspaceSymbol",t=>this.handler.symbols.resolveWorkspaceSymbol(t)),this.addAction("formatSelected",t=>this.handler.format.formatCurrentRange(t)),this.addAction("format",()=>this.handler.format.formatCurrentBuffer()),this.addAction("commands",()=>this.handler.commands.getCommands()),this.addAction("services",()=>Mi.getServiceStats()),this.addAction("toggleService",t=>Mi.toggle(t)),this.addAction("codeAction",(t,i)=>this.handler.codeActions.doCodeAction(t,i)),this.addAction("organizeImport",()=>this.handler.codeActions.organizeImport()),this.addAction("fixAll",()=>this.handler.codeActions.doCodeAction(null,[fR.CodeActionKind.SourceFixAll])),this.addAction("doCodeAction",t=>this.handler.codeActions.applyCodeAction(t)),this.addAction("codeActions",(t,i)=>this.handler.codeActions.getCurrentCodeActions(t,i)),this.addAction("quickfixes",t=>this.handler.codeActions.getCurrentCodeActions(t,[fR.CodeActionKind.QuickFix])),this.addAction("codeLensAction",()=>this.handler.codeLens.doAction()),this.addAction("runCommand",(...t)=>this.handler.commands.runCommand(...t)),this.addAction("doQuickfix",()=>this.handler.codeActions.doQuickfix()),this.addAction("refactor",()=>this.handler.refactor.doRefactor()),this.addAction("repeatCommand",()=>this.handler.commands.repeat()),this.addAction("installExtensions",(...t)=>ve.installExtensions(t)),this.addAction("updateExtensions",t=>ve.updateExtensions(t)),this.addAction("extensionStats",()=>ve.getExtensionStates()),this.addAction("loadedExtensions",()=>ve.loadedExtensions()),this.addAction("watchExtension",t=>ve.watchExtension(t)),this.addAction("activeExtension",t=>ve.activate(t)),this.addAction("deactivateExtension",t=>ve.deactivate(t)),this.addAction("reloadExtension",t=>ve.reloadExtension(t)),this.addAction("toggleExtension",t=>ve.toggleExtension(t)),this.addAction("uninstallExtension",(...t)=>ve.uninstallExtension(t)),this.addAction("getCurrentFunctionSymbol",()=>this.handler.symbols.getCurrentFunctionSymbol()),this.addAction("showOutline",t=>this.handler.symbols.showOutline(t)),this.addAction("hideOutline",()=>this.handler.symbols.hideOutline()),this.addAction("getWordEdit",()=>this.handler.rename.getWordEdit()),this.addAction("addCommand",t=>this.handler.commands.addVimCommand(t)),this.addAction("addRanges",t=>this.cursors.addRanges(t)),this.addAction("currentWorkspacePath",()=>y.rootPath),this.addAction("selectCurrentPlaceholder",t=>Ut.selectCurrentPlaceholder(!!t)),this.addAction("codeActionRange",(t,i,r)=>this.handler.codeActions.codeActionRange(t,i,r)),this.addAction("incomingCalls",t=>this.handler.callHierarchy.getIncoming(t)),this.addAction("outgoingCalls",t=>this.handler.callHierarchy.getOutgoing(t)),this.addAction("showIncomingCalls",()=>this.handler.callHierarchy.showCallHierarchyTree("incoming")),this.addAction("showOutgoingCalls",()=>this.handler.callHierarchy.showCallHierarchyTree("outgoing")),this.addAction("inspectSemanticToken",()=>this.handler.semanticHighlighter.inspectSemanticToken()),this.addAction("semanticHighlight",()=>this.handler.semanticHighlighter.highlightCurrent()),this.addAction("showSemanticHighlightInfo",()=>this.handler.semanticHighlighter.showHighlightInfo())}addAction(e,t){if(this.actions.has(e))throw new Error(`Action ${e} already exists`);this.actions.set(e,t)}async init(){let{nvim:e}=this,t=Date.now();try{await ve.init(),await y.init(k),e.setVar("coc_workspace_initialized",!0,!0),Ut.init(),HD.init(),It.init(),Di.init(e),rt.init(),this.handler=new xC(e),Mi.init(),ve.activateExtensions(),y.autocmds.setupDynamicAutocmd(!0),e.pauseNotification(),e.setVar("WorkspaceFolders",y.folderPaths,!0),e.setVar("coc_service_initialized",1,!0),e.call("coc#util#do_autocmd",["CocNvimInit"],!0),e.resumeNotification(!1,!0),this._ready=!0,await P.fire("ready",[]),Qte.info(`coc.nvim initialized with node: ${process.version} after ${Date.now()-t}ms`),this.emit("ready")}catch(i){e.echoError(i)}}get isReady(){return this._ready}get ready(){return this._ready?Promise.resolve():new Promise(e=>{this.once("ready",()=>{e()})})}hasAction(e){return this.actions.has(e)}async cocAction(e,...t){let i=this.actions.get(e);if(!i)throw new Error(`Action "${e}" doesn't exist`);let r=Date.now(),o=await Promise.resolve(i.apply(null,t)),s=Date.now()-r;return s>500&&Qte.warn(`Slow action "${e}" cost ${s}ms`),o}getHandler(){return this.handler}dispose(){this.removeAllListeners(),J(this.disposables),ve.dispose(),Di.dispose(),y.dispose(),Uo.dispose(),k.dispose(),rt.dispose(),Mi.stopAll(),Mi.dispose(),this.handler&&this.handler.dispose(),Ut.dispose(),oe.dispose(),HD.dispose(),It.dispose()}};var eie=x(tf());Kn();De();ET();var $r=H()("attach"),VTe=global.hasOwnProperty("__TEST__"),eke=["installExtensions","updateExtensions"],tie=(n,e=!0)=>{let t=(0,zte.attach)(n,Vte.default.getLogger("node-client"),e);global.hasOwnProperty("__TEST__")||t.call("coc#util#path_replace_patterns").then(s=>{if(Lt(s)){let a=B.file;B.file=l=>(l=l.replace(/\\/g,"/"),Object.keys(s).forEach(u=>l=l.replace(new RegExp("^"+u),s[u])),a(l))}}).logError(),t.setVar("coc_process_pid",process.pid,!0);let i=new SC(t),r=!1,o=!1;return t.on("notification",async(s,a)=>{switch(s){case"VimEnter":{!o&&r&&(o=!0,await i.init());break}case"Log":{$r.debug(...a);break}case"TaskExit":case"TaskStderr":case"TaskStdout":case"GlobalChange":case"PromptInsert":case"InputChar":case"MenuInput":case"OptionSet":case"PromptKeyPress":case"FloatBtnClick":case"CompleteStop":$r.trace("Event: ",s,...a),await P.fire(s,a);break;case"CocAutocmd":$r.trace("Notification autocmd:",...a),await P.fire(a[0],a.slice(1));break;case"redraw":break;default:{if(!i.hasAction(s)){console.error(`action "${s}" does not exist`);return}try{i.isReady?$r.info("receive notification:",s,a):$r.warn(`Plugin not ready when received "${s}"`,a),await i.ready,await i.cocAction(s,...a)}catch(u){t.echoError(`Error on notification "${s}": ${u instanceof Error?u.message:u}`),$r.error(u)}}}}),t.on("request",async(s,a,l)=>{if(s=="redraw"){l.send();return}let u=setTimeout(()=>{$r.error("Request cost more than 3s",s,a)},3e3);try{if(s=="CocAutocmd")$r.trace("Request autocmd:",...a),await P.fire(a[0],a.slice(1)),l.send(void 0);else{if(!i.isReady&&!eke.includes(s)){$r.warn(`Plugin not ready on request "${s}"`,a),l.send("Plugin not ready",!0);return}$r.info("Request action:",s,a);let c=await i.cocAction(s,...a);l.send(c)}clearTimeout(u)}catch(c){clearTimeout(u),l.send(c instanceof Error?c.message:c.toString(),!0),$r.error("Request error:",s,a,c)}}),t.channelId.then(async s=>{r=!0,VTe&&t.call("coc#rpc#set_channel",[s],!0);let{major:a,minor:l,patch:u}=eie.default.parse(Sb);t.setClientInfo("coc",{major:a,minor:l,patch:u},"remote",{},{}),await t.getVvar("vim_did_enter")&&!o&&(o=!0,await i.init())}).catch(s=>{console.error(`Channel create error: ${s.message}`)}),i};Object.defineProperty(console,"log",{value(){TC&&TC.info(...arguments)}});var TC=H()("server");tie({reader:process.stdin,writer:process.stdout});process.on("uncaughtException",function(n){let e="Uncaught exception: "+n.message;console.error(e),TC.error("uncaughtException",n.stack)});process.on("unhandledRejection",function(n,e){n instanceof Error?console.error("UnhandledRejection: "+n.message+` -`+n.stack):console.error("UnhandledRejection: "+n),TC.error("unhandledRejection ",e,n)}); -/*! - * bytes - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015 Jed Watson - * MIT Licensed - */ -/*! - * content-disposition - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ -/*! (c) 2020 Andrea Giammarchi */ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -/** - * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped) - * - * @copyright Yusuke Kawasaki - * @license MIT - * @constructor - * @see https://github.com/kawanet/event-lite - * @see http://kawanet.github.io/event-lite/EventLite.html - * @example - * var EventLite = require("event-lite"); - * - * function MyClass() {...} // your class - * - * EventLite.mixin(MyClass.prototype); // import event methods - * - * var obj = new MyClass(); - * obj.on("foo", function() {...}); // add event listener - * obj.once("bar", function() {...}); // add one-time event listener - * obj.emit("foo"); // dispatch event - * obj.emit("bar"); // dispatch another event - * obj.off("foo"); // remove event listener - */ diff --git a/pack/ant/start/coc.nvim/data/schema.json b/pack/ant/start/coc.nvim/data/schema.json deleted file mode 100644 index d24bfdb..0000000 --- a/pack/ant/start/coc.nvim/data/schema.json +++ /dev/null @@ -1,1666 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Configuration file for coc.nvim", - "additionalProperties": false, - "definitions": { - "float": { - "type": "object", - "properties": { - "border": { - "type": "boolean", - "default": false, - "description": "Set to true to use borders." - }, - "rounded": { - "type": "boolean", - "default": false, - "description": "Use rounded borders when border is true." - }, - "highlight": { - "type": "string", - "default": "CocFloating", - "description": "Background highlight group of float window." - }, - "title": { - "type": "string", - "default": "", - "description": "Title used by float window." - }, - "borderhighlight": { - "type": "string", - "default": "CocFloating", - "description": "Border highlight group of float window." - }, - "close": { - "type": "boolean", - "default": false, - "description": "Set to true to draw close icon" - }, - "maxWidth": { - "type": "integer", - "description": "Maximum width of float window, include border." - }, - "maxHeight": { - "type": "integer", - "minimum": 2, - "description": "Maximum height of float window, include border." - }, - "focusable": { - "type": "boolean", - "default": true, - "description": "Enable focus by user actions (wincmds, mouse events), neovim only." - }, - "shadow": { - "type": "boolean", - "default": false, - "description": "Drop shadow effect by blending with the background, neovim only." - }, - "winblend": { - "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 100, - "description": "Enables pseudo-transparency by set 'winblend' option of window, neovim only." - } - } - }, - "languageServerBase": { - "type": "object", - "properties": { - "enable": { - "type": "boolean", - "default": true - }, - "cwd": { - "type": "string", - "default": "", - "description": "Working directory of languageserver, absolute path or relative to workspace folder, use workspace root by default" - }, - "disableDynamicRegister": { - "type": "boolean", - "default": false, - "description": "Disable dynamic registerCapability feature for this languageserver to avoid duplicated feature regstration." - }, - "disableSnippetCompletion": { - "type": "boolean", - "default": false, - "description": "Disable completion snippet feature for this languageserver, the languageserver may not respect it." - }, - "disabledFeatures": { - "type": "array", - "default": [], - "description": "Disabled features for this languageserver.", - "items": { - "type": "string", - "enum": [ - "completion", - "configuration", - "workspaceFolders", - "diagnostics", - "willSave", - "willSaveUntil", - "didSaveTextDocument", - "fileSystemWatcher", - "hover", - "signatureHelp", - "definition", - "references", - "documentHighlight", - "documentSymbol", - "workspaceSymbol", - "codeAction", - "codeLens", - "formatting", - "documentFormatting", - "documentRangeFormatting", - "documentOnTypeFormatting", - "rename", - "documentLink", - "executeCommand", - "pullConfiguration", - "typeDefinition", - "implementation", - "declaration", - "color", - "foldingRange", - "selectionRange", - "progress", - "callHierarchy", - "linkedEditing", - "fileEvents", - "semanticTokens" - ] - } - }, - "formatterPriority": { - "type": "number", - "default": 0, - "description": "Priority of this languageserver's formatter." - }, - "env": { - "type": "object", - "default": null, - "description": "Environment variables for child process." - }, - "stdioEncoding": { - "type": "string", - "default": "utf8", - "description": "Encoding used for stdio of child process." - }, - "rootPatterns": { - "type": "array", - "default": [], - "description": "Root patterns used to resolve rootPath from current file, default to workspace root", - "items": { - "type": "string" - } - }, - "requireRootPattern": { - "type": "boolean", - "default": false, - "description": "If true, doesn't start server when root pattern not found." - }, - "ignoredRootPaths": { - "type": "array", - "default": [], - "description": "Absolute root paths that language server should not use as rootPath, higher priority than rootPatterns.", - "items": { - "type": "string" - } - }, - "filetypes": { - "type": "array", - "default": [], - "description": "Supported filetypes, add * in array for all filetypes.", - "items": { - "type": "string" - } - }, - "additionalSchemes": { - "type": "array", - "default": [], - "description": "Additional uri schemes, default schemes including file & untitled.", - "items": { - "type": "string" - } - }, - "revealOutputChannelOn": { - "type": "string", - "default": "never", - "description": "Configure message level to show the output channel buffer", - "enum": ["info", "warn", "error", "never"] - }, - "progressOnInitialization": { - "type": "boolean", - "default": false, - "description": "Enable progress report on languageserver initialize." - }, - "initializationOptions": { - "type": "object", - "default": {}, - "description": "initializationOptions passed to languageserver" - }, - "settings": { - "type": "object", - "default": {}, - "description": "Settings of languageserver" - }, - "trace.server": { - "type": "string", - "default": "off", - "enum": ["off", "messages", "verbose"], - "description": "Trace level of communication between server and client" - } - } - }, - "languageServerSocket": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/languageServerBase" }], - "required": ["port", "filetypes"], - "additionalProperties": false, - "properties": { - "port": { - "type": "integer", - "description": "Port number of socket server" - }, - "host": { - "type": "string", - "default": "127.0.0.1", - "description": "Host of server" - }, - "disableSnippetCompletion": {}, - "disableDynamicRegister": {}, - "disabledFeatures": {}, - "formatterPriority": {}, - "enable": {}, - "rootPatterns": {}, - "requireRootPattern": {}, - "ignoredRootPaths": {}, - "filetypes": {}, - "additionalSchemes": {}, - "revealOutputChannelOn": {}, - "progressOnInitialization": {}, - "initializationOptions": {}, - "settings": {}, - "stdioEncoding": {}, - "trace.server": {} - } - }, - "languageServerModule": { - "type": "object", - "allOf": [{ "$ref": "#/definitions/languageServerBase" }], - "required": ["module", "filetypes"], - "additionalProperties": false, - "properties": { - "module": { - "type": "string", - "default": "", - "description": "Absolute path of javascript file, should works in IPC mode" - }, - "args": { - "type": "array", - "default": [], - "description": "Extra arguments of module", - "items": { - "type": "string" - } - }, - "runtime": { - "type": "string", - "default": "", - "description": "Absolute path of node runtime." - }, - "execArgv": { - "type": "array", - "default": [], - "description": "Argv passed to node when using module, normally used for debugging, ex: [\"--nolazy\", \"--inspect-brk=6045\"]", - "items": { - "type": "string" - } - }, - "transport": { - "type": "string", - "default": "ipc", - "description": "Transport kind used by server, could be 'ipc', 'stdio', 'socket' and 'pipe'", - "enum": ["ipc", "stdio", "socket", "pipe"] - }, - "transportPort": { - "type": "integer", - "description": "Port number used when transport is 'socket'" - }, - "cwd": {}, - "env": {}, - "enable": {}, - "disableDynamicRegister": {}, - "disableSnippetCompletion": {}, - "disabledFeatures": {}, - "formatterPriority": {}, - "rootPatterns": {}, - "requireRootPattern": {}, - "ignoredRootPaths": {}, - "filetypes": {}, - "additionalSchemes": {}, - "revealOutputChannelOn": {}, - "progressOnInitialization": {}, - "initializationOptions": {}, - "stdioEncoding": {}, - "settings": {}, - "trace.server": {} - } - }, - "languageServerCommand": { - "type": "object", - "required": ["command", "filetypes"], - "allOf": [{ "$ref": "#/definitions/languageServerBase" }], - "additionalProperties": false, - "properties": { - "command": { - "type": "string", - "default": "", - "description": "Executable in $PATH to start languageserver, should not used with module" - }, - "args": { - "type": "array", - "default": [], - "description": "Arguments of command", - "items": { - "type": "string" - } - }, - "detached": { - "type": "boolean", - "default": false, - "description": "Detach the languageserver process" - }, - "shell": { - "type": "boolean", - "default": false, - "description": "Use shell for process" - }, - "cwd": {}, - "env": {}, - "enable": {}, - "disableDynamicRegister": {}, - "disableSnippetCompletion": {}, - "disabledFeatures": {}, - "formatterPriority": {}, - "rootPatterns": {}, - "requireRootPattern": {}, - "ignoredRootPaths": {}, - "filetypes": {}, - "additionalSchemes": {}, - "revealOutputChannelOn": {}, - "progressOnInitialization": {}, - "initializationOptions": {}, - "stdioEncoding": {}, - "settings": {}, - "trace.server": {} - } - } - }, - "properties": { - "http.proxy": { - "type": "string", - "default": "", - "pattern": "^https?://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$", - "description": "The proxy setting to use. If not set, will be inherited from the `http_proxy` and `https_proxy` environment variables." - }, - "http.proxyStrictSSL": { - "type": "boolean", - "description": "Controls whether the proxy server certificate should be verified against the list of supplied CAs", - "default": true - }, - "http.proxyAuthorization": { - "type": ["null", "string"], - "description": "The value to send as the `Proxy-Authorization` header for every network request.", - "default": null - }, - "http.proxyCA": { - "type": "string", - "description": "CA (file) to use as Certificate Authority", - "default": null - }, - "npm.binPath": { - "type": "string", - "default": "npm", - "description": "Command or absolute path to npm or yarn." - }, - "suggest.noselect": { - "type": "boolean", - "description": "Not make vim select first item on completion start", - "default": false - }, - "suggest.formatItems": { - "type": "array", - "items": { - "enum": ["abbr", "menu", "kind", "shortcut"] - }, - "contains": { - "enum": ["abbr"] - }, - "uniqueItems": true, - "description": "Items shown in popup menu in order.", - "default": ["abbr", "menu", "kind", "shortcut"] - }, - "suggest.selection": { - "type": "string", - "default": "recentlyUsed", - "description": "Controls how suggestions are pre-selected when showing the suggest list.", - "enum": ["none", "recentlyUsed", "recentlyUsedByPrefix"] - }, - "suggest.enablePreselect": { - "type": "boolean", - "description": "Enable preselect feature of LSP, works when suggest.noselect is false.", - "default": true - }, - "suggest.floatConfig": { - "type": "object", - "description": "Configure style of popup menu and documentation window of completion.", - "allOf": [{ "$ref": "#/definitions/float" }], - "additionalProperties": false, - "properties": { - "border": {}, - "rounded": {}, - "highlight": {}, - "borderhighlight": {}, - "maxWidth": {}, - "winblend": {}, - "shadow": {} - } - }, - "suggest.labelMaxLength": { - "type": "number", - "description": "Max length of abbr that shown as label of complete item.", - "default": 200 - }, - "suggest.detailMaxLength": { - "type": "number", - "description": "Max length of detail that should be shown in popup menu.", - "default": 100 - }, - "suggest.detailField": { - "type": "string", - "default": "preview", - "description": "Where to show the detail text of CompleteItem from LS.", - "enum": ["abbr", "preview"] - }, - "suggest.autoTrigger": { - "type": "string", - "default": "always", - "description": "How should completion be triggered", - "enum": ["always", "trigger", "none"] - }, - "suggest.languageSourcePriority": { - "type": "number", - "default": 99, - "description": "Priority of language sources." - }, - "suggest.snippetIndicator": { - "type": "string", - "default": "~", - "description": "The character used in abbr of complete item to indicate the item could be expand as snippet." - }, - "suggest.maxCompleteItemCount": { - "type": "number", - "default": 50, - "description": "Maximum number of complete items shown in vim" - }, - "suggest.preferCompleteThanJumpPlaceholder": { - "type": "boolean", - "description": "Confirm completion instead of jump to next placeholder when completion is activated.", - "default": false - }, - "suggest.fixInsertedWord": { - "type": "boolean", - "description": "Make inserted word replace word characters after cursor position.", - "default": true - }, - "suggest.localityBonus": { - "type": "boolean", - "description": "Boost suggestions that appear closer to the cursor position.", - "default": true - }, - "suggest.triggerAfterInsertEnter": { - "type": "boolean", - "description": "Trigger completion after InsertEnter, auto trigger should be 'always' to enable this option", - "default": false - }, - "suggest.minTriggerInputLength": { - "type": "integer", - "default": 1, - "description": "Minimal input length for trigger completion, default 1" - }, - "suggest.triggerCompletionWait": { - "type": "integer", - "default": 0, - "minimum": 0, - "maximum": 50, - "description": "Wait time between text change and completion start, cancel completion when text changed during wait." - }, - "suggest.timeout": { - "type": "integer", - "default": 5000, - "minimum": 500, - "maximum": 15000, - "description": "Timeout for completion, in milliseconds." - }, - "suggest.acceptSuggestionOnCommitCharacter": { - "type": "boolean", - "default": false, - "description": "Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character. Requires CompleteChanged event to work." - }, - "suggest.lowPrioritySourceLimit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "Max items count for source priority lower than 90." - }, - "suggest.highPrioritySourceLimit": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "description": "Max items count for source priority bigger than or equal to 90." - }, - "suggest.removeDuplicateItems": { - "type": "boolean", - "description": "Remove completion items with duplicated word for all sources, snippet items are excluded.", - "default": false - }, - "suggest.defaultSortMethod": { - "type": "string", - "description": "Default sorting behavior for suggested completion items.", - "default": "length", - "enum": ["length", "alphabetical", "none"] - }, - "suggest.snippetsSupport": { - "type": "boolean", - "description": "Set to false to disable snippets support of completion.", - "default": true - }, - "suggest.completionItemKindLabels": { - "type": "object", - "default": {}, - "description": "Set custom labels to completion items' kinds.", - "properties": { - "text": { "type": "string", "maxLength": 1 }, - "method": { "type": "string", "maxLength": 1 }, - "function": { "type": "string", "maxLength": 1 }, - "constructor": { "type": "string", "maxLength": 1 }, - "field": { "type": "string", "maxLength": 1 }, - "variable": { "type": "string", "maxLength": 1 }, - "class": { "type": "string", "maxLength": 1 }, - "interface": { "type": "string", "maxLength": 1 }, - "module": { "type": "string", "maxLength": 1 }, - "property": { "type": "string", "maxLength": 1 }, - "unit": { "type": "string", "maxLength": 1 }, - "value": { "type": "string", "maxLength": 1 }, - "enum": { "type": "string", "maxLength": 1 }, - "keyword": { "type": "string", "maxLength": 1 }, - "snippet": { "type": "string", "maxLength": 1 }, - "color": { "type": "string", "maxLength": 1 }, - "file": { "type": "string", "maxLength": 1 }, - "reference": { "type": "string", "maxLength": 1 }, - "folder": { "type": "string", "maxLength": 1 }, - "enumMember": { "type": "string", "maxLength": 1 }, - "constant": { "type": "string", "maxLength": 1 }, - "struct": { "type": "string", "maxLength": 1 }, - "event": { "type": "string", "maxLength": 1 }, - "operator": { "type": "string", "maxLength": 1 }, - "typeParameter": { "type": "string", "maxLength": 1 }, - "default": { "type": "string", "maxLength": 1 } - }, - "additionalProperties": false - }, - "suggest.invalidInsertCharacters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Invalid character for strip valid word when inserting text of complete item.", - "default": [" ", "(", "<", "{", "[", "\r", "\n"] - }, - "suggest.asciiCharactersOnly": { - "type": "boolean", - "description": "Trigger suggest with ASCII characters only", - "default": false - }, - "suggest.ignoreRegexps": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Regexps to ignore when trigger suggest", - "default": [] - }, - "suggest.virtualText": { - "type": "boolean", - "description": "Show virtual text for insert word of selected item, works on neovim >= 0.5.0", - "default": false - }, - "documentHighlight.priority": { - "type": "number", - "default": -1, - "description": "Match priority used by document highlight, see ':h matchadd'" - }, - "documentHighlight.timeout": { - "type": "integer", - "default": 300, - "minimum": 200, - "maximum": 5000, - "description": "Timeout for document highlight, in milliseconds." - }, - "colors.filetypes": { - "type": "array", - "default": [], - "description": "Filetypes that should be enabled for colors highlight feature, use \"*\" for all filetypes.", - "items": { - "type": "string" - } - }, - "colors.highlightPriority": { - "type": "number", - "description": "Priority for colors highlights, works on vim8 and neovim >= 0.6.0", - "default": 1000, - "maximum": 4096 - }, - "links.tooltip": { - "type": "boolean", - "description": "Show tooltip of link under cursor on CursorHold, neovim only", - "default": false - }, - "diagnostic.enable": { - "type": "boolean", - "description": "Set to false to disable diagnostic display", - "default": true - }, - "diagnostic.highlighLimit": { - "type": "number", - "description": "Limit count for highlighted diagnostics, too many diagnostic highlights could make vim stop responding", - "default": 1000 - }, - "diagnostic.highlightPriority": { - "type": "number", - "description": "Priority for diagnostic highlights, works on vim8 and neovim >= 0.6.0", - "default": 4096, - "maximum": 4096, - "minimum": 110 - }, - "diagnostic.autoRefresh": { - "type": "boolean", - "description": "Enable automatically refresh diagnostics, use diagnosticRefresh action when it's disabled.", - "default": true - }, - "diagnostic.level": { - "type": "string", - "description": "Used for filter diagnostics by diagnostic severity.", - "default": "hint", - "enum": ["hint", "information", "warning", "error"] - }, - "diagnostic.locationlistLevel": { - "type": ["string", "null"], - "description": "Filter diagnostics in locationlist.", - "default": null, - "enum": ["hint", "information", "warning", "error"] - }, - "diagnostic.signLevel": { - "type": ["string", "null"], - "description": "Filter diagnostics displayed in signcolumn.", - "default": null, - "enum": ["hint", "information", "warning", "error"] - }, - "diagnostic.messageLevel": { - "type": ["string", "null"], - "description": "Filter diagnostic message in float window/popup.", - "default": null, - "enum": ["hint", "information", "warning", "error"] - }, - "diagnostic.locationlistUpdate": { - "type": "boolean", - "description": "Update locationlist on diagnostics change, only works with locationlist opened by :CocDiagnostics command and first window of associated buffer.", - "default": true - }, - "diagnostic.checkCurrentLine": { - "type": "boolean", - "description": "When enabled, show all diagnostics of current line if there are none at the current position.", - "default": false - }, - "diagnostic.messageTarget": { - "type": "string", - "description": "Diagnostic message target.", - "default": "float", - "enum": ["echo", "float"] - }, - "diagnostic.messageDelay": { - "type": "number", - "description": "How long to wait (in milliseconds) before displaying the diagnostic message with echo or float", - "default": 200 - }, - "diagnostic.refreshOnInsertMode": { - "type": "boolean", - "description": "Enable diagnostic refresh on insert mode, default false.", - "default": false - }, - "diagnostic.displayByAle": { - "type": "boolean", - "description": "Use Ale for display diagnostics in vim, will disable coc for display diagnostics, restart required on change.", - "default": false - }, - "diagnostic.virtualText": { - "type": "boolean", - "description": "Use NeoVim virtual text to display diagnostics", - "default": false - }, - "diagnostic.virtualTextLevel": { - "type": ["string", "null"], - "description": "Filter diagnostic message in virtual text by level", - "default": null, - "enum": ["hint", "information", "warning", "error"] - }, - "diagnostic.virtualTextWinCol": { - "type": ["number", "null"], - "description": "Window column number to align virtual text", - "default": null - }, - "diagnostic.virtualTextCurrentLineOnly": { - "type": "boolean", - "description": "Only show virtualText diagnostic on current cursor line", - "default": true - }, - "diagnostic.virtualTextPrefix": { - "type": "string", - "description": "The prefix added virtual text diagnostics", - "default": " " - }, - "diagnostic.virtualTextLines": { - "type": "number", - "description": "The number of non empty lines from a diagnostic to display", - "default": 3 - }, - "diagnostic.virtualTextLineSeparator": { - "type": "string", - "description": "The text that will mark a line end from the diagnostic message", - "default": " \\ " - }, - "diagnostic.enableSign": { - "type": "boolean", - "default": true, - "description": "Enable signs for diagnostics." - }, - "diagnostic.enableHighlightLineNumber": { - "type": "boolean", - "default": true, - "description": "Enable highlighting line numbers for diagnostics, only works with neovim and diagnostic.enableSign is true." - }, - "diagnostic.enableMessage": { - "type": "string", - "default": "always", - "description": "When to enable show messages of diagnostics.", - "enum": ["always", "jump", "never"] - }, - "diagnostic.signPriority": { - "type": "number", - "description": "Priority of diagnostic signs, default to 10", - "default": 10 - }, - "diagnostic.errorSign": { - "type": "string", - "description": "Text of error sign", - "default": ">>" - }, - "diagnostic.warningSign": { - "type": "string", - "description": "Text of warning sign", - "default": "⚠" - }, - "diagnostic.infoSign": { - "type": "string", - "description": "Text of info sign", - "default": ">>" - }, - "diagnostic.hintSign": { - "type": "string", - "description": "Text of hint sign", - "default": ">>" - }, - "diagnostic.floatConfig": { - "type": "object", - "description": "Configure float window style of diagnostic message.", - "allOf": [{ "$ref": "#/definitions/float" }], - "additionalProperties": false, - "properties": { - "border": {}, - "rounded": {}, - "highlight": {}, - "borderhighlight": {}, - "title": {}, - "close": {}, - "maxHeight": {}, - "maxWidth": {}, - "winblend": {}, - "focusable": {}, - "shadow": {} - } - }, - "diagnostic.filetypeMap": { - "type": "object", - "description": "A map between buffer filetype and the filetype assigned to diagnostics. To syntax highlight diagnostics with their parent buffer type use `\"default\": \"bufferType\"`", - "default": {} - }, - "diagnostic.format": { - "type": "string", - "description": "Define the diagnostic format that shown in float window or echoed, available parts: source, code, severity, message", - "default": "[%source%code] [%severity] %message" - }, - "diagnostic.separateRelatedInformationAsDiagnostics": { - "type": "boolean", - "default": false, - "description": "Separate related information as diagnostics." - }, - "diagnostic.showUnused": { - "type": "boolean", - "default": true, - "description": "Show diagnostics with unused tag, affects highlight, sign, virtual text, message" - }, - "diagnostic.showDeprecated": { - "type": "boolean", - "default": true, - "description": "Show diagnostics with deprecated tag." - }, - "signature.enable": { - "type": "boolean", - "description": "Enable signature help when trigger character typed, require restart service on change.", - "default": true - }, - "signature.triggerSignatureWait": { - "type": "integer", - "default": 500, - "minimum": 200, - "maximum": 1000, - "description": "Timeout for trigger signature help, in milliseconds." - }, - "signature.target": { - "type": "string", - "description": "Target of signature help, use float when possible by default.", - "default": "float", - "enum": ["float", "echo"] - }, - "signature.floatConfig": { - "type": "object", - "description": "Configure float window style of signature documents.", - "allOf": [{ "$ref": "#/definitions/float" }], - "additionalProperties": false, - "properties": { - "border": {}, - "rounded": {}, - "highlight": {}, - "borderhighlight": {}, - "title": {}, - "close": {}, - "maxHeight": {}, - "maxWidth": {}, - "winblend": {}, - "focusable": {}, - "shadow": {} - } - }, - "signature.preferShownAbove": { - "type": "boolean", - "description": "Show signature help float window above cursor when possible, require restart service on change.", - "default": true - }, - "signature.hideOnTextChange": { - "type": "boolean", - "description": "Hide signature float window when text changed on insert mode.", - "default": false - }, - "codeLens.enable": { - "type": "boolean", - "description": "Enable codeLens feature, require neovim with set virtual text feature.", - "default": false - }, - "codeLens.position": { - "type": "string", - "enum": ["top", "eol", "right_align"], - "description": "Position of codeLens, requires nvim >= 0.6.0", - "default": "top" - }, - "codeLens.separator": { - "type": "string", - "description": "Separator text for codeLens in virtual text", - "default": "" - }, - "codeLens.subseparator": { - "type": "string", - "description": "Subseparator between codeLenses in virtual text", - "default": " " - }, - "refactor.openCommand": { - "type": "string", - "description": "Open command for refactor window.", - "default": "vsplit" - }, - "refactor.saveToFile": { - "type": "boolean", - "description": "Save changed buffer to file when write refactor buffer with ':noa wa' command.", - "default": true - }, - "refactor.beforeContext": { - "type": "number", - "default": 3, - "description": "Print num lines of leading context before each match." - }, - "refactor.afterContext": { - "type": "number", - "default": 3, - "description": "Print num lines of trailing context after each match." - }, - "refactor.showMenu": { - "type": "string", - "default": "", - "description": "Refactor buffer local mapping to bring up menu for this chunk." - }, - "hover.target": { - "type": "string", - "description": "Target to show hover information, default is floating window when possible.", - "enum": ["preview", "echo", "float"] - }, - "hover.previewMaxHeight": { - "type": "number", - "default": 12, - "description": "Max height of preview window for hover." - }, - "hover.floatConfig": { - "type": "object", - "description": "Configure float window style of hover documents.", - "allOf": [{ "$ref": "#/definitions/float" }], - "additionalProperties": false, - "properties": { - "border": {}, - "rounded": {}, - "highlight": {}, - "borderhighlight": {}, - "title": {}, - "close": {}, - "maxHeight": {}, - "maxWidth": {}, - "winblend": {}, - "focusable": {}, - "shadow": {} - } - }, - "hover.autoHide": { - "type": "boolean", - "default": true, - "description": "Automatically hide hover float window on CursorMove or InsertEnter." - }, - "dialog.maxHeight": { - "type": "number", - "default": 30, - "description": "Maximum height of dialog window." - }, - "dialog.maxWidth": { - "type": "number", - "default": 80, - "description": "Maximum width of dialog window." - }, - "dialog.rounded": { - "type": "boolean", - "default": true, - "description": "use rounded border for dialog window." - }, - "dialog.confirmKey": { - "type": "string", - "default": "", - "description": "Confirm key for confirm selection used by menu and picker, you can always use to cancel." - }, - "dialog.pickerButtons": { - "type": "boolean", - "default": true, - "description": "Show buttons for picker dialog window/popup." - }, - "dialog.pickerButtonShortcut": { - "type": "boolean", - "default": true, - "description": "Show shortcut in buttons of picker dialog window/popup, used when dialog.pickerButtons is true." - }, - "dialog.floatHighlight": { - "type": ["string", "null"], - "default": null, - "description": "Highlight group for dialog window/popup, default to 'CocFloating'" - }, - "dialog.floatBorderHighlight": { - "type": ["string", "null"], - "default": null, - "description": "Highlight group for border of dialog window/popup, default to 'CocFloating'" - }, - "dialog.shortcutHighlight": { - "type": "string", - "default": "MoreMsg", - "description": "Highlight group for shortcut character in menu dialog, default to 'MoreMsg'" - }, - "notification.border": { - "type": "boolean", - "default": true, - "description": "Enable rounded border for notification windows." - }, - "notification.timeout": { - "type": "integer", - "default": 10000, - "description": "Timeout for auto close notifications, in miniseconds." - }, - "notification.marginRight": { - "type": "integer", - "default": 10, - "description": "Margin right to the right of editor window." - }, - "notification.focusable": { - "type": "boolean", - "default": true, - "description": "Enable focus by user actions (wincmds, mouse events), neovim only." - }, - "notification.maxWidth": { - "type": "integer", - "default": 60, - "description": "Maximum content width of notification dialog." - }, - "notification.maxHeight": { - "type": "integer", - "default": 10, - "description": "Maximum content height of notification dialog." - }, - "notification.disabledProgressSources": { - "type": "array", - "default": [], - "description": "Soureces that should be disabled for message progress, use * to disable all message only progresses", - "items": { - "type": "string" - } - }, - "notification.minProgressWidth": { - "type": "integer", - "default": 30, - "description": "Minimal with of progress notification." - }, - "notification.highlightGroup": { - "type": "string", - "default": "CocFloating", - "description": "Highlight group of notification dialog." - }, - "notification.winblend": { - "type": "integer", - "default": 30, - "minimum": 0, - "maximum": 100, - "description": "Winblend option of notification window, neovim only." - }, - "workspace.openOutputCommand": { - "type": "string", - "default": "vs", - "description": "Command used to open output channel." - }, - "workspace.openResourceCommand": { - "type": "string", - "default": "tab drop", - "description": "Command to open files that not loaded, load files as hidden buffers when empty." - }, - "workspace.ignoredFiletypes": { - "type": "array", - "default": [], - "description": "Filetypes that should be ignored for workspace folder resolve.", - "items": { - "type": "string" - } - }, - "workspace.bottomUpFiletypes": { - "type": "array", - "default": [], - "description": "Filetypes that should have workspace folder should resolved from base directory of file, or [\"*\"] for any filetype.", - "items": { - "type": "string" - } - }, - "workspace.ignoredFolders": { - "type": "array", - "default": ["$HOME"], - "description": "List of folders that should not be resolved as workspace folder, environment variables and minimatch patterns can be used.", - "items": { - "type": "string" - } - }, - "workspace.workspaceFolderCheckCwd": { - "type": "boolean", - "default": true, - "description": "Whether the current working directory should be used first when checking patterns match for workspace folder." - }, - "workspace.workspaceFolderFallbackCwd": { - "type": "boolean", - "default": true, - "description": "Use current working directory as workspace folder when no root patterns resolved." - }, - "list.indicator": { - "type": "string", - "default": ">", - "description": "The character used as first character in prompt line" - }, - "list.alignColumns": { - "type": "boolean", - "default": false, - "description": "Whether to align lists in columns, default: `false`" - }, - "list.menuAction": { - "type": "boolean", - "default": false, - "description": "Use menu picker instead of confirm() for choose action." - }, - "list.interactiveDebounceTime": { - "type": "number", - "default": 100, - "description": "Debounce time for input change on interactive mode." - }, - "list.height": { - "type": "number", - "default": 10, - "description": "Height of split list window." - }, - "list.statusLineSegments": { - "type": ["array", "null"], - "default": [ - "%#CocListMode#-- %{coc#list#status(\"mode\")} --%*", - "%{coc#list#status(\"loading\")}", - "%{coc#list#status(\"args\")}", - "(%L/%{coc#list#status(\"total\")})", - "%=", - "%#CocListPath# %{coc#list#status(\"cwd\")} %l/%L%*" - ], - "items": { - "types": "string" - }, - "description": "An array of statusline segments that will be used to draw the status line for list windows." - }, - "list.signOffset": { - "type": "number", - "default": 900, - "description": "Sign offset of list, should be different from other plugins." - }, - "list.selectedSignText": { - "type": "string", - "default": "*", - "description": "Sign text for selected lines." - }, - "list.extendedSearchMode": { - "type": "boolean", - "default": true, - "description": "Enable extended search mode which allows multiple search patterns delimited by spaces." - }, - "list.limitLines": { - "type": ["number", "null"], - "default": null, - "description": "Limit lines for list buffer." - }, - "list.maxPreviewHeight": { - "type": "number", - "default": 12, - "description": "Max height for preview window of list." - }, - "list.previewSplitRight": { - "type": "boolean", - "default": false, - "description": "Use vsplit for preview window." - }, - "list.previewHighlightGroup": { - "type": "string", - "default": "Search", - "description": "Highlight group used for highlight the range in preview window." - }, - "list.previewToplineStyle": { - "type": "string", - "default": "offset", - "description": "Topline style for list previews", - "enum": ["offset", "middle"] - }, - "list.previewToplineOffset": { - "type": "number", - "default": 3, - "description": "Topline offset for list previews" - }, - "list.nextKeymap": { - "type": "string", - "default": "", - "description": "Key used for select next line on insert mode." - }, - "list.previousKeymap": { - "type": "string", - "default": "", - "description": "Key used for select previous line on insert mode." - }, - "list.normalMappings": { - "type": "object", - "default": {}, - "description": "Custom keymappings on normal mode." - }, - "list.insertMappings": { - "type": "object", - "default": {}, - "description": "Custom keymappings on insert mode." - }, - "list.source.diagnostics.includeCode": { - "type": "boolean", - "description": "Whether to show the diagnostic code in the list.", - "default": true - }, - "list.source.diagnostics.pathFormat": { - "type": "string", - "description": "Decide how the filepath is shown in the list.", - "enum": ["full", "short", "filename", "hidden"], - "default": "full" - }, - "list.source.symbols.excludes": { - "type": "array", - "default": [], - "description": "Patterns of minimatch for filepath to execlude from symbols list.", - "items": { - "type": "string" - } - }, - "list.source.outline.ctagsFilestypes": { - "type": "array", - "default": [], - "description": "Filetypes that should use ctags for outline instead of language server.", - "items": { - "type": "string" - } - }, - "cursors.cancelKey": { - "type": "string", - "default": "", - "description": "Key used for cancel cursors session." - }, - "cursors.nextKey": { - "type": "string", - "default": "", - "description": "Key used for jump to next cursors position." - }, - "cursors.previousKey": { - "type": "string", - "default": "", - "description": "Key used for jump to previous cursors position." - }, - "cursors.wrapscan": { - "type": "boolean", - "default": true, - "description": "Searches wrap around the first or last cursors range." - }, - "semanticTokens.filetypes": { - "type": "array", - "description": "Filetypes that enable semanticTokens highlighting or [\"*\"] for any filetype", - "default": [], - "items": { - "type": "string" - } - }, - "semanticTokens.highlightPriority": { - "type": "number", - "description": "Priority for semantic tokens highlight.", - "default": 2048, - "maximum": 4096 - }, - "semanticTokens.incrementTypes": { - "type": "array", - "description": "Semantic token types that should increase highlight when insert at the start and end position of token.", - "default": ["variable", "string", "parameter"], - "items": { - "type": "string" - } - }, - "semanticTokens.combinedModifiers": { - "type": "array", - "description": "Semantic token modifiers that should have highlight combined with syntax highlights.", - "default": ["deprecated"], - "items": { - "type": "string" - } - }, - "tree.closedIcon": { - "type": "string", - "default": "+", - "description": "Closed icon of tree view." - }, - "tree.openedIcon": { - "type": "string", - "default": "-", - "description": "Opend icon of tree view." - }, - "tree.key.toggleSelection": { - "type": "string", - "default": "", - "description": "Trigger key to select/unselect item" - }, - "tree.key.toggle": { - "type": "string", - "default": "t", - "description": "Trigger key to toggle expand state of tree node, does nothing with leaf node." - }, - "tree.key.actions": { - "type": "string", - "default": "", - "description": "Trigger key to invoke actions." - }, - "tree.key.collapseAll": { - "type": "string", - "default": "M", - "description": "Trigger key to collapse all tree node." - }, - "tree.key.invoke": { - "type": "string", - "default": "", - "description": "Trigger key to invoke default command of current node or selection." - }, - "tree.key.close": { - "type": "string", - "default": "", - "description": "Trigger key to dispose the tree and close tree window." - }, - "tree.key.activeFilter": { - "type": "string", - "default": "f", - "description": "Trigger key active filter." - }, - "tree.key.selectNext": { - "type": "string", - "default": "", - "description": "Trigger key to select next item during filter." - }, - "tree.key.selectPrevious": { - "type": "string", - "default": "", - "description": "Trigger key to select previous item during filter." - }, - "outline.showLineNumber": { - "type": "boolean", - "default": true, - "description": "Show line number of symbols." - }, - "outline.detailAsDescription": { - "type": "boolean", - "default": true, - "description": "Show detail as description aside with label, when false detail will be shown in tooltip on cursor hold." - }, - "outline.splitCommand": { - "type": "string", - "default": "botright 30vs", - "description": "Window split command used by outline." - }, - "outline.followCursor": { - "type": "boolean", - "default": true, - "description": "Reveal item in outline tree on cursor hold." - }, - "outline.autoWidth": { - "type": "boolean", - "default": true, - "description": "Automatically increase window width to avoid wrapped lines." - }, - "outline.keepWindow": { - "type": "boolean", - "default": false, - "description": "Jump back to original window after outline is shown." - }, - "outline.sortBy": { - "type": "string", - "default": "category", - "description": "Sort method for symbols.", - "enum": ["position", "name", "category"] - }, - "outline.switchSortKey": { - "type": "string", - "default": "", - "description": "The key used to switch sort method for symbols provider of current tree view." - }, - "outline.expandLevel": { - "type": "number", - "default": 1, - "description": "Expand level of tree nodes." - }, - "outline.checkBufferSwitch": { - "type": "boolean", - "default": true, - "description": "Recreate outline view after user changed to another buffer on current tab." - }, - "outline.codeActionKinds": { - "type": "array", - "default": ["", "quickfix", "refactor"], - "description": "Filter code actions in actions menu by kinds.", - "items": { - "type": "string", - "enum": ["", "quickfix", "refactor", "source"] - } - }, - "callHierarchy.openCommand": { - "type": "string", - "default": "edit", - "description": "Open command for callHierarchy tree view." - }, - "callHierarchy.splitCommand": { - "type": "string", - "default": "botright 30vs", - "description": "Window split command used by callHierarchy tree view." - }, - "callHierarchy.enableTooltip": { - "type": "boolean", - "default": true, - "description": "Enable tooltip to show relative filepath of call hierarchy." - }, - "coc.preferences.enableLinkedEditing": { - "type": "boolean", - "default": false, - "description": "Enable linked editing support." - }, - "coc.preferences.enableMessageDialog": { - "type": "boolean", - "default": false, - "description": "Enable messages shown in notification dialog." - }, - "coc.preferences.maxFileSize": { - "type": "string", - "default": "10MB", - "description": "Maximum file size in bytes that coc.nvim should handle, default '10MB'" - }, - "coc.preferences.useQuickfixForLocations": { - "type": "boolean", - "description": "Use vim's quickfix list for jump locations,\n need restart on change.", - "default": false - }, - "coc.preferences.extensionUpdateCheck": { - "type": "string", - "default": "never", - "description": "Interval for check extension update, could be daily, weekly, never", - "enum": ["daily", "weekly", "never"] - }, - "coc.preferences.snippetStatusText": { - "type": "string", - "default": "SNIP", - "description": "Text shown in statusline to indicate snippet session is activated." - }, - "coc.preferences.snippetHighlight": { - "type": "boolean", - "description": "Use highlight group 'CocSnippetVisual' to highlight placeholders with same index of current one.", - "default": false - }, - "coc.preferences.currentFunctionSymbolAutoUpdate": { - "type": "boolean", - "description": "Automatically update the value of b:coc_current_function on CursorHold event", - "default": false - }, - "coc.preferences.formatOnSaveFiletypes": { - "type": "array", - "default": [], - "description": "Filetypes that should run format on save.", - "items": { - "type": "string" - } - }, - "coc.preferences.rootPatterns": { - "type": "array", - "default": [".git", ".hg", ".projections.json"], - "description": "Root patterns to resolve workspaceFolder from parent folders of opened files, resolved from up to down.", - "items": { - "type": "string" - } - }, - "coc.preferences.watchmanPath": { - "type": "string", - "description": "executable path for https://facebook.github.io/watchman/, detected from $PATH by default", - "default": null - }, - "coc.preferences.jumpCommand": { - "anyOf": [ - { - "type": "string", - "enum": [ - "edit", - "split", - "vsplit", - "tabe", - "drop", - "tab drop", - "pedit" - ] - }, - { "type": "string", "minimum": 1 } - ], - "description": "Command used for location jump, like goto definition, goto references etc. Can be also a custom command that gives file as an argument.", - "default": "edit" - }, - "coc.preferences.messageLevel": { - "type": "string", - "description": "Message level for filter echoed messages, could be 'more', 'warning' and 'error'", - "default": "more", - "enum": ["more", "warning", "error"] - }, - "coc.preferences.bracketEnterImprove": { - "type": "boolean", - "description": "Improve enter inside bracket `<> {} [] ()` by add new empty line below and place cursor to it. Works with `coc#on_enter()`", - "default": true - }, - "coc.preferences.formatOnType": { - "type": "boolean", - "description": "Set to true to enable formatting on typing", - "default": false - }, - "coc.preferences.formatOnTypeFiletypes": { - "type": "array", - "default": [], - "description": "Filetypes that should run format on typing. Only take effect when `coc.preferences.formatOnType` set `true`", - "items": { - "type": "string" - } - }, - "coc.preferences.floatActions": { - "type": "boolean", - "description": "Set to false to disable float/popup support for actions menu, won't work on vim without float or popup window support.", - "default": true - }, - "coc.preferences.promptInput": { - "type": "boolean", - "description": "Use prompt buffer in float window for user input.", - "default": true - }, - "coc.preferences.enableMarkdown": { - "type": "boolean", - "description": "Tell the language server that markdown text format is supported, note that markdown text may not rendered as expected.", - "default": true - }, - "coc.preferences.excludeImageLinksInMarkdownDocument": { - "type": "boolean", - "description": "Exclude image links from markdown text in float window.", - "default": true - }, - "coc.preferences.silentAutoupdate": { - "type": "boolean", - "description": "Not open split window with update status when performing auto update.", - "default": true - }, - "coc.preferences.willSaveHandlerTimeout": { - "type": "integer", - "default": 500, - "minimum": 200, - "maximum": 5000, - "description": "Will save handler timeout" - }, - "coc.preferences.renameFillCurrent": { - "type": "boolean", - "default": true, - "description": "Disable to stop Refactor-Rename float/popup window from populating with old name in the New Name field." - }, - "coc.source.around.enable": { - "type": "boolean", - "default": true - }, - "coc.source.around.shortcut": { - "type": "string", - "default": "A" - }, - "coc.source.around.priority": { - "type": "integer", - "default": 1 - }, - "coc.source.around.disableSyntaxes": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - }, - "coc.source.buffer.enable": { - "type": "boolean", - "default": true - }, - "coc.source.buffer.shortcut": { - "type": "string", - "default": "B" - }, - "coc.source.buffer.priority": { - "type": "integer", - "default": 1 - }, - "coc.source.buffer.ignoreGitignore": { - "type": "boolean", - "default": true, - "description": "Ignore git ignored files for buffer words" - }, - "coc.source.buffer.disableSyntaxes": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - }, - "coc.source.file.enable": { - "type": "boolean", - "default": true - }, - "coc.source.file.shortcut": { - "type": "string", - "default": "F" - }, - "coc.source.file.priority": { - "type": "integer", - "default": 10 - }, - "coc.source.file.disableSyntaxes": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - }, - "coc.source.file.triggerCharacters": { - "type": "array", - "default": ["/", "\\"], - "items": { - "type": "string" - } - }, - "coc.source.file.trimSameExts": { - "type": "array", - "default": [".ts", ".js"], - "description": "Trim same extension on file completion", - "items": { - "type": "string" - } - }, - "coc.source.file.ignoreHidden": { - "type": "boolean", - "default": true, - "description": "Ignore completion for hidden files" - }, - "coc.source.file.ignorePatterns": { - "type": "array", - "default": [], - "description": "Ignore patterns of matcher", - "items": { - "type": "string" - } - }, - "languageserver": { - "type": "object", - "default": {}, - "description": "Dictionary of languageservers, key is used as id of languageserver.", - "patternProperties": { - "^[_a-zA-Z]+$": { - "oneOf": [ - { - "$ref": "#/definitions/languageServerModule" - }, - { - "$ref": "#/definitions/languageServerCommand" - }, - { - "$ref": "#/definitions/languageServerSocket" - } - ] - } - } - } - } -} diff --git a/pack/ant/start/coc.nvim/doc/coc-config.txt b/pack/ant/start/coc.nvim/doc/coc-config.txt deleted file mode 100644 index e79eb4b..0000000 --- a/pack/ant/start/coc.nvim/doc/coc-config.txt +++ /dev/null @@ -1,1250 +0,0 @@ -*coc-config.txt* NodeJS client for Vim & Neovim. - -CONTENTS - -Http |coc-config-http| -Completion |coc-config-suggest| -Document highlight |coc-config-documentHighlight| -Colors |coc-config-colors| -Links |coc-config-links| -Diagnostics |coc-config-diagnostic| -Signature |coc-config-signature| -Cursors |coc-config-cursors| -Refactor |coc-config-refactor| -Hover |coc-config-hvoer| -Dialog |coc-config-dialog| -Notification |coc-config-notification| -CodeLens |coc-config-codelens| -Workspace |coc-config-workspace| -List |coc-config-list| -Preferences |coc-config-preferences| -Semantic tokens |coc-config-semanticTokens| -Tree |coc-config-tree| -Outline |coc-config-outline| -Call Hierarchy |coc-config-callHierarchy| -Npm |coc-config-npm| -Float |coc-config-float| -Language server |coc-config-languageserver| - -============================================================================== -BUILTIN CONFIGURATIONS *coc-config* - -Builtin configurations of coc.nvim, it's recommended to use `coc-json` -extension for completion and validation support. - ------------------------------------------------------------------------------- -Http request~ - *coc-config-http* -"http.proxy" *coc-config-http-proxy* - - HTTP proxy URI, used for extensions that send request, default: `""` - -"http.proxyStrictSSL" *coc-config-http-proxyStrictSSL* - - Controls whether the proxy server certificate should be verified - against the list of supplied CAs, default: `true` - -"http.proxyAuthorization" *coc-config-http-proxyAuthorization* - - The value to send as the `Proxy-Authorization` header for every - network request. - -"http.proxyCA" *coc-config-http-proxyCA* - - CA (file) to use as Certificate Authority. - ------------------------------------------------------------------------------- -Completion related~ - *coc-config-suggest* -"suggest.noselect" *coc-config-suggest-noselect* - - Avoid select complete item on completion start, default: `false`. - - Note: default changed to `false` on coc.nvim 0.0.82 to provide preselect - item. - -"suggest.selection" *coc-config-suggest-selection* - - Controls how suggestions are pre-selected when showing the suggest - list. Default: "recentlyUsed". - - Could be "none", "recentlyUsed" and "recentlyUsedByPrefix". - -"suggest.formatItems" *coc-config-suggest-formatItems* - - Items shown in popup menu in order. - Default to : `["abbr", "menu", "kind", "shortcut"]` - -"suggest.enablePreselect" *coc-config-suggest-enablePreselect* - - Enable preselect feature of LSP, works when "suggest.noselect" is false. - Default: `true`. - -"suggest.labelMaxLength" *coc-config-suggest-labelMaxLength* - - Maximum length of label shown in popup menu, default: `200` - -"suggest.floatConfig" *coc-config-suggest-floatConfig* - - Configure style of popup menu and documentation window for completion, - see |coc-config-float|. - - Note: some properties not work, including: "title", "focusable", - "close" and "maxHeight" (use 'pumheight' option for maximum height of - popup menu). - - Note: "maxWidth" not works for popup menu, use - |coc-config-suggest-detailMaxLength| instead. - -"suggest.detailMaxLength" *coc-config-suggest-detailMaxLength* - - Max length of detail that will be shown in popup menu, default: `100` - -"suggest.detailField" *coc-config-suggest-detailField* - - Where to add the detail in complete item when it's less than max - length, default: `"preview"` when floating documentation is enabled. - - Valid options: ["abbr", "menu", "preview"] - -"suggest.autoTrigger" *coc-config-suggest-autoTrigger* - - How should completion be triggered, default: `"always"` - - Valid options: ["always", "trigger", "none"] - - - `always`: trigger suggest on word characters and trigger - characters. - - `trigger`: trigger suggest on trigger characters only. - - `none`: no auto trigger at all. - -"suggest.languageSourcePriority" *coc-config-suggest-languageSourcePriority* - - Priority of language sources, default: `99` - -"suggest.snippetIndicator" *coc-config-suggest-snippetIndicator* - - The character used in completion item abbreviation to indicate it - expands as code snippet, default: `~`. - -"suggest.maxCompleteItemCount" *coc-config-suggest-maxCompleteItemCount* - - Maximum number of complete items shown in Vim, default: `50` - -"suggest.preferCompleteThanJumpPlaceholder" *coc-config-suggest-preferCompleteThanJumpPlaceholder* - - Confirm completion instead of jump to next placeholder when completion - activates, default: `false` - -"suggest.snippetsSupport" *coc-config-suggest-snippetsSupport* - - Enable snippets expands expand on confirm completion. When set to - `false` coc.nvim would set language client option: - `CompletionClientCapabilities.completionItem.snippetSupport` to - `false` as well. - - Note: the language server may still send completion items with - snippets when falsy. - -"suggest.fixInsertedWord" *coc-config-suggest-fixInsertedWord* - - Inserted word replaces the next one, default: `true` - -"suggest.localityBonus" *coc-config-suggest-localityBonus* - - Boost suggestions that appear closer to the cursor position, - default: `true` - -"suggest.triggerAfterInsertEnter" *coc-config-suggest-triggerAfterInsertEnter* - - Trigger completion after |InsertEnter|. Requires "suggest.autoTrigger" - to be set, default: `false` - -"suggest.timeout" *coc-config-suggest-timeout* - - Timeout for completion (unit: milliseconds), default: `5000` - -"suggest.minTriggerInputLength" *coc-config-suggest-minTriggerInputLength* - - Number of characters in the current word after which the completion - triggers, default: `1` - -"suggest.triggerCompletionWait" *coc-config-suggest-triggerCompletionWait* - - Delay between typing the trigger character and completion start which - initiates server synchronization, default: `0` - -"suggest.acceptSuggestionOnCommitCharacter" *coc-config-suggest-acceptSuggestionOnCommitCharacter* - - The server provides a set of commit characters: these characters can - trigger completion item acceptance. This also inserts commit character - after the completion item text. Requires `CompleteChanged` event to work, - default: `false` - -"suggest.lowPrioritySourceLimit" *coc-config-suggest-lowPrioritySourceLimit* - - Max items count for source priority lower than `90`. - -"suggest.highPrioritySourceLimit" *coc-config-suggest-highPrioritySourceLimit* - - Max items count for source priority bigger than or equal to `90`. - -"suggest.removeDuplicateItems" *coc-config-suggest-removeDuplicateItems* - - Remove completion items with duplicated word for all sources, snippet - items are excluded, default: `false` - -"suggest.defaultSortMethod" *coc-config-suggest-defaultSortMethod* - - Default sorting behavior for suggested completion items, default: - `length` - -"suggest.invalidInsertCharacters" *coc-config-suggest-invalidInsertCharacters* - - Invalid character for strip valid word when inserting text of complete - item, default: ` ,(,<,{,[,\r,\n` - -"suggest.asciiCharactersOnly" *coc-config-suggest-asciiCharactersOnly* - - Trigger suggest with ASCII characters only, default: `false` - -"suggest.ignoreRegexps" *coc-config-suggest-ignoreRegexps* - - Array of regexps, when input matched one of them, not trigger - completion, default: `[]` - -"suggest.virtualText" *coc-config-suggest-virtualText* - - Show virtual text for insert word of selected item, works on neovim >= - 0.5.0, default: `false` - -"suggest.completionItemKindLabels" *coc-config-suggest-completionItemKindLabels* - - Set custom labels to completion item kinds, default: `{}`. - - Example configuration: with https://nerdfonts.com: > - - "suggest.completionItemKindLabels": { - "keyword": "\uf1de", - "variable": "\ue79b", - "value": "\uf89f", - "operator": "\u03a8", - "constructor": "\uf0ad", - "function": "\u0192", - "reference": "\ufa46", - "constant": "\uf8fe", - "method": "\uf09a", - "struct": "\ufb44", - "class": "\uf0e8", - "interface": "\uf417", - "text": "\ue612", - "enum": "\uf435", - "enumMember": "\uf02b", - "module": "\uf40d", - "color": "\ue22b", - "property": "\ue624", - "field": "\uf9be", - "unit": "\uf475", - "event": "\ufacd", - "file": "\uf723", - "folder": "\uf114", - "snippet": "\ue60b", - "typeParameter": "\uf728", - "default": "\uf29c" - } -< ------------------------------------------------------------------------------- -Document highlight~ - *coc-config-documentHighlight* -"documentHighlight.priority" *coc-config-documentHighlight-priority* - - Match priority used by document highlight, see ':h matchadd'. - Default `-1` - -"documentHighlight.timeout" *coc-config-documentHighlight-timeout* - - Timeout for document highlight, in milliseconds. - Default `500` - ------------------------------------------------------------------------------- -Colors highlight~ - *coc-config-colors* -"colors.filetypes" *coc-config-colors-filetypes* - - Filetypes that should enable colors highlight feature. - Use `*` for all filetypes. - - Default: `[]` - ------------------------------------------------------------------------------- -Links~ - *coc-config-links* -"links.tooltip" *coc-config-links-tooltip* - - Show tooltip of link under cursor on CursorHold, neovim only. - Default: `false` - ------------------------------------------------------------------------------- -Diagnostics~ - *coc-config-diagnostic* -"diagnostic.enable" *coc-config-diagnostic-enable* - - Display diagnostics, default: `true` - -"diagnostic.autoRefresh" *coc-config-diagnostic-autoRefresh* - - Enable automatically refresh diagnostics, use - |CocAction('diagnosticRefresh')| action to refresh diagnostics when it's - disabled, default: `true` - -"diagnostic.refreshOnInsertMode" *coc-config-diagnostic-refreshOnInsertMode* - - Refresh diagnostics when in insert mode, default: `false` - -"diagnostic.displayByAle" *coc-config-diagnostic-displayByAle* - - Use ALE for displaying diagnostics. This will disable coc.nvim for - displaying diagnostics. Restart to make changes take the effect, - default: `false` - -"diagnostic.level" *coc-config-diagnostic-level* - - Filter diagnostics by severity level (affect both UI and diagnostic - list), default: `"hint"` - - Valid options: ["hint", "information", "warning", "error"] - -"diagnostic.highlighLimit" *coc-config-diagnostic-highlighLimit* - - Limit count for highlighted diagnostics, too many diagnostic - highlights could make vim stop responding. - - Default: `1000` - -"diagnostic.highlightPriority" *coc-config-diagnostic-highlightPriority* - - Priority for diagnostic highlights, works on vim8 and neovim >= 0.6.0 - - Default: `4096` - -"diagnostic.enableSign" *coc-config-diagnostic-enableSign* - - Enable signs for diagnostics, default: `true` - -"diagnostic.signLevel" *coc-config-diagnostic-signLevel* - - Filter diagnostics in sign column, default: `null`. - -"diagnostic.signPriority" *coc-config-diagnostic-signPriority* - - Priority of diagnostic sign, default to `10`, check |sign-priority|. - -"diagnostic.errorSign" *coc-config-diagnostic-errorSign* - - Sign of error diagnostics shown in the 'signcolumn', default: `">>"` - -"diagnostic.warningSign" *coc-config-diagnostic-warningSign* - - Sign of warning diagnostics shown in the 'signcolumn', default: `"⚠"` - -"diagnostic.infoSign" *coc-config-diagnostic-infoSign* - - Sign of info diagnostics shown in the 'signcolumn', default: `">>"` - -"diagnostic.hintSign" *coc-config-diagnostic-hintSign* - - Sign of hint diagnostics shown in the 'signcolumn', default: `">>"` - - -"diagnostic.enableHighlightLineNumber" *coc-config-diagnostic-enableHighlightLineNumber* - - Enable highlighting line numbers for diagnostics, only works with - neovim and `diagnostic.enableSign` is true. - - default: `true` - -"diagnostic.locationlistUpdate" *coc-config-diagnostic-locationlistUpdate* - - Update locationlist on diagnostics change, only works with - locationlist opened by :CocDiagnostics command and first window of - associated buffer. - - default: `true` - -"diagnostic.locationlistLevel" *coc-config-diagnostic-locationlistLevel* - - Filter diagnostics in locationlist, default: `null`. - -"diagnostic.enableMessage" *coc-config-diagnostic-enableMessage* - - When to enable show messages of diagnostics. - - Valid options: ["always","jump","never"], always means including - cursor hold and after jump to another diagnostic. - - default: `"always"` - -"diagnostic.messageLevel" *coc-config-diagnostic-messageLevel* - - Filter diagnostic message in float window/popup, default: `null`. - -"diagnostic.checkCurrentLine" *coc-config-diagnostic-checkCurrentLine* - - Show all diagnostics of the current line if none of them are at the - current position, default: `false` - -"diagnostic.messageDelay" *coc-config-diagnostic-messageDelay* - - How long to wait (in milliseconds) before displaying the diagnostic - message with echo or float. - - Default: `200` - -"diagnostic.messageTarget" *coc-config-diagnostic-messageTarget* - - Diagnostic message target, default: `"float"` - - Valid options: ["echo", "float"] - -"diagnostic.format" *coc-config-diagnostic-format* - - Define the diagnostic message format. - Available parts: source, code, severity, message - - Default: `[%source%code] [%severity] %message` - -"diagnostic.floatConfig" *coc-config-diagnostic-floatConfig* - - Configuration of floating window/popup, see |coc-config-float|. - -"diagnostic.filetypeMap" *coc-config-diagnostic-filetypeMap* - - A map between buffer filetype and the filetype assigned to diagnostics - in float window. To syntax highlight diagnostics with their parent - buffer type use `"default": "bufferType"`, default: `{}` - -"diagnostic.virtualText" *coc-config-diagnostic-virtualText* - - Use Neovim virtual text to display diagnostics, default: `false` - -"diagnostic.virtualTextLevel" *coc-config-diagnostic-virtualTextLevel* - - Filter diagnostic message in virtual text by level, default: `null` - -"diagnostic.virtualTextWinCol" *coc-config-diagnostic-virtualTextWinCol* - - Window column number to align virtual text, default: `null` - -"diagnostic.virtualTextCurrentLineOnly" *coc-config-diagnostic-virtualTextCurrentLineOnly* - - Only show virtualText diagnostic on current cursor line, default: - `true` - -"diagnostic.virtualTextPrefix" *coc-config-diagnostic-virtualTextPrefix* - - The prefix added for virtual text diagnostics, default: `" "` - -"diagnostic.virtualTextLines" *coc-config-diagnostic-virtualTextLines* - - The number of non-empty lines from a diagnostic to display, default: `3` - -"diagnostic.virtualTextLineSeparator" *coc-config-diagnostic-virtualTextLineSeparator* - - The text that will mark a line end from the diagnostic message, - default: `" \\ "` - -"diagnostic.separateRelatedInformationAsDiagnostics" *coc-config-diagnostic-separateRelatedInformationAsDiagnostics* - - Separate related information as diagnostics, default: `false` - ------------------------------------------------------------------------------- -Signature~ - *coc-config-signature* -"signature.enable" *coc-config-signature-enable* - - Enable signature help when trigger character typed. Requires service - restart on change, default: `true` - -"signature.floatConfig" *coc-config-signature-floatConfig* - - Configuration of floating window/popup for signature documents, see - |coc-config-float|. - -"signature.triggerSignatureWait" *coc-config-signature-triggerSignatureWait* - - Timeout for signature request trigger (milliseconds), default: `500`. - Change to higher value for slow Language Servers. - -"signature.target" *coc-config-signature-target* - - Target of signature help, use `"float"` when possible by default. - - Valid options: ["float", "echo"] - -"signature.preferShownAbove" *coc-config-signature-preferShownAbove* - - Show signature help's floating window above cursor when possible. - Requires restart on change, default: `true` - -"signature.hideOnTextChange" *coc-config-signature-hideOnTextChange* - - Hide signature help's floating window when text changed. Requires - restart on change, default: `false` - ------------------------------------------------------------------------------- -Multiple cursors~ - *coc-config-cursors* -"cursors.cancelKey" *coc-config-cursors-cancelKey* - - Key used for cancel cursors session, default: `` - -"cursors.nextKey" *coc-config-cursors-nextKey* - - Key used for jump to next cursors position. , default: `` - -"cursors.previousKey" *coc-config-cursors-previousKey* - - Key used for jump to previous cursors position, default: `` - -"cursors.wrapscan" *coc-config-cursors-wrapscan* - - Searches wrap around the first or last cursors range, default: `true` - ------------------------------------------------------------------------------- -Refactor buffer~ - *coc-config-refactor* -"refactor.saveToFile" *coc-config-refactor-saveToFile* - - Save changed buffer to file when write refactor buffer with ':noa wa' - command. set to false if you want save buffer by yourself. - -"refactor.openCommand" *coc-config-refactor-openCommand* - - Open command for refactor window, default: `vsplit` - -"refactor.beforeContext" *coc-config-refactor-beforeContext* - - Print num lines of leading context before each match, default: `3` - -"refactor.afterContext" *coc-config-refactor-afterContext* - - Print num lines of trailing context after each match, default: `3` - -"refactor.showMenu" *coc-config-refactor-showMenu* - - Refactor buffer local mapping to bring up menu for this chunk, - default: `` - ------------------------------------------------------------------------------- -Hover~ - *coc-config-hover* -"hover.target" *coc-config-hover-target* - - Target to show hover information, default is floating window when - possible. - - Valid options: ["preview", "echo", "float"] - -"hover.previewMaxHeight" *coc-config-hover-previewMaxHeight* - - Max height of preview window for hover, default: `12` - -"hover.floatConfig" *coc-config-hover-floatConfig* - - Configuration of floating window/popup for hover documents, see - |coc-config-float|. - -"hover.autoHide" *coc-config-hover-autoHide* - - Automatically hide hover float window on CursorMove or InsertEnter, - default `true`. - ------------------------------------------------------------------------------- -Dialog~ - *coc-config-dialog* -"dialog.maxWidth" *coc-config-dialog-maxWidth* - - Maximum width of dialog window. - -"dialog.maxHeight" *coc-config-dialog-maxHeight* - - Maximum height of dialog window. - -"dialog.rounded" *coc-config-dialog-rounded* - - Use rounded border for dialog window, default `true`. - -"dialog.confirmKey" *coc-config-dialog-confirmKey* - - Confirm key for confirm selection used by menu and picker, you can - always use to cancel, default to ``. - -"dialog.pickerButtons" *coc-config-dialog-pickerButtons* - - Show buttons for picker dialog window/popup, default `true`. - -"dialog.pickerButtonShortcut" *coc-config-dialog-pickerButtonShortcut* - - Show shortcut in buttons of picker dialog window/popup, used when - dialog.pickerButtons is true, default `true`. - -"dialog.floatHighlight" *coc-config-dialog-floatHighlight* - - Highlight group for dialog window/popup, default to 'CocFloating'. - -"dialog.floatBorderHighlight" *coc-config-dialog-floatBorderHighlight* - - Highlight group for border of dialog window/popup, default to - 'CocFloating'. - -"dialog.shortcutHighlight" *coc-config-dialog-shortcutHighlight* - - Highlight group for shortcut character in menu dialog, default to - 'MoreMsg' - ------------------------------------------------------------------------------- -Notification~ - *coc-config-notification* - -"notification.maxWidth" *coc-config-notification-maxWidth* - - Maximum content width of notification dialog, default to `60`. - -"notification.maxHeight" *coc-config-notification-maxHeight* - - Maximum content height of notification dialog, default to `10`. - -"notification.disabledProgressSources" *coc-config-notification-disabledProgressSources* - - Sources that should be disabled for message progress, use "*" to - disable all message only progress notifications, default to `[]` - - Source name could be extension id or `language-client-{id}`. - -"notification.minProgressWidth" *coc-config-notification-minProgressWidth* - - Minimal with of progress notification. - -"notification.highlightGroup" *coc-config-notification-highlightGroup* - - Highlight group of notification dialog, default to `CocFloating`. - -"notification.winblend" *coc-config-notification-winblend* - - Winblend option of notification window, neovim only, default `30`. - -"notification.border" *coc-config-notification-border* - - Enable rounded border for notification windows, default `true`. - -"notification.timeout" *coc-config-notification-timeout* - - Timeout for auto close notifications, in miniseconds, default `10000`. - -"notification.marginRight" *coc-config-notification-marginRight* - - Margin right to the right of editor window, default `10`. - -"notification.focusable" *coc-config-notification-focusable* - - Enable focus by user actions (wincmds, mouse events), neovim only, - default `true`. - ------------------------------------------------------------------------------- -CodeLens~ - *coc-config-codelens* -"codeLens.enable" *coc-config-codeLens-enable* - - Enable `codeLens` feature. Requires Neovim with virtual text feature, - default: `false`. - -"codeLens.position" *coc-config-codeLens-position* - - Position of codeLens, works on nvim >= 0.6.0, valid options - ["top", "eol", "right_align"], default: `top`. - -"codeLens.separator" *coc-config-codeLens-separator* - - Separator text for `codeLens` in virtual text, default: `""`. - -"codeLens.subseparator" *coc-config-codeLens-subseparator* - - Subseparator text for multiple codelens in virtual text, default: `" "` - ------------------------------------------------------------------------------- -Workspace related~ - *coc-config-workspace* -"workspace.openOutputCommand" *coc-config-workspace-openOutputCommand* - - Command used to open output channel, default: `vs` - -"workspace.openResourceCommand" *coc-config-workspace-openResourceCommand* - - Command to open files that not loaded, default: `tab drop` - -"workspace.ignoredFiletypes *coc-config-workspace-ignoredFiletypes* - - Filetypes to ignore for workspace folder resolution, default: `[]` - - Note: This is the filetype after mapping by `g:coc_filetype_map`. - -"workspace.ignoredFolders" *coc-config-workspace-ignoredFolders* - - List of folders that should not be resolved as workspace folder. - Environment variables and minimatch patterns can be used. - - Default: ["$HOME"] - -"workspace.bottomUpFiletypes" *coc-config-workspace-bottomUpFiletypes* - - Filetypes that should have workspace folder resolved from base - directory of file, or `["*"]` for any filetype. - - Default: [] - -"workspace.workspaceFolderCheckCwd" *coc-config-workspace-workspaceFolderCheckCwd* - - Whether the cwd directory should be checked first when resolving - workspace folder of current buffer. - - Default: `true` - -"workspace.workspaceFolderFallbackCwd" *coc-config-workspace-workspaceFolderFallbackCwd* - - Use current working directory as workspace folder when no root - patterns resolved. - - Default: `true` - ------------------------------------------------------------------------------- -List~ - *coc-config-list* -"list.indicator" *coc-config-list-indicator* - - The character used as first character in prompt line, default: `">"` - -"list.alignColumns" *coc-config-list-alignColumns* - - Whether to align lists in columns, default: `false` - -"list.menuAction" *coc-config-list-menuAction* - - Use menu picker instead of confirm() for choose action. - Default: `false` - -"list.height" *coc-config-list-height* - - Height of list window (when splited), default: `10` - -"list.signOffset" *coc-config-list-signOffset* - - Sign offset of list, should be different from other plugins, default: - `900` - -"list.selectedSignText" *coc-config-list-selectedSignText* - - Sign text for selected lines, default: `"*"` - -"list.limitLines" *coc-config-list-limitLines* - - Limit lines shown in the list buffer, no limit by default, default: `null` - -"list.maxPreviewHeight" *coc-config-list-maxPreviewHeight* - - Max height for preview window of list, default: `12` - -"list.previewHighlightGroup" *coc-config-list-previewHighlightGroup* - - Highlight group used for highlighting the range in preview window, - default: `"Search"` - -"list.previewToplineStyle" *coc-config-list-previewToplineStyle* - - Topline style for list previews - default: `"offset"` - Valid options: ["offset","middle"] - -"list.previewToplineOffset" *coc-config-list-previewToplineOffset* - - Topline offset for list previews - default: `3` - -"list.nextKeymap" *coc-config-list-nextKeymap* - - Key for selecting next line in the insert mode, default: `""` - -"list.previousKeymap" *coc-config-list-previousKeymap* - - Key for selecting previous line in the insert mode, default: `""` - -"list.extendedSearchMode" *coc-config-list-extendedSearchMode* - - Enable extended search mode which allows multiple search patterns - delimited by whitespace, default: `true` - -"list.normalMappings" *coc-config-list-normalMappings* - - Custom key mappings in the normal mode, default: `{}` - -"list.insertMappings" *coc-config-list-insertMappings* - - Custom key mappings in the insert mode, default: `{}` - -"list.interactiveDebounceTime" *coc-config-list-interactiveDebounceTime* - - Debounce time for input change on interactive mode, default: `100` - -"list.previewSplitRight" *coc-config-list-previewSplitRight* - - Use vsplit for preview window, default: `false` - -"list.source.symbols.excludes" *coc-config-list-source-symbols-excludes* - - Patterns of minimatch for filepath to exclude from symbols list, - default: `[]` - -"list.source.outline.ctagsFilestypes" *coc-config-list-source-outline-ctagsFilestypes* - - Filetypes that should use `ctags` for outline instead of language server, - default: `[]` - - -"list.source.diagnostics.pathFormat" *coc-config-list-source-diagnostics-pathFormat* - - Decide how the filepath is shown in the list. - - Valid options: ["full", "short", "filename", "hidden"]. - - default: `"full"` - -"list.source.diagnostics.includeCode" *coc-config-list-source-diagnostics-includeCode* - - Whether to show the diagnostic code in the list. - - default: `true` - ------------------------------------------------------------------------------- -Preferences~ - *coc-config-preferences* -"coc.preferences.enableLinkedEditing" *coc-preferences-enableLinkedEditing* - - Enable linked editing support, default: `false` - -"coc.preferences.enableMessageDialog" *coc-preferences-enableMessageDialog* - - Enable messages shown in notification dialog, default: `false` - -"coc.preferences.maxFileSize" *coc-preferences-maxFileSize* - - Maximum file size in bytes that coc.nvim should handle, default: `'10MB'` - -"coc.preferences.useQuickfixForLocations" *coc-preferences-useQuickfixForLocations* - - Use Vim's quickfix list for jump locations. Requires restart on change, - default: `false` - -"coc.preferences.extensionUpdateCheck" *coc-preferences-extensionUpdateCheck* - - Interval for checking extension updates, default: `"never"` - - Valid options: ["daily","weekly","never"] - -"coc.preferences.snippetHighlight" *coc-preferences-snippetHighlight* - - Use highlight group 'CocSnippetVisual' to highlight placeholders with - same index of current one. - - default: `false` - -"coc.preferences.snippetStatusText" *coc-preferences-snippetStatusText* - - Text shown in 'statusline' to indicate snippet session is activate. - Check |coc-status| for statusline integration. - - Default: `"SNIP"` - -"coc.preferences.currentFunctionSymbolAutoUpdate" *coc-preferences-currentFunctionSymbolAutoUpdate* - - Automatically update the value of `b:coc_current_function` on `CursorHold` - event, default: `false` - -"coc.preferences.formatOnSaveFiletypes" *coc-preferences-formatOnSaveFiletypes* - - Filetypes for which formatting triggers when saving, default: `[]` - - The operation only format the document by one format provider that - have highest priority, timeout is 500ms to avoid vim blocked for too - long time. - - Note: This is the filetype after mapping by `g:coc_filetype_map`. - - Note since vim's autocmd not nested by default, coc.nvim may not - receive latest code when you're using other vim plugin to format - document at the same time. - -"coc.preferences.rootPatterns" *coc-preferences-rootPatterns* - - Root patterns to resolve `workspaceFolder` from parent folders of opened - files, resolved from up to down, default: - `[".git",".hg",".projections.json"]` - -"coc.preferences.watchmanPath" *coc-preferences-watchmanPath* - - Executable path for https://facebook.github.io/watchman/, detected - from $PATH by default, default: `null` - -"coc.preferences.jumpCommand" *coc-preferences-jumpCommand* - - Command used for location jump performed for goto definition, goto - references etc, default: `"edit"` - - Valid options: ["edit", "split", "vsplit", "tabe", "drop", "tab drop"] - -"coc.preferences.messageLevel" *coc-preferences-messageLevel* - - Message level for filter echoed messages default: `"more"` - - Valid options: ["more", "warning", "error"] - -"coc.preferences.bracketEnterImprove" *coc-preferences-bracketEnterImprove* - - Improve handling of pressing enter inside brackets (`<> {} [] ()`) by - create a new empty line in the middle, the indent is calculated by vim, - checkout |indentexpr| for details. - - Works with |coc#on_enter()|, default: `true` - -"coc.preferences.formatOnType" *coc-preferences-formatOnType* - - Set to true to enable format on type, default: `false` - -"coc.preferences.formatOnTypeFiletypes" *coc-preferences-formatOnTypeFiletypes* - - Filetypes that should run format on typing specific characters, - default: `[]`, requires `onTypeEdit` provider |CocHasProvider|. - - Note: takes effect when `coc.preferences.formatOnType` set `true`. - Note: Use filetypes after mapped by `g:coc_filetype_map`. - -"coc.preferences.floatActions" *coc-preferences-floatActions* - - Set to false to disable float/popup support for actions menu. - Default: `true` - -"coc.preferences.promptInput" *coc-preferences-promptInput* - - Use prompt buffer in float window for user input. - Default: `true` - -"coc.preferences.enableMarkdown" *coc-preferences-enableMarkdown* - - Tell the language server that markdown text format is supported, - note that you may have additional escaped characters for markdown - text. - -"coc.preferences.silentAutoupdate" *coc-preferences-silentAutoupdate* - - Not open split window with update status when performing auto update. - -"coc.preferences.willSaveHandlerTimeout" *coc-preferences-willSaveHandlerTimeout* - - Will save handler timeout, default: `500` - -"coc.preferences.renameFillCurrent" *coc-preferences-renameFillCurrent* - - Disable to stop Refactor-Rename float/popup window from populating - with old name in the New Name field. - Default: `true` - ------------------------------------------------------------------------------- -Semantic tokens~ - *coc-config-semanticTokens* -"semanticTokens.filetypes" *coc-config-semanticTokens-filetypes* - - Filetypes that should enable semantic tokens highlight feature. Use - `["*"]` for all filetypes, default: `[]` - - Note: semantic tokens highlight requires nvim >= 0.5.0 and vim >= - 8.1.0579 to work. - -"semanticTokens.highlightPriority" *coc-config-semanticTokens-highlightPriority* - - Priority for semantic tokens highlight, default `2048` - -"semanticTokens.incrementTypes" *coc-config-semanticTokens-incrementTypes* - - Semantic token types that should increase highlight when insert at - the start and end position of token. - - Default: `['variable', 'string']` - -"semanticTokens.combinedModifiers" *coc-config-semanticTokens-combinedModifiers* - - Semantic token modifiers that should combine with syntax highlights. - - Default: `['deprecated']` - ------------------------------------------------------------------------------- -Tree~ - *coc-config-tree* -"tree.closedIcon" *coc-config-tree-closedIcon* - - Closed icon of tree view, use '' to make it look better when you - have patched font, default: '+'. - -"tree.openedIcon" *coc-config-tree-openedIcon* - - Opened icon of tree view, use '' to make it look better when you - have patched font, default: '-' - -"tree.key.toggleSelection" *coc-config-tree-key-toggleSelection* - - Trigger key to select/unselect item, default: - -"tree.key.toggle" *coc-config-tree-key-toggle* - - Trigger key to toggle expand state of tree node, default: 't' - -"tree.key.actions" *coc-config-tree-key-actions* - - Trigger key to invoke actions, default: - -"tree.key.collapseAll" *coc-config-tree-key-collapseAll* - - Trigger key to collapse all tree node, default: 'M' - -"tree.key.invoke" *coc-config-tree-key-invoke* - - Trigger key to invoke default command of current node or selection, - default: - -"tree.key.close" *coc-config-tree-key-close* - - Trigger key to dispose the tree and close tree window, default: - -"tree.key.activeFilter" *coc-config-tree-key-activeFilter* - - Trigger key active filter, only works when tree view support filter, - default: 'f' - -"tree.key.selectNext" *coc-config-tree-key-selectNext* - - Trigger key to select next item during filter, default - -"tree.key.selectPrevious" *coc-config-tree-key-selectPrevious* - - Trigger key to select previous item during filter, default - ------------------------------------------------------------------------------- -Outline~ - *coc-config-outline* -"outline.splitCommand" *coc-config-outline-splitCommand* - - Window split command used by outline, default 'botright 30vs' - -"outline.followCursor" *coc-config-outline-followCursor* - - Reveal item in outline tree on cursor hold, default `true` - -"outline.keepWindow" *coc-config-outline-keepWindow* - - Jump back to original window after outline is shown, default `false` - -"outline.autoWidth" *coc-config-outline-autoWidth* - - Automatically increase window width to avoid wrapped lines, default - `true`, use |g:coc_max_treeview_width| to change maximum width. - -"outline.sortBy" *coc-config-outline-sortBy* - - Sort method for symbols, available options: 'position', 'name' and - 'category'. Default: 'category'. - -"outline.switchSortKey" *coc-config-outline-switchSortKey* - - The key used to switch sort method for symbols provider of current - tree view. Default - -"outline.expandLevel" *coc-config-outline-expandLevel* - - Default expand level of tree nodes, default `1` - -"outline.checkBufferSwitch" *coc-config-outline-checkBufferSwitch* - - Recreate outline view after changed to another buffer on current tab. - Default `true` - -"outline.showLineNumber" *coc-config-outline-showLineNumber* - - Show line number of document symbols. - Default `true` - -"outline.detailAsDescription" *coc-config-outline-detailAsDescription* - - Show detail as description aside with label. - Default: `true` - -"outline.codeActionKinds" *coc-config-outline-codeActionKinds* - - Filter code actions in actions menu by kinds. - Default: ['', 'quickfix', 'refactor', 'source'] - ------------------------------------------------------------------------------- -Call hierarchy~ - *coc-config-callHierarchy* -"callHierarchy.openCommand" *coc-config-callHierarchy-openCommand* - - Open command for callHierarchy tree view, default to 'edit'. - -"callHierarchy.splitCommand" *coc-config-callHierarchy-splitCommand* - - Window split command used by callHierarchy tree view. - -"callHierarchy.enableTooltip" *coc-config-callHierarchy-enableTooltip* - - Enable tooltip to show relative filepath of call hierarchy. - Default: `true` - ------------------------------------------------------------------------------- -Npm~ - *coc-config-npm* -"npm.binPath" *coc-config-npm-binPath* - - Command or full path of npm or yarn executable for install/update - extensions, default: `npm` - ------------------------------------------------------------------------------- -Float configuration~ - *coc-config-float* - -Used by `suggest.floatConfig`, `diagnostic.floatConfig`, -`signature.floatConfig` and `hover.floatConfig`, following properties are -supported: - - - "border": Change to `true` to enable border. - - "rounded": Use rounded borders when border is `true`. - - "highlight": Background highlight group of float window. - - "title": Title used by float window. - - "borderhighlight": Border highlight group of float window. - - "close": Set to true to draw close icon. - - "maxWidth": Maximum width of float window, contains border. - - "maxHeight": Maximum height of float window, contains border. - - "winblend": Set 'winblend' option of window, neovim only. - - "focusable": Set to false to make window not focusable, neovim only. - - "shadow": Set to true to enable shadow, neovim only. - ------------------------------------------------------------------------------- -Languageserver~ - *coc-config-languageserver* - - Dictionary of Language Servers, key is the ID of corresponding server, - and value is configuration of languageserver. Default: `{}` - - Properties of languageserver configuration: - - - "enable": Change to `false` to disable that languageserver. - - - "filetypes": Supported filetypes, add * in array for all filetypes. - Note: it's required for start the languageserver, please make sure - your filetype is expected by `:CocCommand document.echoFiletype` command - - - "additionalSchemes": Additional uri schemes, default schemes - including file & untitled. - Note: you have to setup vim provide content for custom uri as well. - - - "cwd": Working directory used to start languageserver, vim's cwd is - used by default. - - - "env": Environment variables for child process. - - - "settings": Settings for languageserver, received on server - initialization. - - - "trace.server": Trace level of communication between server and - client that showed with output channel, open output channel by - command `:CocCommand workspace.showOutput` - - - "stdioEncoding": Encoding used for stdio of child process. - - - "initializationOptions": Initialization options passed to - languageserver (it's deprecated) - - - "rootPatterns": Root patterns used to resolve rootPath from current - file. - - - "requireRootPattern": If true, doesn't start server when root - pattern not found. - - - "ignoredRootPaths": Absolute root paths that language server should - not use as rootPath, higher priority than rootPatterns. - - - "disableDynamicRegister": Disable dynamic registerCapability feature - for this languageserver to avoid duplicated feature regstration. - - - "disableSnippetCompletion": Disable snippet completion feature for - this languageserver. - - - "disabledFeatures": Disable features for this languageserver, - valid keys: -> - ["completion", "configuration", "workspaceFolders", "diagnostics", - "willSave", "willSaveUntil", "didSaveTextDocument", - "fileSystemWatcher", "hover", "signatureHelp", "definition", - "references", "documentHighlight", "documentSymbol", - "workspaceSymbol", "codeAction", "codeLens", "formatting", - "documentFormatting", "documentRangeFormatting", - "documentOnTypeFormatting", "rename", "documentLink", - "executeCommand", "pullConfiguration", "typeDefinition", - "implementation", "declaration", "color", "foldingRange", - "selectionRange", "progress", "callHierarchy", "linkedEditing", - "fileEvents", "semanticTokens"] -< - - "formatterPriority": Priority of this languageserver's formatter. - - - "revealOutputChannelOn": Configure message level to show the output - channel buffer. - - - "progressOnInitialization": Enable progress report on languageserver - initialize. - -Language server start with command:~ - - Additional fields can be used for a command languageserver: - - - "command": Executable program name in $PATH or absolute path of - executable used for start languageserver. - - - "args": Command line arguments of command. - - - "detached": Detach language server when is true. - - - "shell": Use shell for server process, default: `false` - -Language server start with module:~ - - Additional fields can be used for a languageserver started by node - module: - - - "module": Absolute filepath of javascript file. - - - "args": Extra arguments used on fork javascript module. - - - "runtime": Absolute path of node runtime, node runtime of coc.nvim - is used by default. - - - "execArgv": Argv passed to node on fork, normally used for - debugging, example: `["--nolazy", "--inspect-brk=6045"]` - - - "transport": Transport kind used by server, could be 'ipc', 'stdio', - 'socket' and 'pipe'. 'ipc' is used by default (recommended). - - - "transportPort": Port number used when transport is 'socket'. - -Language server use initialized socket server:~ - - - "port": Port number of socket server. - - - "host": Host of socket server, default to `127.0.0.1`. - -============================================================================== -vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:noet:fen: diff --git a/pack/ant/start/coc.nvim/doc/coc.txt b/pack/ant/start/coc.nvim/doc/coc.txt deleted file mode 100644 index e0a843c..0000000 --- a/pack/ant/start/coc.nvim/doc/coc.txt +++ /dev/null @@ -1,3534 +0,0 @@ -*coc-nvim.txt* NodeJS client for Vim & Neovim. - -Version: 0.0.82 -Author: Qiming Zhao -License: Anti 996 license - -CONTENTS *coc-contents* - -Introduction |coc-introduction| -Requirements |coc-requirements| -Installation |coc-installation| -Configuration |coc-configuration| -LSP features |coc-lsp| - Document |coc-document| - Completion |coc-completion| - Diagnostics |coc-diagnostics| - Locations |coc-locations| - Signature help |coc-signature| - Format |coc-format| - Code action |coc-code-actions| - Document highlights |coc-document-highlights| - Document color |coc-document-color| - Snippets |coc-snippets| - Workspace |coc-workspace| - Cursors |coc-cursors| - Outline |coc-outline| - Call hierarchy |coc-callHierarchy| - Semantic highlights |coc-semantic-highlights| -Interface |coc-interface| - Key mappings |coc-key-mappings| - Variables |coc-variables| - Buffer variables |coc-buffer-variables| - Global variables |coc-global-variables| - Functions |coc-functions| - Commands |coc-commands| - Autocmds |coc-autocmds| - Highlights |coc-highlights| -Tree |coc-tree| - Tree mappings |coc-tree-mappings| - Tree filter |coc-tree-filter| -List |coc-list| - List command |coc-list-command| - List command options |coc-list-options| - List configuration |coc-list-configuration| - List mappings |coc-list-mappings| - list sources |coc-list-sources| -Dialog |coc-dialog| - Dialog basic |coc-dialog-basic| - Dialog confirm |coc-dialog-confirm| - Dialog input |coc-dialog-input| - Dialog menu |coc-dialog-menu| - Dialog picker |coc-dialog-picker| -Notification |coc-notification| -Statusline integration |coc-status| - Manual |coc-status-manual| - Airline |coc-status-airline| - Lightline |coc-status-lightline| -FAQ |coc-faq| -Changelog |coc-changelog| - -============================================================================== -INTRODUCTION *coc-introduction* - -Coc.nvim enhances your (Neo)Vim to match the user experience provided by -VSCode through a rich extension ecosystem and implemented features of Language -Server Protocol (3.16 for now). - -Some of its key features include:~ - -- APIs compatible with both Vim8 and Neovim. -- Loading VSCode-like extensions. -- Configuring coc.nvim and its extensions with JSON configuration - |coc-configuration|. -- Configuring Language Servers that using Language Server Protocol (LSP) - |coc-config-languageserver|. - -It is designed for best possible integration with other Vim plugins. - -Note: This plugin doesn't come with support for any specific language. You -will need to install a coc.nvim extension or set up the language server by -configuration. - -Note: multiple language servers for same document is allowed, but you should -avoid configure same language server that already used by coc.nvim extension. - -Note: Automatic completion plugins can't play nicely together, you can disable -automatic completion of coc.nvim through `"suggest.autoTrigger": "none"` (or -`"suggest.autoTrigger": "trigger"`) in your configuration file. - -============================================================================== -REQUIREMENTS *coc-requirements* - -Neovim >= 0.4.0 or Vim >= 8.1.1719. - -NodeJS https://nodejs.org/ >= 12.12.0. - -Yarn https://yarnpkg.com/ required to build coc.nvim from typescript source -code. - -============================================================================== -INSTALLATION *coc-installation* - -If you're using [vim-plug](https://github.com/junegunn/vim-plug), add this to -your `init.vim` or `.vimrc`: > - - Plug 'neoclide/coc.nvim', {'branch': 'release'} -< -And run: > - - :PlugInstall - -For other plugin managers, make sure to use code from the release branch. - -To use Vim's native |packages| on Linux or MaxOS, use script like: > - - #!/bin/sh - # for vim8 - mkdir -p ~/.vim/pack/coc/start - cd ~/.vim/pack/coc/start - curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz|tar xzfv - - vim -c 'helptags ~/.vim/pack/coc/start/doc|q' - - # for neovim - mkdir -p ~/.local/share/nvim/site/pack/coc/start - cd ~/.local/share/nvim/site/pack/coc/start - curl --fail -L https://github.com/neoclide/coc.nvim/archive/release.tar.gz|tar xzfv - - nvim -c 'helptags ~/.local/share/nvim/site/pack/coc/start|q' - -when using source code of coc.nvim, you'll have to install -https://yarnpkg.com/ and run `yarn install` in project root of coc.nvim. - -============================================================================== -CONFIGURATION *coc-configuration* - -The configuration of coc.nvim is stored in file `coc-settings.json`. - -Command |:CocConfig| will open (create when necessary) a user settings -file in the folder returned by |coc#util#get_config_home()|. - -To create a local configuration file for a specific workspace, use -|:CocLocalConfig|. - -The global configuration file can be created in another directory by setting -`g:coc_config_home` in your `.vimrc` or `init.vim`: > - - let g:coc_config_home = '/path/to/folder' - -The configuration files are all in JSON format (with comment supported), it's -recommended to enable JSON completion and validation by install the `coc-json` -extension: > - - :CocInstall coc-json -< -The user configuration can also be changed by |coc#config()|. - -Configurations are composed with builtin configurations and configurations -contributed by coc extensions, see |coc-config| for builtin configurations. - -============================================================================== -LSP FEATURES *coc-lsp* - -All features (except for telemetry) of LSP 3.16 are supported, checkout -the specification at -https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/ - -LSP features only works with attached document, see |coc-document-attached|. - -To check exists providers of current buffer, use command -`:CocCommand document.checkBuffer` or |CocHasProvider()|. - -For historic reason, some features just works, but some are not. - -Features automatically work by default:~ - -- Trigger completion |coc-completion|. -- Diagnostics refresh |coc-diagnostics|. -- Trigger signature help |coc-signature|. -- Inlay hints (only works with some coc extensions, but not - |coc-config-languageserver| yet). - -Note all features could be disabled/enabled by |coc-configuration| and some -vim variables. - -Features require enabled by configuration:~ - -- Semantic highlights |coc-semantic-highlights|. -- Document color highlights |coc-document-color|. -- Code lens, enabled by |coc-config-codeLens-enable|. -- Linked editing, enabled by |coc-preferences-enableLinkedEditing|. -- Format on type, enabled by |coc-preferences-formatOnType| -- Format on save, enabled by |coc-preferences-formatOnSaveFiletypes|. - -Features requested by user:~ - -- Locations related (including definitions, references etc.) |coc-locations| -- Invoke code action |coc-code-actions|. -- Show call hierarchy tree |coc-callHierarchy|. -- Format, range format and on type format |coc-format|. -- Highlight same symbol ranges |coc-document-highlights|. -- Outline of document symbols |coc-outline| and |coc-list-symbols|. -- Show hover information |CocAction('doHover')| and |CocAction('definitionHover')|. -- Rename symbol under cursor |CocAction('rename')|. -- Open link under cursor |CocAction('openlink')|. -- Range selection |CocAction('rangeSelect').| -- Create folds |CocAction('fold')|. - -For convenient, some actions have associated |coc-key-mappings| provided. -Prefer |CocAction()| for more options. - -Features triggered by languageserver or extension:~ - -- Show message notification. -- Show message request. -- Log message (use `:CocCommand workspace.showOutput` to show output). -- Show document request. -- Work done progress. - -To make coc.nvim provide LSP features for your languages, checkout -https://github.com/neoclide/coc.nvim/wiki/Language-servers - -To debug issues with languageserver, checkout -https://github.com/neoclide/coc.nvim/wiki/Debug-language-server - -============================================================================== - -DOCUMENT *coc-document* - -An associated document is created on buffer create, and disposed on buffer -unload. - -Attached document:~ - *coc-document-attached* - -An attached document means coc.nvim synchronize the lines of vim's buffer with -associated document automatically. - -Only attached documents are synchronized with language servers and therefore -LSP features could be provided for the attached buffer. - -The buffer may not be attached by following reasons: - -- The 'buftype' is neither nor 'acwrite'. -- Buffer variable |b:coc_enabled| is `0`. -- Byte length of buffer exceed |coc-preferences-maxFileSize|. -- Buffer is used for command line window. - -Use |CocAction('ensureDocument')| or `:CocCommand document.checkBuffer` to -check attached state of current buffer. - -Filetype map:~ - *coc-document-filetype* - -Some filetypes are mapped to others to match the languageId used by VSCode, -including: - -- javascript.jsx -> javascriptreact -- typescript.jsx -> typescriptreact -- typescript.tsx -> typescriptreact -- tex -> latex - -Use |g:coc_filetype_map| to create additional filetype maps. - -Use `:CocCommand document.echoFiletype` to echo mapped filetype of current -document. - -Note make sure use mapped filetypes for configurations that expect filetypes. - -============================================================================== -COMPLETION *coc-completion* - -The builtin completion of vim is no longer used, the default completion -behavior works like VSCode: - -- Completion is automatically triggered by default. -- Item selection is enabled by default, use |coc-config-suggest-noselect| to - disable default selection. -- When selection enabled and no preselect item exists, recent used item that - matched will be selected by default. -- Snippet and additional edits only work after confirm completion. -- 'completeopt' is not used and APIs of builtin popupmenu not work. - -Default Key-mappings:~ - -To make the completion work like builtin completion without configuration, -following key-mappings are used when the {lhs} is not mapped: - -Use , , and to navigate completion list: > - - inoremap coc#pum#visible() ? coc#pum#next(1) : "\" - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - inoremap coc#pum#visible() ? coc#pum#next(0) : "\" - inoremap coc#pum#visible() ? coc#pum#prev(0) : "\" -< -Use and to scroll: > - - inoremap coc#pum#visible() ? coc#pum#scroll(1) : "\" - inoremap coc#pum#visible() ? coc#pum#scroll(0) : "\" -< -Use and to cancel and confirm completion: > - - inoremap coc#pum#visible() ? coc#pum#cancel() : "\" - inoremap coc#pum#visible() ? coc#pum#confirm() : "\" - -Note: and are not remapped by coc.nvim. -> -Related variables:~ - -- Disable completion for buffer: |b:coc_suggest_disable| -- Disable specific sources for buffer: |b:coc_disabled_sources| -- Disable words for trigger completion: |b:coc_suggest_blacklist| -- Add additional keyword characters: |b:coc_additional_keywords| - -Related functions:~ - -- Trigger completion with options: |coc#start()|. -- Trigger completion refresh: |coc#refresh()|. -- Select and confirm completion: |coc#_select_confirm()|. -- Check if customized popupmenu is visible: |coc#pum#visible()|. -- Select next complete item: |coc#pum#next()|. -- Select previous complete item: |coc#pum#prev()|. -- Cancel completion and reset trigger text: |coc#pum#cancel()|. -- Confirm completion: |coc#pum#confirm()|. -- Close the popupmenu only: |coc#pum#stop()|. -- Get information of the popupmenu: |coc#pum#info()|. -- Select specific complete item: |coc#pum#select()|. -- Insert word of selected item and finish completion: |coc#pum#insert()|. -- Scroll popupmenu: |coc#pum#scroll()|. - -Customize completion:~ - -Use |coc-config-suggest| to change behavior of completion. - -Use 'pumwidth' for configure minimal width of popupmenu and 'pumheight' -for maximum height. - -Related Highlight groups: - |CocPum| for highlight groups of customized pum. - |CocSymbol| for kind icons. - |CocMenuSel| for background highlight of selected item. - -Note: background, border and winblend are configured by -|coc-config-suggest-floatConfig|. - -Example user key-mappings:~ - *coc-completion-example* - -Note: use command `:verbose imap` to check current insert -key-mappings when your key-mappings not work. - -Use and to navigate completion list: > - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' - endfunction - - " Insert when previous text is space, refresh completion if not. - inoremap - \ coc#pum#visible() ? coc#pum#next(1): - \ check_back_space() ? "\" : - \ coc#refresh() - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - -Use to trigger completion: > - - if has('nvim') - inoremap coc#refresh() - else - inoremap coc#refresh() - endif -< -Use to confirm completion, use: > - - inoremap coc#pum#visible() ? coc#_select_confirm() : "\" -< -To make to confirm selection of selected complete item or notify coc.nvim -to format on enter, use: > - - inoremap coc#pum#visible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" - -Map for trigger completion, completion confirm, snippet expand and jump -like VSCode: > - - inoremap - \ coc#pum#visible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? - \ "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - - function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - - let g:coc_snippet_next = '' -< -Note: the `coc-snippets` extension is required for this to work. - -============================================================================== -DIAGNOSTICS SUPPORT *coc-diagnostics* - -Diagnostics of coc.nvim are automatically refreshed to UI by default, checkout -|coc-config-diagnostic| for available configurations. - -Note most language servers only send diagnostics for opened buffers for -performance reason, some lint tools could provide diagnostics for all files in -workspace. - -Note pull diagnostics feature is added in LSP 3.17, which is not available -yet. - -Changes on diagnostics refresh~ - -- Add highlights for diagnostic ranges and virtual text (when enabled on - neovim with virtual text support), see |coc-highlights-diagnostics|. -- Add diagnostic signs to 'signcolumn', use `set signcolumn=yes` to avoid - unnecessary UI refresh. -- Update variable |b:coc_diagnostic_info|. -- Refresh related |location-list| which was opened by |:CocDiagnostics|. - -Diagnostics are not refreshed when buffer is hidden, and refresh on insert -mode is disabled by default. - -Diagnostics highlights:~ - -See |coc-highlights-diagnostics|. - -Enable and disable diagnostics~ - -Use |coc-config-diagnostic-enable| to toggle diagnostics feature. - -Use |CocAction('diagnosticToggle')| for enable/disable diagnostics of current -buffer. - -Show diagnostic messages~ - -Diagnostic messages would be automatically shown/hide when the diagnostics -under cursor position changed (use float window/popup when possible) by -default. - -To manually refresh diagnostics messages, use |(coc-diagnostic-info)| -and |CocAction('diagnosticPreview')|. - -Jump between diagnostics~ - -Use key-mappings: - - |(coc-diagnostic-next)| jump to next diagnostic. - |(coc-diagnostic-prev)| jump to previous diagnostic. - |(coc-diagnostic-next-error)| jump to next error. - |(coc-diagnostic-prev-error)| jump to previous error. - -Check all diagnostics~ - -Use |coc-list-diagnostics| to open |coc-list| with all available diagnostics. - -Use API |CocAction('diagnosticList')| to get list of all diagnostics. - -============================================================================== -LOCATIONS SUPPORT *coc-locations* - -There're different kinds of locations, including "definitions", "declarations", -"implementations", "typeDefinitions" and "references", the languageserver used -by current document may support some of them. - -Key-mappings for invoke locations request~ - -- |(coc-definition)| -- |(coc-declaration)| -- |(coc-implementation)| -- |(coc-type-definition)| -- |(coc-references)| -- |(coc-references-used)| - -Error will be shown when the buffer not attached |coc-document-attached|. - -Location jump behavior~ - -When there's only one location returned, the location is opened by command -specified by |coc-preferences-jumpCommand| ("edit" by default), context mark -is added by |m'|, so you can jump back previous location by . - -When multiple locations returned, |coc-list-location| is opened for preview -and other further actions. - -To use |coc-list-location| for single location as well, use -|coc-locations-api| (instead key-mappings provided by coc.nvim). - -To change default options of |coc-list-location| or use other plugin for -list of locations, see |g:coc_enable_locationlist|. - -To use vim's quickfix for locations, use configuration -|coc-preferences-useQuickfixForLocations|. - -To use vim's tag list for definitions, use |CocTagFunc()|. - - *coc-locations-api* -Related APIs~ - -APIs for jump locations: - -- Jump to definition locations |CocAction('jumpDefinition')|. -- Jump to declaration locations |CocAction('jumpDeclaration')|. -- Jump to implementation locations |CocAction('jumpImplementation')|. -- Jump to type definition locations |CocAction('jumpTypeDefinition')|. -- Jump to references |CocAction('jumpReferences')| and |CocAction('jumpUsed')|. - -APIs for get location list: - -- |CocAction('definitions')| -- |CocAction('declarations')| -- |CocAction('implementations')| -- |CocAction('typeDefinitions')| -- |CocAction('references')| - -Send custom locations request to languageserver: - -- |CocLocations()| -- |CocLocationsAsync()| - -============================================================================== -SIGNATURE HELP *coc-signature* - -Signature help of function is automatically triggered by default(when user -type trigger characters defined by the provider), which will use float -window/popup to show the signature messages when possible. - -Use |CocAction('showSignatureHelp')| to trigger signature help manually. - -Note error will not be thrown when provider not exists or nothing returned -from languageserver, use `:CocCommand document.checkBuffer` to check provider -state of current buffer. - -Use |coc-config-signature| to change default signature help behavior. - -============================================================================== -FORMAT *coc-format* - -There're various ways to format document. - -Format full document:~ - -Use |CocAction('format')|, you can create a command like: > - - command! -nargs=0 Format :call CocActionAsync('format') -< -to format current buffer. - -Format on type:~ - -Enable format when insert specific characters by configurations: - -- |coc-preferences-formatOnType| -- |coc-preferences-formatOnTypeFiletypes| - -requires `onTypeEdit` provider |CocHasProvider|. - -Format selected code:~ - -Use 'formatexpr' for specific filetypes: > - - autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') - -So that |gq| could works for format range of lines. -> -Setup visual mode and operator key-mappings: > - - xmap f (coc-format-selected) - nmap f (coc-format-selected) -< -Format on save:~ - -Use configuration |coc-preferences-formatOnSaveFiletypes|. - -Or create |BufWritePre| autocmd like: > - - autocmd BufWritePre * call CocAction('format') -< -Note avoid use |CocActionAsync| with |BufWritePre|. - -Format on enter:~ - -Use |coc#on_enter()| is required to notify coc.nvim the press on enter key. - -Configure |coc-preferences-bracketEnterImprove| - -============================================================================== -CODE ACTION *coc-code-actions* - -Code actions are used for make some specific code changes. - -There're different kinds of code actions: - -- `quickfix` used for fix diagnostic(s). -- `refactor` used for code refactor. -- `source` code actions apply to the entire file. -- `organizeImport` organize import statements of current document. - -Invoke code action~ - -To fix diagnostic at current line, use |(coc-fix-current)|. - -Key-mappings for choose code action:~ - -- |(coc-codeaction-cursor)| -- |(coc-codeaction-line)| -- |(coc-codeaction)| -- |(coc-codeaction-selected)| - -|coc-dialog-menu| would be shown for pick specific code action. - -To invoke organize import action, use command like: -> - command! -nargs=0 OR :call CocAction('runCommand', - \ 'editor.action.organizeImport') - -Related APIs~ - -- |CocAction('codeActions')| -- |CocAction('organizeImport')| -- |CocAction('fixAll')| -- |CocAction('quickfixes')| -- |CocAction('doCodeAction')| -- |CocAction('doQuickfix')| -- |CocAction('codeActionRange')| - -============================================================================== -DOCUMENT HIGHLIGHTS *coc-document-highlights* - -Document highlights is used for highlight same symbols of current document -under cusor. - -To enable highlight on CursorHold, create an autocmd like this: > - - autocmd CursorHold * silent call CocActionAsync('highlight') -< -Checkout |coc-highlights-document| for related highlight groups. - -Note error will not be thrown when provider not exists or nothing returned -from languageserver with |CocAction('highlight')| - -Install `coc-highlight` extension if you want to highlight same words under -cursor without languageserver support. - -To jump between previous/next symbol position, use -`:CocCommand document.jumpToPrevSymbol` and -`:CocCommand document.jumpToNextSymbol` - -============================================================================== -DOCUMENT COLOR *coc-document-color* - -Document colors added color highlights to your documents. To enable document -color highlights, use ||coc-config-colors-filetypes||. - -Install `coc-highlights` to provide document color highlights for all -filetypes. - -To pick a color from system color picker, use |CocAction('pickColor')| or -choose `editor.action.pickColor` from |:CocCommand|. - -Note: may not work on your system. - -To change color presentation, use |CocAction('colorPresentation')| or choose -`editor.action.colorPresentation` from |:CocCommand|. - -============================================================================== -SNIPPETS SUPPORT *coc-snippets* - -Snippets engine of coc.nvim support both VSCode snippets and ultisnips -snippets format. - -The complete item with snippet format has label ends with `~` by default. -Select the complete item and confirm the completion by |coc#pum#confirm()| to -expand the snippet. - -A snippet session would be deactivated under the following conditions: - -- |InsertEnter| triggered outside snippet. -- Jump to final placeholder. -- Content change detected after snippet. -- Content changed in a snippet outside placeholder (except for deletion of - plain text). - -To load and expand custom snippets, install `coc-snippets` extension is -recommended. - -Related configurations:~ - -- |g:coc_snippet_prev| -- |g:coc_snippet_next| -- |coc-config-suggest-snippetIndicator| -- |coc-config-suggest-preferCompleteThanJumpPlaceholder| -- |coc-preferences-snippetStatusText| -- |coc-preferences-snippetHighlight| - -Related functions:~ - -- |coc#snippet#next()| -- |coc#snippet#prev()| -- |coc#expandable()| -- |coc#jumpable()| -- |coc#expandableOrJumpable()| - -Related variables, highlights and autocmds:~ - -- |b:coc_snippet_active| -- |CocSnippetVisual| -- |CocJumpPlaceholder| - -============================================================================== -WROKSPACE SUPPORT *coc-workspace* - -Workspace folders~ - -Unlike VSCode, workspace folders are resolved from filepath after buffer -creation. - -A list of file/folder names is used for resolve workspace folder, the patterns -could comes from: - -- |b:coc_root_patterns| -- `rootPatterns` field of configured language server. -- `rootPatterns` contributions from coc extensions. -- |coc-preferences-rootPatterns| - -Workspace folder is resolved from cwd of vim first and then from top directory -to the parent directory of current filepath, when workspace folder not -resolved, current working directory is used if it's parent folder of current -buffer. Configurations are provided to change the default behavior: - -- |coc-config-workspace-ignoredFiletypes| -- |coc-config-workspace-ignoredFolders| -- |coc-config-workspace-bottomUpFiletypes| -- |coc-config-workspace-workspaceFolderCheckCwd| -- |coc-config-workspace-workspaceFolderFallbackCwd| - -Note for performance reason, user's home directory would never considered as -workspace folder, which also means the languageserver that requires workspace -folder may not work when you start vim from home directory. - -To preserve workspace folders across vim session, |g:WorkspaceFolders| is -provided. - -To manage current workspace folders, use |coc-list-folders| - -To get related root patterns of current buffer, use |coc#util#root_patterns()| - -Use `:CocCommand workspace.workspaceFolders` to echo current workspaceFolders. - -Workspace edit~ - -Workspace edit is used to apply changes for multiple buffers(and files), the -edit could includes document edits and file operations (including file create, -file/directory delete and file/directory rename). - -When the edit failed to apply, coc.nvim will revert the changes (including -document edits and file operations) that previous made. - -Files not loaded would be loaded by `tab drop` command, configured by -|coc-config-workspace-openResourceCommand|. - -To undo and redo workspace edit just applied, use command -`:CocCommand workspace.undo` and `:CocCommand workspace.redo` - -To inspect previous workspace edit, use command -`:CocCommand workspace.inspectEdit`, in opened buffer, use for jump to -change position under cursor. - -============================================================================== -CURSORS SUPPORT *coc-cursors* - -Multiple cursors supported is added to allow edit multiple locations at once. - -Cursors session could be started by following ways: - -- Use command `:CocCommand document.renameCurrentWord` to rename variable - under cursor. -- Use |(coc-refactor)| to open refactor buffer. -- Use |:CocSearch| to open searched locations. -- Use cursors related key-mappings to add text range, including - |(coc-cursors-operator)|, |(coc-cursors-word)|, - |(coc-cursors-position)| and |(coc-cursors-range)| -- Ranges added by command `editor.action.addRanges` from coc extensions. - -Default key-mappings when cursors activated: - -- cancel cursors session. -- jump to next cursors range. -- jump to previous cursors range. - -Use |coc-config-cursors| to change cursors related key-mappings. -Use highlight group |CocCursorRange| to change default range highlight. -Use |b:coc_cursors_activated| to check if cursors session is enabled. - -============================================================================== -SYMBOLS OUTLINE *coc-outline* - -Outline is a split window with current document symbols rendered as -|coc-tree|. - -To show and hide outline of current window, use |CocAction('showOutline')| and -|CocAction('hideOutline')|. - -Outline view has Window variable `cocViewId` set to `OUTLINE`. - -Following outline features are supported: -- Start fuzzy filter by |coc-config-tree-key-activeFilter|. -- Automatic update after document change. -- Automatic reload when buffer in current window changed. -- Automatic follow cursor position by default. -- Different filter modes that can be changed on the fly - |coc-config-outline-switchSortKey|. - -Note: outline would try to reload document symbols after 500ms when provider -not registered, which avoid the necessary to check provider existence. - -Checkout |coc-config-tree| and |coc-config-outline| for available -configurations. - -Checkout |CocTree| and |CocSymbol| for customize highlights. - -Use configuration `"suggest.completionItemKindLabels"` for custom icons. - -To show outline for each tab automatically, use |autocmd|: -> - autocmd VimEnter,Tabnew * - \ if empty(&buftype) | call CocActionAsync('showOutline', 1) | endif -< -To close outline when it's the last window automatically, use -|autocmd| like: -> - autocmd BufEnter * call CheckOutline() - function! CheckOutline() abort - if &filetype ==# 'coctree' && winnr('$') == 1 - if tabpagenr('$') != 1 - close - else - bdelete - endif - endif - endfunction -< -Create a key-mapping to toggle outline, like: -> - nnoremap o :call ToggleOutline() - function! ToggleOutline() abort - let winid = coc#window#find('cocViewId', 'OUTLINE') - if winid == -1 - call CocActionAsync('showOutline', 1) - else - call coc#window#close(winid) - endif - endfunction -< -============================================================================== -CALL HIERARCHY *coc-callHierarchy* - -A call hierarchy is a splited |coc-tree| with locations for incoming or -outgoing calls of current function. - -Call hierarchy window is opend by |CocAction('showIncomingCalls')| and -|CocAction('showOutgoingCalls')|. - -Call hierarchy is configured by |CocSymbol|, |coc-config-callHierarchy| and -|coc-config-tree|. - -Related ranges are highlighted with |CocSelectedRange| highlight group in -opend buffer. - -|coc-dialog-menu| could be invoked by |coc-config-tree-key-actions|. -Available actions: - -- Dismiss. -- Open in new tab. -- Show Incoming Calls. -- Show Outgoing Calls. - -Use in call hierarchy tree to open location in original window. - -============================================================================== -SEMANTIC HIGHLIGHTS *coc-semantic-highlights* - -Semantic tokens are used to add additional color information to a file that -depends on language specific symbol information. - -Use |coc-config-semanticTokens-filetypes| to enable semantic tokens highlights. - -Use `:CocCommand semanticTokens.checkCurrent` to check semantic highlight -information with current buffer. - -To create custom highlights for symbol under cursor, follow these steps: - -- Inspect semantic token by -> - :CocCommand semanticTokens.inspect -< - to check token type and token modifiers with current symbol. - -- Create new highlight group by |highlight|, for example: -> - :hi link CocSemDeclarationVariable MoreMsg -< -- Refresh semantic highlight of current buffer by: -> - :CocCommand semanticTokens.refreshCurrent -< -See |CocSem| to customize semantic token highlight groups. - -See |coc-config-semanticTokens| for related configurations. - -============================================================================== -INTERFACE *coc-interface* - ------------------------------------------------------------------------------- - -Key mappings *coc-key-mappings* - -There're some cases that local key-mappings are enabled for current buffer. - - Snippet jump key-mappings when snippet is activated: - |g:coc_snippet_prev| and |g:coc_snippet_next|. - - Cursor jump and cancel key-mappings when cursors is activated - |coc-config-cursors|. - - Dialog key-mappings for confirm and cancel dialog window - |coc-config-dialog|. - - Key-mappings for |CocList| buffer: |coc-list-mappings|. - -Note: Use |:verbose| command to check key-mappings that taking effect. - -Note: Use 'noremap' with will make the key-mapping not work at all. - -Note: key-mappings are provided for convenient, use |CocActionAsync()| or -|CocAction()| for more options. - -Normal mode key-mappings:~ - -*(coc-diagnostic-info)* Show diagnostic message of current position by -invoke |CocAction('diagnosticInfo')| - -*(coc-diagnostic-next)* Jump to next diagnostic position. - -*(coc-diagnostic-prev)* Jump to previous diagnostic position. - -*(coc-diagnostic-next-error)* Jump to next diagnostic error position. - -*(coc-diagnostic-prev-error)* Jump to previous diagnostic error position. - -*(coc-definition)* Jump to definition(s) of current symbol by invoke -|CocAction('jumpDefinition')| - -*(coc-declaration)* Jump to declaration(s) of current symbol by invoke -|CocAction('jumpDeclaration')| - -*(coc-implementation)* Jump to implementation(s) of current symbol by -invoke |CocAction('jumpImplementation')| - -*(coc-type-definition)* Jump to type definition(s) of current symbol by -invoke |CocAction('jumpTypeDefinition')| - -*(coc-references)* Jump to references of current symbol by invoke -|CocAction('jumpReferences')| - -*(coc-references-used)* Jump to references of current symbol exclude -declarations. - -*(coc-format-selected)* - - Format selected range, works on both |visual-mode| and |normal-mode|, - when used in normal mode, the selection works on the motion object. - - For example: > - - vmap p (coc-format-selected) - nmap p (coc-format-selected) -< - makes `p` format the visually selected range, and you can use - `pap` to format a paragraph. - -*(coc-format)* Format the whole buffer by invoke |CocAction('format')| -*(coc-rename)* Rename symbol under cursor to a new word by invoke -|CocAction('rename')| - -*(coc-refactor)* Open refactor window for refactor of current symbol by -invoke |CocAction('refactor')| - -*(coc-command-repeat)* Repeat latest |CocCommand|. - -*(coc-codeaction)* Get and run code action(s) for current file, use -|coc-codeaction-cursor| for same behavior as VSCode. - -*(coc-codeaction-line)* Get and run code action(s) for current line. - -*(coc-codeaction-cursor)* Get and run code action(s) using empty range -at current cursor. - -*(coc-codeaction-selected)* Get and run code action(s) with the selected -region. Works on both |visual-mode| and |normal-mode|. - -*(coc-openlink)* Open link under cursor by use |CocAction('openlink')|. - -*(coc-codelens-action)* Do command from codeLens of current line. - -*(coc-fix-current)* Try first quickfix action for diagnostics of current -line. - -*(coc-float-hide)* Hide all float windows/popups created by coc.nvim. - -*(coc-float-jump)* Jump to first float window (neovim only), use -|CTRL-W_p| for jump to previous window. - -*(coc-range-select)* - - Select next selection range. - Works on both |visual-mode| and |normal-mode|. - - Note: requires selection ranges feature of language server. - -*(coc-funcobj-i)* - - Select inside function. Recommend mapping: - Works on both |visual-mode| and |normal-mode|. - > - xmap if (coc-funcobj-i) - omap if (coc-funcobj-i) -< - Note: Requires 'textDocument.documentSymbol' support from the language - server. - -*(coc-funcobj-a)* - - Select around function. Works on both |visual-mode| and - |normal-mode|. Recommended mapping: -> - xmap af (coc-funcobj-a) - omap af (coc-funcobj-a) -< - Note: Requires 'textDocument.documentSymbol' support from the language - server. - -*(coc-classobj-i)* - - Select inside class/struct/interface. Works on both |visual-mode| and - |normal-mode|. Recommended mapping: -> - xmap ic (coc-classobj-i) - omap ic (coc-classobj-i) -< - Note: Requires 'textDocument.documentSymbol' support from the language - server. - -*(coc-classobj-a)* - - Select around class/struct/interface. Works on both |visual-mode| and - |normal-mode|. Recommended mapping: -> - xmap ac (coc-classobj-a) - omap ac (coc-classobj-a) -< - Note: Requires 'textDocument.documentSymbol' support from the language - server. - - -*(coc-cursors-operator)* Add text to cursors session by motion object. - -*(coc-cursors-word)* Add current word to cursors session. - -*(coc-cursors-position)* Add current position as empty range to cursors -session. - -Visual mode key-mappings:~ - -*(coc-range-select-backward)* - - Select previous selection range. - - Note: requires selection ranges feature of language server, like: - coc-tsserver, coc-python - -*(coc-cursors-range)* Add selection to cursors session. - ------------------------------------------------------------------------------- -VARIABLES *coc-variables* - -User defined variables:~ - ------------------------------------------------------------------------------- - -Buffer variables *coc-buffer-variables* - -b:coc_enabled *b:coc_enabled* - - Set to `0` on buffer create if you don't want coc.nvim receive content - from buffer. Normally used with |BufAdd| autocmd, example: -> - " Disable file with size > 1MB - autocmd BufAdd * if getfsize(expand('')) > 1024*1024 | - \ let b:coc_enabled=0 | - \ endif -< -b:coc_root_patterns *b:coc_root_patterns* - - Root patterns used for resolving workspaceFolder for - the current file, will be used instead of - `"coc.preferences.rootPatterns"` setting. Example: > - - autocmd FileType python let b:coc_root_patterns = - \ ['.git', '.env'] -< - -b:coc_suggest_disable *b:coc_suggest_disable* - - Disable completion support of current buffer. Example: > - - " Disable completion for python - autocmd FileType python let b:coc_suggest_disable = 1 - -b:coc_disabled_sources *b:coc_disabled_sources* - - Disabled completion sources of current buffer. Example: -> - let b:coc_disabled_sources = ['around', 'buffer', 'file'] -< -b:coc_diagnostic_disable *b:coc_diagnostic_disable* - - Disable diagnostic support of current buffer. - -b:coc_suggest_blacklist *b:coc_suggest_blacklist* - - List of input words for which completion should not be triggered. - Example: > - - " Disable completion for 'end' in lua files - autocmd FileType lua let b:coc_suggest_blacklist = ["end"] - -b:coc_additional_keywords *b:coc_additional_keywords* - - Addition keyword characters for generate keywords. Example: > - - " Add keyword characters for css - autocmd FileType css let b:coc_additional_keywords = ["-"] - -b:coc_trim_trailing_whitespace *b:coc_trim_trailing_whitespace* - - Trim trailing whitespace on a line, default `0`. - Use by "FormattingOptions" send to the server. - -b:coc_trim_final_newlines *b:coc_trim_final_newlines* - - Trim all newlines after the final newline at the end of the file. - Use by "FormattingOptions" send to the server. - - Other buffer options that affect document format: 'eol', 'shiftwidth' - and 'expandtab'. - - Note: language server may not respect format options. - ------------------------------------------------------------------------------- - -Global variables *coc-global-variables* - -g:coc_disable_startup_warning *g:coc_disable_startup_warning* - - Disable possible warning on startup for old vim/node version. - - Default: 0 - -g:coc_disable_uncaught_error *g:coc_disable_uncaught_error* - - Disable uncaught error messages from node process of coc.nvim. - - Default: 0 - -g:coc_text_prop_offset *g:coc_text_prop_offset* - - Start |textprop| id offset of highlight namespaces on vim, change to - other value to avoid conflict. - - Default: 1000 - -g:coc_channel_timeout *g:coc_channel_timeout* - - Channel timeout in seconds for request to node client. - - Default: 30 - -g:coc_disable_transparent_cursor *g:coc_disable_transparent_cursor* - - Disable transparent cursor when CocList is activated. - Set it to `1` if you have issue with transparent - cursor. - - Default: 0 - -g:coc_start_at_startup *g:coc_start_at_startup* - - Start coc service on startup, use |CocStart| to start server when you - set it to 0. - - Default: 1 - -g:coc_global_extensions *g:coc_global_extensions* - - Global extension names to install when they aren't installed. -> - let g:coc_global_extensions = ['coc-json', 'coc-git'] -< - Note: coc.nvim will try to install extensions that are not installed - in this list after initialization. - -g:coc_uri_prefix_replace_patterns *g:coc_uri_prefix_replace_patterns* - - This map defines URI prefix replacements. This is useful in the case - that an LSP requires code to adhere to a particular directory - structure. For example, `/Users/myUser/workspace` can be mapped to - `/home/myUser/workspace`. -> - let g:coc_uri_prefix_replace_patterns = {'/Users': '/home'} -< -g:coc_enable_locationlist *g:coc_enable_locationlist* - - Use location list of |CocList| when jump to locations. - - Set it to 0 when you need customize behavior of location jump by use - |CocLocationsChange| and |g:coc_jump_locations| - - If you want use vim's quickfix list instead, add - `"coc.preferences.useQuickfixForLocations": true` in your - configuration file, this configuration would be ignored and no autocmd - triggered. - - Default: 1 - -g:coc_snippet_next *g:coc_snippet_next* - - Trigger key for going to the next snippet position, applied in insert - and select mode. - - Only works when snippet session is activated. - - Default: - -g:coc_snippet_prev *g:coc_snippet_prev* - - Trigger key for going to the previous snippet position, applied in - insert and select mode. - - Only works when snippet session is activated. - - Default: - -g:coc_filetype_map *g:coc_filetype_map* - - Map for document filetypes so the server could handle current document - as another filetype, example: > - - let g:coc_filetype_map = { - \ 'html.swig': 'html', - \ 'wxss': 'css', - \ } -< - Default: {} - - See |coc-document-filetype| for details. - -g:coc_selectmode_mapping *g:coc_selectmode_mapping* - - Add key mappings for making snippet select mode easier. > - - snoremap c - snoremap c - snoremap c - snoremap "_c -< - Default: 1 - -g:coc_node_path *g:coc_node_path* - - Path to node executable to start coc service, example: > - - let g:coc_node_path = '/usr/local/opt/node@12/bin/node' -< - Use this when coc has problems with your system node, - - Note: you can use `~` as home directory. - -g:coc_node_args *g:coc_node_args* - - Arguments passed to node when starting coc service from source code. - - Useful for starting coc in debug mode, example: > -> - let g:coc_node_args = ['--nolazy', '--inspect-brk=6045'] -< - Default: [] - -g:coc_status_error_sign *g:coc_status_error_sign* - - Error character used for statusline, default: `E` - -g:coc_status_warning_sign *g:coc_status_warning_sign* - - Warning character used for statusline, default: `W` - -g:coc_quickfix_open_command *g:coc_quickfix_open_command* - - Command used for open quickfix list. To jump fist position after - quickfix list opend, you can use: -> - let g:coc_quickfix_open_command = 'copen|cfirst' -< - Default: |copen| - -g:node_client_debug *g:node_client_debug* - - Enable debug mode of node client for check rpc messages between vim - and coc.nvim. Use environment variable $NODE_CLIENT_LOG_FILE to set - the log file or get the log file after coc.nvim started. - To open the log file, use command: > - - :call coc#client#open_log() -< - Default: `0` - -g:coc_config_home *g:coc_config_home* - - Configure the directory which will be used to look for - user's `coc-settings.json`, default: - - Windows: `~/AppData/Local/nvim` - Other: `~/.config/nvim` - -g:coc_data_home *g:coc_data_home* - - Configure the directory which will be used to for data - files(extensions, mru and so on), default: - - Windows: `~/AppData/Local/coc` - Other: `~/.config/coc` - -g:coc_terminal_height *g:coc_terminal_height* - - Height of terminal window, default `8`. - -g:coc_markdown_disabled_languages *g:coc_markdown_disabled_languages* - - Filetype list that should be disabled for highlight in markdown block, - Example: > - - let g:coc_markdown_disabled_languages = ['html'] - -g:coc_highlight_maximum_count *g:coc_highlight_maximum_count* - - When highlight items exceed maximum count, highlight items will be - grouped and added by using |timer_start| for better user experience. - - Default `100` - -g:coc_default_semantic_highlight_groups *g:coc_default_semantic_highlight_groups* - - Create default semantic highlight groups for |coc-semantic-highlights| - - Default: `1` - -g:coc_max_treeview_width *g:coc_max_treeview_width* - - Maximum width of tree view when adjusted by auto width. - - Default: `40` - -g:coc_borderchars *g:coc_borderchars* - - Border characters used by border window, default to: -> - ['─', '│', '─', '│', '┌', '┐', '┘', '└'] -< - Note: you may need special font like Nerd font to show them. - -g:coc_border_joinchars *g:coc_border_joinchars* - - Border join characters used by float window/popup, default to: -> - ['┬', '┤', '┴', '├'] -< - Note: you may need special font like Nerd font to show them. - -g:coc_prompt_win_width *g:coc_prompt_win_width* - - Width of input prompt window, default `32`. - - *g:coc_notify* -g:coc_notify_error_icon *g:coc_notify_error_icon* - - Error icon for notification, default to:  - -g:coc_notify_warning_icon *g:coc_notify_warning_icon* - - Warning icon for notification, default to: ⚠ - -g:coc_notify_info_icon *g:coc_notify_info_icon* - - Info icon for notification, default to:  - ------------------------------------------------------------------------------- - -Some variables are provided by coc.nvim. - - -g:WorkspaceFolders *g:WorkspaceFolders* - - Current workspace folders, used for restoring from a session file, add - `set sessionoptions+=globals` to vimrc for restoring globals on - session load. - -g:coc_jump_locations *g:coc_jump_locations* - - This variable would be set to jump locations when the - |CocLocationsChange| autocmd is fired. - - Each location item contains: - - 'filename': full file path. - 'lnum': line number (1 based). - 'col': column number(1 based). - 'text': line content of location. - -g:coc_process_pid *g:coc_process_pid* - - Process pid of coc.nvim service. If your vim doesn't kill coc.nvim - process on exit, use: -> - autocmd VimLeavePre * if get(g:, 'coc_process_pid', 0) - \ | call system('kill -9 '.g:coc_process_pid) | endif -< - in your vimrc. - -g:coc_service_initialized *g:coc_service_initialized* - - Is `1` when coc.nvim initialized, used with autocmd |CocNvimInit|. - -g:coc_status *g:coc_status* - - Status string contributed by coc.nvim and extensions, used for status - line. - -g:coc_last_float_win *g:coc_last_float_win* - - Window id of latest created float/popup window. - -g:coc_last_hover_message *g:coc_last_hover_message* - - Last message echoed from `doHover`, can be used in statusline. - - Note: not used when floating or preview window used for `doHover`. - -b:coc_snippet_active *b:coc_snippet_active* - - Is `1` when snippet session is activated, use |coc#jumpable| to check - if it's possible to jump placeholder. - -b:coc_diagnostic_info *b:coc_diagnostic_info* - - Diagnostic information of current buffer, the format would look like: - - `{'error': 0, 'warning': 0, 'information': 0, 'hint':0}` - - can be used to customize statusline. See |coc-status|. - -b:coc_current_function *b:coc_current_function* - - Function string that current cursor in. - - Set `"coc.preferences.currentFunctionSymbolAutoUpdate": true` - in coc-settings.json to update it on CursorHold. - -b:coc_cursors_activated *b:coc_cursors_activated* - - Use expression `get(b:, 'coc_cursors_activated',0)` to check if - cursors session is activated for current buffer. - ------------------------------------------------------------------------------- -FUNCTIONS *coc-functions* - -Coc functions are normally used by user defined command/keymap or other -plugins. - -Note: some functions only work after the coc service has been initialized. - -To run a function on startup, use an autocmd like: > - - autocmd User CocNvimInit call CocAction('runCommand', - \ 'tsserver.watchBuild') -< -coc#start([{option}]) *coc#start()* - - Start completion with optional {option}. Option could contains: - - - `source` specific completion source name. - - Example: > - - inoremap =coc#start({'source': 'word'}) -< - Use `:CocList sources` to get available sources. - -coc#refresh() *coc#refresh()* - - Start or refresh completion at current cursor position, bind this to - 'imap' to trigger completion, example: > - - inoremap coc#refresh() - -coc#_select_confirm() *coc#_select_confirm()* - - Select first completion item if no completion item is selected, then - confirm the completion. - -coc#config({section}, {value}) *coc#config()* - - Change user configuration, overwrite configurations from - user config file and default values. Example: > - - call coc#config('coc.preferences', { - \ 'timeout': 1000, - \}) - call coc#config('languageserver', { - \ 'ccls': { - \ "command": "ccls", - \ "trace.server": "verbose", - \ "filetypes": ["c", "cpp", "objc", "objcpp"] - \ } - \}) -< - - Note: this function can be called multiple times. - Note: this function can be called before coc.nvim started. - Note: this function can work alongside the user configuration file, - but it's not recommended to use both. - -coc#add_extension({name}, ...) *coc#add_extension()* - - Deprecated function for install extensions not exists. - Use |g:coc_global_extensions| variable instead. - - Example: > - - call coc#add_extension('coc-json', 'coc-tsserver', 'coc-rls') -< - This function can be called before service initialized. - This function can be called multiple times. - -coc#add_command({id}, {command}, [{title}]) *coc#add_command()* - - Add custom Vim command to commands list opened by - `:CocList commands` . - - Example: > - - call coc#add_command('mundoToggle', 'MundoToggle', - \ 'toggle mundo window') -< -coc#expandable() *coc#expandable()* - - Check if a snippet is expandable at the current position. - Requires `coc-snippets` extension installed. - -coc#jumpable() *coc#jumpable()* - - Check if a snippet is jumpable at the current position. - -coc#expandableOrJumpable() *coc#expandableOrJumpable()* - - Check if a snippet is expandable or jumpable at the current position. - Requires `coc-snippets` extension installed. - -coc#on_enter() *coc#on_enter()* - - Notify coc.nvim that `` has been pressed. - - Used for the format on type and improvement of brackets, example: > - - " Confirm the completion when popupmenu is visible, insert and - " notify coc.nvim otherwise. - inoremap coc#pum#visible() ? coc#pum#confirm() - \: "\u\\=coc#on_enter()\" -< - Note:to enable format on type, add ` "coc.preferences.formatOnType": true` - in your settings file. - -coc#status() *coc#status()* - - Return a status string that can be used in the status line, the status - includes diagnostic information from `b:coc_diagnostic_info` and - extension contributed statuses from `g:coc_status`. For statusline - integration, see |coc-status| - -coc#util#api_version() *coc#util#api_version()* - - Get coc.nvim's vim api version number, start from `1`. - -coc#util#job_command() *coc#util#job_command()* - - Get the job command used for starting the coc service. - -coc#util#get_config_home() *coc#util#get_config_home()* - - Get the config directory that contains the user's coc-settings.json. - -coc#util#get_data_home() *coc#util#get_data_home()* - - Get `coc` data directory. - -coc#util#extension_root() *coc#util#extension_root()* - - Return extensions root of coc.nvim. - -coc#util#rebuild() *coc#util#rebuild()* - - Run `npm rebuild` for all coc extensions. - -coc#util#root_patterns() *coc#util#root_patterns()* - - Get root patterns used for current document. - - Result could be something like: > - - {'global': ['.git', '.hg', '.projections.json'], 'buffer': [], 'server': v:null} -< -coc#util#get_config({key}) *coc#util#get_config()* - - Get configuration (mostly defined in coc-settings.json) by {key}, - example: > - - :echo coc#util#get_config('coc.preferences') - -coc#snippet#next() *coc#snippet#next()* - - Jump to next placeholder, does nothing when |coc#jumpable| is 0. - -coc#snippet#prev() *coc#snippet#prev()* - - Jump to previous placeholder, does nothing when |coc#jumpable| is 0. - - *coc#pum* -coc#pum#visible() *coc#pum#visible()* - - Check if customized popupmenu is visible. - -coc#pum#next({insert}) *coc#pum#next()* - - Select next item of customized popupmenu, insert word when {insert} is - truth value. - -coc#pum#prev({insert}) *coc#pum#prev()* - - Select previous item of customized popupmenu, insert word when {insert} - is truth value. - -coc#pum#stop() *coc#pum#stop()* - - Close the customized popupmenu, works like of vim. - Return - -coc#pum#cancel() *coc#pum#cancel()* - - Cancel the customized popupmenu and revert trigger input, like - of vim. Return empty string. - -coc#pum#confirm() *coc#pum#confirm()* - - Confirm completion and close the customized pum, like of vim. - Return empty string. - -coc#pum#info() *coc#pum#info()* - - Return information of the customized popupmenu, should only be used - when |coc#pum#visible()| is 1. - - Result contains: - index Current select item index, 0 based. - scrollbar Non-zero if a scrollbar is displayed. - row Screen row count, 0 based. - col Screen column count, 0 based. - width Width of pum, including padding and border. - height Height of pum, including padding and border. - size Count of displayed complete items. - inserted Is |v:true| when there is item inserted. - -coc#pum#select({index}, {insert}, {confirm}) *coc#pum#select()* - - Selects an item in the completion popupmenu. - Return empty string. - - Parameters:~ - {index} Index (zero-based) of the item to select. - {insert} Whether the selection should be inserted - in the buffer. - {confirm} Confirm the completion and dismis the - popupmenu, implies `insert`. - -coc#pum#insert() *coc#pum#insert()* - - Insert word of current selected item and finish completion. - Timer is used to make it works as rhs of key-mappings. - -coc#pum#scroll({forward}) *coc#pum#scroll()* - - Scroll the popupmenu forward or backward by page. - Timer is used to make it works as rhs of key-mappings. - Return empty string. - - Parameters:~ - {forward} Scroll forward when none zero. - - *coc#notify* -coc#notify#close_all() *coc#notify#close_all()* - - Close all notification windows. - -coc#notify#do_action([{winid}]) *coc#notify#do_action()* - - Invoke action for all notification windows, or particular window with - winid. - -coc#notify#copy() *coc#notify#copy()* - - Copy all content from notifications to system clipboard. - -coc#notify#show_sources() *coc#notify#show_sources()* - - Show source name (extension name) in notification windows. - -coc#notify#keep() *coc#notify#keep()* - - Stop auto hide timer of notification windows. - -coc#float#has_float([{all}]) *coc#float#has_float()* - - Check if float window/popup exists, check coc.nvim's float - window/popup by default. - -coc#float#close_all([{all}]) *coc#float#close_all()* - - Close all float windows/popups created by coc.nvim, set {all} to `1` - for all float window/popups. - -coc#float#close({winid}) *coc#float#close()* - - Close float window/popup with {winid}. - -coc#float#has_scroll() *coc#float#has_scroll()* - - Return `1` when there is scrollable float window/popup created by - coc.nvim. - - Example key-mappings: -> - if has('nvim-0.4.0') || has('patch-8.2.0750') - nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" - inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" - vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" - endif -< -coc#float#scroll({forward}, [{amount}]) *coc#float#scroll()* - - Scroll all scrollable float windows/popups, scroll backward when - {forward} is not `1`. {amount} could be number or full page when - omitted. - - Note: this function requires nvim >= 0.4.0 or vim >= 8.2.750 to work. - - -CocRequest({id}, {method}, [{params}]) *CocRequest()* - - Send a request to language client of {id} with {method} and optional - {params}. Example: > - - call CocRequest('tslint', 'textDocument/tslint/allFixes', - \ {'textDocument': {'uri': 'file:///tmp'}}) -< - Vim error will be raised if the response contains an error. - - *CocRequestAsync()* - -CocRequestAsync({id}, {method}, [{params}, [{callback}]]) - - Send async request to remote language server. - {callback} function is called with error and response. - -CocNotify({id}, {method}, [{params}]) *CocNotify()* - - Send notification to remote language server, example: -> - call CocNotify('ccls', '$ccls/reload') -< - *CocRegistNotification()* - -CocRegistNotification({id}, {method}, {callback}) - - Register notification callback for specified client {id} and {method}, - example: > - - autocmd User CocNvimInit call CocRegistNotification('ccls', - \ '$ccls/publishSemanticHighlight', function('s:Handler')) -< - {callback} is called with single param as notification result. - - Note: when register notification with same {id} and {method}, only the - later registered would work. - - *CocLocations()* - -CocLocations({id}, {method}, [{params}, {openCommand}]) - - Send location request to language client of {id} with - {method} and optional {params}. eg: > - - call CocLocations('ccls', '$ccls/call', {'callee': v:true}) - - call CocLocations('ccls', '$ccls/call', {}, 'vsplit') -< - {openCommand}: optional command to open buffer, default to - `coc.preferences.jumpCommand` , |:edit| by default. When it's - `v:false` locations list would always used. - - *CocLocationsAsync()* - -CocLocationsAsync({id}, {method}, [{params}, {openCommand}]) - - Same as |CocLocations()|, but send notification to server instead - of request. - - -CocAction({action}, [...{args}]) *CocAction()* - - Run {action} of coc with optional extra {args}. - - Checkout |coc-actions| for available actions. - - Note: it's recommended to use |CocActionAsync()| unless you have to - block your vim. - - *CocActionAsync()* - -CocActionAsync({action}, [...{args}, [{callback}]]) - - Call CocAction by send notification to server of coc.nvim. - - Optional callback is called with `error` as the first argument and - `response` as the second argument. - - Checkout |coc-actions| for available actions. - -CocHasProvider({feature}) *CocHasProvider()* - - Check if provider exists for specified feature of current buffer. - Supported features: - - `rename` `onTypeEdit` `documentLink` `documentColor` `foldingRange` - `format` `codeAction` `workspaceSymbols` `formatRange` `hover` - `signature` `documentSymbol` `documentHighlight` `definition` - `declaration` `typeDefinition` `reference` `implementation` `codeLens` - `selectionRange` - -CocTagFunc({pattern}, {flags}, {info}) *CocTagFunc()* - - Used for vim's 'tagfunc' option, to make tag search by |CTRL-]| use - coc.nvim as provider, tag search would be performed when no result - from coc.nvim. - - Make sure your vim support 'tagfunc' by -> - :echo exists('&tagfunc') -< ------------------------------------------------------------------------------- - *coc-actions* -Available Actions ~ - -Acceptable {action} names for |CocAction()| and |CocActionAsync()|. - -"ensureDocument" *CocAction('ensureDocument')* - - Ensure current document is attached to coc.nvim - |coc-document-attached|, should be used when you need invoke action of - current document on buffer create. - - Return |v:false| when document can't be attached. - -"diagnosticList" *CocAction('diagnosticList')* - - Get all diagnostic items of the current Neovim session. - -"diagnosticInfo" *CocAction('diagnosticInfo')* - - Show diagnostic message at the current position, do not truncate. - -"diagnosticToggle" [{enable}] *CocAction('diagnosticToggle')* - - Enable/disable diagnostics on the fly, not work when `displayByAle` is - enabled. You can toggle by specifying {enable}. {enable} can be 0 or 1 - -"diagnosticPreview" *CocAction('diagnosticPreview')* - - Show diagnostics under current cursor in preview window. - -"diagnosticRefresh" [{bufnr}] *CocAction('diagnosticRefresh')* - - Force refresh diagnostics for special buffer with {bufnr} or all buffers - when {bufnr} doesn't exist, returns `v:null` before diagnostics are shown. - - NOTE: Will refresh in any mode. - - Useful when `diagnostic.autoRefresh` is `false`. - -"refreshSource" [{source}] *CocAction('refreshSource')* - - refresh all sources or a source with a name of {source}. - -"sourceStat" *CocAction('sourceStat')* - - get the list of completion source stats for the current buffer. - -"toggleSource" {source} *CocAction('toggleSource')* - - enable/disable {source}. - -"definitions" *CocAction('definitions')* - - Get definition locations of symbol under cursor. - Return LSP `Location[]` - -"declarations" *CocAction('declarations')* - - Get declaration location(s) of symbol under cursor. - Return LSP `Location | Location[] | LocationLink[]` - -"implementations" *CocAction('implementations')* - - Get implementation locations of symbol under cursor. - Return LSP `Location[]` - -"typeDefinitions" *CocAction('typeDefinitions')* - - Get type definition locations of symbol under cursor. - Return LSP `Location[]` - -"references" [{excludeDeclaration}] *CocAction('references')* - - Get references location list of symbol under cursor. - - {excludeDeclaration}: exclude declaration locations when not zero. - - Return LSP `Location[]` - -"jumpDefinition" [{openCommand}] *CocAction('jumpDefinition')* - - jump to definition locations of the current symbol. - Return `v:false` when location not found. - - |coc-list-location| is used when more than one position is available, - for custom location list, use variable: |g:coc_enable_locationlist|. - - To always use |coc-list-location|| for locations, use `v:false` for - {openCommand}. - - {openCommand}: optional command to open buffer, default to - `coc.preferences.jumpCommand` in `coc-settings.json` - -"jumpDeclaration" [{openCommand}] *CocAction('jumpDeclaration')* - - jump to declaration locations of the current symbol. - Return `v:false` when location not found. - - same behavior as "jumpDefinition". - - When {openCommand} is `v:false`, location list would be always used. - -"jumpImplementation" [{openCommand}] *CocAction('jumpImplementation')* - - Jump to implementation locations of the current symbol. - Return `v:false` when location not found. - - same behavior as "jumpDefinition" - -"jumpTypeDefinition" [{openCommand}] *CocAction('jumpTypeDefinition')* - - Jump to type definition locations of the current symbol. - Return `v:false` when location not found. - - same behavior as "jumpDefinition" - -"jumpReferences" [{openCommand}] *CocAction('jumpReferences')* - - Jump to references locations of the current symbol, use - |CocAction('jumpUsed')| to exclude declaration locations. - - Return `v:false` when location not found. - - same behavior as "jumpDefinition" - -"jumpUsed" [{openCommand}] *CocAction('jumpUsed')* - - Jump references locations withtout declarations. - - same behavior as "jumpDefinition" - -"getHover" *CocAction('getHover')* - - Get documentation text array on current position, returns array of - string. - -"doHover" [{hoverTarget}] *CocAction('doHover')* - - Show documentation of current symbol, return `v:false` when hover not - found. - - {hoverTarget}: optional specification for where to show hover info, - defaults to `coc.preferences.hoverTarget` in `coc-settings.json`. - Valid options: ["preview", "echo", "float"] - -"definitionHover" [{hoverTarget}] *CocAction('definitionHover')* - - Same as |CocAction('doHover')|, but includes definition contents from - definition provider when possible. - -"showSignatureHelp" *CocAction('showSignatureHelp')* - - Echo signature help of current function, return `v:false` when - signature not found. You may want to set up an autocmd like this: > - - autocmd User CocJumpPlaceholder call - \ CocActionAsync('showSignatureHelp') -< -"getCurrentFunctionSymbol" *CocAction('getCurrentFunctionSymbol')* - - Return the function string that current cursor in. - -"documentSymbols" [{bufnr}] *CocAction('documentSymbols')* - - Get a list of symbols of current buffer or specific {bufnr}. - -"rename" *CocAction('rename')* - - Rename the symbol under the cursor position, user will be prompted for - a new name. - - Note: coc.nvim supports rename for disk files, but your language server - may not. - -"refactor" *CocAction('refactor')* - - Open refactor windows with current symbol as activated cursor ranges. - Check |coc-config-cursors| and |coc-config-refactor| for related - configuration. - - Use to open buffer at current position in split window. - Use to show action menu which have tab open and remove actions. - -"format" *CocAction('format')* - - Format current buffer using the language server. - Return `v:false` when format failed. - -"formatSelected" [{mode}] *CocAction('formatSelected')* - - Format the selected range, {mode} should be one of visual mode: `v` , - `V`, `char`, `line`. - - When {mode} is omitted, it should be called using |formatexpr|. - - -"selectionRanges" *CocAction('selectionRanges')* - - Get selection ranges of current position from language server. - -"services" *CocAction('services')* - - Get an information list for all services. - -"toggleService" {serviceId} *CocAction('toggleService')* - - Start or stop a service. - -"codeAction" [{mode}] [{only}] *CocAction('codeAction')* - - Prompt for a code action and do it. - - {mode} could be `line` or `cursor` or result of |visualmode()|, - current buffer range is used when it's empty string. - - {only} can be title of a codeAction or list of CodeActionKind. - -"codeActionRange" {start} {end} [{kind}] *CocAction('codeActionRange')* - - Run code action for range. - - {start} Start line number of range. - {end} End line number of range. - {kind} Code action kind, see |CocAction('codeActions')| for available - action kind. - - Can be used to create commands like: > - - command! -nargs=* -range CocAction :call CocActionAsync('codeActionRange', , , ) - command! -nargs=* -range CocFix :call CocActionAsync('codeActionRange', , , 'quickfix') -< -"codeLensAction" *CocAction('codeLensAction')* - - Invoke the command for codeLens of current line (or the line that - contains codeLens just above). Prompt would be shown when multiple - actions are available. - -"commands" *CocAction('commands')* - - Get a list of available service commands for the current buffer. - -"runCommand" [{name}] [...{args}] *CocAction('runCommand')* - - Run a global command provided by the language server. If {name} is not - provided, a prompt with a list of commands is shown to be selected. - - {args} are passed as arguments of command. - - You can bind your custom command like so: > - - command! -nargs=0 OrganizeImport - \ :call CocActionAsync('runCommand', 'tsserver.organizeImports') - -"fold" {{kind}} *CocAction('fold')* - - Fold the current buffer, optionally use {kind} for filtering folds, - {kind} could be either 'comment', 'imports' or 'region' - - Return `v:false` when failed. - -"highlight" *CocAction('highlight')* - - Highlight the symbols under the cursor. - -"openLink" [{command}] *CocAction('openlink')* - - Open a link under the cursor with {command}. - {command} default to `edit`. - - File and URL links are supported, return `v:false` when failed. - - Uri under cursor is searched when no link returned from documentLink - provider. - -"extensionStats" *CocAction('extensionStats')* - - Get all extension states as a list. Including `id`, `root` and - `state`. - - State could be `disabled`, `activated` and `loaded`. - -"toggleExtension" {id} *CocAction('toggleExtension')* - - Enable/disable an extension. - -"uninstallExtension" {id} *CocAction('uninstallExtension')* - - Uninstall an extension. - -"reloadExtension" {id} *CocAction('reloadExtension')* - - Reload an activated extension. - -"activeExtension" {id} *CocAction('activeExtension')* - - Activate extension of {id}. - -"deactivateExtension" {id} *CocAction('deactivateExtension')* - - Deactivate extension of {id}. - -"pickColor" *CocAction('pickColor')* - - Change the color at the current cursor position, requires - `documentColor` provider |CocHasProvider|. - - Note: only works on mac or when you have python support on Vim and - have the gtk module installed. - -"colorPresentation" *CocAction('colorPresentation')* - - Change the color presentation at the current color position, requires - `documentColor` provider |CocHasProvider|. - -"codeActions" [{mode}] [{only}] *CocAction('codeActions')* - - Get codeActions list of current document. - - {mode} can be result of |visualmode()| for visual selected - range. When it's falsy value, current file is used as range. - - {only} can be array of codeActionKind, possible values including: - - 'refactor': Base kind for refactoring actions - - 'quickfix': base kind for quickfix actions - - 'refactor.extract': Base kind for refactoring extraction actions - - 'refactor.inline': Base kind for refactoring inline actions - - 'refactor.rewrite': Base kind for refactoring rewrite actions - - 'source': Base kind for source actions - - 'source.organizeImports': Base kind for an organize imports source - action - - 'source.fixAll': Base kind for auto-fix source actions - - {only} can also be string, which means filter by tilte of codeAction. - -"organizeImport" *CocAction('organizeImport')* - - Run organize import codeAction for current buffer. - Show warning when codeAction not found. - -"fixAll" *CocAction('fixAll')* - - Run fixAll codeAction for current buffer. - Show warning when codeAction not found. - - -"quickfixes" [{visualmode}] *CocAction('quickfixes')* - - Get quickfix codeActions of current buffer. - - Add {visualmode} as second argument get quickfix actions with range of - latest |visualmode()| - -"doCodeAction" {codeAction} *CocAction('doCodeAction')* - - Do a codeAction. - -"doQuickfix" *CocAction('doQuickfix')* - - Do the first preferred quickfix action on current line. - - Throw error when no quickfix action found. - -"addRanges" {ranges} *CocAction('addRanges')* - - Ranges must be provided as array of range type: https://git.io/fjiEG - -"getWordEdit" *CocAction('getWordEdit')* - - Get workspaceEdit of current word, language server used when possible, - extract word from current buffer as fallback. - -"getWorkspaceSymbols" {input} *CocAction('getWorkspaceSymbols')* - - Get workspace symbols from {input}. - -"resolveWorkspaceSymbol" {symbol} *CocAction('resolveWorkspaceSymbol')* - - Resolve location for workspace {symbol}. - -"diagnosticToggleBuffer" [{bufnr}] [{enable}] *CocAction('diagnosticToggleBuffer')* - - Toggle diagnostics for specific buffer, current buffer is used when - {bufnr} not provided. 0 for current buffer - You can toggle by specifying {enable}. {enable} can be 0 or 1 - - Note: this will only affect diagnostics shown in the UI, list of all - diagnostics won't change. - -"showOutline" [{keep}] *CocAction('showOutline')* - - Show |coc-outline| for current buffer. Does nothing when outline - window already shown for current buffer. - - {keep} override `"outline.keepWindow"` configuration when specified. - Could be 0 or 1. - - Returns after window is shown (document symbol request is still in - progress). - -"hideOutline" *CocAction('hideOutline')* - - Close |coc-outline| on current tab. Throws vim error when it can't - be closed by vim. - -"incomingCalls" [{CallHierarchyItem}] *CocAction('incomingCalls')* - - Retrieve incoming calls from {CallHierarchyItem} or current position - when not provided. - -"outgoingCalls" [{CallHierarchyItem}] *CocAction('outgoingCalls')* - - Retrieve outgoing calls from {CallHierarchyItem} or current position - when not provided. - -"showIncomingCalls" *CocAction('showIncomingCalls')* - - Show incoming calls of current function with |coc-tree|, see - |coc-callHierarchy| - -"showOutgoingCalls" *CocAction('showOutgoingCalls')* - - Show outgoing calls of current function with |coc-tree|. - -"semanticHighlight" *CocAction('semanticHighlight')* - - Request semantic tokens highlight for current buffer. - -"inspectSemanticToken" *CocAction('inspectSemanticToken')* - - Inspect semantic token information at cursor position. - -"rangeSelect" {visualmode} {forward} *CocAction('rangeSelect')* - - Visual select previous or next code range, requires `selectionRange` - provider. - - {visualmode} should be result of {visualmode} or "" for current cursor - position. - {forward} select backward when it's falsy value. - ------------------------------------------------------------------------------- -COMMANDS *coc-commands* - -:CocStart *:CocStart* - - Start the coc.nvim server, do nothing if it's already started. - -:CocRestart *:CocRestart* - - Restart coc.nvim service. - - Use this command when you want coc to start all over again. - -:CocDisable *:CocDisable* - - Disable handling vim events. - -:CocEnable *:CocEnable* - - Enable handling vim events. - -:CocConfig *:CocConfig* - - Edit the user config file `.vim/coc-settings.json` in - |coc#util#get_config_home()| - -:CocLocalConfig *:CocLocalConfig* - - Edit or create `.vim/coc-settings.json` in current workspace folder. - -:CocInstall [{option}] {name} ... *:CocInstall* - - Install one or more coc extensions. - - {option}: could be `-sync` for use blocked process to download instead - of terminal. - - Examples: > - - " Install latest coc-omni - :CocInstall coc-omni - " Install coc-omni 1.0.0 - :CocInstall coc-omni@1.0.0 - " Install snippet extension from github - :CocInstall https://github.com/dsznajder/vscode-es7-javascript-react-snippets -> -:CocUninstall {name} *:CocUninstall* - - Uninstall an extension, use to complete the extension - name. - -:CocUpdate *:CocUpdate* - - Update all coc extensions to the latest version. - -:CocUpdateSync *:CocUpdateSync* - - Block version of update coc extensions. - -:CocRebuild *:CocRebuild* - - Run `npm rebuild` for coc extensions. - - May be required when environment nodejs get upgraded. - -:CocCommand {name} [{args}] ... *:CocCommand* - - Run a command contributed by extensions, use `` for name - completion. - -:CocOpenLog *:CocOpenLog* - - Open log file of coc.nvim. - - Use environmental variable `NVIM_COC_LOG_FILE` for fixed log file. - Note: the log would be cleared when coc.nvim started. - - Use environment variable `NVIM_COC_LOG_LEVEL` to change log level - (default 'info', could be 'all', 'trace', 'debug', 'info', - 'warn', 'error', 'off'). - Use shell command: > - - export NVIM_COC_LOG_LEVEL=debug -< - or add: > - - let $NVIM_COC_LOG_LEVEL='debug' -< - to the beginning of your `.vimrc` - -:CocInfo *:CocInfo* - - Show version and log information in a split window, useful for - submitting a bug report. - -:CocDiagnostics [height] *:CocDiagnostics* - - Open vim's |location-list| with diagnostics of current buffer. - -:CocSearch *:CocSearch* - - Perform search by ripgrep https://github.com/BurntSushi/ripgrep, - refactor window would be opened. - - Note: the search is performed on your files, so normally you should - save your buffers before invoke this command. - - Common arguments for ripgrep:~ - - `-e` `--regexp`: treat search pattern as regexp. - `-F` `--fixed-strings`: treat search pattern as fixed string. - `-L` `--follow`: follow symbolic links while traversing directories. - `-g` `--glob` {GLOB}: Include or exclude files and directories for - searching that match the given glob. - `--hidden`: Search hidden files and directories. - `--no-ignore-vcs`: Don't respect version control ignore files - (.gitignore, etc.). - `--no-ignore`: Don't respect ignore files (.gitignore, .ignore, etc.). - `-w` `--word-regexp`: Only show matches surrounded by word boundaries. - `-S` `--smart-case`: Searches case insensitively if the pattern is all - lowercase. Search case sensitively otherwise. - `--no-config`: Never read configuration files. - `-x` `--line-regexp`: Only show matches surrounded by line boundaries. - - Use `:man 1 rg` in your terminal for more details. - - Note: By default, hidden files and directories are skipped. - - Note: By default, vcs ignore files including `.gitignore` and - `.ignore` are respected - - Escape arguments:~ - - || is used to convert command line arguments to arguments of - rg, which means you have to escape space for single argument. For - example, if you want to search `import { Neovim` , you have to use: -> - :CocSearch import\ \{\ Neovim -< - The escape for `{` is required because rg use regexp be default, or: -> - :CocSearch -F import\ {\ Neovim -< - for strict match. - - Change and save:~ - - Refactor session is started with searched patterns highlighted, just - change the text and save refactor buffer to make changes across all - related files. You can make any kind of changes, including add lines - and remove lines. - -:CocWatch [extension] *:CocWatch* - - Watch loaded [extension] for reload on file change, use for - complete extension id. - -:CocOutline *:CocOutline* - - Invoke |CocAction('showOutline')| by notification. - ------------------------------------------------------------------------------- -AUTOCMD *coc-autocmds* - - *CocLocationsChange* - -:autocmd User CocLocationsChange {command} - - For building a custom view of locations, set - |g:coc_enable_locationlist| to 0 and use this autocmd with with - |g:coc_jump_locations| - - For example, to disable auto preview of location list, use: -> - let g:coc_enable_locationlist = 0 - autocmd User CocLocationsChange CocList --normal location -< - *CocNvimInit* -:autocmd User CocNvimInit {command} - - Triggered after the coc services have started. - - If you want to trigger an action of coc after Vim has started, this - autocmd should be used because coc is always started asynchronously. - - *CocStatusChange* - -:autocmd User CocStatusChange {command} - - Triggered after `g:coc_status` changed, can be used for refresh - stautsline. - - *CocDiagnosticChange* - -:autocmd User CocDiagnosticChange {command} - - Triggered after the diagnostic status has changed. - - Could be used for updating the statusline. - - *CocJumpPlaceholder* - -:autocmd User CocJumpPlaceholder {command} - - Triggered after a jump to a placeholder. Can be used for - showing signature help like: > - - autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -< - *CocOpenFloat* - -:autocmd User CocOpenFloat {command} - - Triggered when a floating window is opened. The window is not - focused, use |g:coc_last_float_win| to get window id. - - *CocOpenFloatPrompt* - -:autocmd User CocOpenFloatPrompt {command} - - Triggered when a floating prompt window is opened (triggered after - CocOpenFloat). - - *CocTerminalOpen* -:autocmd User CocTerminalOpen {command} - - Triggered when the terminal is shown, can be used for adjusting the - window height. - ------------------------------------------------------------------------------- - -HIGHLIGHTS *coc-highlights* - -To customize a highlight, simply use |:highlight| command in your vimrc, like: -> - " make error texts have a red color - highlight CocErrorHighlight ctermfg=Red guifg=#ff0000 -< -Type |:highlight| command with group name to check current highlight. - -Note: don't use `:hi default` for overwriting the highlights. - -Note: user defined highlight commands should appear after the |:colorscheme| -command and use |ColorScheme| autocmd to make sure customized highlights works -after color scheme change. - -Markdown related~ - -*CocBold* for bold text. -*CocItalic* for italic text. -*CocUnderline* for underlined text. -*CocStrikeThrough* for strikethrough text, like usage of deprecated API. -*CocMarkdownCode* for inline code in markdown content. -*CocMarkdownHeader* for markdown header in floating window/popup. -*CocMarkdownLink* for markdown link text in floating window/popup. - -Diagnostics related~ - *coc-highlights-diagnostics* - -*CocFadeOut* for faded out text, such as for highlighting unnecessary code. -*CocErrorSign* for error signs. -*CocWarningSign* for warning signs. -*CocInfoSign* for information signs. -*CocHintSign* for hint signs. -*CocErrorVirtualText* for error virtual text. -*CocWarningVirtualText* for warning virtual text. -*CocInfoVirtualText* for information virtual text. -*CocHintVirtualText* for hint virtual text. -*CocErrorHighlight* for error code range. -*CocWarningHighlight* for warning code range. -*CocInfoHighlight* for information code range. -*CocHintHighlight* for hint code range. -*CocDeprecatedHighlight* for deprecated code range, links to -|CocStrikeThrough| by default. -*CocUnusedHighlight* for unnecessary code range, links to |CocFadeOut| by -default. -*CocErrorLine* line highlight of sign which contains error. -*CocWarningLine* line highlight of sign which contains warning. -*CocInfoLine* line highlight of sign which information. -*CocHintLine* line highlight of sign which contains hint. - -Highlight with higher priority would overwrite highlight with lower priority. -The priority order: - - |CocUnusedHighlight| > |CocDeprecatedHighlight| > |CocErrorHighlight| - > |CocWarningHighlight| > |CocInfoHighlight| > |CocHintHighlight| - -Document highlight related~ - *coc-highlights-document* - -Highlights used for highlighting same symbols in the buffer at the current -cursor position. - -*CocHighlightText* default symbol highlight. -*CocHighlightRead* for `Read` kind of document symbol. -*CocHighlightWrite* for `Write` kind of document symbol. - -Float window/popup related~ - -*CocFloating* default highlight group of floating windows/popups. -Default link to |NormalFloat| on neovim and|`Pmenu| on vim. -*CocErrorFloat* for errors in floating windows/popups. -*CocWarningFloat* for warnings in floating windows/popups. -*CocInfoFloat* for infos in floating windows/popups. -*CocHintFloat* for hints in floating windows/popups. - -Notification window/popup related~ - -CocNotification *CocNotification* - -*CocNotificationProgress* for progress line in progress notification. -*CocNotificationButton* for action buttons in notification window. -*CocNotificationError* for highlight border of error notification. -*CocNotificationWarning* for highlight border of warning notification. -*CocNotificationInfo* for highlight border of info notification. - -List related~ - *coc-highlights-list* - -*CocListLine* for current cursor line. -*CocListSearch* for matched characters. -*CocListMode* for mode text in the statusline. -*CocListPath* for cwd text in the statusline. -*CocSelectedText* for sign text of selected lines (multiple selection only). -*CocSelectedLine* for line highlight of selected lines (multiple selection only). - -Tree view related~ - -CocTree *CocTree* - -*CocTreeTitle* for title in tree view. -*CocTreeDescription* for description beside label. -*CocTreeOpenClose* for open and close icon in tree view. -*CocTreeSelected* for highlight lines contains selected node. - -Popup menu related~ - *CocPum* -*CocPumSearch* for matched input characters, linked to |CocSearch| by default. -*CocPumMenu* for menu of complete item. -*CocPumShortcut* for shortcut text of source. -*CocPumDeprecated* for deprecated label. -*CocPumVirtualText* for virtual text which enabled by -|coc-config-suggest-virtualText| - -Symbol icons~ - -CocSymbol *CocSymbol* - -Highlight groups for symbol icons, including `CompletionItemKind` and -`SymbolKind` of LSP. The highlight groups link to related |nvim-treesitter| -highlight groups when possible and fallback to builtin highlight groups. - -*CocSymbolDefault* linked to |hl-MoreMsg| by default. -*CocSymbolText* -*CocSymbolUnit* -*CocSymbolValue* -*CocSymbolKeyword* -*CocSymbolSnippet* -*CocSymbolColor* -*CocSymbolReference* -*CocSymbolFolder* -*CocSymbolFile* -*CocSymbolModule* -*CocSymbolNamespace* -*CocSymbolPackage* -*CocSymbolClass* -*CocSymbolMethod* -*CocSymbolProperty* -*CocSymbolField* -*CocSymbolConstructor* -*CocSymbolEnum* -*CocSymbolInterface* -*CocSymbolFunction* -*CocSymbolVariable* -*CocSymbolConstant* -*CocSymbolString* -*CocSymbolNumber* -*CocSymbolBoolean* -*CocSymbolArray* -*CocSymbolObject* -*CocSymbolKey* -*CocSymbolNull* -*CocSymbolEnumMember* -*CocSymbolStruct* -*CocSymbolEvent* -*CocSymbolOperator* -*CocSymbolTypeParameter* - -Note: Use configuration |coc-config-suggest-completionItemKindLabels| for customized icon -characters. - -Semantic token highlight groups~ - *CocSem* - -Semantic highlight groups are starts with `CocSem` which link to related -|nvim-treesitter| highlight groups when possible and fallback to builtin -highlight groups, use variable |g:coc_default_semantic_highlight_groups| to -disable creation of these highlight groups. - -Only semantic tokens types and `deprecated` modifier have default -highlight groups. - -You need create highlight groups for highlight other modifiers and/or specific -modifier with type, for example: -> - " Add highlights for defaultLibrary modifier - hi link CocSemDefaultLibrary TSOtherDefaultLibrary - hi link CocSemDefaultLibraryClass TSTypeDefaultLibrary - hi link CocSemDefaultLibraryInterface TSTypeDefaultLibrary - hi link CocSemDefaultLibraryEnum TSTypeDefaultLibrary - hi link CocSemDefaultLibraryType TSTypeDefaultLibrary - hi link CocSemDefaultLibraryNamespace TSTypeDefaultLibrary - - " Add highlights for declaration modifier - hi link CocSemDeclaration TSOtherDeclaration - hi link CocSemDeclarationClass TSTypeDeclaration - hi link CocSemDeclarationInterface TSTypeDeclaration - hi link CocSemDeclarationEnum TSTypeDeclaration - hi link CocSemDeclarationType TSTypeDeclaration - hi link CocSemDeclarationNamespace TSTypeDeclaration -< -The modifier highlight groups have higher priority. - -Others~ - -*CocSearch* highlight group for matched characters in list. -*CocDisabled* highlight for disabled items, eg: menu item. -*CocCodeLens* for virtual text of codeLens. -*CocCursorRange* for highlight of activated cursors ranges. -*CocLinkedEditing* for highlight of activated linked editing ranges. -*CocHoverRange* for range of current hovered symbol. -*CocMenuSel* for current menu item in menu dialog (should only provide -background color). -*CocSelectedRange* for highlight ranges of outgoing calls. -*CocSnippetVisual* for highlight snippet placeholders. -*CocInlayHint* for highlight inlay hint virtual text block, default linked to -|CocHintSign| - -============================================================================== -TREE SUPPORT *coc-tree* - -Tree view is used for render outline and call hierarchy, following features -are supported: - -- Data update while keep tree node open/close state. -- Auto refresh on load error. -- Click open/close icon to toggle collapse state. -- Click node to invoke default command. -- Show tooltip in float window on |CursorHold| when possible. -- Key-mappings support |coc-tree-mappings| -- Optional multiple selection. -- Optional node reveal support. -- Optional fuzzy filter support. -- Provide api `window.createTreeView` for extensions. - -Check |coc-config-tree| for related configurations. - -The filetype is `'coctree'`, which can be used to overwrite buffer and window -options. - -Use variable |w:cocViewId| to detect the kind of tree. - ------------------------------------------------------------------------------- - -TREE KEY MAPPINGS *coc-tree-mappings* - -Default key-mappings are provided for 'coctree' buffer, which can be changed -by configuration |coc-config-tree|. - - - Select/unselect item, configured by `"tree.key.toggleSelection"`. - - Invoke actions of current item, configured by `"tree.key.actions"`. - - Close tree window, configured by `"tree.key.close"`. - - Invoke command of current item, configured by `"tree.key.invoke"`. - - Move cursor to original window. -f - Activate filter, configured by `"tree.key.activeFilter"`. -t - Trigger key to toggle expand state of tree node, configured by - `tree.key.toggle`. -M - Collapse all tree node, configured by `"tree.key.collapseAll"`. - ------------------------------------------------------------------------------- - -TREE FILTER *coc-tree-filter* - -Filter mode is used for search for specific node by fuzzy filter, invoke the -key configured by `"tree.key.activeFilter"` to activate filter mode. - -Note: some tree views not have filter mode supported. - -When filter mode is activated, type normal character to insert filter input -and following special keys are supported: - - - Delete last filter character when possible. - - Delete last filter character when possible. - - Clean up filter text. - - Navigate to previous filter text (stored on command invoke). - - Navigate to next filter text (stored on command invoke). - - exit filter mode. - - exit filter mode. - or `"tree.key.selectPrevious"` - Select previous node. - or `"tree.key.selectNext"` - Select next node. - or `"key.key.invoke"` - Invoke command of selected node. - -============================================================================== -LIST SUPPORT *coc-list* - -Built-in list support to make working with lists of items easier. - -The following features are supported: - -- Insert & normal mode. -- Default key-mappings for insert & normal mode. -- Customize key-mappings for insert & normal mode. -- Commands for reopening & doing actions with a previous list. -- Different match modes. -- Interactive mode. -- Auto preview on cursor move. -- Number select support. -- Built-in actions for locations. -- Parse ANSI code. -- Mouse support. -- Select actions using . -- Multiple selections using in normal mode. -- Select lines by visual selection. - ------------------------------------------------------------------------------- - -LIST COMMAND *coc-list-command* - -:CocList [{...options}] [{source}] [{...args}] *:CocList* - - Open coc list of {source}, example: > - - :CocList --normal location -< - For current jump locations. - - See |coc-list-options| for available list options, - - Also check |coc-config-list| for list configuration. - - {args} are sent to source during the fetching of list. - Press `?` on normal mode to get supported {args} of current - list. - - When {source} is empty, lists source is used. - -:CocListResume [{name}] *:CocListResume* - - Reopen last opened list, input and cursor position will be preserved. - -:CocListCancel *:CocListCancel* - - Close list, useful when the list is not the current window. - -:CocPrev [{name}] *:CocPrev* - - Invoke default action for the previous item in the last {name} list. - - Doesn't open the list window if it's closed. - -:CocNext [{name}] *:CocNext* - - Invoke the default action for the next item in the last {name} list. - - Doesn't open the list window if it's closed. - -:CocFirst [{name}] *:CocFirst* - - Invoke default action for first item in the last {name} list. - -:CocLast [{name}] *:CocLast* - - Invoke default action for last item in the last {name} list. - - *coc-list-options* -Options of CocList command~ - ---top - Show list as top window. - ---tab - Open list in new tabpage. - ---normal - - Start list in normal mode, recommended for short list. - ---no-sort - Disable sort made by fuzzy score or most recently used, use it when - it's already sorted. - ---input={input} - - Specify the input on session start. - ---strict --S - Use strict matching instead of fuzzy matching. - ---regex --R - Use regex matching instead of fuzzy matching. - ---ignore-case - - Ignore case when using strict matching or regex matching. - ---number-select --N - Type a line number to select an item and invoke the default action on - insert mode. Type `0` to select the 10th line. - - ---interactive --I - Use interactive mode, list items would be reloaded on input - change, filter and sort would be done by list implementation. - - Note: only works when the list support interactive mode. - - Note: filtering and sorting would be done by underlying task, which - means options including `--strict`, `--no-sort`, `--regex`, - `--ignore-case` would not work at all. - ---auto-preview --A - - Start a preview for the current item on the visible list. - ---no-quit - - Not quit list session after do action. - - Note: you may need to refresh the list for current state. - ---first - - Invoke default action for first list item on list open. - Nothing happens when the list is empty. - ---reverse - - Reverse lines order of list. - ------------------------------------------------------------------------------- - -LIST CONFIGURATION *coc-list-configuration* - -Use `coc-settings.json` for configuration of lists. - -Configuration of list starts with 'list.'. - -See |coc-config-list| or type `list.` in your settings file to get completion -list (requires coc-json installed). - -For configuration of a specified list, use section that starts with: -`list.source.{name}`, where `{name}` is the name of list. - -Change default action:~ - -If you want to use `tabe` as default action of symbols list, you can use: -> - // change default action of symbols - "list.source.symbols.defaultAction": "tabe" -< -in your coc-settings.json - -Change default options:~ - -Use `list.source.{name}.defaultOptions` setting like: > - - // make symbols list use normal mode and interactive by default - "list.source.symbols.defaultOptions": ["--interactive", "--number-select"], -< -Note: some list like symbols only work in interactive mode, you must -include `--interactive` in `defaultOptions`. - -Note: default options will not be used when there're options passed -with |:CocList| command. - -Change default arguments:~ - -Use `list.source.{name}.defaultArgs` setting like: > - - // use regex match for grep source - "list.source.grep.defaultArgs": ["-regex"], - -Note: default arguments used only when arguments from |:CocList| command is -empty. - -Note: Type `?` on normal mode to get supported arguments of current list. - ------------------------------------------------------------------------------- - -LIST MAPPINGS *coc-list-mappings* - -Default mappings on insert mode: - - - Cancel list session. - - Do default action with selected items or current item. - - Stop loading task. - - Paste text from system clipboard. - - Reload list. - - Change to normal mode. - - Select next line. - - Select previous line. - - Move cursor left. - - Move cursor right. - - Move cursor to end of prompt. - - Same as . - - Move cursor to start of prompt. - - Same as . - - Scroll window forward. - - Scroll window backward. - - Remove previous character of cursor. - - Remove previous character of cursor. - - Remove previous word of cursor. - - Remove characters before cursor. - - Navigate to next input in history. - - Navigate to previous input in history. - - Switch matcher for filter items. - - Insert content from vim's register. - - Select action. - -Default mappings on normal mode: - - - Cancel list session. - - Do default action with selected items or current item. - - Stop source from fetching more items. - - Reload list. - - Mark all visible items selected. - - Jump to original window on list create. - - Select action. - - Scroll preview window down. - - Scroll preview window up. - - Toggle select of current item. -i,I,o,O,a,A - Change to insert mode. -p - Preview action. -: - Cancel list session without closing window. -? - Show help of current list. -t - Do 'tabe' action. -d - Do 'drop' action. -s - Do 'split' action. - -Use |coc-list-mappings-custom| to override default mappings. - - *coc-list-mappings-custom* - -Configurations `"list.normalMappings"` and `"list.insertMappings"` are used -for customizing the list key-mappings, example: > - - "list.insertMappings": { - "": "do:refresh", - "": "feedkeys:\\", - "": "feedkeys:\\", - "": "normal:j", - "": "normal:k", - "": "action:tabe", - "": "call:MyFunc", - // paste yanked text to prompt - "": "eval:@@" - } - "list.normalMappings": { - "c": "expr:MyExprFunc" - "d": "action:delete" - } -< -Note: you should only use mappings that start with ` can't be remapped for other actions. - -The mapping expression should be `command:arguments`, available commands: - -'do' - special actions provided by coc list, including: - 'refresh' - reload list. - 'selectall' - mark all visible items selected. - 'switch' - switch matcher used for filter items. - 'exit' - exit list session. - 'stop' - stop loading task. - 'cancel' - cancel list session but leave list window open. - 'toggle' - toggle selection of current item. - 'togglemode' - toggle between insert and normal mode. - 'previous' - move cursor to previous item. - 'next' - move cursor to next item. - 'defaultaction' - do default action for selected item(s). - 'chooseaction' - choose action for selected item(s). - 'jumpback' - stop prompt and jump back to original window. - 'previewtoggle' - toggle preview window, requires preview action exists. - 'previewup' - scroll preview window up. - 'previewdown' - scroll preview window down. - 'help' - show help. -'prompt' - do prompt action, including: - 'previous' - change to previous input in history. - 'next' - change to next input in history. - 'start' - move cursor to start. - 'end' - move cursor to end. - 'left' - move cursor left. - 'right' - move cursor right. - 'deleteforward' - remove previous character. - 'deletebackward' - remove next character. - 'removetail' - remove characters afterwards. - 'removeahead' - remove character ahead. - 'removeword' - remove word before cursor. - 'insertregister' - insert content from Vim register. - 'paste' - append text from system clipboard to prompt. -'eval' - append text to prompt from result of VimL expression. -'action' - execute action of list, use to find available actions. -'feedkeys' - feedkeys to list window, use `\\` in JSON to escape special - characters. -'normal' - execute normal command in list window. -'normal!' - execute normal command without remap. -'command' - execute command. -'call' - call Vim function with |coc-list-context| as only argument. -'expr' - same as 'call' but expect the function return action name. - - *coc-list-context* - -Context argument contains the following properties: - -'name' - name of the list, example: `'location'`. -'args' - arguments of the list. -'input' - current input of prompt. -'winid' - window id on list activated. -'bufnr' - buffer number on list activated. -'targets' - list of selected targets, checkout |coc-list-target| for properties. - - *coc-list-target* - -Target contains the following properties: - -'label' - mandatory property that is shown in the buffer. -'filtertext' - optional filter text used for filtering items. -'location' - optional location of item, check out https://bit.ly/2Rtb6Bo -'data' - optional additional properties. - ------------------------------------------------------------------------------- - -LIST SOURCES *coc-list-sources* - ------------------------------------------------------------------------------- - -location *coc-list-location* - - Last jump locations. - - Actions: - - - 'preview' : preview location in preview window. - - 'open': open location by use - `"coc.preferences.jumpCommand"`, default action - - 'tabe': Use |:tabe| to open location. - - 'drop': Use |:drop| to open location. - - 'vsplit': Use |:vsplit| to open location. - - 'split': Use |:split| to open location. - - 'quickfix': Add selected items to Vim's quickfix. - -extensions *coc-list-extensions* - - Manage coc.nvim extensions. - - Actions: - - - 'toggle' activate/deactivate extension, default action. - - 'disable' disable extension. - - 'enable' enable extension. - - 'lock' lock/unlock extension to current version. - - 'doc' view extension's README doc. - - 'fix' fix dependencies in terminal buffer. - - 'reload' reload extension. - - 'uninstall' uninstall extension. - -diagnostics *coc-list-diagnostics* - - All diagnostics for the workspace. - - Actions: - - - Same as |coc-list-location| - -folders *coc-list-folders* - - Manage current workspace folders of coc.nvim. - - Actions: - - - 'edit' change the directory of workspace folder. - - 'delete' remove selected workspace folder. - -outline *coc-list-outline* - - Symbols in the current document. - - Actions: - - - Same as |coc-list-location| - -symbols *coc-list-symbols* - - Search workspace symbols. - - Actions: - - - Same as |coc-list-location| - -services *coc-list-services* - - Manage registered services. - - Actions: - - - 'toggle': toggle service state, default action. - -commands *coc-list-commands* - - Workspace commands. - - Actions: - - - 'run': run selected command, default action. - -links *coc-list-links* - - Links in the current document. - - Actions: - - - 'open': open the link, default action. - - 'jump': jump to link definition. - -sources *coc-list-completion-sources* - - Available completion sources. - - Actions: - - - 'toggle': activate/deactivate source, default action. - - 'refresh': refresh source. - - 'open': open the file where source defined. - -lists *coc-list-lists* - - Get available lists. - - Actions: - - - 'open': open selected list, default action. - -============================================================================== - -DIALOG SUPPORT *coc-dialog* - -Dialog is special float window/popup that could response to user actions, -dialog have close button, border, title (optional), bottom buttons(optional). - -Note bottom buttons work different on neovim and vim, on neovim you can -click the button since neovim allows focus of window, on vim you have to type -highlighted character to trigger button callback. - -Note dialog feature requires neovim >= 0.4.0 or vim >= 8.2.0750 to work. - -See |coc-config-dialog| for available configurations. - ------------------------------------------------------------------------------- - - *coc-dialog-basic* - -A basic dialog is create by javascript api `window.showDialog` , which is just -some texts with optional buttons. - ------------------------------------------------------------------------------- - - *coc-dialog-confirm* - -A confirm dialog is used for user to confirm an action, normally created by -`window.showPrompt()` Confirm dialog uses filter feature on vim8 and -|getchar()| on neoivm. - -The difference is you can operate vim on vim8, but not on neovim. - -Supported key-mappings: - - - force cancel, return -1 for callback. -, n, N - reject the action, return 0 for callback. -y,Y - accept the action, return 1 for callback. - ------------------------------------------------------------------------------- - - *coc-dialog-input* - -An input dialog request user input with optional default value, normally -created by `window.requestInput`, when `"coc.preferences.promptInput"` is -false, vim's commandline input prompt is used instead. - -On neovim, it uses float window, on vim8, it opens terminal in popup. - -Supported key-mappings: - - - move cursor to first col. - - move cursor to last col. - - cancel input, null is received by callback. - - accept current input selection of current item. - -QuickPick related (available when created by |coc-dialog-quickpick|). - - - scroll forward quickpick list. - - scroll backward quickpick list. - - move to next item in quickpick list. - - move to previous item in quickpick list. - - toggle selection of current item in quickpick list when -canSelectMany is supported. - -Note on neovim, other insert mode key-mappings could work. - -Note not possible to configure key-mappings on vim8, to customize key-mappings -on neovim, use |CocOpenFloatPrompt| with current buffer. - ------------------------------------------------------------------------------- - - *coc-dialog-quickpick* - -A quickpick is a input dialog in the middle with a float window/popup contains -filtred list items. - -A simple fuzzy filter is used by default. - -See |coc-config-dialog| for available configurations. - -See |coc-dialog-input| for available key-mappings. - ------------------------------------------------------------------------------- - - *coc-dialog-menu* - -A menu dialog is shown aside current cursor position for pick a single item -from list of items, extensions could use `window.showMenuPicker` to create menu -dialog. - -Supported key-mappings: - - - cancel selection. - - confirm selection of current item, use -|dialog.confirmKey| to override. -1-9 - select item with 1 based index. -g - move to first item. -G - move to last item. -j - move to next item. -k - move to previous item. - - scroll forward. - - scroll backward. - ------------------------------------------------------------------------------- - - *coc-dialog-picker* - -A picker dialog is used for multiple selection. On neovim, it's possible to -toggle selection by mouse click inside the bracket. Extensions could use -`window.showPickerDialog` to create picker dialog. - -Supported key-mappings: - - - cancel selection. - - confirm selection of current item, use -|dialog.confirmKey| to override. - - toggle selection of current item. -g - move to first item. -G - move to last item. -j - move to next item. -k - move to previous item. - - scroll forward. - - scroll backward. - -Note when close button is clicked, the selection is canceled with undefined -result (same as ). - -============================================================================== - -NOTIFICATION SUPPORT *coc-notification* - -Notification windows are shown from bottom right of the screen. Notifications -behavior like notifications on VSCode. - -Notifications are created by javascript APIs: `window.showErrorMessage()`, -`window.showWarningMessage()`, `window.showInformationMessage()`, -`window.showNotification()` and `window.withProgress()`. - -Possible kind of notifications: 'error', 'warning', 'info' and 'progress'. - -Message notifications (not progress) requires -|coc-preferences-enableMessageDialog| to be `true`. Message notifications -without actions would be automatically closed after milliseconds specified by -|coc-config-notification-timeout|. - -Features: - -- Animated position and 'winblend' on show and hide. -- Reposition current tab notification windows when notification dismissed. -- Notification with same options will be replaced to avoid duplicated windows. -- Percent and message update for progress notification. -- Click the button (neovim only) or use |coc#notify#do_action()| to invoke - actions. -- Click the window would cancel auto close (on neovim and focusable is true). -- For customize icons, see |g:coc_notify|. -- For customize highlights, see |CocNotification|. -- For customize other behaviors, see |coc-config-notification|. -- For available user actions (ex: "close_all", "do_action" "show_sources"), see - |coc#notify|. - -Note notification feature requires neovim >= 0.4.0 or vim >= 8.2.0750 to work. - -============================================================================== - -STATUSLINE SUPPORT *coc-status* - -Diagnostics info and other status info contributed by extensions could be -shown in statusline. - -The easiest way is add `%{coc#status()}` to your 'statusline' option. Example: > - - set statusline^=%{coc#status()} -> ------------------------------------------------------------------------------- - - *coc-status-manual* - -Create function: -> - function! StatusDiagnostic() abort - let info = get(b:, 'coc_diagnostic_info', {}) - if empty(info) | return '' | endif - let msgs = [] - if get(info, 'error', 0) - call add(msgs, 'E' . info['error']) - endif - if get(info, 'warning', 0) - call add(msgs, 'W' . info['warning']) - endif - return join(msgs, ' ') . ' ' . get(g:, 'coc_status', '') - endfunction -< -Add `%{StatusDiagnostic()}` to your 'statusline' option. - ------------------------------------------------------------------------------- - - *coc-status-airline* - -With vim-airline: https://github.com/vim-airline/vim-airline - -Error and warning display should work in vim-airline out of box. - -Disable vim-airline integration: -> - let g:airline#extensions#coc#enabled = 0 -< -Change error symbol: -> - let airline#extensions#coc#error_symbol = 'Error:' -< -Change warning symbol: -> - let airline#extensions#coc#warning_symbol = 'Warning:' -< -Change error format: -> - let airline#extensions#coc#stl_format_err = '%E{[%e(#%fe)]}' -< -Change warning format: -> - let airline#extensions#coc#stl_format_warn = '%W{[%w(#%fw)]}' -< ------------------------------------------------------------------------------- - *coc-status-lightline* - -With lightline.vim: https://github.com/itchyny/lightline.vim - -Use configuration like: > - - let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'cocstatus', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'cocstatus': 'coc#status' - \ }, - \ } - - " Use autocmd to force lightline update. - autocmd User CocStatusChange,CocDiagnosticChange call lightline#update() -< -============================================================================== -CUSTOM SOURCE *coc-custom-source* - -Creating a custom source in VimL is supported. - -Check out https://github.com/neoclide/coc.nvim/wiki/Create-custom-source - -============================================================================== -FAQ *coc-faq* - ------------------------------------------------------------------------------- - -Check out https://github.com/neoclide/coc.nvim/wiki/F.A.Q - -============================================================================== -CHANGELOG *coc-changelog* - -See history.md under project root. - -============================================================================== -vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:noet:fen: diff --git a/pack/ant/start/coc.nvim/history.md b/pack/ant/start/coc.nvim/history.md deleted file mode 100644 index 8f0a635..0000000 --- a/pack/ant/start/coc.nvim/history.md +++ /dev/null @@ -1,1475 +0,0 @@ -# 2022-06-14 - -- Add highlight groups `CocListLine` and `CocListSearch`. - -# 2022-06-11 - -- Add configuration "notification.disabledProgressSources" -- Add "rounded" property to "floatConfig" - -# 2022-06-04 - -- Add configuration `workspace.openOutputCommand`. -- Log channel message of vim when `g:node_client_debug` enabled. - -# 2022-05-30 - -- Disable `progressOnInitialization` for language client by default. - -# 2022-05-28 - -- Support `repeat#set` for commands that make changes only. - -# 2022-05-24 - -- Add transition and annotation support for `workspace.applyEdits()`. -- Add command `workspace.undo` and `workspace.redo`. -- Remove configuration `coc.preferences.promptWorkspaceEdit`. -- Remove command `CocAction` and `CocFix`. - -# 2022-05-22 - -- Check for previous position when not able to find completion match. -- Add `content` support to `window.showMenuPicker()` - -# 2022-05-17 - -- Add `QuickPick` module. -- Add API `window.showQuickPick()` and `window.createQuickPick()`. - -# 2022-05-16 - -- Add properties `title`, `loading` & `borderhighlight` to `InputBox` - -# 2022-05-14 - -- Add `InputOption` support to `window.requestInput` -- Add API `window.createInputBox()`. - -# 2022-05-13 - -- Notification support like VSCode https://github.com/neoclide/coc.nvim/discussions/3813 -- Add configuration `notification.minProgressWidth` -- Add configuration `notification.preferMenuPicker` -- Support `source` in notification windows. - -# 2022-05-07 - -- Show sort method as description in outline view. -- Add configuration `outline.switchSortKey`, default to ``. -- Add configuration `outline.detailAsDescription`, default to `true`. -- Add variable `g:coc_max_treeview_width`. -- Add `position: 'center'` support to `window.showMenuPicker()` - -# 2022-05-06 - -- Use menu for `window.showQuickpick()`. -- Add configuration `outline.autoWidth`, default to `true`. - -# 2022-05-05 - -- Add key bindings to dialog (created by `window.showDialog()`) on neovim. - -# 2022-05-04 - -- Add `languages.registerInlayHintsProvider()` for inlay hint support. - -# 2022-04-25 - -- Add `LinkedEditing` support - -# 2022-04-23 - -- Add `WinScrolled` event to events. - -# 2022-04-20 - -- Select recent item when input is empty and selection is `recentUsedByPrefix`. -- Add `coc#snippet#prev()` and `coc#snippet#next()`. -- Add command `document.checkBuffer`. -- Add `region` param to `window.diffHighlights()`. - -# 2022-04-06 - -- `workspace.onDidOpenTextDocument` fire `contentChanges` as empty array when - document changed with same lines. - -# 2022-04-04 - -- Avoid `CompleteDone` cancel next completion. -- Avoid indent change on `` and `` during completion. -- Support `joinUndo` and `move` with `document.applyEdits()`. - -# 2022-04-02 - -- Change `suggest.triggerCompletionWait` default to `0`. -- Not trigger completion on `TextChangedP`. -- Remove configuration `suggest.echodocSupport`. -- Fix complettion triggered after ``. - -# 2022-03-31 - -- Check buffer rename on write. - -# 2022-03-30 - -- Improve words parse performance. -- Remove configurations `coc.source.around.firstMatch` and `coc.source.buffer.firstMatch`. -- Fix `coc.source.buffer.ignoreGitignore` not works - -# 2022-03-30 - -- Check document reload on detach. - -# 2022-03-29 - -- Add menu actions to refactor buffer. - -# 2022-03-12 - -- Avoid use `` for cancel completion. - -# 2022-03-05 - -- Make `WinClosed` event fires on `CursorHold` to support vim8. -- Add events `TabNew` and `TabClose`. -- Make outline reuse TreeView buffer. - -# 2022-03-02 - -- Add ultisnip option to `snippetManager.insertSnippet()` and - `snippetManager.resolveSnippet()`. -- Support ultisnip regex option: `/a` (ascii option). -- Support transform replacement of ultisnip, including: - - Variable placeholders, `$0`, `$1` etc. - - Escape sequence `\u` `\l` `\U` `\L` `\E` `\n` `\t` - - Conditional replacement: `(?no:text:other text)` - -# 2022-02-28 - -- Change `workspace.ignoredFiletypes` default value to `[]` - -# 2022-02-24 - -- Add `window.activeTextEditor`, `window.visibleTextEditors`. -- Add events `window.onDidChangeActiveTextEditor` `window.onDidChangeVisibleTextEditors`. -- Add class `RelativePattern`. -- Add `workspace.findFiles()`. - -# 2022-02-23 - -- Add `workspace.openTextDocument()` -- Add `Workspace.getRelativePath()`. -- Add `window.terminals` `window.onDidOpenTerminal` `window.onDidCloseTerminal` - and `window.createTerminal`. -- Add `exitStatus` property to `Terminal`. -- Support `strictEnv` in `TerminalOptions` on neovim. -- Deprecated warning for `workspace.createTerminal()`, - `workspace.onDidOpenTerminal` and `workspace.onDidCloseTerminal` - -# 2022-02-18 - -- Clear all highlights created by coc.nvim before restart. -- Support strike through for ansiparse. -- Support `highlights` for `Documentation` in float window. - -# 2022-02-17 - -- Change workspace configuration throw error when workspace folder can't be - resolved. -- Remove configuration `diagnostic.highlightOffset`. - -# 2022-02-15 - -- Add `events.race`. -- Change default `suggest.triggerCompletionWait` to 50. -- Support trigger completion after indent fix. - -# 2022-02-14 - -- Add `pumvisible` property to events. - -# 2022-02-10 - -- Add shortcut support for `window.showMenuPicker()`. -- Add configuration `dialog.shortcutHighlight` for shortcut highlight. -- Add configuration `list.menuAction` for choose action by menu picker. - -# 2022-02-09 - -- Add error log to `nvim_error_event`. -- Add `nvim.lua()` which replace `nvim.executeLua()` to typings.d.ts. - -# 2022-02-08 - -- Support `MenuItem` with disabled property for `window.showMenuPicker` -- Support show disabled code actions in menu picker. - -# 2022-02-07 - -- Change `:CocLocalConfig` to open configuration file of current workspace - folder. - -# 2022-02-05 - -- Support `version` from `textDocument/publishDiagnostics` notification's parameter. -- Support `codeDescription` of diagnostics by add href to float window. -- Support `showDocument` request from language server. -- Support `label` from DocumentSymbolOptions in outline tree. -- Support extra url use regexp under cursor with `openLink` action. -- Support `activeParameter` from signature information. -- Add `trimTrailingWhitespace`, `insertFinalNewline` and `trimFinalNewlines` to FormattingOptions. -- Add configuration `links.tooltip`, default to `false`. - -# 2022-02-04 - -- Add `--reverse` option to list. -- Add `` key-mapping to cancel list in preview window (neovim only). - -# 2022-02-02 - -- Remove `disableWorkspaceFolders` `disableDiagnostics` and `disableCompletion` - from language client option. -- Add configuration `documentHighlight.timeout`. -- Add `tabPersist` option to `ListAction`. -- Add `refactor` to `LocationList` - -# 2022-01-30 - -- Add configuration `diagnostics.virtualTextLevel`. -- Remove configuration `suggest.numberSelect` - -# 2022-01-26 - -- Use `nvim_buf_set_text` when possible to keep extmarks. - -# 2022-01-25 - -- Not trigger completion when filtered is succeed. -- Move methods `workspace.getSelectedRange` `workspace.selectRange` to `window` - module, show deprecated warning when using old methods. - -# 2022-01-23 - -- Support semantic tokens highlights from range provider. - -# 2022-01-22 - -- Not set `gravity` with api `nvim_buf_set_extmark` because highlight bug, wait neovim fix. -- Support watch later created workspace folders for file events. - -# 2022-01-21 - -- Changed semantic token highlight prefix from `CocSem_` to `CocSem`. -- Changed semantic token highlight disabled by default, use configuration - `semanticTokens.filetypes` -- Add configuration `semanticTokens.filetypes`. -- Add configuration `semanticTokens.highlightPriority`. -- Add configuration `semanticTokens.incrementTypes`. -- Add configuration `semanticTokens.combinedModifiers`. -- Add command `semanticTokens.refreshCurrent`. -- Add command `semanticTokens.inspect`. -- Add action `inspectSemanticToken`. -- Rework command `semanticTokens.checkCurrent` to show highlight information. -- Support semantic tokens highlight group composed with type and modifier. - -# 2022-01-21 - -- Add configuration `workspace.ignoredFolders`. -- Add configuration `workspace.workspaceFolderFallbackCwd`. - -# 2022-01-20 - -- Remove deprecated method `workspace.resolveRootFolder`. - -# 2022-01-17 - -- Extend `buffer.updateHighlights` to support `priority`, `combine`, `start_incl` and `end_incl`. -- Add configuration `diagnostic.highlightPriority`. -- Add configuration `colors.filetypes` and `colors.highlightPriority`. - -# 2022-01-16 - -- Add configuration `codeLens.position`. - -# 2022-01-14 - -- Add configuration `suggest.selection`. - -# 2022-01-13 - -- `codeLens.separator` now defaults to `""` and will be placed above lines on neovim >= 0.6.0 . -- Add configurations 'diagnostic.locationlistLevel', 'diagnostic.signLevel', 'diagnostic.messageLevel'. - -# 2022-01-12 - -- Add document.lineAt(), export TextLine class. -- Upgrade node-client, support nvim.exec(). -- Add documentHighlight.priority configuration. - -# 2019-08-18 0.0.74 - -- feat(cursors): support multiple cursors. -- feat(extensions): install missing extensions by CocInstall. -- feat(extensions): add command `extensions.forceUpdateAll`. -- feat(completion): rework preselect feature. -- feat(extension): use request for fetch package info. -- feat(language-client): support disableDynamicRegister configuration. -- feat(list): paste from vim register support on insert mode #1088. -- feat(plugin): add CocHasProvider(), close #1087. -- refactor(outline): not exclude variables and callback. -- refactor(diagnostic): remove timeout on InsertLeave. - -# 2019-07-11 0.0.73 - -- fix(completion): fix map of number select -- fix(languages): fix cursor position with snippet -- fix(completion): fix cursor position with additionalTextEdits -- fix(position): fix rangeOverlap check #961 -- fix(list): not change guicursor when it's empty -- fix(list): fix filter not work on loading -- fix(list): fix custom location list command not work -- fix(util): highlight & render on vim8 -- fix(handler): fix getCommands -- fix(handler): not check lastInsert on trigger signatureHelp -- fix(handler): fix check of signature help trigger -- fix(language-client): configuration for configured server, closes #930 -- fix(diagnostic): clear diagnostics on filetype change -- feat(plugin): add download & fetch modules -- feat(plugin): add highligher module -- feat(refactor): add `(coc-refactor)` for refactor window -- feat(extension): use mv module for folder rename -- feat(extension): support install tagged extension -- feat(extension): support custom extension root `g:coc_extension_root` -- feat(handler): close signature float window on ')' -- feat(list): support `g:coc_quickfix_open_command` -- feat(list): add eval action -- feat(list): add --tab list option -- feat(list): use highligher module for showHelp -- feat(terminal): add noa on window jump -- feat(terminal): support vim8 -- feat(diagnostic): add diagnosticRelated support -- feat(diagnostic): use text properties on vim8 -- feat(handler): improve signature float window - -# 2019-07-01 - -- feat(plugin): add CocStatusChange autocmd -- feat(extension): support both npm and yarn. -- feat(plugin): work on vim 8.0 -- feat(extensions): add lock & doc actions to extension source -- feat(extension): add proxy auth support (#920) -- feat(source): not change startcol for file source -- feat(completion): no numberSelect for number input -- feat(extensions): Use yarn when npm not found -- feat(completion): no popup for command line buffer -- feat(plugin): support only for codeActions action -- feat(task): debounce stdout -- feat(plugin): add keymaps for selection ranges -- feat(plugin): add function textobj -- feat(list): restore window height, closes #905 -- feat(handler): support signature.floatTimeout -- feat(configuration): support change of workspace configuration -- feat(diagnostic): add keymaps for jump error diagnostics -- feat(plugin): delay start on gvim, fix #659 - -# 2019-06-15 - -- feat(plugin): add popup support of vim -- refactor(completion): improve float support -- refactor(floating): remove unused code -- refactor(workspace): replace find-up -- refactor(handler): improve message for fold method -- fix(virtualtext): invalid highlight tag (#874) -- fix(snippets): fix plaintext check -- fix(highlight): catch error of child_process.spawn -- fix(highlight): use v:progpath, fix #871 -- fix(floatFactory): escape feedkeys -- fix(handler): fix getCurrentFunctionSymbol not work - -# 2019-06-12 - -- feat(document): add getVar method -- fix(util): not break selection on message -- fix(workspace): fix jumpTo not work on vim8 -- fix(completion): trigger completion with word character -- refactor(handler): return boolean result -- perf(workspace): improve jump performance -- fix(util): Escape filename for jump (#862) -- refactor(plugin): not show empty hover -- feat(outline): ignore callback function -- feat(workspace): support list of events with registerAutocmd -- fix(workspace): fix jump with tab drop -- refactor(language-client): change API of selectionRanges - -# 2019-06-09 - -- **Break change** `CocHighlightText` link to `CursorColumn` by default. -- **Break change** logger folder changed to `$XDG_RUNTIME_DIR` when exists. -- Add `` and `` support for list, #825. -- Add function `coc#add_command()`. -- Add `disableDiagnostics` & `disableCompletion` to languageclient configuration. -- Add `signature.triggerSignatureWait` configuration. -- Add vim-repeat support for run command and quickfix. -- Add preferred `codeAction` support. -- Add `prompt.paste` action to list. -- Add title as argument support for `codeAction` action. -- Add `suggest.floatEnable` configuration. -- Add `editor.action.organizeImport` command. -- Add `:CocAction` and `:CocFix` commands. -- Add `codeActions` action. -- Fix issues with list. - -# 2019-05-30 - -- **Break change** logger folder changed. -- Add support of vim-repeat for `` keymaps. -- Add `CocRegistNotification()` function. -- Add argument to rename action. -- Add `suggest.disableMenuShortcut` configuration. -- Add glob support for root patterns. -- Add `` keymap to list window. -- Add shortcut in sources list. -- Add `list.previewSplitRight` configuration. -- Add `triggerOnly` property to source. -- Add warning for duplicate extension. -- Bug fixes. - -# 2019-05-07 - -- **New feature** load extensions from coc-extensions folder. -- Add `workspace.renameCurrentFile` command. -- Add `FloatBuffer`, `FloatFactory` and `URI` to exports. -- Add `resolveItem` support to list. -- Fix prompt can't work when execute list action. -- Fix ansiparser for empty color ranges. -- Fix highlight only work with first 8 items. - -# 2019-04-27 - -- **Break change** vim-node-rpc not required on vim. -- **Break change** python not required on vim. -- **Break change** complete items would refreshed after 500ms when not finished. -- Add `additionalSchemes` for configured language server. -- Add support for jumpCommand as false. -- Fix `diagnostic.level` not work. - -# 2019-04-09 - -- **Break change** `--strictMatch` option of list renamed to `--strict` -- **Break change** `suggest.reloadPumOnInsertChar` support removed. -- **Break change** no more binary release. -- **Break change** logic for resolve workspace folder changed. -- Add `Task` module. -- Add `getCurrentFunctionSymbol` action. -- Add `list.source.outline.ctagsFilestypes` setting. -- Add `suggest.disableMenu` and `suggest.disableMenu` settings. -- Add `equal` support for complete items. -- Add support for do action with visual select lines of list. -- Add expand tilder support for language server command. -- Add switch matcher support to list. -- Add select all support to list. -- Add quickfix action to list. -- Add `selectionRanges` of LSP. -- Add load extensions for &rtp support. -- Add `coc#on_enter()` for formatOnType and add new lines on enter. -- Improve completion by support trigger completion when pumvisible. -- Remove document check on `BufWritePre`. - -# 2019-03-31 - -- **Break change** not using vim-node-rpc from npm modules any more. -- **Break change** rename `_` to `CocRefresh`. -- Fix wrong format options send to server. -- Fix throw error when extension root not created. -- Fix MarkedString not considered as markdown. -- Fix echo message on vim exit. -- Fix error throw on file watch. -- Fix unexpected update of user configuration. - -# 2019-03-28 - -- Add `workspace.resolveRootFolder`. -- Add `diagnostic.joinMessageLines` setting. -- Add `suggest.completionItemKindLabels` setting. -- Add `memento` support for extension. -- Add `workspace.getSelectedRange`. -- Add `Terminal` module. -- Add command `workbench.action.reloadWindow`. -- Fix extension not activated by command. -- Fix broken undo with floating window. -- Fix document create possible wrong uri & filetype. -- Improve highlight with floating window. - -# 2019-03-24 - -- **Break change** make number input not trigger completion. -- **Break change** make none keywords character doesn't filter completion. -- Add functions for check snippet state. -- Add setting `diagnostic.checkCurrentLine`. -- Fix `signature.target` not work. -- Fix flick of signature window. -- Fix EPIPE error of node-client. -- Fix wrong root of FileWatchSysmtem. - -# 2019-03-19 - -- **Break change** signature settings now starts `signature`. -- **Break change** default request timeout changed to 5s. -- **Break change** `commands.executeCommand` return promise. -- Add `coc.preferences.signatureHelpTarget`. -- Add `diagnostic.maxWindowHeight` & `signature.maxWindowHeight`. -- Add `diagnostic.enableSign`. -- Add support for `$COC_NO_PLUGINS`. -- Add keymaps: `(coc-float-hide)` and `(coc-float-jump)`. -- Add `coc.preferences.enableFloatHighlight`. -- Fix issues with floating window. -- Fix critical performance issue on diff text. -- Improve color of `CocHighlightText`. -- Improve sort of complete items. -- Improve extension list with version and open action. - -# 2019-03-16 - -- **Break change** change vim config home on windows to '\$HOME/vimfiles'. -- Add highlights to float windows. -- Add CocLocationsAsync(). -- Add support for `b:coc_suggest_disable`. -- Add support for `b:coc_suggest_blacklist`. -- Add setting `diagnostic.messageTarget`. -- Add floating window support for signatures. -- Fix issues with diagnostic float. -- Fix info of completion item not shown. -- Fix CocUpdateSync not work without service start. -- Fix wrong indent spaces of snippets. - -# 2019-03-11 - -- **Break change** change buffers instead of disk file for `workspace.applyEdits`. -- **Break change** add config errors to diagnostic list instead of jump locations. -- **Break change** hack for popup menu flicker is removed, use `suggest.reloadPumOnInsertChar` to enable it. -- **Break change** use `nvim_select_popupmenu_item` for number select completion. -- Add floating window for completion items. -- Add floating window support for diagnostics. -- Add floating window support for hover documentation. -- Add `coc#on_enter()` for notify enter pressed. -- Add setting `coc.preferences.useQuickfixForLocations`. -- Add support of `g:coc_watch_extensions` for automatic reload extensions. -- Add command: `editor.action.doCodeAction`. -- Fix service on restarted on windows after rebuild. -- Fix config of airline. -- Fix relative path of watchman. -- Improve Mru model. - -# 2019-03-03 - -- **Break change** signature change of `workspace.registerKeymap`. -- **Break change** `` of CocList can't be remapped any more. -- **Break change** use `yarnpkg` command instead of `yarn` when possible. -- **Break change** `noinsert` is removed from `completeopt` when `noselect` is - enabled, `` would break line by default. -- Add setting `diagnostic.refreshAfterSave`. -- Add chinese documentation. -- Add support of multiple line placeholder. -- Fix edit of nested snippet placeholders. -- Fix possible infinite create of documents. -- Fix check for resume completion. - -# 2019-02-25 - -- **Break change** default of `suggest.detailMaxLength` changed to 100. -- **Break change** option of `workspace.registerKeymap` changed. -- Add settings: `suggest.detailField`. -- Add check for autocmd in health check. -- Add trigger patterns support for complete sources. -- Add support of `coc-snippets-expand-jump` -- Add `source` option for completion start. -- Add `sources.createSource` method. - -# 2019-02-22 - -- **Break change** some configurations have been renamed, checkout #462. -- **Break change** no longer automatic trigger for CursorHoldI #452. -- **Break change** add preview option of `completeopt` according to `suggest.enablePreview`. -- Add statusItem for CocUpdate. -- Add `-sync` option for `:CocInstall` -- Add support for floating preview window. -- Add more module export. -- Fix check of vim-node-rpc throw error. -- Fix wrong line for TextEdit of complete item. -- Fix diagnostics not cleared on service restart. - -# 2019-02-17 - -- **Break change** completion resolve requires CompleteChanged autocmd. -- **Break change** mapping of space on insert mode of list removed. -- **Break change** kind of completion item use single letter. -- Fix snippet not works on GUI vim. -- Fix cursor vanish on vim by use timer hacks. -- Fix behavior of list preview window. -- Fix python check on vim. -- Fix CocJumpPlaceholder not fired. -- Fix vscode-open command not work. - -# 2019-02-12 - -- **Break change** function `coc#util#clearmatches` signature changed. -- Add check for python gtk module. -- Add check for vim-node-rpc update error. -- Fix source name of diagnostics. -- Fix empty buffers created on preview. -- Fix trigger of `CursorHoldI`. - -# 2019-02-11 - -- **Break change:** internal filetype of settings file changed to jsonc. -- **Break change:** `coc#util#install` changed to synchronize by default. -- **Break change:** no document highlight would be added for colored symbol. -- **Break change:** remove `coc.preferences.openResourceCommand`. -- Add fallback rename implementation which rename symbols on current buffer. -- Add command `:CocUpdateSync`. -- Add `coc.preferences.detailMaxLength` for slice detail on completion menu. -- Add cancel support for completion. -- Add `ctags` as fallback of document symbols list. -- Add default key-mappings for location actions. -- Add python check on vim. -- Add `disableSyntaxes` support for completion sources. -- Add support for change `isProgress` of `StatusBarItem` -- Add check of coc.nvim version for `CocUpdate` -- Add `coc.preferences.previewAutoClose`, default true. -- Add `workspace.add registerAutocmd`. -- Fix highlight not cleared on vim -- Fix health check of service state. -- Fix CursorHoldI not triggered on neovim. -- Fix sort of list not stable. - -# 2019-02-04 - -- **Break change:** no messages when documentSymbol and workspaceSymbol provider - not found. -- Add support for configure sign in statusline. -- Add help action for list. -- Fix parse error on extensions update. -- Fix wrong uri on windows. -- Fix cancel list without close ui. -- Improve startup time by remove jobwait. - -# 2019-02-02 - -- **Break change:** extensions now update automatically, prompt is removed. -- Add check for extension compatibility. -- Add transform support for placeholder. -- Add check for node version. -- Add error check for list. -- Add settings: `coc.preferences.diagnostic.virtualTextLines`. -- Fix preview window not shown. -- Fix highlight not cleared on vim. -- Fix highlight commands of list block vim on start. -- Improve extension load. -- Improve list experience. - -# 2019-01-28 - -- **Break change:** `coc.preferences.diagnostic.echoMessage` changed to enum. -- Add mru support for commands and lists list. -- Add `coc.preferences.diagnostic.refreshOnInsertMode` -- Add `Mru` module. -- Improve highlight for lists, support empty `filterLabel`. -- Fix `findLocations` not work with nest locations. -- Fix cursor position after apply additionalTextEdits. - -# 2019-01-24 - -- **Break change:** python code for denite support moved to separated repo. -- **Break change:** Quickfix list no longer used. -- Add list support. -- Add configuration: `coc.preferences.diagnostic.virtualText`. -- Add watch for `&rtp` change. -- Add support for configure `g:coc_user_config` and `g:coc_global_extensions` -- Add support for send request to coc on vim start. -- Add `g:coc_start_at_startup` support. -- Add configuration: `coc.preferences.invalidInsertCharacters`. -- Add configuration: `coc.preferences.snippetStatusText`. -- Add `coc#_insert_key()` for insert keymap. -- Add `workspace.registerExprKeymap()`. -- Add detect for `vim-node-rpc` abnormal exist. -- Add `requireRootPattern` to languageserver configuration. -- Fix git check, always generate keywords. -- Fix crash when `righleft` set to 1 on neovim. -- Fix snippet position could be wrong. - -# 2019-01-09 - -- **Break change:** throw error when languageserver id is invalid. -- Add watcher for languageserver configuration change. -- Fix possible invalid package.json. -- Fix applyEdits not work sometimes. -- Fix server still started when command search failed. -- Fix log file not writeable. -- Improve completion performance. - -# 2019-01-03 - -- **Break change:** using of `g:rooter_patterns` is removed. -- **Break change:** diagnostics would be updated in insert mode now. -- Add configuration: `coc.preferences.rootPatterns` -- Add `TM_SELECTED_TEXT` and `CLIPBOARD` support for snippets. -- Fix check of latest insert char failed. -- Fix highlight not cleared sometimes. - -# 2019-01-01 - -- Fix issues with completion. - -# 2018-12-31 - -- **Break change:** created keymaps use rpcrequest instead of rpcnotify. -- **Break change:** snippets provider is removed, use `coc-snippets` for - extension snippets. -- Add command: `coc.action.insertSnippet` -- Fix position of snippets. -- Fix modifier of registered keymaps. -- Fix completion triggered on complete done. -- Fix closure function possible conflict. -- Fix unexpected snippet cancel. -- Fix document applyEdits, always use current lines. -- Fix fail of yarn global command. -- Fix check of changedtick on completion done. -- Fix line used for textEdit of completion. -- Fix snippet canceled by `formatOnType`. -- Fix `CocJumpPlaceholder` not fired -- Optimize content synchronize. - -# 2018-12-27 - -- **Break change:** no more message on service ready. -- **Break change:** vim source now registered as extension. -- **Break change:** complete item sort have reworked. -- **Break change:** request send to coc would throw when service not ready. -- Add support for check current state on diagnostic update. -- Add `env` opinion for registered command languageserver. -- Add outputChannel for watchman. -- Add `coc#_select_confirm()` for trigger select and confirm. -- Add `coc.preferences.numberSelect`. -- Add priority support for format provider. -- Add `workspace.watchGlobal` and `workspace.watchOption` methods. -- Fix cursor disappear on `TextChangedP` with vim. -- Fix coc process not killed when update on windows. -- Fix snippet broken on vim. -- Fix support of startcol of completion result. -- Fix `labelOffsetSupport` wrong position. -- Fix flicking on neovim. -- Fix unicide not considered as iskeyword. -- Fix watchman client not initialized sometimes. -- Improve performance for parse iskeyword. -- Not echo message on vim exit. -- Not send empty configuration change to languageserver. - -# 2018-12-20 - -- **Break change** configuration for module language server, transport now - require specified value. -- **Break change** new algorithm for socre complete items. -- Add command `workspace.clearWatchman`. -- Add `quickfixs`, `doCodeAction` and `doQuickfix` actions. -- Add `g:vim_node_rpc_args` for debug purpose. -- Add `coc#add_extension()` for specify extensions to install. -- Fix clients not restarted on CocRestart. -- Fix `execArgv` and `runtime` not work for node language server. -- Fix detail of complete item not echoed sometimes. -- Fix actions missing when registered with same clientId. -- Fix issues with signature echo. -- Fix uri is wrong with whitespace. -- Improve highlight performance with `nvim_call_atomic`. - -# 2018-12-17 - -- **Break change** `vim-node-rpc` now upgrade in background. -- Add `ignoredRootPaths` to `languageserver` option. -- Add detect of vim running state. -- Add `client.vim` for create clients. -- Fix possible wrong current line of `completeResolve`. -- Fix snippet not work with `set virtualedit=all`. -- Fix default timeout to 2000. -- Fix file mode of log file. - -# 2018-12-12 - -- **Break change** `fixInsertedWord` fix inserted word which ends with word - after. -- **Break change** `onCompleteSelect` is removed. -- Add `workspace.registerKeymap` for register keymap. -- Add match score for sort complete items. -- Fix possible connection lost. -- Fix priority of diagnostic signs. -- Fix possible wrong uri. -- Fix `RevealOutputChannelOn` not default to `never`. -- Fix possible wrong line used for textEdit of complete item. -- Fix possible wrong cursor position of snippet after inserted. - -# 2018-12-08 - -- **Break change** default rootPath would be directory of current file, not cwd. -- **Break change** codeLens feature now disabled by default. -- **Break change** diagnostic prev/next now loop diagnostics. -- Add support of neovim highlight namespace. -- Add support for undo `additionalTextEdits` on neovim -- Fix configuration resolve could be wrong. -- Fix word of completion item could be wrong. -- Fix rootPath could be null. -- Fix highlight not cleared on restart. - -# 2018-12-06 - -- **Break change** `RevealOutputChannelOn` of language client default to - `never`. -- Fix can't install on windows vim. -- Fix `displayByAle` not clearing diagnostics. -- Add check for `vim-node-rpc` update on vim. -- Add `Resolver` module. -- Improve apply `WorkspaceEdit`, support `0` as document version and merge - edits for same document. - -# 2018-12-05 - -- Add `CocJumpPlaceholder` autocmd. -- Add `rootPatterns` to `languageserver` config. -- Add setting: `coc.preferences.hoverTarget`, support use echo. -- Add setting `coc.preferences.diagnostic.displayByAle` for use ale to display errors. -- Add setting `coc.preferences.extensionUpdateCheck` for control update check of - extensions. -- Add `coc#config` for set configuration in vim. -- Fix rootPath not resolved on initialize. -- Fix possible wrong `tabSize` by use `shiftwidth` option. -- Fix trigger of `documentColors` request. -- Fix `vim-node-rpc` service not work on windows vim. -- Fix `codeLens` not works. -- Fix highlight of signatureHelp. -- Fix watchman watching same root multiple times. -- Fix completion throw undefined error. -- Fix `open_terminal` not works on vim. -- Fix possible connection lost by use notification when possible. -- Fix process not terminated when connection lost. -- Rework diagnostics with task sequence. -- Rework configuration with more tests. - -# 2018-11-28 - -- _Break change_ signature help reworked, vim API for echo signature changed. -- Add `:CocInfo` command. -- Add trigger for signature help after function expand. -- Add echo message when provider not found for some actions. -- Add support for `formatexpr` -- Add support for locality bonus like VSCode. -- Add support of `applyAdditionalLEdits` on item selected by `` -- Add `coc.preferences.useQuickfixForLocations` -- Add `coc.preferences.messageLevel` -- Add support for trigger command which not registered by server. -- Add `g:coc_denite_quickfix_action` -- Fix insert unwanted word when trigger `commitCharacter`. -- Fix rpc request throw on vim. -- Fix `data` of complete item conflict. -- Fix code action not work sometime. -- Fix `coc.preferences.diagnostic.locationlist` not work. -- Fix `coc.preference.preferCompleteThanJumpPlaceholder`. -- Fix `workspace.jumpTo` not work sometime. -- Fix line indent for snippet. -- Fix trigger of `signatureHelp` and `onTypeFormat`. - -# 2018-11-24 - -- **Break change** sources excluding `around`, `buffer` or `file` are extracted - as extensions. -- **Break change** custom source doesn't exist any more. -- Add `coc.preferences.preferCompleteThanJumpPlaceholder` to make jump - placeholder behavior as confirm completion when possible. -- Add `CocDiagnosticChange` autocmd for force statusline update. -- Add `onDidUnloadExtension` event on extension unload. -- Fix `getDiagnosticsInRange`, consider all interactive ranges. -- Fix completion throw when `data` on complete item is `string`. -- Fix `commitCharacters` not works. -- Fix workspace methods: `renameFile`, `deleteFile` and `resolveRoot`. -- Fix textEdit of builtin sources not works. - -# 2018-11-19 - -- **Break change** snippet support reworked: support nest snippets, independent - session in each buffer and lots of fixes. -- **Break change** diagnostic list now sort by severity first. -- Add commands: `:CocUninstall` and `:CocOpenLog` -- Add cterm color for highlights. -- Add line highlight support for diagnostic. -- Add `coc.preferences.fixInsertedWord` to make complete item replace current word. -- Fix check confirm not works on vim sometimes. -- Fix check of `vim-node-rpc`. -- Fix preselect complete item not first sometimes. -- Improve completion sort result by consider more abort priority and recent - selected. -- Improve colors module, only highlight current buffer and when buffer changed. -- Improve `doc/coc.txt` - -# 2018-11-13 - -- **Break change** default completion timeout changed to 2s. -- **Break change** snippet session not canceled on `InsertLeave`, use - `` in normal mode to cancel. -- Add document color support. -- Add CocAction 'pickColor' and 'colorPresentation'. -- Add prompt for install vim-node-rpc module. -- Add support for `inComplete` completion result. -- Add status item for snippet session. -- Add support for fix inserted text of snippet completion item. -- Fix document highlight not cleared. -- Fix cancel behavior of snippet. -- Fix range check of edit on snippet session. -- Fix check of completion confirm. -- Fix highlight group 'CocHighlightWrite' not work. -- Fix command `editor.action.rename` not works. -- Fix throw error before initialize. -- Fix `g:coc_node_path` not working. -- Fix file source throw undefined error. -- Improve logic of sorting completion items, strict match items comes first. - -# 2018-11-07 - -- **Break change** word source removed from custom sources, enabled for markdown - by default. -- **Break change** ignore sortText when input.length > 3. -- **Break change** show prompt for install `coc-json` when not found. -- Fix document content synchronize could be wrong. -- Fix filetype not converted on completion. -- Fix complete item possible not resolved. -- Improve document highlight, no highlight when cursor moved. -- Improve completion score, use fuzzaldrin-plus replace fuzzaldrin. - -# 2018-11-02 - -- **Break change** no items from snippets source when input is empty. -- **Break change** `javascript.jsx` would changed to `javascriptreact` as languageId. -- **Break change** `typescript.tsx` would changed to `typescriptreact` as languageId. -- Add support for `commitCharacters` and `coc.preferences.acceptSuggestionOnCommitCharacter`. -- Add setting: `coc.preferences.diagnostic.level`. -- Add `g:coc_filetype_map` for customize mapping between filetype and languageId. -- Add `g:coc_node_path` for custom node executable. -- Add `workspaceFolders` feature to language client. -- Add `~` to complete item of snippet source. -- Add `onDidChangeWorkspaceFolder` event -- Fix `eol` issue by check `eol` option. -- Fix `workspace.document` could be null. -- Fix `workspaceFolder` could be null. -- Fix diagnostic for quickfix buffer. -- Fix resolve of `coc.preferences.rootPath` - -# 2018-10-29 - -- **Break change** diagnostic reworked, no refresh on insert mode. -- **Break change** keep `sortText` on filter for better result. -- **Break change** prefer trigger completion than filter, same as VSCode. -- **Break change** filetype of document would be first part of `&filetype` split by `.`. -- **Break change** prefer label as abbr for complete item. -- Fix creating wrong `textEdit` for snippet. -- Fix `startcol` of `CompleteResult` not working. -- Fix `workspaceConfiguration.toJSON` return invalid result. -- Fix `workspace.readFile` not synchronized with buffer. -- Fix `workspace.rootPath` not resolved as expected. -- Fix `CompletionItem` resolved multiple times. -- Fix check of `latestInsert` on completion. -- Fix `formatOnType` possible add unnecessary indent. -- Fix document content synchronized on vim. -- Fix confirm check of completion for all source. -- Fix document possible register multiple times. -- Fix completion always stopped when input is empty. -- Add warning message when definition not found. -- Add `redraw` after `g:coc_status` changed. -- Remove change of `virtualedit` option of snippet. -- Improved performance of filter completion items. - -# 2018-10-25 - -- Fix `implementation` and `typeDefinition` of language client not working. -- Fix `diffLines` return wrong range. -- Fix `setqflist` and `setloclist` not works on vim. -- Fix snippets and `additionalTextEdits` not works on vim. -- Fix append lines not works on vim. -- Fix highlight action not works on vim. -- Fix null version of `TextDocumentIdentifier` not handled. -- Add `workspace.registerTextDocumentContentProvider` for handle custom uri. -- Add `workspace.createStatusBarItem` method. - -# 2018-10-21 - -- **Break change**: `triggerAfterInsertEnter` now respect `minTriggerInputLength`. -- Add `coc.preferences.minTriggerInputLength`. -- Add command: `:CocCommand`. -- Fix `position` of `provideCompletionItems`. -- Fix content change not trigger after completion. -- Fix default sorters & matchers of denite sources. -- Fix `outputChannel` wrong `buftype`. -- Fix completion not works with `textEdit` add new lines. -- Fix first item not resolved when `noselect` is disabled -- Remove using of `diff` module. - -# 2018-10-18 - -- **Break change**: all buffers are created as document. -- **Break change**: retrieve workspace root on document create. -- Fix `uri` for all buffer types. -- Fix bad performance on parse keywords. -- Fix check of language client state. -- Fix register of `renameProvider` -- Fix `CocRequestAsync` not work. -- Fix `workspace.openResource` error with `wildignore` option. -- Fix output channel can't shown if hidden. -- Fix extension activate before document create. -- Add command `vscode.open` and `editor.action.restart`. -- Add `workspace.requestInput` method. -- Add support of `g:rooter_patterns` -- Add `storagePath` to `ExtensionContext` -- Add `workspace.env` property. -- Add support of scoped configuration. -- Disable buffer highlight on vim. - -# 2018-10-14 - -- **Break change** API: `workspace.resoleModule` only does resolve. -- **Break change** extension would still be loaded even if current coc version - miss match. -- **Break change** variables are removed from view of `Denite coc-symbols` -- Fix `workspace.applyEdits` -- Fix `console.log` throws in extension. -- Fix invalid `workspace.root` with custom buffer schema. -- Fix possible crash on neovim 0.3.1 by not attach terminal buffer. -- Fix jump position not stored when jump to current buffer position. -- Fix install function not works on vim. -- Add support for custom uri schema for `workspace.jumpTo` and `workspace.openResource` -- Add `workspace.findUp` for find up file of current buffer. -- Add `env` option for custom language server config. -- Add vim function: `CocRequest` and `CocRequestAsync` for send request to - language server in vim. -- Add `coc.preferences.parseKeywordsLimitLines` and `coc.preferences.hyphenAsKeyword` - for buffer parse. -- Rework completion for performance and accuracy. - -# 2018-10-05 - -- **Break change**, `workspace.onDidChangeConfiguration` emit `ConfigurationChangeEvent` now. -- Add `position` to function `coc#util#open_terminal`. -- Improve performance of completion by use vim's filter when possible. -- Fix service start multiple times. -- Fix parse of `iskeyword` option, consider `@-@`. -- Fix completion of snippet: cancel on line change. - -# 2018-10-01 - -- Improved document `didChange` before trigger completion. -- Add option `coc.preferences.triggerCompletionWait`, default 60. -- Add watch for `iskeyword` change. -- Fix snippet jump not works sometime. -- Fix possible wrong `rootPath` of language server. -- Fix highlight of highlight action not using terminal colors. -- Fix detect for insert new line character. - -# 2018-09-30 - -- Add quickfix source of denite and fzf -- Add option `coc.preferences.rootPath` -- Add option `revealOutputChannelOn` to language server. -- Fix jump of placeholder. -- Fix empty root on language server initialize. - -# 2018-09-28 - -- **Break change**: `coc.preferences.formatOnType` default to `false`. -- **Break change**: snippet completion disabled in `string` and `comment`. -- Add support for register local extension. -- Add title for commands in `Denite coc-command` -- Fix prompt hidden by echo message. -- Fix contribute commands not shown in denite interface. -- Fix parse of `iskeyword`, support character range. -- Fix `triggerKind` of completion. -- Fix install extension from url not reloaded. - -# 2018-09-27 - -- **Break change**: `:CocDisable` disabled all events from vim. -- **Break change**: new snippet implementation. - - Support multiple line snippet. - - Support VSCode snippet extension. - - Support completion of snippets from snippet extension. -- Add highlight groups for different severity. -- Add `coc.preferences.formatOnType` option. -- Add `coc.preferences.snippets.enable` option. -- Fix snippet not works as `insertText`. -- Fix echo message with multiple lines. -- Fix `signatureHelp` with `showcmd` disabled. -- Fix location list cleared on `:lopen`. -- Fix diagnostic info not cleared on `:CocDisable` -- Fix diagnostic info not cleared on buffer unload. -- Fix buffer highlight not cleared on `highlight` action. -- Fix format on type not work as expected. - -# 2018-09-24 - -- **Break change**: use `CursorMove` instead of `CursorHold` for diagnostic - message. -- **Break change**: direct move to diagnostic position would show diagnostic - message without truncate. -- **Break change**: snippet would be canceled when mode changed to normal, no - mapping of `` any more. -- Add format document on `insertLeave` when `onTypeFormat` is supported. -- Add buffer operations on resource edit. -- Add `uninstall` action for `Denite coc-extension`. -- Fix active extension on command not working. -- Fix delete file from resource edit not works. - -# 2018-09-20 - -- Fix diagnostic check next offset for diagnostics. -- Add `(coc-diagnostic-info)` for show diagnostic message without - truncate. - -# 2018-09-15 - -- Fix wrong configuration on update. -- Fix install command with tag version. -- Fix using of unsafe `new Buffer`. -- Add support of trace format & resource operations. -- Add support of json validation for extension. -- Add support of format on save by `coc.preferences.formatOnSaveFiletypes` - -# 2018-09-10 - -- Add `Denite coc-extension` for manage extensions. -- Add actions for manage extension including `toggleExtension` `reloadExtension` - `deactivateExtension` -- Add check for extension update everyday. -- Fix extensions using same process of coc itself. -- Fix `configurationSection` should be null if none was specified. - -# 2018-09-07 - -- **Break change**: all extension all separated from core, checkout - [Using coc extension](https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions) -- Fix `textDocumentSync` option not work when received as object. -- Fix wrong diagnostic info when using multiple lint servers. -- Use `CursorHold` for show diagnostic message. -- Add option `coc.preferences.enableMessage` to disable showing of diagnostic - message. -- Add new events module for receive vim events. -- Add support for `prepareRename`. -- Add support for `CodeActionOptions` - -# 2018-08-30 - -- Fix wrong `triggerKind` from VSCode. -- Add `(coc-openlink)` for open link. -- Add `typescript.jsx` as valid typescript type. - -# 2018-08-23 - -- Fix sometimes client status invalid. -- Add multiply provider support for all features. -- Add `documentLink` support -- Add `documentHighlight` support -- Add `foldingRange` support -- Add support of `documentSelector` same as VSCode - -# 2018-08-21 - -- Fix diagnostic and arguments of tsserver. -- Add `keepfocus` option for `open_terminal`. -- Improve error catch of autocmds. -- Add `onTypeFormat` feature for language server -- Add `onTypeFormat` support for tsserver. -- Refactor and more tests of workspace. -- Fix `window/showMessageRequest` request. -- Use `callAsync` for async request to vim. -- Add `CocActionAsync` function send async request to server. - -# 2018-08-17 - -- Fix exists terminal buffer not watched. -- Fix buffer not attached after `edit!`. -- Fix clean diagnostics of `tsserver.watchBuild` command. -- Fix refresh of buffer. -- Fix document not found on `BufEnter`. - - Use `rpcrequest` for `BufCreate` - -- Fix no permission of log file. - - Disable create log file for root user. - -- Add more command for tsserver: - - - `tsserver.reloadProjects` - - `tsserver.openTsServerLog` - - `tsserver.goToProjectConfig` - - `tsserver.restart` - -- Add test for workspace. - -# 2018-08-16 - -- Improved for tsserver: - - - Add `watchBuild` command for build current project with watch in terminal. - - Support of untitled buffer - - Support `projectRootPath` - -- Fix detach error of document. -- Fix trigger characters not works for some source. -- Fix document possible not sync before save. -- Fix denite errors with 0 as result. -- Fix wrong arguments of tsserver refactor command. -- Use `drop` for workspace `openResource`. -- Add clear coc signs on `:CocRestart`. -- **Break change** all buffer types except `nofile` `help` and `quickfix` are - watched for changes. - -# 2018-08-15 - -- Fix filter of completion items on fast input. -- Fix sometimes fails of include & neosnippet source. -- Fix sometimes fails to find global modules. -- Improve complete source initialization. - - - Always respect change of configuration. - -- Add ability to start standalone coc service for debugging. - - - Use `NVIM_LISTEN_ADDRESS=/tmp/nvim nvim` to start - neovim. - - Start coc server by command like `node bin/server.js` - -- Add ability to recover from unload buffer. - - Sometimes `bufReadPost` `BufEnter` could be not be fired on buffer create, - check buffer on `CursorHold` and `TextChanged` to fix this issue. - -- Add tsserver features: `tsserver.formatOnSave` and `tsserver.organizeImportOnSave` - - Both default to false. - -- Add tests for completion sources. - -# 2018-08-14 - -- Fix remote source not working. -- Fix sort of completion items. -- Fix EPIPE error from net module. -- Add `tslint.lintProject` command. -- Add config `coc.preferences.maxCompleteItemCount`. -- Add `g:coc_auto_copen`, default to `1`. - -# 2018-08-12 - -- **Break change** `:CocRefresh` replaced with `call CocAction('refreshSource')`. -- Add support filetype change of buffer. -- Add basic test for completion. -- Improve loading speed, use child process to initialize vim sources. -- Improve install.sh, install node when it doesn't exist. -- Improve interface of workspace. -- Fix loading of configuration content. - -# 2018-08-11 - -- Fix configuration content not saved on change. -- Fix thrown error on watchman not found. -- Fix incompatible options of `child_process`. -- Fix location list for diagnostics. - - - Reset on `BufWinEnter`. - - Available for all windows of single buffer. - - Use replace on change for coc location list. - - Add debounce. - -- Fix signature help behaviour, truncate messages to not overlap. -- Reworks sources use async import. - -# 2018-08-10 - -- Fix dispose for all modules. -- Add support for multiple `addWillSaveUntilListener`. -- Fix `startcol` for json server. -- Add support filetype `javascriptreact` for tsserver. - -# 2018-08-09 - -- Add `coc#util#install` for installation. -- Add `install.cmd` for windows. - -# 2018-08-08 - -- Improved location list for diagnostics. -- Add `internal` option to command. - - Commands registered by server are internal. - -- Add support for multiple save wait until requests. - -# 2018-08-07 - -- Add `forceFullSync` to language server option. - -# 2018-08-05 - -- Improve eslint extension to use workspaceFolder. -- Fix watchman not works with multiple roots. -- Add feature: dynamic root support for workspace. -- **Break change** output channel of watchman is removed. - -# 2018-08-04 - -- Fix order of document symbols. -- Fix completion snippet with `$variable`. -- Add feature: expand snippet on confirm. -- Add feature: `(coc-complete-custom)` for complete custom sources. - - Default customs sources: `emoji`, `include` and `word` - -- **Break change** `emoji` `include` used for all filetypes by default. - -# 2018-08-03 - -- Add command `:CocErrors` for debug. -- Support `DocumentSymbol` for 'textDocument/documentSymbol' - -# 2018-08-02 - -- Fix error of language client with unsupported schema. - - No document event fired for unsupported schema (eg: fugitive://) - -- Fix update empty configuration not works. - -# 2018-07-31 - -- Improve file source triggered with dirname started path. - -# 2018-07-30 - -- Fix source ultisnip not working. -- Fix custom language client with command not working. -- Fix wrong arguments passed to `runCommand` function. -- Improve module install, add `sudo` for `npm install` on Linux. -- Improve completion on backspace. - - Completion is resumed when search is empty. - - Completion is triggered when user try to fix search. - -# 2018-07-29 - -- **Break change** all servers are decoupled from coc.nvim - - A prompt for download is shown when server not found. - -- **Break change** `vim-node-rpc` decoupled from coc.nvim - - A prompt would be shown to help user install vim-node-rpc in vim. - -- Add command `CocConfig` - -# 2018-07-28 - -- Fix uncaught exception error on windows. -- Use plugin root for assets resolve. -- Fix emoji source not triggered by `:`. -- Improve file source to recognize `~` as user home. - -# 2018-07-27 - -- Prompt user for download server module with big extension like `vetur` and `wxml-langserver` -- **Break change**, section of settings changed: `cssserver.[languageId]` moved to `[languageId]` - - For example: `cssserver.css` section is moved to `css` section. - - This makes coc settings of css languages the same as VSCode. - -- **Break change**, `stylelint` extension is disabled by default, add - - ``` - "stylelint.enable": true, - ``` - - to your `coc-settings.json` to enable it. - - User will be prompted to download server if `stylelint-langserver` is not - installed globally. - -- **Break change**, `triggerAfterInsertEnter` is always `true`, add - - ``` - "coc.preferences.triggerAfterInsertEnter": false, - ``` - - to your `coc-settings.json` to disable it. - -- **Break change**, when `autoTrigger` is `always` completion would be triggered - after completion item select. - -# 2018-07-24 - -- better statusline integration with airline and lightline. - -# 2018-07-23 - -- Coc service start much faster. -- Add vim-node-rpc module. -- **Break change** global function `CocAutocmd` and `CocResult` are removed. -- Support Vue with vetur - -# 2018-07-21 - -- Fix issue with `completeopt`. -- Add source `neosnippet`. -- Add source `gocode`. - -# 2018-07-20 - -- Add documentation for language server debug. -- Rework register of functions, avoid undefined function. - -# 2018-07-19 - -- Fix error of `isFile` check. -- Ignore undefined function on service start. - -# 2018-07-17 - -- Add `coc.preference.jumpCommand` to settings. -- Make coc service standalone. - -# 2018-07-16 - -- Support arguments for `runCommand` action. -- Add coc command `workspace.showOutput`. -- Support output channel for language server. -- Support `[extension].trace.server` setting for trace server communication. - -# 2018-07-15 - -- Support location list for diagnostic. -- Add tsserver project errors command. - -# 2018-07-14 - -- Add support for `preselect` of complete item. -- Add support for socket language server configuration. -- Fix configured language server doesn't work. -- Add `workspace.diffDocument` coc command. -- Fix buffer sometimes not attached. -- Improve completion of JSON extension. - -# 2018-07-13 - -- **Break change:** `diagnostic` in setting.json changed to `diagnostic`. -- Fix clearHighlight arguments. -- Add eslint extension https://github.com/Microsoft/vscode-eslint. -- Fix snippet break with line have \$variable. -- Use jsonc-parser replace json5. -- Add `data/schema.json` for coc-settings.json. - -# 2018-07-12 - -- Fix restart of tsserver not working. -- Fix edit of current buffer change jumplist by using `:keepjumps`. diff --git a/pack/ant/start/coc.nvim/package.json b/pack/ant/start/coc.nvim/package.json deleted file mode 100644 index 3285f30..0000000 --- a/pack/ant/start/coc.nvim/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "coc.nvim-release", - "version": "0.0.82", - "description": "LSP based intellisense engine for neovim & vim8.", - "engines": { - "node": ">=12.12.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/neoclide/coc.nvim.git" - }, - "author": "Qiming Zhao ", - "bugs": { - "url": "https://github.com/neoclide/coc.nvim/issues" - }, - "homepage": "https://github.com/neoclide/coc.nvim#readme" -} diff --git a/pack/ant/start/coc.nvim/plugin/coc.vim b/pack/ant/start/coc.nvim/plugin/coc.vim deleted file mode 100644 index 13e9c26..0000000 --- a/pack/ant/start/coc.nvim/plugin/coc.vim +++ /dev/null @@ -1,703 +0,0 @@ -scriptencoding utf-8 -if exists('g:did_coc_loaded') || v:version < 800 - finish -endif - -function! s:checkVersion() abort - let l:unsupported = 0 - if get(g:, 'coc_disable_startup_warning', 0) != 1 - if has('nvim') - let l:unsupported = !has('nvim-0.4.0') - else - let l:unsupported = !has('patch-8.1.1719') - endif - - if l:unsupported == 1 - echohl Error - echom "coc.nvim requires at least Vim 8.1.1719 or Neovim 0.4.0, but you're using an older version." - echom "Please upgrade your (neo)vim." - echom "You can add this to your vimrc to avoid this message:" - echom " let g:coc_disable_startup_warning = 1" - echom "Note that some features may error out or behave incorrectly." - echom "Please do not report bugs unless you're using at least Vim 8.1.1719 or Neovim 0.4.0." - echohl None - sleep 2 - else - if !has('nvim-0.5.0') && !has('patch-8.2.0750') - echohl WarningMsg - echom "coc.nvim works best on vim >= 8.2.0750 and neovim >= 0.5.0, consider upgrade your vim." - echom "You can add this to your vimrc to avoid this message:" - echom " let g:coc_disable_startup_warning = 1" - echom "Note that some features may behave incorrectly." - echohl None - sleep 2 - endif - endif - endif -endfunction - -call s:checkVersion() - -let g:did_coc_loaded = 1 -let g:coc_service_initialized = 0 -let s:is_win = has('win32') || has('win64') -let s:root = expand(':h:h') -let s:is_vim = !has('nvim') -let s:is_gvim = s:is_vim && has("gui_running") - -if get(g:, 'coc_start_at_startup', 1) && !s:is_gvim - call coc#rpc#start_server() -endif - -function! CocTagFunc(pattern, flags, info) abort - if a:flags !=# 'c' - " use standard tag search - return v:null - endif - return coc#rpc#request('getTagList', []) -endfunction - -function! CocPopupCallback(bufnr, arglist) abort - if len(a:arglist) == 2 - if a:arglist[0] == 'confirm' - call coc#rpc#notify('PromptInsert', [a:arglist[1], a:bufnr]) - elseif a:arglist[0] == 'exit' - execute 'silent! bd! '.a:bufnr - "call coc#rpc#notify('PromptUpdate', [a:arglist[1]]) - elseif a:arglist[0] == 'change' - let text = a:arglist[1] - let current = getbufvar(a:bufnr, 'current', '') - if text !=# current - call setbufvar(a:bufnr, 'current', text) - let cursor = term_getcursor(a:bufnr) - let info = { - \ 'lnum': cursor[0], - \ 'col': cursor[1], - \ 'line': text, - \ 'changedtick': 0 - \ } - call coc#rpc#notify('CocAutocmd', ['TextChangedI', a:bufnr, info]) - endif - elseif a:arglist[0] == 'send' - let key = a:arglist[1] - let escaped = strcharpart(key, 1, strchars(key) - 2) - call coc#rpc#notify('PromptKeyPress', [a:bufnr, escaped]) - endif - endif -endfunction - -function! CocAction(name, ...) abort - if !get(g:, 'coc_service_initialized', 0) - throw 'coc.nvim not ready when invoke CocAction "'.a:name.'"' - endif - return coc#rpc#request(a:name, a:000) -endfunction - -function! CocHasProvider(name) abort - return coc#rpc#request('hasProvider', [a:name]) -endfunction - -function! CocActionAsync(name, ...) abort - return s:AsyncRequest(a:name, a:000) -endfunction - -function! CocRequest(...) abort - return coc#rpc#request('sendRequest', a:000) -endfunction - -function! CocNotify(...) abort - return coc#rpc#request('sendNotification', a:000) -endfunction - -function! CocRegistNotification(id, method, cb) abort - call coc#on_notify(a:id, a:method, a:cb) -endfunction - -function! CocLocations(id, method, ...) abort - let args = [a:id, a:method] + copy(a:000) - return coc#rpc#request('findLocations', args) -endfunction - -function! CocLocationsAsync(id, method, ...) abort - let args = [a:id, a:method] + copy(a:000) - return s:AsyncRequest('findLocations', args) -endfunction - -function! CocRequestAsync(...) - return s:AsyncRequest('sendRequest', a:000) -endfunction - -function! s:AsyncRequest(name, args) abort - let Cb = empty(a:args)? v:null : a:args[len(a:args) - 1] - if type(Cb) == 2 - if !coc#rpc#ready() - call Cb('service not started', v:null) - else - call coc#rpc#request_async(a:name, a:args[0:-2], Cb) - endif - return '' - endif - call coc#rpc#notify(a:name, a:args) - return '' -endfunction - -function! s:CommandList(...) abort - let list = coc#rpc#request('commandList', a:000) - return join(list, "\n") -endfunction - -function! s:ExtensionList(...) abort - let stats = CocAction('extensionStats') - call filter(stats, 'v:val["isLocal"] == v:false') - let list = map(stats, 'v:val["id"]') - return join(list, "\n") -endfunction - -function! s:SearchOptions(...) abort - let list = ['-e', '--regexp', '-F', '--fixed-strings', '-L', '--follow', - \ '-g', '--glob', '--hidden', '--no-hidden', '--no-ignore-vcs', - \ '--word-regexp', '-w', '--smart-case', '-S', '--no-config', - \ '--line-regexp', '--no-ignore', '-x'] - return join(list, "\n") -endfunction - -function! s:LoadedExtensions(...) abort - let list = CocAction('loadedExtensions') - return join(list, "\n") -endfunction - -function! s:InstallOptions(...)abort - let list = ['-terminal', '-sync'] - return join(list, "\n") -endfunction - -function! s:OpenConfig() - let home = coc#util#get_config_home() - if !isdirectory(home) - echohl MoreMsg - echom 'Config directory "'.home.'" does not exist, create? (y/n)' - echohl None - let confirm = nr2char(getchar()) - redraw! - if !(confirm ==? "y" || confirm ==? "\r") - return - else - call mkdir(home, 'p') - end - endif - execute 'edit '.home.'/coc-settings.json' - call coc#rpc#notify('checkJsonExtension', []) -endfunction - -function! s:get_color(item, fallback) abort - let t = type(a:item) - if t == 1 - return a:item - endif - if t == 4 - let item = get(a:item, 'gui', {}) - let color = get(item, &background, a:fallback) - return type(color) == 1 ? color : a:fallback - endif - return a:fallback -endfunction - -function! s:AddAnsiGroups() abort - let color_map = {} - let colors = ['#282828', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374'] - let names = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'grey'] - for i in range(0, len(names) - 1) - let name = names[i] - if exists('g:terminal_ansi_colors') - let color_map[name] = s:get_color(get(g:terminal_ansi_colors, i, colors[i]), colors[i]) - else - let color_map[name] = get(g:, 'terminal_color_'.i, colors[i]) - endif - endfor - try - for name in keys(color_map) - let foreground = toupper(name[0]).name[1:] - let foregroundColor = color_map[name] - for key in keys(color_map) - let background = toupper(key[0]).key[1:] - let backgroundColor = color_map[key] - exe 'hi default CocList'.foreground.background.' guifg='.foregroundColor.' guibg='.backgroundColor - endfor - exe 'hi default CocListFg'.foreground. ' guifg='.foregroundColor. ' ctermfg='.foreground - exe 'hi default CocListBg'.foreground. ' guibg='.foregroundColor. ' ctermbg='.foreground - endfor - catch /.*/ - " ignore invalid color - endtry -endfunction - -function! s:CursorRangeFromSelected(type, ...) abort - " add range by operator - call coc#rpc#request('cursorsSelect', [bufnr('%'), 'operator', a:type]) -endfunction - -function! s:OpenDiagnostics(...) abort - let height = get(a:, 1, 0) - call coc#rpc#request('fillDiagnostics', [bufnr('%')]) - if height - execute ':lopen '.height - else - lopen - endif -endfunction - -function! s:Disable() abort - if get(g:, 'coc_enabled', 0) == 0 - return - endif - augroup coc_nvim - autocmd! - augroup end - call coc#rpc#request('detach', []) - echohl MoreMsg - echom '[coc.nvim] Event disabled' - echohl None - let g:coc_enabled = 0 -endfunction - -function! s:Autocmd(...) abort - if !get(g:, 'coc_workspace_initialized', 0) - return - endif - call coc#rpc#notify('CocAutocmd', a:000) -endfunction - -function! s:HandleCharInsert(char, bufnr) abort - if get(g:, 'coc_disable_space_report', 0) - let g:coc_disable_space_report = 0 - if a:char ==# ' ' - return - endif - endif - call s:Autocmd('InsertCharPre', a:char, a:bufnr) -endfunction - -function! s:HandleWinScrolled(winid) abort - if getwinvar(a:winid, 'float', 0) - call coc#float#nvim_scrollbar(a:winid) - endif - call s:Autocmd('WinScrolled', a:winid) -endfunction - -function! s:SyncAutocmd(...) - if !get(g:, 'coc_workspace_initialized', 0) - return - endif - call coc#rpc#request('CocAutocmd', a:000) -endfunction - -function! s:Enable(initialize) - if get(g:, 'coc_enabled', 0) == 1 - return - endif - let g:coc_enabled = 1 - - augroup coc_nvim - autocmd! - - if coc#rpc#started() - autocmd VimEnter * call coc#rpc#notify('VimEnter', []) - elseif get(g:, 'coc_start_at_startup', 1) - autocmd VimEnter * call coc#rpc#start_server() - endif - if s:is_vim - if exists('##DirChanged') - autocmd DirChanged * call s:Autocmd('DirChanged', getcwd()) - endif - if exists('##TerminalOpen') - autocmd TerminalOpen * call s:Autocmd('TermOpen', +expand('')) - endif - else - autocmd DirChanged * call s:Autocmd('DirChanged', get(v:event, 'cwd', '')) - autocmd TermOpen * call s:Autocmd('TermOpen', +expand('')) - autocmd WinEnter * call coc#float#nvim_win_enter(win_getid()) - endif - autocmd CursorMoved list:///* call coc#list#select(bufnr('%'), line('.')) - if exists('##WinClosed') - autocmd WinClosed * call coc#float#on_close(+expand('')) - autocmd WinClosed * call coc#notify#on_close(+expand('')) - elseif exists('##TabEnter') - autocmd TabEnter * call coc#notify#reflow() - endif - if has('nvim-0.4.0') || has('patch-8.1.1719') - autocmd CursorHold * call coc#float#check_related() - endif - if exists('##WinScrolled') - autocmd WinScrolled * call s:HandleWinScrolled(+expand('')) - endif - autocmd TabNew * call s:Autocmd('TabNew', tabpagenr()) - autocmd TabClosed * call s:Autocmd('TabClosed', +expand('')) - autocmd WinLeave * call s:Autocmd('WinLeave', win_getid()) - autocmd WinEnter * call s:Autocmd('WinEnter', win_getid()) - autocmd BufWinLeave * call s:Autocmd('BufWinLeave', +expand(''), bufwinid(+expand(''))) - autocmd BufWinEnter * call s:Autocmd('BufWinEnter', +expand(''), win_getid()) - autocmd FileType * call s:Autocmd('FileType', expand(''), +expand('')) - autocmd InsertCharPre * call s:HandleCharInsert(v:char, bufnr('%')) - if exists('##TextChangedP') - autocmd TextChangedP * call s:Autocmd('TextChangedP', +expand(''), coc#util#change_info()) - endif - autocmd TextChangedI * call s:Autocmd('TextChangedI', +expand(''), coc#util#change_info()) - autocmd InsertLeave * call s:Autocmd('InsertLeave', +expand('')) - autocmd InsertEnter * call s:Autocmd('InsertEnter', +expand('')) - autocmd BufHidden * call s:Autocmd('BufHidden', +expand('')) - autocmd BufEnter * call s:Autocmd('BufEnter', +expand('')) - autocmd TextChanged * call s:Autocmd('TextChanged', +expand(''), getbufvar(+expand(''), 'changedtick')) - autocmd BufWritePost * call s:Autocmd('BufWritePost', +expand(''), getbufvar(+expand(''), 'changedtick')) - autocmd CursorMoved * call s:Autocmd('CursorMoved', +expand(''), [line('.'), col('.')]) - autocmd CursorMovedI * call s:Autocmd('CursorMovedI', +expand(''), [line('.'), col('.')]) - autocmd CursorHold * call s:Autocmd('CursorHold', +expand(''), [line('.'), col('.')]) - autocmd CursorHoldI * call s:Autocmd('CursorHoldI', +expand(''), [line('.'), col('.')]) - autocmd BufNewFile,BufReadPost * call s:Autocmd('BufCreate', +expand('')) - autocmd BufUnload * call s:Autocmd('BufUnload', +expand('')) - autocmd BufWritePre * call s:SyncAutocmd('BufWritePre', +expand(''), bufname(+expand('')), getbufvar(+expand(''), 'changedtick')) - autocmd FocusGained * if mode() !~# '^c' | call s:Autocmd('FocusGained') | endif - autocmd FocusLost * call s:Autocmd('FocusLost') - autocmd VimResized * call s:Autocmd('VimResized', &columns, &lines) - autocmd VimLeavePre * let g:coc_vim_leaving = 1 - autocmd VimLeavePre * call s:Autocmd('VimLeavePre') - autocmd BufReadCmd,FileReadCmd,SourceCmd list://* call coc#list#setup(expand('')) - autocmd BufWriteCmd __coc_refactor__* :call coc#rpc#notify('saveRefactor', [+expand('')]) - autocmd ColorScheme * call s:Hi() - augroup end - if a:initialize == 0 - call coc#rpc#request('attach', []) - echohl MoreMsg - echom '[coc.nvim] Event enabled' - echohl None - endif -endfunction - -function! s:FgColor(hlGroup) abort - let fgId = synIDtrans(hlID(a:hlGroup)) - let ctermfg = synIDattr(fgId, 'reverse', 'cterm') ==# '1' ? synIDattr(fgId, 'bg', 'cterm') : synIDattr(fgId, 'fg', 'cterm') - let guifg = synIDattr(fgId, 'reverse', 'gui') ==# '1' ? synIDattr(fgId, 'bg', 'gui') : synIDattr(fgId, 'fg', 'gui') - let cmd = ' ctermfg=' . (empty(ctermfg) ? '223' : ctermfg) - let cmd .= ' guifg=' . (empty(guifg) ? '#ebdbb2' : guifg) - return cmd -endfunction - -function! s:Hi() abort - hi default CocErrorSign ctermfg=Red guifg=#ff0000 guibg=NONE - hi default CocWarningSign ctermfg=Brown guifg=#ff922b guibg=NONE - hi default CocInfoSign ctermfg=Yellow guifg=#fab005 guibg=NONE - hi default CocHintSign ctermfg=Blue guifg=#15aabf guibg=NONE - hi default CocSelectedText ctermfg=Red guifg=#fb4934 guibg=NONE - hi default CocCodeLens ctermfg=Gray guifg=#999999 guibg=NONE - hi default CocUnderline term=underline cterm=underline gui=underline - hi default CocBold term=bold cterm=bold gui=bold - hi default CocItalic term=italic cterm=italic gui=italic - if s:is_vim || has('nvim-0.4.0') - hi default CocStrikeThrough term=strikethrough cterm=strikethrough gui=strikethrough - else - hi default CocStrikeThrough guifg=#989898 ctermfg=gray - endif - hi default CocMarkdownLink ctermfg=Blue guifg=#15aabf guibg=NONE - hi default CocDisabled guifg=#999999 ctermfg=gray - hi default CocSearch ctermfg=Blue guifg=#15aabf guibg=NONE - hi default link CocFadeOut Conceal - hi default link CocMarkdownCode markdownCode - hi default link CocMarkdownHeader markdownH1 - hi default link CocMenuSel CursorLine - hi default link CocErrorFloat CocErrorSign - hi default link CocWarningFloat CocWarningSign - hi default link CocInfoFloat CocInfoSign - hi default link CocHintFloat CocHintSign - hi default link CocErrorHighlight CocUnderline - hi default link CocWarningHighlight CocUnderline - hi default link CocInfoHighlight CocUnderline - hi default link CocHintHighlight CocUnderline - hi default link CocDeprecatedHighlight CocStrikeThrough - hi default link CocUnusedHighlight CocFadeOut - hi default link CocListLine CursorLine - hi default link CocListSearch CocSearch - hi default link CocListMode ModeMsg - hi default link CocListPath Comment - hi default link CocHighlightText CursorColumn - hi default link CocHoverRange Search - hi default link CocCursorRange Search - hi default link CocLinkedEditing CocCursorRange - hi default link CocHighlightRead CocHighlightText - hi default link CocHighlightWrite CocHighlightText - hi default link CocInlayHint CocHintSign - " Notification - hi default CocNotificationProgress ctermfg=Blue guifg=#15aabf guibg=NONE - hi default link CocNotificationButton CocUnderline - hi default link CocNotificationError CocErrorFloat - hi default link CocNotificationWarning CocWarningFloat - hi default link CocNotificationInfo CocInfoFloat - " Snippet - hi default link CocSnippetVisual Visual - " Tree view highlights - hi default link CocTreeTitle Title - hi default link CocTreeDescription Comment - hi default link CocTreeOpenClose CocBold - hi default link CocTreeSelected CursorLine - hi default link CocSelectedRange CocHighlightText - " Symbol highlights - hi default link CocSymbolDefault MoreMsg - "Pum - hi default link CocPumSearch CocSearch - hi default link CocPumMenu Normal - hi default link CocPumShortcut Comment - hi default link CocPumDeprecated CocStrikeThrough - hi default CocPumVirtualText ctermfg=239 guifg=#504945 - - if has('nvim') - hi default link CocFloating NormalFloat - else - hi default link CocFloating Pmenu - endif - if !exists('*sign_getdefined') || empty(sign_getdefined('CocCurrentLine')) - sign define CocCurrentLine linehl=CocMenuSel - endif - if !exists('*sign_getdefined') || empty(sign_getdefined('CocListCurrent')) - sign define CocListCurrent linehl=CocListLine - endif - if !exists('*sign_getdefined') || empty(sign_getdefined('CocTreeSelected')) - sign define CocTreeSelected linehl=CocTreeSelected - endif - if has('nvim-0.5.0') - hi default CocCursorTransparent gui=strikethrough blend=100 - endif - - if has('nvim') - let names = ['Error', 'Warning', 'Info', 'Hint'] - for name in names - if !hlexists('Coc'.name.'VirtualText') - let suffix = name ==# 'Warning' ? 'Warn' : name - if hlexists('DiagnosticVirtualText'.suffix) - exe 'hi default link Coc'.name.'VirtualText DiagnosticVirtualText'.suffix - else - exe 'hi default link Coc'.name.'VirtualText Coc'.name.'Sign' - endif - endif - endfor - endif - call s:AddAnsiGroups() - - if get(g:, 'coc_default_semantic_highlight_groups', 1) - let hlMap = { - \ 'Namespace': ['TSNamespace', 'Include'], - \ 'Type': ['TSType', 'Type'], - \ 'Class': ['TSConstructor', 'Special'], - \ 'Enum': ['TSEnum', 'Type'], - \ 'Interface': ['TSInterface', 'Type'], - \ 'Struct': ['TSStruct', 'Identifier'], - \ 'TypeParameter': ['TSParameter', 'Identifier'], - \ 'Parameter': ['TSParameter', 'Identifier'], - \ 'Variable': ['TSSymbol', 'Identifier'], - \ 'Property': ['TSProperty', 'Identifier'], - \ 'EnumMember': ['TSEnumMember', 'Constant'], - \ 'Event': ['TSEvent', 'Keyword'], - \ 'Function': ['TSFunction', 'Function'], - \ 'Method': ['TSMethod', 'Function'], - \ 'Macro': ['TSConstMacro', 'Define'], - \ 'Keyword': ['TSKeyword', 'Keyword'], - \ 'Modifier': ['TSModifier', 'StorageClass'], - \ 'Comment': ['TSComment', 'Comment'], - \ 'String': ['TSString', 'String'], - \ 'Number': ['TSNumber', 'Number'], - \ 'Boolean': ['TSBoolean', 'Boolean'], - \ 'Regexp': ['TSStringRegex', 'String'], - \ 'Operator': ['TSOperator', 'Operator'], - \ 'Decorator': ['TSSymbol', 'Identifier'], - \ 'Deprecated': ['TSStrike', 'CocDeprecatedHighlight'] - \ } - for [key, value] in items(hlMap) - let ts = get(value, 0, '') - let fallback = get(value, 1, '') - execute 'hi default link CocSem'.key.' '.(hlexists(ts) ? ts : fallback) - endfor - endif - let symbolMap = { - \ 'Keyword': ['TSKeyword', 'Keyword'], - \ 'Namespace': ['TSNamespace', 'Include'], - \ 'Class': ['TSConstructor', 'Special'], - \ 'Method': ['TSMethod', 'Function'], - \ 'Property': ['TSProperty', 'Identifier'], - \ 'Text': ['TSText', 'CocSymbolDefault'], - \ 'Unit': ['TSUnit', 'CocSymbolDefault'], - \ 'Value': ['TSValue', 'CocSymbolDefault'], - \ 'Snippet': ['TSSnippet', 'CocSymbolDefault'], - \ 'Color': ['TSColor', 'Float'], - \ 'Reference': ['TSTextReference', 'Constant'], - \ 'Folder': ['TSFolder', 'CocSymbolDefault'], - \ 'File': ['TSFile', 'Statement'], - \ 'Module': ['TSModule', 'Statement'], - \ 'Package': ['TSPackage', 'Statement'], - \ 'Field': ['TSField', 'Identifier'], - \ 'Constructor': ['TSConstructor', 'Special'], - \ 'Enum': ['TSEnum', 'CocSymbolDefault'], - \ 'Interface': ['TSInterface', 'CocSymbolDefault'], - \ 'Function': ['TSFunction', 'Function'], - \ 'Variable': ['TSVariableBuiltin', 'Special'], - \ 'Constant': ['TSConstant', 'Constant'], - \ 'String': ['TSString', 'String'], - \ 'Number': ['TSNumber', 'Number'], - \ 'Boolean': ['TSBoolean', 'Boolean'], - \ 'Array': ['TSArray', 'CocSymbolDefault'], - \ 'Object': ['TSObject', 'CocSymbolDefault'], - \ 'Key': ['TSKey', 'Identifier'], - \ 'Null': ['TSNull', 'Type'], - \ 'EnumMember': ['TSEnumMember', 'Identifier'], - \ 'Struct': ['TSStruct', 'Keyword'], - \ 'Event': ['TSEvent', 'Constant'], - \ 'Operator': ['TSOperator', 'Operator'], - \ 'TypeParameter': ['TSParameter', 'Identifier'], - \ } - for [key, value] in items(symbolMap) - let hlGroup = hlexists(value[0]) ? value[0] : get(value, 1, 'CocSymbolDefault') - if hlexists(hlGroup) - execute 'hi default CocSymbol'.key.' '.s:FgColor(hlGroup) - endif - endfor -endfunction - -function! s:FormatFromSelected(type) - call CocActionAsync('formatSelected', a:type) -endfunction - -function! s:CodeActionFromSelected(type) - call CocActionAsync('codeAction', a:type) -endfunction - -function! s:ShowInfo() - if coc#rpc#ready() - call coc#rpc#notify('showInfo', []) - else - let lines = [] - echomsg 'coc.nvim service not started, checking environment...' - let node = get(g:, 'coc_node_path', $COC_NODE_PATH == '' ? 'node' : $COC_NODE_PATH) - if !executable(node) - call add(lines, 'Error: '.node.' is not executable!') - else - let output = trim(system(node . ' --version')) - let ms = matchlist(output, 'v\(\d\+\).\(\d\+\).\(\d\+\)') - if empty(ms) || str2nr(ms[1]) < 12 || (str2nr(ms[1]) == 12 && str2nr(ms[2]) < 12) - call add(lines, 'Error: Node version '.output.' < 12.12.0, please upgrade node.js') - endif - endif - " check bundle - let file = s:root.'/build/index.js' - if !filereadable(file) - call add(lines, 'Error: javascript bundle not found, please compile code of coc.nvim by esbuild.') - endif - if !empty(lines) - botright vnew - setl filetype=nofile - call setline(1, lines) - else - if get(g:, 'coc_start_at_startup',1) - echohl MoreMsg | echon 'Service stopped for some unknown reason, try :CocStart' | echohl None - else - echohl MoreMsg | echon 'Start on startup is disabled, try :CocStart' | echohl None - endif - endif - endif -endfunction - -command! -nargs=0 CocOutline :call coc#rpc#notify('showOutline', []) -command! -nargs=? CocDiagnostics :call s:OpenDiagnostics() -command! -nargs=0 CocInfo :call s:ShowInfo() -command! -nargs=0 CocOpenLog :call coc#rpc#notify('openLog', []) -command! -nargs=0 CocDisable :call s:Disable() -command! -nargs=0 CocEnable :call s:Enable(0) -command! -nargs=0 CocConfig :call s:OpenConfig() -command! -nargs=0 CocLocalConfig :call coc#rpc#notify('openLocalConfig', []) -command! -nargs=0 CocRestart :call coc#rpc#restart() -command! -nargs=0 CocStart :call coc#rpc#start_server() -command! -nargs=0 CocRebuild :call coc#util#rebuild() -command! -nargs=1 -complete=custom,s:LoadedExtensions CocWatch :call coc#rpc#notify('watchExtension', []) -command! -nargs=+ -complete=custom,s:SearchOptions CocSearch :call coc#rpc#notify('search', []) -command! -nargs=+ -complete=custom,s:ExtensionList CocUninstall :call CocActionAsync('uninstallExtension', ) -command! -nargs=* -complete=custom,s:CommandList -range CocCommand :call coc#rpc#notify('runCommand', []) -command! -nargs=* -complete=custom,coc#list#options CocList :call coc#rpc#notify('openList', []) -command! -nargs=? -complete=custom,coc#list#names CocListResume :call coc#rpc#notify('listResume', []) -command! -nargs=? -complete=custom,coc#list#names CocListCancel :call coc#rpc#notify('listCancel', []) -command! -nargs=? -complete=custom,coc#list#names CocPrev :call coc#rpc#notify('listPrev', []) -command! -nargs=? -complete=custom,coc#list#names CocNext :call coc#rpc#notify('listNext', []) -command! -nargs=? -complete=custom,coc#list#names CocFirst :call coc#rpc#notify('listFirst', []) -command! -nargs=? -complete=custom,coc#list#names CocLast :call coc#rpc#notify('listLast', []) -command! -nargs=0 CocUpdate :call coc#util#update_extensions(1) -command! -nargs=0 -bar CocUpdateSync :call coc#util#update_extensions() -command! -nargs=* -bar -complete=custom,s:InstallOptions CocInstall :call coc#util#install_extension([]) - -call s:Enable(1) -call s:Hi() - -" Default key-mappings for completion -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#next(1) : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#next(0) : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#prev(0) : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#cancel() : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#confirm() : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#scroll(1) : "\" -endif -if empty(mapcheck("\", 'i')) - inoremap coc#pum#visible() ? coc#pum#scroll(0) : "\" -endif - -vnoremap (coc-range-select) :call CocActionAsync('rangeSelect', visualmode(), v:true) -vnoremap (coc-range-select-backward) :call CocActionAsync('rangeSelect', visualmode(), v:false) -nnoremap (coc-range-select) :call CocActionAsync('rangeSelect', '', v:true) -nnoremap (coc-codelens-action) :call CocActionAsync('codeLensAction') -vnoremap (coc-format-selected) :call CocActionAsync('formatSelected', visualmode()) -vnoremap (coc-codeaction-selected) :call CocActionAsync('codeAction', visualmode()) -nnoremap (coc-codeaction-selected) :set operatorfunc=CodeActionFromSelectedg@ -nnoremap (coc-codeaction) :call CocActionAsync('codeAction', '') -nnoremap (coc-codeaction-line) :call CocActionAsync('codeAction', 'line') -nnoremap (coc-codeaction-cursor) :call CocActionAsync('codeAction', 'cursor') -nnoremap (coc-rename) :call CocActionAsync('rename') -nnoremap (coc-format-selected) :set operatorfunc=FormatFromSelectedg@ -nnoremap (coc-format) :call CocActionAsync('format') -nnoremap (coc-diagnostic-info) :call CocActionAsync('diagnosticInfo') -nnoremap (coc-diagnostic-next) :call CocActionAsync('diagnosticNext') -nnoremap (coc-diagnostic-prev) :call CocActionAsync('diagnosticPrevious') -nnoremap (coc-diagnostic-next-error) :call CocActionAsync('diagnosticNext', 'error') -nnoremap (coc-diagnostic-prev-error) :call CocActionAsync('diagnosticPrevious', 'error') -nnoremap (coc-definition) :call CocActionAsync('jumpDefinition') -nnoremap (coc-declaration) :call CocActionAsync('jumpDeclaration') -nnoremap (coc-implementation) :call CocActionAsync('jumpImplementation') -nnoremap (coc-type-definition) :call CocActionAsync('jumpTypeDefinition') -nnoremap (coc-references) :call CocActionAsync('jumpReferences') -nnoremap (coc-references-used) :call CocActionAsync('jumpUsed') -nnoremap (coc-openlink) :call CocActionAsync('openLink') -nnoremap (coc-fix-current) :call CocActionAsync('doQuickfix') -nnoremap (coc-float-hide) :call coc#float#close_all() -nnoremap (coc-float-jump) :call coc#float#jump() -nnoremap (coc-command-repeat) :call CocAction('repeatCommand') -nnoremap (coc-refactor) :call CocActionAsync('refactor') - -nnoremap (coc-cursors-operator) :set operatorfunc=CursorRangeFromSelectedg@ -vnoremap (coc-cursors-range) :call CocAction('cursorsSelect', bufnr('%'), 'range', visualmode()) -nnoremap (coc-cursors-word) :call CocAction('cursorsSelect', bufnr('%'), 'word', 'n') -nnoremap (coc-cursors-position) :call CocAction('cursorsSelect', bufnr('%'), 'position', 'n') - -vnoremap (coc-funcobj-i) :call CocAction('selectSymbolRange', v:true, visualmode(), ['Method', 'Function']) -vnoremap (coc-funcobj-a) :call CocAction('selectSymbolRange', v:false, visualmode(), ['Method', 'Function']) -onoremap (coc-funcobj-i) :call CocAction('selectSymbolRange', v:true, '', ['Method', 'Function']) -onoremap (coc-funcobj-a) :call CocAction('selectSymbolRange', v:false, '', ['Method', 'Function']) - -vnoremap (coc-classobj-i) :call CocAction('selectSymbolRange', v:true, visualmode(), ['Interface', 'Struct', 'Class']) -vnoremap (coc-classobj-a) :call CocAction('selectSymbolRange', v:false, visualmode(), ['Interface', 'Struct', 'Class']) -onoremap (coc-classobj-i) :call CocAction('selectSymbolRange', v:true, '', ['Interface', 'Struct', 'Class']) -onoremap (coc-classobj-a) :call CocAction('selectSymbolRange', v:false, '', ['Interface', 'Struct', 'Class']) diff --git a/pack/ant/start/nvim-lspconfig/.codespellignorewords b/pack/ant/start/nvim-lspconfig/.codespellignorewords new file mode 100644 index 0000000..a4d1410 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.codespellignorewords @@ -0,0 +1,4 @@ +als +edn +esy +protols diff --git a/pack/ant/start/nvim-lspconfig/.editorconfig b/pack/ant/start/nvim-lspconfig/.editorconfig new file mode 100644 index 0000000..bb6a142 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.editorconfig @@ -0,0 +1,13 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 8 +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[{Makefile,**/Makefile,runtime/doc/*.txt}] +indent_style = tab +indent_size = 8 diff --git a/pack/ant/start/nvim-lspconfig/.github/CODEOWNERS b/pack/ant/start/nvim-lspconfig/.github/CODEOWNERS new file mode 100644 index 0000000..e4ea4a0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/CODEOWNERS @@ -0,0 +1,6 @@ +* @glepnir + +/.github/ @dundargoc + +/flake.lock @teto +/flake.nix @teto diff --git a/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/bug_report.yml b/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..951e301 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,16 @@ +name: Bug report +description: Report a problem in nvim-lspconfig +labels: [bug] +body: + - type: markdown + attributes: + value: | + Do NOT file bugs in this repo. The configs in this repo are unsupported and provided only as a starting point. We depend on users (like you) to troubleshoot issues with their specific LSP setups and [send improvements](https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md). + + If you have a feature request or found a bug in the core Nvim `vim.lsp` module (not this repo), [report it to Nvim](https://github.com/neovim/neovim/issues/new?assignees=&labels=bug%2Clsp&projects=&template=lsp_bug_report.yml). + - type: textarea + attributes: + label: "Description" + description: "A short description of the problem you are reporting." + validations: + required: true diff --git a/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/config.yml b/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..10233f4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Question + url: https://vi.stackexchange.com/ + about: Usage questions and support requests diff --git a/pack/ant/start/nvim-lspconfig/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/pack/ant/start/nvim-lspconfig/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..efb4f2b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,5 @@ +--- +name: Pull Request +about: Submit a pull request +title: '' +--- diff --git a/pack/ant/start/nvim-lspconfig/.github/ci/run_sanitizer.sh b/pack/ant/start/nvim-lspconfig/.github/ci/run_sanitizer.sh new file mode 100644 index 0000000..4098d8a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/ci/run_sanitizer.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +REF_BRANCH="$1" +PR_BRANCH="$2" + +# checks for added lines that contain search pattern and prints them +SEARCH_PATTERN="(dirname|fn\.cwd)" + +if git diff --pickaxe-all -U0 -G "${SEARCH_PATTERN}" "${REF_BRANCH}" "${PR_BRANCH}" -- '*.lua' | grep -Ev '(configs|utils)\.lua$' | grep -E "^\+.*${SEARCH_PATTERN}" ; then + echo + echo 'String "dirname" found. There is a high risk that this might contradict the directive:' + echo '"Do not add vim.fn.cwd or util.path.dirname in root_dir".' + echo "see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#adding-a-server-to-lspconfig." + exit 1 +fi diff --git a/pack/ant/start/nvim-lspconfig/.github/dependabot.yml b/pack/ant/start/nvim-lspconfig/.github/dependabot.yml new file mode 100644 index 0000000..e96fd52 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + commit-message: + prefix: "ci" diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/codespell.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/codespell.yml new file mode 100644 index 0000000..c43f761 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/codespell.yml @@ -0,0 +1,11 @@ +name: codespell +on: [pull_request] +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install codespell + run: pip install codespell + - name: Use codespell + run: codespell --quiet-level=2 --check-hidden --skip=./doc/server_configurations.md,./doc/server_configurations.txt --ignore-words=.codespellignorewords diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/comment-config-changes.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/comment-config-changes.yml new file mode 100644 index 0000000..40bcaaf --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/comment-config-changes.yml @@ -0,0 +1,19 @@ +name: "Check changes to config" +on: [pull_request_target] +jobs: + check-config-changes: + runs-on: ubuntu-latest + permissions: + pull-requests: write + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - run: | + if ! git diff origin/$GITHUB_BASE_REF...$(git branch --show-current) --exit-code -- doc/server_configurations.md doc/server_configurations.txt; then + gh pr comment $PR_NUMBER --body 'Note that `server_configurations.md` or `server_configurations.txt` will be regenerated by the docgen CI process. Edit the Lua source file instead. For details on generating documentation, see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs' + fi diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/commit_lint.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/commit_lint.yml new file mode 100644 index 0000000..e1df4ca --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/commit_lint.yml @@ -0,0 +1,12 @@ +on: [pull_request] +jobs: + lint-commits: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: npm install --save-dev @commitlint/{cli,config-conventional} + - run: | + echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js + - run: npx commitlint --from HEAD~1 --to HEAD --verbose diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/docgen.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/docgen.yml new file mode 100644 index 0000000..678b00d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/docgen.yml @@ -0,0 +1,32 @@ +name: docgen + +on: + push: + branches: + - master + +jobs: + docgen: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: nightly + - name: Run docgen + run: | + scripts/docgen.sh + - name: Commit changes + env: + COMMIT_MSG: | + docs: update server_configurations.md + skip-checks: true + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add doc/server_configurations.md doc/server_configurations.txt + # Only commit and push if we have changes + git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push) diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/lint.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/lint.yml new file mode 100644 index 0000000..452748c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/lint.yml @@ -0,0 +1,37 @@ +name: lint + +on: + pull_request: + branches: + - master + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Run luacheck + uses: lunarmodules/luacheck@v1 + with: + args: lua/* test/* + + - name: Run selene + uses: NTBBloodbath/selene-action@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --display-style=quiet . + + style-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Lint with stylua + uses: JohnnyMorganz/stylua-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --check . diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/problem_matchers/selene.json b/pack/ant/start/nvim-lspconfig/.github/workflows/problem_matchers/selene.json new file mode 100644 index 0000000..4bbf24f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/problem_matchers/selene.json @@ -0,0 +1,30 @@ +{ + "problemMatcher": [ + { + "owner": "selene-error", + "severity": "error", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+):\\serror(.*)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + }, + { + "owner": "selene-warning", + "severity": "warning", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+):\\swarning(.*)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/release.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/release.yml new file mode 100644 index 0000000..9e59018 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: "release" +on: + push: + tags: + - '*' +jobs: + luarocks-upload: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: LuaRocks Upload + uses: nvim-neorocks/luarocks-tag-release@v7 + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + with: + summary: "A collection of common configurations for Neovim's built-in language server client." + detailed_description: | + This plugin allows for declaratively configuring, + launching, and initializing language servers you have installed on your system. + Language server configurations are community-maintained. + licence: "Apache/2.0" diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/sanitizer.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/sanitizer.yml new file mode 100644 index 0000000..89fd51e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/sanitizer.yml @@ -0,0 +1,14 @@ +name: "Dirname Checker" +on: [pull_request] +jobs: + disallowed-root-checker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - run: | + if ! bash .github/ci/run_sanitizer.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}; then + exit 1 + fi diff --git a/pack/ant/start/nvim-lspconfig/.github/workflows/test.yml b/pack/ant/start/nvim-lspconfig/.github/workflows/test.yml new file mode 100644 index 0000000..8d5f7a7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: test + +on: + pull_request: + branches: + - master + +jobs: + test: + name: Run Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + - uses: rhysd/action-setup-vim@v1 + id: vim + with: + neovim: true + version: nightly + + - name: luajit + uses: leafo/gh-actions-lua@v10 + with: + luaVersion: "luajit-openresty" + + - name: luarocks + uses: leafo/gh-actions-luarocks@v4 + + - name: run test + shell: bash + run: | + luarocks install luacheck + luarocks install vusted + vusted ./test diff --git a/pack/ant/start/nvim-lspconfig/.gitignore b/pack/ant/start/nvim-lspconfig/.gitignore new file mode 100644 index 0000000..a928eed --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.gitignore @@ -0,0 +1,3 @@ +.luacheckcache +neovim +doc/tags diff --git a/pack/ant/start/nvim-lspconfig/.luacheckrc b/pack/ant/start/nvim-lspconfig/.luacheckrc new file mode 100644 index 0000000..ac6af14 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.luacheckrc @@ -0,0 +1,15 @@ +-- vim: ft=lua tw=80 + +-- Rerun tests only if their modification time changed. +cache = true + +ignore = { + "122", -- Setting a read-only field of a global variable. + "212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off. + "631", -- max_line_length, vscode pkg URL is too long +} + +-- Global objects defined by the C code +read_globals = { + "vim", +} diff --git a/pack/ant/start/nvim-lspconfig/.stylua.toml b/pack/ant/start/nvim-lspconfig/.stylua.toml new file mode 100644 index 0000000..78c5507 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/.stylua.toml @@ -0,0 +1,6 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "None" diff --git a/pack/ant/start/nvim-lspconfig/CONTRIBUTING.md b/pack/ant/start/nvim-lspconfig/CONTRIBUTING.md new file mode 100644 index 0000000..b83ee8a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/CONTRIBUTING.md @@ -0,0 +1,127 @@ +## Requirements + +- [Link requirements](#Lint) +- Documentation is generated by `scripts/docgen.lua`. + - Only works on linux and macOS + +## Scope of lspconfig + +The point of lspconfig is to provide the minimal configuration necessary for a server to act in compliance with the language server protocol. In general, if a server requires custom client-side commands or off-spec handlers, then the server configuration should be added *without* those in lspconfig and receive a dedicated plugin such as nvim-jdtls, nvim-metals, etc. + +## Pull requests (PRs) + +- To avoid duplicate work, create a draft pull request. +- Avoid cosmetic changes to unrelated files in the same commit. +- Use a [feature branch](https://www.atlassian.com/git/tutorials/comparing-workflows) instead of the master branch. +- Use a **rebase workflow** for small PRs. + - After addressing review comments, it's fine to rebase and force-push. + +## Adding a server to lspconfig + +The general form of adding a new language server is to start with a minimal skeleton. This includes populating the `config` table with a `default_config` and `docs` table. + +When choosing a server name, convert all dashes (`-`) to underscores (`_`) If the name of the server is a unique name (`pyright`, `clangd`) or a commonly used abbreviation (`zls`), prefer this as the server name. If the server instead follows the pattern x-language-server, prefer the convention `x_ls` (`jsonnet_ls`). + +`default_config` should include, at minimum the following: +* `cmd`: a list which includes the executable name as the first entry, with arguments constituting subsequent list elements (`--stdio` is common). +Note that Windows has a limitation when it comes to directly invoking a server that's installed by `npm` or `gem`, so it requires additional handling. + +```lua +cmd = { 'typescript-language-server', '--stdio' } +``` + +* `filetypes`: a list for filetypes the server should match with +* `root_dir`: a function (or function handle) which returns the root of the project used to determine if lspconfig should launch a new language server, or attach a previously launched server when you open a new buffer matching the filetype of the server. Note, lspconfig does not offer a dedicated single file mode (this is not codified in the spec). Do not add `vim.fn.cwd` or `util.path.dirname` in `root_dir`. A future version of lspconfig will provide emulation of a single file mode until this is formally codified in the specification. A good fallback is `util.find_git_ancestor`, see other configurations for examples. + +Additionally, the following options are often added: + +* `init_options`: a table sent during initialization, corresponding to initializationOptions sent in [initializeParams](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeParams) as part of the first request sent from client to server during startup. +* `settings`: a table sent during [`workspace/didChangeConfiguration`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#didChangeConfigurationParams) shortly after server initialization. This is an undocumented convention for most language servers. There is often some duplication with initOptions. + +An example for adding a new language server is shown below for `pyright`, a python language server included in lspconfig: + +```lua +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', +} + +local function organize_imports() + local params = { + command = 'pyright.organizeimports', + arguments = { vim.uri_from_bufnr(0) }, + } + vim.lsp.buf.execute_command(params) +end + +return { + default_config = { + cmd = { 'pyright-langserver', '--stdio' }, + filetypes = { 'python' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + settings = { + python = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = 'workspace', + }, + }, + }, + }, + commands = { + PyrightOrganizeImports = { + organize_imports, + description = 'Organize Imports', + }, + }, + docs = { + description = [[ +https://github.com/microsoft/pyright + +`pyright`, a static type checker and language server for python +]], + }, +} +``` + +## Commit style + +lspconfig, like neovim core, follows the [conventional commit style](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) please submit your commits accordingly. Generally commits will be of the form: + +``` +feat: add lua-language-server support +fix(lua-language-server): update root directory pattern +docs: update README.md +``` + +with the commit body containing additional details. + +## Lint + +PRs are checked with the following software: +- [luacheck](https://github.com/luarocks/luacheck#installation) +- [stylua](https://github.com/JohnnyMorganz/StyLua). +- [selene](https://github.com/Kampfkarren/selene) + +Please run the linter locally before submitting a PR: + + make lint + +If using nix, you can use `nix develop` to install these to a local nix shell. + +## Generating docs + +GitHub Actions automatically generates `server_configurations.md`. Only modify `scripts/README_template.md` or the `docs` table in the server config Lua file. Do not modify `server_configurations.md` directly. + +To preview the generated `server_configurations.md` locally, run `scripts/docgen.lua` from +`nvim` (from the project root): + + nvim -R -Es +'set rtp+=$PWD' +'luafile scripts/docgen.lua' diff --git a/pack/ant/start/nvim-lspconfig/LICENSE.md b/pack/ant/start/nvim-lspconfig/LICENSE.md new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/LICENSE.md @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/pack/ant/start/nvim-lspconfig/Makefile b/pack/ant/start/nvim-lspconfig/Makefile new file mode 100644 index 0000000..74715e6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/Makefile @@ -0,0 +1,12 @@ +test: + vusted ./test + +lint: + @printf "\nRunning luacheck\n" + luacheck lua/* test/* + @printf "\nRunning selene\n" + selene --display-style=quiet . + @printf "\nRunning stylua\n" + stylua --check . + +.PHONY: test lint diff --git a/pack/ant/start/nvim-lspconfig/README.md b/pack/ant/start/nvim-lspconfig/README.md new file mode 100644 index 0000000..8ddc567 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/README.md @@ -0,0 +1,156 @@ +# nvim-lspconfig + +[Configs](doc/server_configurations.md) for the [Nvim LSP client](https://neovim.io/doc/user/lsp.html) (`:help lsp`). + +* **Do not file Nvim LSP client issues here.** The Nvim LSP client does not live here. This is only a collection of LSP configs. +* If you found a bug in the Nvim LSP client, [report it at the Nvim core repo](https://github.com/neovim/neovim/issues/new?assignees=&labels=bug%2Clsp&template=lsp_bug_report.yml). +* These configs are **best-effort and supported by the community.** See [contributions](#contributions). + +See also `:help lspconfig`. + +## Install + +[![LuaRocks](https://img.shields.io/luarocks/v/neovim/nvim-lspconfig?logo=lua&color=purple)](https://luarocks.org/modules/neovim/nvim-lspconfig) + +* Requires neovim version 0.8 above. Update Nvim and nvim-lspconfig before reporting an issue. + +* Install nvim-lspconfig using builtin packages: + + git clone https://github.com/neovim/nvim-lspconfig ~/.config/nvim/pack/nvim/start/nvim-lspconfig + +* Alternatively, nvim-lspconfig can be installed using a 3rd party plugin manager (consult the documentation for your plugin manager for details). + +## Quickstart + +1. Install a language server, e.g. [pyright](doc/server_configurations.md#pyright) + ```bash + npm i -g pyright + ``` +2. Add the language server setup to your init.lua. + ```lua + require'lspconfig'.pyright.setup{} + ``` +3. Launch Nvim, the language server will attach and provide diagnostics. + ``` + nvim main.py + ``` +4. Run `:checkhealth lsp` to see the status or to troubleshoot. + +See [server_configurations.md](doc/server_configurations.md) (`:help lspconfig-all` from Nvim) for the full list of configs, including installation instructions and additional, optional, customization suggestions for each language server. For servers that are not on your system path (e.g., `jdtls`, `elixirls`), you must manually add `cmd` to the `setup` parameter. Most language servers can be installed in less than a minute. + +## Configuration + +Nvim sets some default options whenever a buffer attaches to an LSP client. See [`:h lsp-config`][lsp-config] for more details. In particular, the following options are set: + +* [`'tagfunc'`][tagfunc] + - Enables "go to definition" capabilities using [``][tagjump] and other [tag commands][tag-commands]. +* [`'omnifunc'`][omnifunc] + - Enables (manual) omni mode completion with `` in Insert mode. For *auto*completion, an [autocompletion plugin](https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion) is required. +* [`'formatexpr'`][formatexpr] + - Enables LSP formatting with [`gq`][gq]. + +Nvim also maps `K` to [`vim.lsp.buf.hover()`][vim.lsp.buf.hover] in Normal mode. + +Nvim 0.10 and newer creates the following default maps unconditionally: + +* `[d` and `]d` map to `vim.diagnostic.goto_prev()` and `vim.diagnostic.goto_next()` (respectively) +* `d` maps to `vim.diagnostic.open_float()` + +[lsp-config]: https://neovim.io/doc/user/lsp.html#lsp-config +[tagfunc]: https://neovim.io/doc/user/tagsrch.html#tag-function +[omnifunc]: https://neovim.io/doc/user/options.html#'omnifunc' +[formatexpr]: https://neovim.io/doc/user/options.html#'formatexpr' +[gq]: https://neovim.io/doc/user/change.html#gq +[vim.lsp.buf.hover]: https://neovim.io/doc/user/lsp.html#vim.lsp.buf.hover() +[tagjump]: https://neovim.io/doc/user/tagsrch.html#CTRL-%5D +[tag-commands]: https://neovim.io/doc/user/tagsrch.html#tag-commands + +Further customization can be achieved using the [`LspAttach`][LspAttach] autocommand event. +The [`LspDetach`][LspAttach] autocommand event can be used to "cleanup" mappings if a buffer becomes detached from an LSP server. +See [`:h LspAttach`][LspAttach] and [`:h LspDetach`][LspDetach] for details and examples. +See [`:h lsp-buf`][lsp-buf] for details on other LSP functions. + +[LspAttach]: https://neovim.io/doc/user/lsp.html#LspAttach +[LspDetach]: https://neovim.io/doc/user/lsp.html#LspDetach +[lsp-buf]: https://neovim.io/doc/user/lsp.html#lsp-buf + +Additional configuration options can be provided for each LSP server by passing arguments to the `setup` function. See `:h lspconfig-setup` for details. Example: + +```lua +local lspconfig = require('lspconfig') +lspconfig.rust_analyzer.setup { + -- Server-specific settings. See `:help lspconfig-setup` + settings = { + ['rust-analyzer'] = {}, + }, +} +``` + +## Troubleshooting + +If you have an issue, the first step is to reproduce with a [minimal configuration](https://github.com/neovim/nvim-lspconfig/blob/master/test/minimal_init.lua). + +The most common reasons a language server does not start or attach are: + +1. The language server is not installed. nvim-lspconfig does not install language servers for you. You should be able to run the `cmd` defined in each server's Lua module from the command line and see that the language server starts. If the `cmd` is an executable name instead of an absolute path to the executable, ensure it is on your path. +2. Missing filetype plugins. Certain languages are not detecting by vim/neovim because they have not yet been added to the filetype detection system. Ensure `:set ft?` shows the filetype and not an empty value. +3. Not triggering root detection. **Some** language servers will only start if it is opened in a directory, or child directory, containing a file which signals the *root* of the project. Most of the time, this is a `.git` folder, but each server defines the root config in the lua file. See [server_configurations.md](doc/server_configurations.md) or the source for the list of root directories. +4. You must pass `capabilities` for **each** `setup {}` if you want these to take effect. +5. **Do not call `setup {}` twice for the same server**. The second call to `setup {}` will overwrite the first. + +Before reporting a bug, check your logs and the output of `:LspInfo`. Add the following to your init.vim to enable logging: + +```lua +vim.lsp.set_log_level("debug") +``` + +Attempt to run the language server, and open the log with: + +``` +:LspLog +``` +Most of the time, the reason for failure is present in the logs. + +## Commands + +* `:LspInfo` shows the status of active and configured language servers. +* `:LspStart ` Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. Pass `autostart = false` to your `.setup{}` call for a language server if you would like to launch clients solely with this command. Defaults to all servers matching current buffer filetype. +* `:LspStop ` Defaults to stopping all buffer clients. +* `:LspRestart ` Defaults to restarting all buffer clients. + +## Wiki + +See the [wiki](https://github.com/neovim/nvim-lspconfig/wiki) for additional topics, including: + +* [Automatic server installation](https://github.com/neovim/nvim-lspconfig/wiki/Installing-language-servers#automatically) +* [Snippets support](https://github.com/neovim/nvim-lspconfig/wiki/Snippets) +* [Project local settings](https://github.com/neovim/nvim-lspconfig/wiki/Project-local-settings) +* [Recommended plugins for enhanced language server features](https://github.com/neovim/nvim-lspconfig/wiki/Language-specific-plugins) + +## Contributions + +If you are missing a language server on the list in [server_configurations.md](doc/server_configurations.md), contributing +a new configuration for it helps others, especially if the server requires special setup. Follow these steps: + +1. Read [CONTRIBUTING.md](CONTRIBUTING.md). +2. Create a new file at `lua/lspconfig/server_configurations/SERVER_NAME.lua`. + - Copy an [existing config](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/) + to get started. Most configs are simple. For an extensive example see + [texlab.lua](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/texlab.lua). +3. Ask questions on [GitHub Discussions](https://github.com/neovim/neovim/discussions) or in the [Neovim Matrix room](https://app.element.io/#/room/#neovim:matrix.org). + +### Release process + +To publish a release: + +- Create and push a new [tag](https://github.com/neovim/nvim-lspconfig/tags). +- After pushing the tag, a [GitHub action](./.github/workflows/release.yml) + will automatically package the plugin and publish the release to LuaRocks. + +## License + +Copyright Neovim contributors. All rights reserved. + +nvim-lspconfig is licensed under the terms of the Apache 2.0 license. + +See [LICENSE.md](./LICENSE.md) diff --git a/pack/ant/start/nvim-lspconfig/doc/lspconfig.txt b/pack/ant/start/nvim-lspconfig/doc/lspconfig.txt new file mode 100644 index 0000000..ef5c180 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/doc/lspconfig.txt @@ -0,0 +1,591 @@ +*lspconfig.txt* For Nvim version 0.8+ + +nvim-lspconfig provides user-contributed configs for the Nvim |lsp| client. + + Type |gO| to see the table of contents. + +============================================================================== +INTRODUCTION *lspconfig* + +nvim-lspconfig is a collection of community-contributed configurations for the +built-in language server client in Nvim core. This plugin provides four +primary functionalities: + + - default launch commands, initialization options, and settings for each + server + - a root directory resolver which attempts to detect the root of your project + - an autocommand mapping that either launches a new language server or + attempts to attach a language server to each opened buffer if it falls + under a tracked project + - utility commands such as LspInfo, LspStart, LspStop, and LspRestart for + managing language server instances + +nvim-lspconfig is not required to use the builtin Nvim |lsp| client, it is +just a convenience layer. See |lsp-quickstart|. + +See |lspconfig-all| for the complete list of language server configurations. + +============================================================================== +QUICKSTART *lspconfig-quickstart* + +- ensure the server is installed and executable from the command line + +- enable the server in your Neovim configuration (Lua example): +> + require'lspconfig'.clangd.setup{} +< +- create a new project, ensure that it contains a root marker which matches the + server requirements specified in |lspconfig-all|. + +- open a file within that project, such as `main.c`. + +- If you need more information about a server configuration, read the corresponding + entry in |lspconfig-all|. + +============================================================================== +THE SETUP METAMETHOD *lspconfig-setup* + +`lspconfig` consists of a collection of language server configurations. Each +configuration exposes a `setup {}` metamethod which makes it easy to directly +use the default configuration or selectively override the defaults. +`setup {}` is the primary interface by which users interact with `lspconfig`. + +Using the default configuration for a server is simple: +> + require'lspconfig'.clangd.setup{} +< +The available server names are listed in |lspconfig-all| and match the server +name in `config.SERVER_NAME` defined in each configuration's source file. + +The purpose of `setup{}` is to wrap the call to Nvim's built-in +`vim.lsp.start_client()` with an autocommand that automatically launch a +language server. + +This autocommand calls `start_client()` or `vim.lsp.buf_attach_client()` +depending on whether the current file belongs to a project with a currently +running client. See |lspconfig-root-detection| for more details. + +The `setup{}` function takes a table which contains a superset of the keys +listed in `:help vim.lsp.start_client()` with the following unique entries: + +- {root_dir} + + `function(filename, bufnr)` + + Returns either a filepath (string) or nil. The language server will only + start if the function returns a filepath. + + If a root directory (string) is returned which is unique from any + previously returned root_dir, a new server will be spawned with that + root directory. See |lspconfig-root-detection| for more details + +- {name} + + `string` + + Defaults to the server's name (`clangd`, `pyright`, etc.). + +- {filetypes} + + `list[string] | nil` + + Set of filetypes for which to attempt to resolve {root_dir}. + + May be empty, or server may specify a default value. + +- {autostart} + + `bool` (default: true) + + Controls if the `FileType` autocommand that launches a language server is + created. If `false`, allows for deferring language servers until manually + launched with `:LspStart` (|lspconfig-commands|). + +- {single_file_support} + + `bool` (default: nil) + + Determines if a server is started without a matching root directory. + See |lspconfig-single-file-support|. + +- {on_new_config} + + `function(new_config, new_root_dir)` + + Function executed after a root directory is detected. This is used to + modify the server configuration (including `cmd` itself). Most commonly, + this is used to inject additional arguments into `cmd`. + + If overriding `on_new_config`, ensure that you read the + `on_new_config` defined in the source file of the default configuration + in `lspconfig`. The original `on_new_config` snippet for a given server + should likely be included in your new override. Some configurations + use `on_new_config` to dynamically set or modify `cmd`. + +Note: all entries passed to `setup {}` override the entry in the default +configuration. There is no composition. + +All `config` elements described in `:help vim.lsp.start_client()` can +additionally be overridden via the `setup {}` call. The most commonly +passed overrides to `setup {}` are: + +- {capabilities} `table ` + + a table which represents the neovim client capabilities. Useful for + broadcasting to the server additional functionality (snippets, off-protocol + features) provided by plugins. + +- {cmd} `list[string]` + + a list where each entry corresponds to the blankspace delimited part of + the command that launches the server. The first entry is the binary used + to run the language server. Additional entries are passed as arguments. + + The equivalent `cmd` for: +> + foo --bar baz +< + is: +> + {'foo', '--bar', 'baz'} +< +- {handlers} `list[functions]` + + a list of handlers which override the function used to process a response + from a given language server. Applied only to the server referenced by + setup. See |lsp-handler|. + +- {init_options} `table ` + + a table passed during the initialization notification after launching + a language server. Equivalent to the `initializationOptions` field found + in `InitializeParams` in the LSP specification. + + See upstream server documentation for available initialization + options. + +- {on_attach} `function(client, bufnr)` + + Callback invoked by Nvim's built-in client when attaching a buffer to a + language server. Often used to set Nvim (buffer or global) options or to + override the Nvim client properties (`server_capabilities`) after a + language server attaches. + + Prefer using an |LspAttach| autocommand handler instead. + +- {settings} `table ` + + The `settings` table is sent after initialization via a + `workspace/didChangeConfiguration` notification from the Nvim client to + the language server. These settings allow a user to change optional runtime + settings of the language server. + + As an example, to set the following settings found in the pyright + documentation: + + `pyright.disableLanguageServices`: `boolean` + `pyright.disableOrganizeImports`: `boolean` + + Nested keys need to be translated into a nested table and passed to + the settings field in `setup {}` as follows: +> + require('lspconfig').pyright.setup{ + settings = { + pyright = { + disableLanguageServices = true, + disableOrganizeImports = true, + } + } + } +< +============================================================================== +OVERRIDING GLOBAL DEFAULTS *lspconfig-global-defaults* + +The global defaults for all servers can be overridden by extending the +`default_config` table. + +> + local lspconfig = require'lspconfig' + lspconfig.util.default_config = vim.tbl_extend( + "force", + lspconfig.util.default_config, + { + autostart = false, + handlers = { + ["window/logMessage"] = function(err, method, params, client_id) + if params and params.type <= vim.lsp.protocol.MessageType.Log then + vim.lsp.handlers["window/logMessage"](err, method, params, client_id) + end + end, + ["window/showMessage"] = function(err, method, params, client_id) + if params and params.type <= vim.lsp.protocol.MessageType.Warning.Error then + vim.lsp.handlers["window/showMessage"](err, method, params, client_id) + end + end, + } + } + ) +< +`setup {}` can additionally override these defaults in subsequent calls. + +============================================================================== +SETUP HOOK *lspconfig-setup-hook* + +`lspconfig` will execute the `on_setup` hook for each setup call to a server after +validating its configuration, and before attempting to launch the server +itself. One typical usage is to allow ad-hoc substitution for any +configuration entry, such as `cmd`. + +> + local lspconfig = require 'lspconfig' + lspconfig.util.on_setup = lspconfig.util.add_hook_before(lspconfig.util.on_setup, function(config) + if some_condition and config.name == "clangd" then + local custom_server_prefix = "/my/custom/server/prefix" + config.cmd = { custom_server_prefix .. "/bin/clangd" } + end + end) + + +Note: This is primarily targeted at plugins developers, so make sure to use +`util.add_hook_before()` as a wrapper instead of overriding the original function +completely, to void breaking external integrations with lspconfig. + +============================================================================== +SERVER CONFIGURATIONS *lspconfig-configurations* + +See |lspconfig-all| for the complete list of language server configurations. + +While the `setup {}` function is the primary interface to `lspconfig`, for +servers for which there is not a configuration, it is necessary to define a +configuration directly. This can be useful if there is an outstanding PR that +is in review, or when developing a language server that is unavailable +publicly. This can be done through the `configs` module. + +The `configs` module is a singleton where configs are defined. The schema for +validating using `vim.validate` is: +> + configs.SERVER_NAME = { + default_config = {'t'}, + on_new_config = {'f', true}, + on_attach = {'f', true}, + commands = {'t', true}, + docs = {'t', true}, + } +< +where the structure of the docs table is as follows: +> + docs = { + description = {'s', true}, + default_config = {'t', true}, + } +< +`commands` is a map of `name:definition` key:value pairs, where `definition` +is a list whose first value is a function implementing the command, and the +rest are either array values which will be formed into flags for the command, +or special keys like `description`. + +Warning: Commands is deprecated and will be removed in future releases. +It is recommended to use `vim.api.nvim_create_user_command()` instead in an +|LspAttach| autocommand handler. + +Example: +> + local function organize_imports() + local params = { + command = 'pyright.organizeimports', + arguments = { vim.uri_from_bufnr(0) }, + } + vim.lsp.buf.execute_command(params) + end + + vim.api.nvim_create_autocmd('LspAttach', { + callback = function(ev) + local client = vim.lsp.get_client_by_id(ev.data.client_id) + if client.name == "pyright" then + vim.api.nvim_create_user_command("PyrightOrganizeImports", organize_imports, {desc = 'Organize Imports'}) + end + end + end + + require("lspconfig")['pyright'].setup{} +< + +The `configs.__newindex` metamethod consumes the config definition and returns +an object with a `setup()` method, to be invoked by users: +> + require'lspconfig'.SERVER_NAME.setup{} + +After you set `configs.SERVER_NAME` you can add arbitrary language-specific +functions to it if necessary. + +Example: +> + configs.texlab.buf_build = buf_build +< + +============================================================================== +ADDING NEW SERVERS *lspconfig-new* + +The steps for adding and enabling a new server configuration are: + +1. load the `lspconfig` module (note that this is a stylistic choice) > + local lspconfig = require 'lspconfig' +< +2. define the configuration > + local configs = require 'lspconfig.configs' + + -- Check if the config is already defined (useful when reloading this file) + if not configs.foo_lsp then + configs.foo_lsp = { + default_config = { + cmd = {'/home/neovim/lua-language-server/run.sh'}, + filetypes = {'lua'}, + root_dir = function(fname) + return lspconfig.util.find_git_ancestor(fname) + end, + settings = {}, + }, + } + end + +3. call `setup()` to enable the FileType autocmd > + lspconfig.foo_lsp.setup{} +< +============================================================================== +ROOT DETECTION *lspconfig-root-detection* + *lspconfig-root-dir* + +A project's `root_dir` is used by `lspconfig` to determine whether `lspconfig` +should start a new server, or attach a previous one, to the current file. + +`lspconfig` automatically launches language servers by defining a filetype +autocommand based on the `filetypes` specified in the default configuration of +each server, optionally overridable by the `filetypes` table passed to +`setup`. + +This autocommand triggers a search from the current file position in the +filesystem hierarchy up to the top level directory of your filesystem. The +`root_dir` entry of each configuration is a function that returns true if the +current directory in this traversal matches a given root pattern. + +The following utility functions are provided by `lspconfig`. Each function call +below returns a function that takes as its argument the current buffer path. + +- `util.root_pattern`: function which takes multiple arguments, each + corresponding to a different root pattern against which the contents of the + current directory are matched using |vim.fn.glob()| while traversing up the + filesystem. Parent directories are traversed once per pattern, in the order + the patterns are specified. +> + root_dir = util.root_pattern('pyproject.toml', 'requirements.txt') +< +- `util.find_git_ancestor`: a function that locates the first parent directory + containing a `.git` directory. +> + root_dir = util.find_git_ancestor + +- `util.find_node_modules_ancestor`: a function that locates the first parent + directory containing a `node_modules` directory. +> + root_dir = util.find_node_modules_ancestor +< + +- `util.find_package_json_ancestor`: a function that locates the first parent + directory containing a `package.json`. +> + root_dir = util.find_package_json_ancestor +< +Note: On Windows, `lspconfig` always assumes forward slash normalized paths with +capitalized drive letters. + +============================================================================== +ADVANCED ROOT DIRECTORY DETECTION *lspconfig-root-advanced* + *lspconfig-root-composition* + +The `root_dir` key in `config` and `setup` can hold any function of the form +> + function custom_root_dir(filename, bufnr) + returns nil | string +> +This allows for rich composition of root directory patterns which is necessary +for some project structures. Example (for Kotlin): +> + local root_files = { + 'settings.gradle', -- Gradle (multi-project) + 'settings.gradle.kts', -- Gradle (multi-project) + 'build.xml', -- Ant + 'pom.xml', -- Maven + } + + local fallback_root_files = { + 'build.gradle', -- Gradle + 'build.gradle.kts', -- Gradle + } + root_dir = function(fname) + local primary = util.root_pattern(unpack(root_files))(fname) + local fallback = util.root_pattern(unpack(fallback_root_files))(fname) + return primary or fallback + end +< +Browsing the source of the default configurations is recommended. + +============================================================================== +SINGLE FILE SUPPORT *lspconfig-single-file-support* + +Language servers require each project to have a `root` in order to provide +features that require cross-file indexing. + +Some servers support not passing a root directory as a proxy for single file +mode under which cross-file features may be degraded. + +`lspconfig` offers limited support for an implicit single-file mode by: + +- first trying to resolve the root directory pattern +- then, if `single_file_support` is enabled for a given language server + configuration, starting the server without sending `rootDirectory` or + `workspaceFolders` during initialization. +- attaching subsequent files in the parent directory to the same server + instance, depending on filetype. +- also supports unnamed buffer if filetype matches the server filetype + settings. + +Cross-file features (navigation, hover) may or may not work depending on the +language server. For a full feature-set, consider moving your files to a +directory with a project structure `lspconfig` can infer. + +Note that in the event that the LSP specification is extended to support a +standard for single-file mode, lspconfig will adopt that standard. + +============================================================================== +COMMANDS *lspconfig-commands* + +- `:LspInfo` shows the status of active and configured language servers. Note + that client id refers to the Nvim RPC instance connected to a given + language server. + +The following commands support tab-completion for all arguments. All commands +that require a client id can either leverage tab-completion or the info +contained in `:LspInfo`: + +- `:LspStart ` launches the requested (configured) client, but only + if it successfully resolves a root directory. Note: Defaults to all + configured servers matching the current buffer filetype. +- `:LspStop ` stops the server with the given client id. Defaults to + stopping all servers active on the current buffer. if you want to force stop + a language server you can do it like `:LspStop ++force` +- `:LspRestart ` restarts the client with the given client id, and + will attempt to reattach to all previously attached buffers. + +============================================================================== +COMPLETION SUPPORT *lspconfig-completion* + +Manually triggered completion can be provided by Nvim's built-in omnifunc. +See |lspconfig|. + +For autocompletion, Nvim does not provide built-in functionality. Consult the +nvim-lspconfig wiki, which provides configuration examples for using +a completion plugin with the built-in client + +============================================================================== +DEBUGGING *lspconfig-debugging* + +While using language servers should be easy, debugging issues can be +challenging. First, it is important to identify the source of the issue, which +is typically (in rough order): + +- the language server itself +- a plugin +- overrides in a user configuration +- the built-in client in Nvim core +- nvim-lspconfig + +The first step in debugging is to test with a minimal configuration (such as +`../test/minimal_init.lua`). Historically, many users problems are due to +plugins or misconfiguration. + +Should that fail, identifying which component is the culprit is challenging. +The following are the only categories of bugs that pertain to nvim-lspconfig. + +- The root directory inferred for your project is wrong, or it should be + detected but is not due to a bug in the nvim-lspconfig path utilities. +- The server is launching, but you believe that the default settings, + initialization options, or command arguments are suboptimal and should be + replaced based on your understanding of the server documentation. + +All bugs Nvim's built-in client should be reported to the Nvim core issue +tracker. All bugs pertaining to plugins should be reported to the respective +plugin. All missing features in a language server should be reported to the +upstream language server issue tracker. + +For debugging nvim-lspconfig issues, the most common hurdles users face are: + + - The language server is not installed or is otherwise not executable. + nvim-lspconfig does not install language servers for you. Ensure the `cmd` + defined in `server_configurations.md` is executable from the command + line. If the absolute path to the binary is not supplied in `cmd`, ensure + it is on your PATH. + - No root detected. nvim-lspconfig is built around the concept of projects. See + |lspconfig-root-detection| for more details. Most of the time, + initializing a git repo will suffice. + - Misconfiguration. Often users will override `cmd`, `on_init`, or + `handlers`. Ensure that you debug by using a stock configuration to ensure + your customizations are not introducing issues. + +|LspInfo| provides an overview of your active and configured language servers +which can be useful for debugging. + +Note that it will not report any configuration changes applied in +`on_new_config`. + +============================================================================== +LOGGING *lspconfig-logging* + +When debugging language servers, it is helpful to enable additional logging in +the built-in client, specifically considering the RPC logs. Example: +> + vim.lsp.set_log_level 'trace' + if vim.fn.has 'nvim-0.5.1' == 1 then + require('vim.lsp.log').set_format_func(vim.inspect) + end +< +Attempt to run the language server, and open the log with: + +> + :LspLog +< +Note that `ERROR` messages containing `stderr` only indicate that the log was +sent to `stderr`. Many servers counter-intuitively send harmless messages +via stderr. + +============================================================================== +SCOPE *lspconfig-scope* + +`lspconfig` is a community effort to create default configurations that fit +within the scope of an official plugin for Nvim. All features that are not +strictly providing default configurations for language servers will be removed +from `lspconfig` in time. The power of the Neovim LSP ecosystem is in the +composability and flexibility of integrating multiple plugins which maximizes +user choice and freedom. + +`lspconfig` also opts to adhere strictly to the LSP specification, with some +small allowances when small modifications to a server configuration are +necessary to enable features critical to its usability. For more featureful +options, the `lspconfig` wiki lists community created plugins that build upon +the built-in client to provide functionality tailored to specific language +servers. + +============================================================================== +Highlights *lspconfig-highlight* + +LspInfoTitle Client name +LspInfoList Server name list +LspInfoFiletype `filetypes` area +LspInfoTip Tip +LspInfoBorder Window border + To set the border use: > + require('lspconfig.ui.windows').default_options.border = 'single' +< Accepts the same values as the `border` option to |nvim_open_win()| + +============================================================================== + +vim:tw=78:ts=8:ft=help:norl: diff --git a/pack/ant/start/nvim-lspconfig/doc/server_configurations.md b/pack/ant/start/nvim-lspconfig/doc/server_configurations.md new file mode 100644 index 0000000..fa74977 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/doc/server_configurations.md @@ -0,0 +1,14126 @@ +# Configurations + + +LSP configs provided by nvim-lspconfig are listed below. This documentation is +autogenerated from the Lua files. You can view this file in Nvim by running +`:help lspconfig-all`. + +- [agda_ls](#agda_ls) +- [aiken](#aiken) +- [als](#als) +- [anakin_language_server](#anakin_language_server) +- [angularls](#angularls) +- [ansiblels](#ansiblels) +- [antlersls](#antlersls) +- [apex_ls](#apex_ls) +- [arduino_language_server](#arduino_language_server) +- [asm_lsp](#asm_lsp) +- [ast_grep](#ast_grep) +- [astro](#astro) +- [autotools_ls](#autotools_ls) +- [awk_ls](#awk_ls) +- [azure_pipelines_ls](#azure_pipelines_ls) +- [bacon_ls](#bacon_ls) +- [ballerina](#ballerina) +- [basedpyright](#basedpyright) +- [bashls](#bashls) +- [bazelrc_lsp](#bazelrc_lsp) +- [beancount](#beancount) +- [bicep](#bicep) +- [biome](#biome) +- [bitbake_language_server](#bitbake_language_server) +- [bitbake_ls](#bitbake_ls) +- [blueprint_ls](#blueprint_ls) +- [bqnlsp](#bqnlsp) +- [bright_script](#bright_script) +- [bsl_ls](#bsl_ls) +- [buck2](#buck2) +- [buddy_ls](#buddy_ls) +- [bufls](#bufls) +- [bzl](#bzl) +- [cadence](#cadence) +- [cairo_ls](#cairo_ls) +- [ccls](#ccls) +- [cds_lsp](#cds_lsp) +- [circom-lsp](#circom-lsp) +- [clangd](#clangd) +- [clarity_lsp](#clarity_lsp) +- [clojure_lsp](#clojure_lsp) +- [cmake](#cmake) +- [cobol_ls](#cobol_ls) +- [codeqlls](#codeqlls) +- [coffeesense](#coffeesense) +- [contextive](#contextive) +- [coq_lsp](#coq_lsp) +- [crystalline](#crystalline) +- [csharp_ls](#csharp_ls) +- [css_variables](#css_variables) +- [cssls](#cssls) +- [cssmodules_ls](#cssmodules_ls) +- [cucumber_language_server](#cucumber_language_server) +- [custom_elements_ls](#custom_elements_ls) +- [cypher_ls](#cypher_ls) +- [dafny](#dafny) +- [dagger](#dagger) +- [dartls](#dartls) +- [dcmls](#dcmls) +- [debputy](#debputy) +- [delphi_ls](#delphi_ls) +- [denols](#denols) +- [dhall_lsp_server](#dhall_lsp_server) +- [diagnosticls](#diagnosticls) +- [digestif](#digestif) +- [djlsp](#djlsp) +- [docker_compose_language_service](#docker_compose_language_service) +- [dockerls](#dockerls) +- [dolmenls](#dolmenls) +- [dotls](#dotls) +- [dprint](#dprint) +- [drools_lsp](#drools_lsp) +- [ds_pinyin_lsp](#ds_pinyin_lsp) +- [earthlyls](#earthlyls) +- [ecsact](#ecsact) +- [efm](#efm) +- [elixirls](#elixirls) +- [elmls](#elmls) +- [elp](#elp) +- [ember](#ember) +- [emmet_language_server](#emmet_language_server) +- [emmet_ls](#emmet_ls) +- [erg_language_server](#erg_language_server) +- [erlangls](#erlangls) +- [esbonio](#esbonio) +- [eslint](#eslint) +- [facility_language_server](#facility_language_server) +- [fennel_language_server](#fennel_language_server) +- [fennel_ls](#fennel_ls) +- [fish_lsp](#fish_lsp) +- [flow](#flow) +- [flux_lsp](#flux_lsp) +- [foam_ls](#foam_ls) +- [fortls](#fortls) +- [fsautocomplete](#fsautocomplete) +- [fsharp_language_server](#fsharp_language_server) +- [fstar](#fstar) +- [futhark_lsp](#futhark_lsp) +- [gdscript](#gdscript) +- [gdshader_lsp](#gdshader_lsp) +- [ghcide](#ghcide) +- [ghdl_ls](#ghdl_ls) +- [ginko_ls](#ginko_ls) +- [gitlab_ci_ls](#gitlab_ci_ls) +- [glasgow](#glasgow) +- [gleam](#gleam) +- [glint](#glint) +- [glsl_analyzer](#glsl_analyzer) +- [glslls](#glslls) +- [golangci_lint_ls](#golangci_lint_ls) +- [gopls](#gopls) +- [gradle_ls](#gradle_ls) +- [grammarly](#grammarly) +- [graphql](#graphql) +- [groovyls](#groovyls) +- [guile_ls](#guile_ls) +- [harper_ls](#harper_ls) +- [haxe_language_server](#haxe_language_server) +- [hdl_checker](#hdl_checker) +- [helm_ls](#helm_ls) +- [hhvm](#hhvm) +- [hie](#hie) +- [hlasm](#hlasm) +- [hls](#hls) +- [hoon_ls](#hoon_ls) +- [html](#html) +- [htmx](#htmx) +- [hydra_lsp](#hydra_lsp) +- [hyprls](#hyprls) +- [idris2_lsp](#idris2_lsp) +- [intelephense](#intelephense) +- [janet_lsp](#janet_lsp) +- [java_language_server](#java_language_server) +- [jdtls](#jdtls) +- [jedi_language_server](#jedi_language_server) +- [jinja_lsp](#jinja_lsp) +- [jqls](#jqls) +- [jsonls](#jsonls) +- [jsonnet_ls](#jsonnet_ls) +- [julials](#julials) +- [kcl](#kcl) +- [koka](#koka) +- [kotlin_language_server](#kotlin_language_server) +- [lean3ls](#lean3ls) +- [leanls](#leanls) +- [lelwel_ls](#lelwel_ls) +- [lemminx](#lemminx) +- [lexical](#lexical) +- [ltex](#ltex) +- [lua_ls](#lua_ls) +- [luau_lsp](#luau_lsp) +- [lwc_ls](#lwc_ls) +- [m68k](#m68k) +- [markdown_oxide](#markdown_oxide) +- [marksman](#marksman) +- [matlab_ls](#matlab_ls) +- [mdx_analyzer](#mdx_analyzer) +- [mesonlsp](#mesonlsp) +- [metals](#metals) +- [millet](#millet) +- [mint](#mint) +- [mlir_lsp_server](#mlir_lsp_server) +- [mlir_pdll_lsp_server](#mlir_pdll_lsp_server) +- [mm0_ls](#mm0_ls) +- [mojo](#mojo) +- [motoko_lsp](#motoko_lsp) +- [move_analyzer](#move_analyzer) +- [msbuild_project_tools_server](#msbuild_project_tools_server) +- [mutt_ls](#mutt_ls) +- [nelua_lsp](#nelua_lsp) +- [neocmake](#neocmake) +- [nextls](#nextls) +- [nginx_language_server](#nginx_language_server) +- [nickel_ls](#nickel_ls) +- [nil_ls](#nil_ls) +- [nim_langserver](#nim_langserver) +- [nimls](#nimls) +- [nixd](#nixd) +- [nomad_lsp](#nomad_lsp) +- [ntt](#ntt) +- [nushell](#nushell) +- [nxls](#nxls) +- [ocamlls](#ocamlls) +- [ocamllsp](#ocamllsp) +- [ols](#ols) +- [omnisharp](#omnisharp) +- [opencl_ls](#opencl_ls) +- [openedge_ls](#openedge_ls) +- [openscad_ls](#openscad_ls) +- [openscad_lsp](#openscad_lsp) +- [pact_ls](#pact_ls) +- [pasls](#pasls) +- [pbls](#pbls) +- [perlls](#perlls) +- [perlnavigator](#perlnavigator) +- [perlpls](#perlpls) +- [pest_ls](#pest_ls) +- [phan](#phan) +- [phpactor](#phpactor) +- [pico8_ls](#pico8_ls) +- [pkgbuild_language_server](#pkgbuild_language_server) +- [please](#please) +- [postgres_lsp](#postgres_lsp) +- [powershell_es](#powershell_es) +- [prismals](#prismals) +- [prolog_ls](#prolog_ls) +- [prosemd_lsp](#prosemd_lsp) +- [protols](#protols) +- [psalm](#psalm) +- [pug](#pug) +- [puppet](#puppet) +- [purescriptls](#purescriptls) +- [pylsp](#pylsp) +- [pylyzer](#pylyzer) +- [pyre](#pyre) +- [pyright](#pyright) +- [qml_lsp](#qml_lsp) +- [qmlls](#qmlls) +- [quick_lint_js](#quick_lint_js) +- [r_language_server](#r_language_server) +- [racket_langserver](#racket_langserver) +- [raku_navigator](#raku_navigator) +- [reason_ls](#reason_ls) +- [regal](#regal) +- [regols](#regols) +- [relay_lsp](#relay_lsp) +- [remark_ls](#remark_ls) +- [rescriptls](#rescriptls) +- [rls](#rls) +- [rnix](#rnix) +- [robotframework_ls](#robotframework_ls) +- [roc_ls](#roc_ls) +- [rome](#rome) +- [rubocop](#rubocop) +- [ruby_lsp](#ruby_lsp) +- [ruff](#ruff) +- [ruff_lsp](#ruff_lsp) +- [rune_languageserver](#rune_languageserver) +- [rust_analyzer](#rust_analyzer) +- [salt_ls](#salt_ls) +- [scheme_langserver](#scheme_langserver) +- [scry](#scry) +- [serve_d](#serve_d) +- [shopify_theme_ls](#shopify_theme_ls) +- [sixtyfps](#sixtyfps) +- [slangd](#slangd) +- [slint_lsp](#slint_lsp) +- [smarty_ls](#smarty_ls) +- [smithy_ls](#smithy_ls) +- [snakeskin_ls](#snakeskin_ls) +- [snyk_ls](#snyk_ls) +- [solang](#solang) +- [solargraph](#solargraph) +- [solc](#solc) +- [solidity](#solidity) +- [solidity_ls](#solidity_ls) +- [solidity_ls_nomicfoundation](#solidity_ls_nomicfoundation) +- [somesass_ls](#somesass_ls) +- [sorbet](#sorbet) +- [sourcekit](#sourcekit) +- [sourcery](#sourcery) +- [spectral](#spectral) +- [spyglassmc_language_server](#spyglassmc_language_server) +- [sqlls](#sqlls) +- [sqls](#sqls) +- [standardrb](#standardrb) +- [starlark_rust](#starlark_rust) +- [starpls](#starpls) +- [statix](#statix) +- [steep](#steep) +- [stimulus_ls](#stimulus_ls) +- [stylelint_lsp](#stylelint_lsp) +- [superhtml](#superhtml) +- [svelte](#svelte) +- [svlangserver](#svlangserver) +- [svls](#svls) +- [swift_mesonls](#swift_mesonls) +- [syntax_tree](#syntax_tree) +- [tabby_ml](#tabby_ml) +- [tailwindcss](#tailwindcss) +- [taplo](#taplo) +- [tblgen_lsp_server](#tblgen_lsp_server) +- [teal_ls](#teal_ls) +- [templ](#templ) +- [terraform_lsp](#terraform_lsp) +- [terraformls](#terraformls) +- [texlab](#texlab) +- [textlsp](#textlsp) +- [tflint](#tflint) +- [theme_check](#theme_check) +- [thriftls](#thriftls) +- [tilt_ls](#tilt_ls) +- [tinymist](#tinymist) +- [ts_ls](#ts_ls) +- [tsp_server](#tsp_server) +- [ttags](#ttags) +- [turtle_ls](#turtle_ls) +- [tvm_ffi_navigator](#tvm_ffi_navigator) +- [twiggy_language_server](#twiggy_language_server) +- [typeprof](#typeprof) +- [typos_lsp](#typos_lsp) +- [typst_lsp](#typst_lsp) +- [uiua](#uiua) +- [unison](#unison) +- [unocss](#unocss) +- [uvls](#uvls) +- [v_analyzer](#v_analyzer) +- [vacuum](#vacuum) +- [vala_ls](#vala_ls) +- [vale_ls](#vale_ls) +- [vdmj](#vdmj) +- [verible](#verible) +- [veridian](#veridian) +- [veryl_ls](#veryl_ls) +- [vhdl_ls](#vhdl_ls) +- [vimls](#vimls) +- [visualforce_ls](#visualforce_ls) +- [vls](#vls) +- [volar](#volar) +- [vtsls](#vtsls) +- [vuels](#vuels) +- [wgsl_analyzer](#wgsl_analyzer) +- [yamlls](#yamlls) +- [yang_lsp](#yang_lsp) +- [yls](#yls) +- [ziggy](#ziggy) +- [ziggy_schema](#ziggy_schema) +- [zk](#zk) +- [zls](#zls) + +## agda_ls + +https://github.com/agda/agda-language-server + +Language Server for Agda. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.agda_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "als" } + ``` + - `filetypes` : + ```lua + { "agda" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## aiken + +https://github.com/aiken-lang/aiken + +A language server for Aiken Programming Language. +[Installation](https://aiken-lang.org/installation-instructions) + +It can be i + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.aiken.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "aiken", "lsp" } + ``` + - `filetypes` : + ```lua + { "aiken" } + ``` + - `root_dir` : + ```lua + root_pattern("aiken.toml", ".git") + ``` + + +## als + +https://github.com/AdaCore/ada_language_server + +Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install). + +Can be configured by passing a "settings" object to `als.setup{}`: + +```lua +require('lspconfig').als.setup{ + settings = { + ada = { + projectFile = "project.gpr"; + scenarioVariables = { ... }; + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.als.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ada_language_server" } + ``` + - `deprecate` : + ```lua + { + to = "github.com/TamaMcGlinn/nvim-lspconfig-ada", + version = "0.2.0" + } + ``` + - `filetypes` : + ```lua + { "ada" } + ``` + - `root_dir` : + ```lua + util.root_pattern("Makefile", ".git", "*.gpr", "*.adc") + ``` + + +## anakin_language_server + +https://pypi.org/project/anakin-language-server/ + +`anakin-language-server` is yet another Jedi Python language server. + +Available options: + +* Initialization: https://github.com/muffinmad/anakin-language-server#initialization-option +* Configuration: https://github.com/muffinmad/anakin-language-server#configuration-options + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.anakin_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "anakinls" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + anakinls = { + pyflakes_errors = { "ImportStarNotPermitted", "UndefinedExport", "UndefinedLocal", "UndefinedName", "DuplicateArgument", "MultiValueRepeatedKeyLiteral", "MultiValueRepeatedKeyVariable", "FutureFeatureNotDefined", "LateFutureImport", "ReturnOutsideFunction", "YieldOutsideFunction", "ContinueOutsideLoop", "BreakOutsideLoop", "TwoStarredExpressions", "TooManyExpressionsInStarredAssignment", "ForwardAnnotationSyntaxError", "RaiseNotImplemented", "StringDotFormatExtraPositionalArguments", "StringDotFormatExtraNamedArguments", "StringDotFormatMissingArgument", "StringDotFormatMixingAutomatic", "StringDotFormatInvalidFormat", "PercentFormatInvalidFormat", "PercentFormatMixedPositionalAndNamed", "PercentFormatUnsupportedFormat", "PercentFormatPositionalCountMismatch", "PercentFormatExtraNamedArguments", "PercentFormatMissingArgument", "PercentFormatExpectedMapping", "PercentFormatExpectedSequence", "PercentFormatStarRequiresSequence" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## angularls + +https://github.com/angular/vscode-ng-language-service + +`angular-language-server` can be installed via npm `npm install -g @angular/language-server`. + +Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup. + +```lua +local project_library_path = "/path/to/project/lib" +local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.angularls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ngserver", "--stdio", "--tsProbeLocations", "", "--ngProbeLocations", "" } + ``` + - `filetypes` : + ```lua + { "typescript", "html", "typescriptreact", "typescript.tsx", "htmlangular" } + ``` + - `root_dir` : + ```lua + root_pattern("angular.json") + ``` + + +## ansiblels + +https://github.com/ansible/vscode-ansible + +Language server for the ansible configuration management tool. + +`ansible-language-server` can be installed via `npm`: + +```sh +npm install -g @ansible/ansible-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ansiblels.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ansible-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml.ansible" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + ansible = { + ansible = { + path = "ansible" + }, + executionEnvironment = { + enabled = false + }, + python = { + interpreterPath = "python" + }, + validation = { + enabled = true, + lint = { + enabled = true, + path = "ansible-lint" + } + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## antlersls + +https://www.npmjs.com/package/antlers-language-server + +`antlersls` can be installed via `npm`: +```sh +npm install -g antlers-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.antlersls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "antlersls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "antlers" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## apex_ls + +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Apex. + +For manual installation, download the JAR file from the [VSCode +extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex). + +```lua +require'lspconfig'.apex_ls.setup { + apex_jar_path = '/path/to/apex-jorje-lsp.jar', + apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors + apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.apex_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "apexcode" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## arduino_language_server + +https://github.com/arduino/arduino-language-server + +Language server for Arduino + +The `arduino-language-server` can be installed by running: + +``` +go install github.com/arduino/arduino-language-server@latest +``` + +The `arduino-cli` tool must also be installed. Follow [these +installation instructions](https://arduino.github.io/arduino-cli/latest/installation/) for +your platform. + +After installing `arduino-cli`, follow [these +instructions](https://arduino.github.io/arduino-cli/latest/getting-started/#create-a-configuration-file) +for generating a configuration file if you haven't done so already, and make +sure you [install any relevant platforms +libraries](https://arduino.github.io/arduino-cli/latest/getting-started/#install-the-core-for-your-board). + +The language server also requires `clangd` to be installed. Follow [these +installation instructions](https://clangd.llvm.org/installation) for your +platform. + +If you don't have a sketch yet create one. + +```sh +$ arduino-cli sketch new test +$ cd test +``` + +You will need a `sketch.yaml` file in order for the language server to understand your project. It will also save you passing options to `arduino-cli` each time you compile or upload a file. You can generate the file by using the following commands. + + +First gather some information about your board. Make sure your board is connected and run the following: + +```sh +$ arduino-cli board list +Port Protocol Type Board Name FQBN Core +/dev/ttyACM0 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr +``` + +Then generate the file: + +```sh +arduino-cli board attach -p /dev/ttyACM0 -b arduino:avr:uno test.ino +``` + +The resulting file should look like this: + +```yaml +default_fqbn: arduino:avr:uno +default_port: /dev/ttyACM0 +``` + +Your folder structure should look like this: + +``` +. +├── test.ino +└── sketch.yaml +``` + +For further instructions about configuration options, run `arduino-language-server --help`. + +Note that an upstream bug makes keywords in some cases become undefined by the language server. +Ref: https://github.com/arduino/arduino-ide/issues/159 + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.arduino_language_server.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + textDocument = { + semanticTokens = vim.NIL + }, + workspace = { + semanticTokens = vim.NIL + } + } + ``` + - `cmd` : + ```lua + { "arduino-language-server" } + ``` + - `filetypes` : + ```lua + { "arduino" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## asm_lsp + +https://github.com/bergercookie/asm-lsp + +Language Server for GAS/GO Assembly + +`asm-lsp` can be installed via cargo: +cargo install asm-lsp + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.asm_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "asm-lsp" } + ``` + - `filetypes` : + ```lua + { "asm", "vmasm" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ast_grep + +https://ast-grep.github.io/ + +ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. +ast-grep LSP only works in projects that have `sgconfig.y[a]ml` in their root directories. +```sh +npm install [-g] @ast-grep/cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ast_grep.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ast-grep", "lsp" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "rust", "go", "java", "python", "javascript", "typescript", "html", "css", "kotlin", "dart", "lua" } + ``` + - `root_dir` : + ```lua + root_pattern('sgconfig.yaml', 'sgconfig.yml') + ``` + + +## astro + +https://github.com/withastro/language-tools/tree/main/packages/language-server + +`astro-ls` can be installed via `npm`: +```sh +npm install -g @astrojs/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.astro.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "astro-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "astro" } + ``` + - `init_options` : + ```lua + { + typescript = {} + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git") + ``` + + +## autotools_ls + +https://github.com/Freed-Wu/autotools-language-server + +`autotools-language-server` can be installed via `pip`: +```sh +pip install autotools-language-server +``` + +Language server for autoconf, automake and make using tree sitter in python. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.autotools_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "autotools-language-server" } + ``` + - `filetypes` : + ```lua + { "config", "automake", "make" } + ``` + - `root_dir` : + ```lua + { "configure.ac", "Makefile", "Makefile.am", "*.mk" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## awk_ls + +https://github.com/Beaglefoot/awk-language-server/ + +`awk-language-server` can be installed via `npm`: +```sh +npm install -g awk-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.awk_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "awk-language-server" } + ``` + - `filetypes` : + ```lua + { "awk" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## azure_pipelines_ls + +https://github.com/microsoft/azure-pipelines-language-server + +An Azure Pipelines language server + +`azure-pipelines-ls` can be installed via `npm`: + +```sh +npm install -g azure-pipelines-language-server +``` + +By default `azure-pipelines-ls` will only work in files named `azure-pipelines.yml`, this can be changed by providing additional settings like so: +```lua +require("lspconfig").azure_pipelines_ls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + schemas = { + ["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = { + "/azure-pipeline*.y*l", + "/*.azure*", + "Azure-Pipelines/**/*.y*l", + "Pipelines/*.y*l", + }, + }, + }, + }, +} +``` +The Azure Pipelines LSP is a fork of `yaml-language-server` and as such the same settings can be passed to it as `yaml-language-server`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.azure_pipelines_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "azure-pipelines-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bacon_ls + +https://github.com/crisidev/bacon-ls + +A Language Server Protocol wrapper for [bacon](https://dystroy.org/bacon/). +It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust +workspaces using the Bacon export locations file. + +It requires `bacon` and `bacon-ls` to be installed on the system using +[mason.nvim](https://github.com/williamboman/mason.nvim) or manually:util + +```sh +$ cargo install --locked bacon bacon-ls +``` + +Settings can be changed using the `settings` dictionary:util + +```lua +settings = { + -- Bacon export filename, default .bacon-locations + locationsFile = ".bacon-locations", + -- Maximum time in seconds the LSP server waits for Bacon to update the + -- export file before loading the new diagnostics + waitTimeSeconds = 10 +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bacon_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bacon-ls" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ballerina + +Ballerina language server + +The Ballerina language's CLI tool comes with its own language server implementation. +The `bal` command line tool must be installed and available in your system's PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ballerina.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bal", "start-language-server" } + ``` + - `filetypes` : + ```lua + { "ballerina" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## basedpyright + +https://detachhead.github.io/basedpyright + +`basedpyright`, a static type checker and language server for python + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.basedpyright.setup{} +``` +**Commands:** +- PyrightOrganizeImports: Organize Imports +- PyrightSetPythonPath: Reconfigure basedpyright with the provided python path + +**Default values:** + - `cmd` : + ```lua + { "basedpyright-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + basedpyright = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + useLibraryCodeForTypes = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bashls + +https://github.com/bash-lsp/bash-language-server + +`bash-language-server` can be installed via `npm`: +```sh +npm i -g bash-language-server +``` + +Language server for bash, written using tree sitter in typescript. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bashls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bash-language-server", "start" } + ``` + - `filetypes` : + ```lua + { "sh" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + bashIde = { + globPattern = "*@(.sh|.inc|.bash|.command)" + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bazelrc_lsp + +https://github.com/salesforce-misc/bazelrc-lsp + +`bazelrc-lsp` is a LSP for `.bazelrc` configuration files. + +The `.bazelrc` file type is not detected automatically, you can register it manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['.*.bazelrc'] = 'bazelrc', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bazelrc_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bazelrc-lsp" } + ``` + - `filetypes` : + ```lua + { "bazelrc" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## beancount + +https://github.com/polarmutex/beancount-language-server#installation + +See https://github.com/polarmutex/beancount-language-server#configuration for configuration options + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.beancount.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "beancount-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "beancount", "bean" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bicep + +https://github.com/azure/bicep +Bicep language server + +Bicep language server can be installed by downloading and extracting a release of bicep-langserver.zip from [Bicep GitHub releases](https://github.com/Azure/bicep/releases). + +Bicep language server requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +Neovim does not have built-in support for the bicep filetype which is required for lspconfig to automatically launch the language server. + +Filetype detection can be added via an autocmd: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.bicep set filetype=bicep ]] +``` + +**By default, bicep language server does not have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +local bicep_lsp_bin = "/path/to/bicep-langserver/Bicep.LangServer.dll" +require'lspconfig'.bicep.setup{ + cmd = { "dotnet", bicep_lsp_bin }; + ... +} +``` + +To download the latest release and place in /usr/local/bin/bicep-langserver: +```bash +(cd $(mktemp -d) \ + && curl -fLO https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip \ + && rm -rf /usr/local/bin/bicep-langserver \ + && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bicep.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "bicep" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## biome + +https://biomejs.dev + +Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome). + +```sh +npm install [-g] @biomejs/biome +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.biome.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "biome", "lsp-proxy" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "json", "jsonc", "typescript", "typescript.tsx", "typescriptreact", "astro", "svelte", "vue", "css" } + ``` + - `root_dir` : + ```lua + root_pattern('biome.json', 'biome.jsonc') + ``` + - `single_file_support` : + ```lua + false + ``` + + +## bitbake_language_server + +🛠️ bitbake language server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bitbake_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bitbake-language-server" } + ``` + - `filetypes` : + ```lua + { "bitbake" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## bitbake_ls + +https://github.com/yoctoproject/vscode-bitbake/tree/staging/server +https://www.npmjs.com/package/language-server-bitbake + +Official Bitbake Language Server for the Yocto Project. + +Can be installed from npm or github. + +``` +npm install -g language-server-bitbake +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bitbake_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "language-server-bitbake", "--stdio" } + ``` + - `filetypes` : + ```lua + { "bitbake" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + false + ``` + + +## blueprint_ls + +https://gitlab.gnome.org/jwestman/blueprint-compiler + +`blueprint-compiler` can be installed via your system package manager. + +Language server for the blueprint markup language, written in python and part +of the blueprint-compiler. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.blueprint_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "blueprint-compiler", "lsp" } + ``` + - `cmd_env` : + ```lua + { + GLOB_PATTERN = "*@(.blp)" + } + ``` + - `filetypes` : + ```lua + { "blueprint" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bqnlsp + +https://git.sr.ht/~detegr/bqnlsp + + +`bqnlsp`, a language server for BQN. + +The binary depends on the shared library of [CBQN](https://github.com/dzaima/CBQN) `libcbqn.so`. +If CBQN is installed system-wide (using `sudo make install` in its source directory) and `bqnlsp` errors that it can't find the shared library, update the linker cache by executing `sudo ldconfig`. +If CBQN has been installed in a non-standard directory or can't be installed globally pass `libcbqnPath = '/path/to/CBQN'` to the setup function. +This will set the environment variables `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (macOS) to the provided path. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bqnlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bqnlsp" } + ``` + - `filetypes` : + ```lua + { "bqn" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bright_script + +https://github.com/RokuCommunity/brighterscript + +`brightscript` can be installed via `npm`: +```sh +npm install -g brighterscript +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bright_script.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bsc", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "brs" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bsl_ls + + https://github.com/1c-syntax/bsl-language-server + + Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bsl_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "bsl", "os" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## buck2 + +https://github.com/facebook/buck2 + +Build system, successor to Buck + +To better detect Buck2 project files, the following can be added: + +``` +vim.cmd [[ autocmd BufRead,BufNewFile *.bxl,BUCK,TARGETS set filetype=bzl ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.buck2.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "buck2", "lsp" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + root_pattern(".buckconfig") + ``` + + +## buddy_ls + +https://github.com/buddy-compiler/buddy-mlir#buddy-lsp-server +The Language Server for the buddy-mlir, a drop-in replacement for mlir-lsp-server, +supporting new dialects defined in buddy-mlir. +`buddy-lsp-server` can be installed at the buddy-mlir repository (buddy-compiler/buddy-mlir) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.buddy_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "buddy-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mlir" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bufls + +https://github.com/bufbuild/buf-language-server + +`buf-language-server` can be installed via `go install`: +```sh +go install github.com/bufbuild/buf-language-server/cmd/bufls@latest +``` + +bufls is a Protobuf language server compatible with Buf modules and workspaces + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bufls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bufls", "serve" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + root_pattern("buf.work.yaml", ".git") + ``` + + +## bzl + +https://bzl.io/ + +https://docs.stack.build/docs/cli/installation + +https://docs.stack.build/docs/vscode/starlark-language-server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bzl.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bzl", "lsp", "serve" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## cadence + +[Cadence Language Server](https://github.com/onflow/cadence-tools/tree/master/languageserver) +using the [flow-cli](https://developers.flow.com/tools/flow-cli). + +The `flow` command from flow-cli must be available. For install instructions see +[the docs](https://developers.flow.com/tools/flow-cli/install#install-the-flow-cli) or the +[Github page](https://github.com/onflow/flow-cli). + +By default the configuration is taken from the closest `flow.json` or the `flow.json` in the users home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cadence.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flow", "cadence", "language-server" } + ``` + - `filetypes` : + ```lua + { "cdc" } + ``` + - `init_options` : + ```lua + { + numberOfAccounts = "1" + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.root_pattern('flow.json') or vim.env.HOME + ``` + + +## cairo_ls + +[Cairo Language Server](https://github.com/starkware-libs/cairo/tree/main/crates/cairo-lang-language-server) + +First, install cairo following [this tutorial](https://medium.com/@elias.tazartes/ahead-of-the-curve-install-cairo-1-0-alpha-and-prepare-for-regenesis-85f4e3940e20) + +Then enable cairo language server in your lua configuration. +```lua +require'lspconfig'.cairo_ls.setup{} +``` + +*cairo-language-server is still under active development, some features might not work yet !* + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cairo_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cairo-language-server", "/C", "--node-ipc" } + ``` + - `filetypes` : + ```lua + { "cairo" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("Scarb.toml", "cairo_project.toml", ".git") + ``` + + +## ccls + +https://github.com/MaskRay/ccls/wiki + +ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified +as compile_commands.json or, for simpler projects, a .ccls. +For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). + +Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example: + +```lua +local lspconfig = require'lspconfig' +lspconfig.ccls.setup { + init_options = { + compilationDatabaseDirectory = "build"; + index = { + threads = 0; + }; + clang = { + excludeArgs = { "-frounding-math"} ; + }; + } +} + +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ccls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ccls" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "objc", "objcpp", "cuda" } + ``` + - `offset_encoding` : + ```lua + "utf-32" + ``` + - `root_dir` : + ```lua + root_pattern('compile_commands.json', '.ccls', '.git') + ``` + - `single_file_support` : + ```lua + false + ``` + + +## cds_lsp + + +https://cap.cloud.sap/docs/ + +`cds-lsp` can be installed via `npm`: + +```sh +npm i -g @sap/cds-lsp +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cds_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cds-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cds" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + cds = { + validate = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## circom-lsp + +[Circom Language Server](https://github.com/rubydusa/circom-lsp) + +`circom-lsp`, the language server for the Circom language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.circom-lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "circom-lsp" } + ``` + - `filetypes` : + ```lua + { "circom" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## clangd + +https://clangd.llvm.org/installation.html + +- **NOTE:** Clang >= 11 is recommended! See [#23](https://github.com/neovim/nvim-lsp/issues/23). +- If `compile_commands.json` lives in a build directory, you should + symlink it to the root of your source tree. + ``` + ln -s /path/to/myproject/build/compile_commands.json /path/to/myproject/ + ``` +- clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) + specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clangd.setup{} +``` +**Commands:** +- ClangdShowSymbolInfo: Show symbol info +- ClangdSwitchSourceHeader: Switch between source/header + +**Default values:** + - `capabilities` : + ```lua + default capabilities, with offsetEncoding utf-8 + ``` + - `cmd` : + ```lua + { "clangd" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "objc", "objcpp", "cuda", "proto" } + ``` + - `root_dir` : + ```lua + root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git' + ) + + ``` + - `single_file_support` : + ```lua + true + ``` + + +## clarity_lsp + +`clarity-lsp` is a language server for the Clarity language. Clarity is a decidable smart contract language that optimizes for predictability and security. Smart contracts allow developers to encode essential business logic on a blockchain. + +To learn how to configure the clarity language server, see the [clarity-lsp documentation](https://github.com/hirosystems/clarity-lsp). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clarity_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "clarity-lsp" } + ``` + - `filetypes` : + ```lua + { "clar", "clarity" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## clojure_lsp + +https://github.com/clojure-lsp/clojure-lsp + +Clojure Language Server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clojure_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "clojure-lsp" } + ``` + - `filetypes` : + ```lua + { "clojure", "edn" } + ``` + - `root_dir` : + ```lua + root_pattern("project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", ".git", "bb.edn") + ``` + + +## cmake + +https://github.com/regen100/cmake-language-server + +CMake LSP Implementation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cmake.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cmake-language-server" } + ``` + - `filetypes` : + ```lua + { "cmake" } + ``` + - `init_options` : + ```lua + { + buildDirectory = "build" + } + ``` + - `root_dir` : + ```lua + root_pattern('CMakePresets.json', 'CTestConfig.cmake', '.git', 'build', 'cmake') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## cobol_ls + +Cobol language support + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cobol_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cobol-language-support" } + ``` + - `filetypes` : + ```lua + { "cobol" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## codeqlls + +Reference: +https://codeql.github.com/docs/codeql-cli/ + +Binaries: +https://github.com/github/codeql-cli-binaries + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.codeqlls.setup{} +``` + + +**Default values:** + - `before_init` : + ```lua + see source file + ``` + - `cmd` : + ```lua + { "codeql", "execute", "language-server", "--check-errors", "ON_CHANGE", "-q" } + ``` + - `filetypes` : + ```lua + { "ql" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + search_path = "list containing all search paths, eg: '~/codeql-home/codeql-repo'" + } + ``` + + +## coffeesense + +https://github.com/phil294/coffeesense + +CoffeeSense Language Server +`coffeesense-language-server` can be installed via `npm`: +```sh +npm install -g coffeesense-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.coffeesense.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "coffeesense-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "coffee" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## contextive + +https://github.com/dev-cycles/contextive + +Language Server for Contextive. + +Contextive allows you to define terms in a central file and provides auto-completion suggestions and hover panels for these terms wherever they're used. + +To install the language server, you need to download the appropriate [GitHub release asset](https://github.com/dev-cycles/contextive/releases/) for your operating system and architecture. + +After the download unzip the Contextive.LanguageServer binary and copy the file into a folder that is included in your system's PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.contextive.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "Contextive.LanguageServer" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## coq_lsp + +https://github.com/ejgallego/coq-lsp/ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.coq_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "coq-lsp" } + ``` + - `filetypes` : + ```lua + { "coq" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## crystalline + +https://github.com/elbywan/crystalline + +Crystal language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.crystalline.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "crystalline" } + ``` + - `filetypes` : + ```lua + { "crystal" } + ``` + - `root_dir` : + ```lua + root_pattern('shard.yml', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## csharp_ls + +https://github.com/razzmatazz/csharp-language-server + +Language Server for C#. + +csharp-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install csharp-ls is with `dotnet tool install --global csharp-ls`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.csharp_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "csharp-ls" } + ``` + - `filetypes` : + ```lua + { "cs" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## css_variables + +https://github.com/vunguyentuan/vscode-css-variables/tree/master/packages/css-variables-language-server + +CSS variables autocompletion and go-to-definition + +`css-variables-language-server` can be installed via `npm`: + +```sh +npm i -g css-variables-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.css_variables.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "css-variables-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "scss", "less" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, + }, + + ``` + + +## cssls + + +https://github.com/hrsh7th/vscode-langservers-extracted + +`css-languageserver` can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.cssls.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cssls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-css-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "scss", "less" } + ``` + - `init_options` : + ```lua + { + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + { + css = { + validate = true + }, + less = { + validate = true + }, + scss = { + validate = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## cssmodules_ls + +https://github.com/antonk52/cssmodules-language-server + +Language server for autocompletion and go-to-definition functionality for CSS modules. + +You can install cssmodules-language-server via npm: +```sh +npm install -g cssmodules-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cssmodules_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cssmodules-language-server" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "typescript", "typescriptreact" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json") + ``` + + +## cucumber_language_server + +https://cucumber.io +https://github.com/cucumber/common +https://www.npmjs.com/package/@cucumber/language-server + +Language server for Cucumber. + +`cucumber-language-server` can be installed via `npm`: +```sh +npm install -g @cucumber/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cucumber_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cucumber-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cucumber" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## custom_elements_ls + +https://github.com/Matsuuu/custom-elements-language-server + +`custom-elements-languageserver` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript custom-elements-languageserver +``` +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. +Here's an example that disables type checking in JavaScript files. +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.custom_elements_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "custom-elements-languageserver", "--stdio" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git") + ``` + + +## cypher_ls + +https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server + +`cypher-language-server`, language server for Cypher query language. +Part of the umbrella project cypher-language-support: https://github.com/neo4j/cypher-language-support + +`cypher-language-server` can be installed via `npm`: +```sh +npm i -g @neo4j-cypher/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cypher_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cypher-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cypher" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dafny + + Support for the Dafny language server. + + The default `cmd` uses "dafny server", which works on Dafny 4.0.0+. For + older versions of Dafny, you can compile the language server from source at + [dafny-lang/language-server-csharp](https://github.com/dafny-lang/language-server-csharp) + and set `cmd = {"dotnet", ""}`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dafny.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dafny", "server" } + ``` + - `filetypes` : + ```lua + { "dfy", "dafny" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dagger + +https://github.com/dagger/cuelsp + +Dagger's lsp server for cuelang. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dagger.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cuelsp" } + ``` + - `filetypes` : + ```lua + { "cue" } + ``` + - `root_dir` : + ```lua + root_pattern("cue.mod", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dartls + +https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec + +Language server for dart. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dartls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dart", "language-server", "--protocol=lsp" } + ``` + - `filetypes` : + ```lua + { "dart" } + ``` + - `init_options` : + ```lua + { + closingLabels = true, + flutterOutline = true, + onlyAnalyzeProjectsWithOpenFiles = true, + outline = true, + suggestFromUnimportedLibraries = true + } + ``` + - `root_dir` : + ```lua + root_pattern("pubspec.yaml") + ``` + - `settings` : + ```lua + { + dart = { + completeFunctionCalls = true, + showTodos = true + } + } + ``` + + +## dcmls + +https://dcm.dev/ + +Language server for DCM analyzer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dcmls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dcm", "start-server", "--client=neovim" } + ``` + - `filetypes` : + ```lua + { "dart" } + ``` + - `root_dir` : + ```lua + root_pattern("pubspec.yaml") + ``` + + +## debputy + +https://salsa.debian.org/debian/debputy + +Language Server for Debian packages. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.debputy.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "debputy", "lsp", "server" } + ``` + - `filetypes` : + ```lua + { "debcontrol", "debcopyright", "debchangelog", "make", "yaml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## delphi_ls + +Language server for Delphi from Embarcadero. +https://marketplace.visualstudio.com/items?itemName=EmbarcaderoTechnologies.delphilsp + +Note, the '*.delphilsp.json' file is required, more details at: +https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_DelphiLSP_Code_Insight_with_Other_Editors + +Below, you'll find a sample configuration for the lazy manager. +When on_attach is triggered, it signals DelphiLSP to load settings from a configuration file. +Without this step, DelphiLSP initializes but remains non-functional: + +```lua +"neovim/nvim-lspconfig", +lazy = false, +config = function() + local capabilities = require("cmp_nvim_lsp").default_capabilities() + local lspconfig = require("lspconfig") + + lspconfig.delphi_ls.setup({ + capabilities = capabilities, + + on_attach = function(client) + local lsp_config = vim.fs.find(function(name) + return name:match(".*%.delphilsp.json$") + end, { type = "file", path = client.config.root_dir, upward = false })[1] + + if lsp_config then + client.config.settings = { settingsFile = lsp_config } + client.notify("workspace/didChangeConfiguration", { settings = client.config.settings }) + else + vim.notify_once("delphi_ls: '*.delphilsp.json' config file not found") + end + end, + }) +end, +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.delphi_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "DelphiLSP.exe" } + ``` + - `filetypes` : + ```lua + { "pascal" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + false + ``` + + +## denols + +https://github.com/denoland/deno + +Deno's built-in language server + +To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages + in your init.lua. Example: + +```lua +vim.g.markdown_fenced_languages = { + "ts=typescript" +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.denols.setup{} +``` +**Commands:** +- DenolsCache: Cache a module and all of its dependencies. + +**Default values:** + - `cmd` : + ```lua + { "deno", "lsp" } + ``` + - `cmd_env` : + ```lua + { + NO_COLOR = true + } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["textDocument/definition"] = , + ["textDocument/references"] = , + ["textDocument/typeDefinition"] = + } + ``` + - `root_dir` : + ```lua + root_pattern("deno.json", "deno.jsonc", ".git") + ``` + - `settings` : + ```lua + { + deno = { + enable = true, + suggest = { + imports = { + hosts = { + ["https://deno.land"] = true + } + } + } + } + } + ``` + + +## dhall_lsp_server + +https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server + +language server for dhall + +`dhall-lsp-server` can be installed via cabal: +```sh +cabal install dhall-lsp-server +``` +prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dhall_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dhall-lsp-server" } + ``` + - `filetypes` : + ```lua + { "dhall" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## diagnosticls + +https://github.com/iamcco/diagnostic-languageserver + +Diagnostic language server integrate with linters. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.diagnosticls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "diagnostic-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + Empty by default, override to add filetypes + ``` + - `root_dir` : + ```lua + Vim's starting directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## digestif + +https://github.com/astoff/digestif + +Digestif is a code analyzer, and a language server, for LaTeX, ConTeXt et caterva. It provides + +context-sensitive completion, documentation, code navigation, and related functionality to any + +text editor that speaks the LSP protocol. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.digestif.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "digestif" } + ``` + - `filetypes` : + ```lua + { "tex", "plaintex", "context" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## djlsp + + https://github.com/fourdigits/django-template-lsp + + `djlsp`, a language server for Django templates. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.djlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "djlsp" } + ``` + - `filetypes` : + ```lua + { "html", "htmldjango" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## docker_compose_language_service + +https://github.com/microsoft/compose-language-service +This project contains a language service for Docker Compose. + +`compose-language-service` can be installed via `npm`: + +```sh +npm install @microsoft/compose-language-service +``` + +Note: If the docker-compose-langserver doesn't startup when entering a `docker-compose.yaml` file, make sure that the filetype is `yaml.docker-compose`. You can set with: `:set filetype=yaml.docker-compose`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.docker_compose_language_service.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "docker-compose-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml.docker-compose" } + ``` + - `root_dir` : + ```lua + root_pattern("docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dockerls + +https://github.com/rcjsuen/dockerfile-language-server-nodejs + +`docker-langserver` can be installed via `npm`: +```sh +npm install -g dockerfile-language-server-nodejs +``` + +Additional configuration can be applied in the following way: +```lua +require("lspconfig").dockerls.setup { + settings = { + docker = { + languageserver = { + formatter = { + ignoreMultilineInstructions = true, + }, + }, + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dockerls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "docker-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "dockerfile" } + ``` + - `root_dir` : + ```lua + root_pattern("Dockerfile") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dolmenls + +https://github.com/Gbury/dolmen/blob/master/doc/lsp.md + +`dolmenls` can be installed via `opam` +```sh +opam install dolmen_lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dolmenls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dolmenls" } + ``` + - `filetypes` : + ```lua + { "smt2", "tptp", "p", "cnf", "icnf", "zf" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dotls + +https://github.com/nikeee/dot-language-server + +`dot-language-server` can be installed via `npm`: +```sh +npm install -g dot-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dotls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dot-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "dot" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dprint + +https://github.com/dprint/dprint + +Pluggable and configurable code formatting platform written in Rust. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dprint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dprint", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "markdown", "python", "toml", "rust", "roslyn" } + ``` + - `root_dir` : + ```lua + + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## drools_lsp + +https://github.com/kiegroup/drools-lsp + +Language server for the [Drools Rule Language (DRL)](https://docs.drools.org/latest/drools-docs/docs-website/drools/language-reference/#con-drl_drl-rules). + +The `drools-lsp` server is a self-contained java jar file (`drools-lsp-server-jar-with-dependencies.jar`), and can be downloaded from [https://github.com/kiegroup/drools-lsp/releases/](https://github.com/kiegroup/drools-lsp/releases/). + +Configuration information: +```lua +-- Option 1) Specify the entire command: +require('lspconfig').drools_lsp.setup { + cmd = { '/path/to/java', '-jar', '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 2) Specify just the jar path (the JAVA_HOME environment variable will be respected if present): +require('lspconfig').drools_lsp.setup { + drools = { jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 3) Specify the java bin and/or java opts in addition to the jar path: +require('lspconfig').drools_lsp.setup { + drools = { + java = { bin = '/path/to/java', opts = { '-Xmx100m' } }, + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, +} +``` + +Neovim does not yet have automatic detection for the `drools` filetype, but it can be added with: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.drl set filetype=drools ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.drools_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "drools" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ds_pinyin_lsp + +https://github.com/iamcco/ds-pinyin-lsp +Dead simple Pinyin language server for input Chinese without IME(input method). +To install, download the latest [release](https://github.com/iamcco/ds-pinyin-lsp/releases) and ensure `ds-pinyin-lsp` is on your path. +And make ensure the database file `dict.db3` is also downloaded. And put the path to `dict.dbs` in the following code. + +```lua + +require('lspconfig').ds_pinyin_lsp.setup { + init_options = { + db_path = "your_path_to_database" + } +} + +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ds_pinyin_lsp.setup{} +``` +**Commands:** +- DsPinyinCompletionOff: Turn off the ds-pinyin-lsp completion +- DsPinyinCompletionOn: Turn on the ds-pinyin-lsp completion + +**Default values:** + - `cmd` : + ```lua + { "ds-pinyin-lsp" } + ``` + - `filetypes` : + ```lua + { "markdown", "org" } + ``` + - `init_options` : + ```lua + { + completion_on = true, + match_as_same_as_input = true, + match_long_input = true, + max_suggest = 15, + show_symbols = true, + show_symbols_by_n_times = 0, + show_symbols_only_follow_by_hanzi = false + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## earthlyls + +https://github.com/glehmann/earthlyls + +A fast language server for earthly. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.earthlyls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "earthlyls" } + ``` + - `filetypes` : + ```lua + { "earthfile" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ecsact + +https://github.com/ecsact-dev/ecsact_lsp_server + +Language server for Ecsact. + +The default cmd assumes `ecsact_lsp_server` is in your PATH. Typically from the +Ecsact SDK: https://ecsact.dev/start + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ecsact.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ecsact_lsp_server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ecsact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## efm + +https://github.com/mattn/efm-langserver + +General purpose Language Server that can use specified error message format generated from specified command. + +Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support +launching the language server on single files. If on an older version of EFM, disable single file support: + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = ..., -- Populate this according to the note below + single_file_support = false, -- This is the important line for supporting older version of EFM +} +``` + +Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must +specify `filetypes` in your call to `setup{}`**. Otherwise `lspconfig` will launch EFM on the `BufEnter` instead +of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set. + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = { 'python','cpp','lua' } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.efm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "efm-langserver" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## elixirls + +https://github.com/elixir-lsp/elixir-ls + +`elixir-ls` can be installed by following the instructions [here](https://github.com/elixir-lsp/elixir-ls#building-and-running). + +```bash +curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip +unzip elixir-ls.zip -d /path/to/elixir-ls +# Unix +chmod +x /path/to/elixir-ls/language_server.sh +``` + +**By default, elixir-ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls. + +```lua +require'lspconfig'.elixirls.setup{ + -- Unix + cmd = { "/path/to/elixir-ls/language_server.sh" }; + -- Windows + cmd = { "/path/to/elixir-ls/language_server.bat" }; + ... +} +``` + +'root_dir' is chosen like this: if two or more directories containing `mix.exs` were found when searching directories upward, the second one (higher up) is chosen, with the assumption that it is the root of an umbrella app. Otherwise the directory containing the single mix.exs that was found is chosen. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elixirls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + {{see description above}} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## elmls + +https://github.com/elm-tooling/elm-language-server#installation + +If you don't want to use Nvim to install it, then you can use: +```sh +npm install -g elm elm-test elm-format @elm-tooling/elm-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elmls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" } + } + ``` + - `cmd` : + ```lua + { "elm-language-server" } + ``` + - `filetypes` : + ```lua + { "elm" } + ``` + - `init_options` : + ```lua + { + disableElmLSDiagnostics = false, + elmReviewDiagnostics = "off", + onlyUpdateDiagnosticsOnSave = false, + skipInstallPackageConfirmation = false + } + ``` + - `root_dir` : + ```lua + root_pattern("elm.json") + ``` + + +## elp + +https://whatsapp.github.io/erlang-language-platform + +ELP integrates Erlang into modern IDEs via the language server protocol and was +inspired by rust-analyzer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "elp", "server" } + ``` + - `filetypes` : + ```lua + { "erlang" } + ``` + - `root_dir` : + ```lua + root_pattern('rebar.config', 'erlang.mk', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ember + +https://github.com/ember-tooling/ember-language-server + +`ember-language-server` can be installed via `npm`: + +```sh +npm install -g @ember-tooling/ember-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ember.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ember-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "handlebars", "typescript", "javascript", "typescript.glimmer", "javascript.glimmer" } + ``` + - `root_dir` : + ```lua + root_pattern("ember-cli-build.js", ".git") + ``` + + +## emmet_language_server + +https://github.com/olrtg/emmet-language-server + +Package can be installed via `npm`: +```sh +npm install -g @olrtg/emmet-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.emmet_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "emmet-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "eruby", "html", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "typescriptreact", "htmlangular" } + ``` + - `root_dir` : + ```lua + git root + ``` + - `single_file_support` : + ```lua + true + ``` + + +## emmet_ls + +https://github.com/aca/emmet-ls + +Package can be installed via `npm`: +```sh +npm install -g emmet-ls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.emmet_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "emmet-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "astro", "css", "eruby", "html", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "svelte", "typescriptreact", "vue", "htmlangular" } + ``` + - `root_dir` : + ```lua + git root + ``` + - `single_file_support` : + ```lua + true + ``` + + +## erg_language_server + +https://github.com/erg-lang/erg#flags ELS + +ELS (erg-language-server) is a language server for the Erg programming language. + +erg-language-server can be installed via `cargo` and used as follows: + ```sh + cargo install erg --features els + erg --language-server + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.erg_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "erg", "--language-server" } + ``` + - `filetypes` : + ```lua + { "erg" } + ``` + - `root_dir` : + ```lua + root_pattern("package.er") or find_git_ancestor + ``` + + +## erlangls + +https://erlang-ls.github.io + +Language Server for Erlang. + +Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls) +Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin` + +Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls). + +Installation requirements: + - [Erlang OTP 21+](https://github.com/erlang/otp) + - [rebar3 3.9.1+](https://github.com/erlang/rebar3) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.erlangls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "erlang_ls" } + ``` + - `filetypes` : + ```lua + { "erlang" } + ``` + - `root_dir` : + ```lua + root_pattern('rebar.config', 'erlang.mk', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## esbonio + +https://github.com/swyddfa/esbonio + +Esbonio is a language server for [Sphinx](https://www.sphinx-doc.org/en/master/) documentation projects. +The language server can be installed via pip + +``` +pip install esbonio +``` + +Since Sphinx is highly extensible you will get best results if you install the language server in the same +Python environment as the one used to build your documentation. To ensure that the correct Python environment +is picked up, you can either launch `nvim` with the correct environment activated. + +``` +source env/bin/activate +nvim +``` + +Or you can modify the default `cmd` to include the full path to the Python interpreter. + +```lua +require'lspconfig'.esbonio.setup { + cmd = { '/path/to/virtualenv/bin/python', '-m', 'esbonio' } +} +``` + +Esbonio supports a number of config values passed as `init_options` on startup, for example. + +```lua +require'lspconfig'.esbonio.setup { + init_options = { + server = { + logLevel = "debug" + }, + sphinx = { + confDir = "/path/to/docs", + srcDir = "${confDir}/../docs-src" + } +} +``` + +A full list and explanation of the available options can be found [here](https://docs.esbon.io/en/esbonio-language-server-v0.16.4/lsp/getting-started.html?editor=neovim-lspconfig#configuration) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.esbonio.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "python3", "-m", "esbonio" } + ``` + - `filetypes` : + ```lua + { "rst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## eslint + +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-eslint-language-server` is a linting engine for JavaScript / Typescript. +It can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-eslint-language-server` provides an `EslintFixAll` command that can be used to format a document on save: +```lua +lspconfig.eslint.setup({ + --- ... + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + command = "EslintFixAll", + }) + end, +}) +``` + +See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options. + +Messages handled in lspconfig: `eslint/openDoc`, `eslint/confirmESLintExecution`, `eslint/probeFailed`, `eslint/noLibrary` + +Additional messages you can handle: `eslint/noConfig` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.eslint.setup{} +``` +**Commands:** +- EslintFixAll: Fix all eslint problems for this buffer + +**Default values:** + - `cmd` : + ```lua + { "vscode-eslint-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" } + ``` + - `handlers` : + ```lua + { + ["eslint/confirmESLintExecution"] = , + ["eslint/noLibrary"] = , + ["eslint/openDoc"] = , + ["eslint/probeFailed"] = + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + codeAction = { + disableRuleComment = { + enable = true, + location = "separateLine" + }, + showDocumentation = { + enable = true + } + }, + codeActionOnSave = { + enable = false, + mode = "all" + }, + experimental = { + useFlatConfig = false + }, + format = true, + nodePath = "", + onIgnoredFiles = "off", + problems = { + shortenToSingleLine = false + }, + quiet = false, + rulesCustomizations = {}, + run = "onType", + useESLintClass = false, + validate = "on", + workingDirectory = { + mode = "location" + } + } + ``` + + +## facility_language_server + +https://github.com/FacilityApi/FacilityLanguageServer + +Facility language server protocol (LSP) support. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.facility_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "facility-language-server" } + ``` + - `filetypes` : + ```lua + { "fsd" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## fennel_language_server + +https://github.com/rydesun/fennel-language-server + +Fennel language server protocol (LSP) support. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fennel_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fennel-language-server" } + ``` + - `filetypes` : + ```lua + { "fennel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## fennel_ls + +https://sr.ht/~xerool/fennel-ls/ + +A language server for fennel. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fennel_ls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" } + } + ``` + - `cmd` : + ```lua + { "fennel-ls" } + ``` + - `filetypes` : + ```lua + { "fennel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## fish_lsp + +https://github.com/ndonfris/fish-lsp + +A Language Server Protocol (LSP) tailored for the fish shell. +This project aims to enhance the coding experience for fish, +by introducing a suite of intelligent features like auto-completion, +scope aware symbol analysis, per-token hover generation, and many others. + +[homepage](https://www.fish-lsp.dev/) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fish_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fish-lsp", "start" } + ``` + - `cmd_env` : + ```lua + { + fish_lsp_show_client_popups = false + } + ``` + - `filetypes` : + ```lua + { "fish" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## flow + +https://flow.org/ +https://github.com/facebook/flow + +See below for how to setup Flow itself. +https://flow.org/en/docs/install/ + +See below for lsp command options. + +```sh +npx flow lsp --help +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.flow.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "npx", "--no-install", "flow", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx" } + ``` + - `root_dir` : + ```lua + root_pattern(".flowconfig") + ``` + + +## flux_lsp + +https://github.com/influxdata/flux-lsp +`flux-lsp` can be installed via `cargo`: +```sh +cargo install --git https://github.com/influxdata/flux-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.flux_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flux-lsp" } + ``` + - `filetypes` : + ```lua + { "flux" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## foam_ls + +https://github.com/FoamScience/foam-language-server + +`foam-language-server` can be installed via `npm` +```sh +npm install -g foam-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.foam_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "foam-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "foam", "OpenFOAM" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## fortls + +https://fortls.fortran-lang.org/index.html + +fortls is a Fortran Language Server, the server can be installed via pip + +```sh +pip install fortls +``` + +Settings to the server can be passed either through the `cmd` option or through +a local configuration file e.g. `.fortls`. For more information +see the `fortls` [documentation](https://fortls.fortran-lang.org/options.html). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fortls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fortls", "--notify_init", "--hover_signature", "--hover_language=fortran", "--use_signature_help" } + ``` + - `filetypes` : + ```lua + { "fortran" } + ``` + - `root_dir` : + ```lua + root_pattern(".fortls") + ``` + - `settings` : + ```lua + {} + ``` + + +## fsautocomplete + +https://github.com/fsharp/FsAutoComplete + +Language Server for F# provided by FsAutoComplete (FSAC). + +FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`. + +Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete). + +You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files: + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` + +This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fsautocomplete.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fsautocomplete", "--adaptive-lsp-server-enabled" } + ``` + - `filetypes` : + ```lua + { "fsharp" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + FSharp = { + EnableReferenceCodeLens = true, + ExternalAutocomplete = false, + InterfaceStubGeneration = true, + InterfaceStubGenerationMethodBody = 'failwith "Not Implemented"', + InterfaceStubGenerationObjectIdentifier = "this", + Linter = true, + RecordStubGeneration = true, + RecordStubGenerationBody = 'failwith "Not Implemented"', + ResolveNamespaces = true, + SimplifyNameAnalyzer = true, + UnionCaseStubGeneration = true, + UnionCaseStubGenerationBody = 'failwith "Not Implemented"', + UnusedDeclarationsAnalyzer = true, + UnusedOpensAnalyzer = true, + UseSdkScripts = true, + keywordsAutocomplete = true + } + } + ``` + + +## fsharp_language_server + +F# Language Server +https://github.com/faldor20/fsharp-language-server + +An implementation of the language server protocol using the F# Compiler Service. + +Build the project from source and override the command path to location of DLL. + +If filetype determination is not already performed by an available plugin ([PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). +), then the following must be added to initialization configuration: + + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fsharp_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dotnet", "FSharpLanguageServer.dll" } + ``` + - `filetypes` : + ```lua + { "fsharp" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## fstar + +https://github.com/FStarLang/FStar + +LSP support is included in FStar. Make sure `fstar.exe` is in your PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fstar.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fstar.exe", "--lsp" } + ``` + - `filetypes` : + ```lua + { "fstar" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## futhark_lsp + +https://github.com/diku-dk/futhark + +Futhark Language Server + +This language server comes with the futhark compiler and is run with the command +``` +futhark lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.futhark_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "futhark", "lsp" } + ``` + - `filetypes` : + ```lua + { "futhark", "fut" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gdscript + +https://github.com/godotengine/godot + +Language server for GDScript, used by Godot Engine. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gdscript.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + see source file + ``` + - `filetypes` : + ```lua + { "gd", "gdscript", "gdscript3" } + ``` + - `root_dir` : + ```lua + util.root_pattern("project.godot", ".git") + ``` + + +## gdshader_lsp + +https://github.com/godofavacyn/gdshader-lsp + +A language server for the Godot Shading language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gdshader_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gdshader-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "gdshader", "gdshaderinc" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ghcide + +https://github.com/digital-asset/ghcide + +A library for building Haskell IDE tooling. +"ghcide" isn't for end users now. Use "haskell-language-server" instead of "ghcide". + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ghcide.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ghcide", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell", "lhaskell" } + ``` + - `root_dir` : + ```lua + root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml") + ``` + + +## ghdl_ls + +https://github.com/ghdl/ghdl-language-server + +A language server for VHDL, using ghdl as its backend. + +`ghdl-ls` is part of pyghdl, for installation instructions see +[the upstream README](https://github.com/ghdl/ghdl/tree/master/pyGHDL/lsp). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ghdl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ghdl-ls" } + ``` + - `filetypes` : + ```lua + { "vhdl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ginko_ls + +`ginko_ls` is meant to be a feature-complete language server for device-trees. +Language servers can be used in many editors, such as Visual Studio Code, Emacs +or Vim + +Install `ginko_ls` from https://github.com/Schottkyc137/ginko and add it to path + +`ginko_ls` doesn't require any configuration. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ginko_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ginko_ls" } + ``` + - `filetypes` : + ```lua + { "dts" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## gitlab_ci_ls + +https://github.com/alesbrelih/gitlab-ci-ls + +Language Server for Gitlab CI + +`gitlab-ci-ls` can be installed via cargo: +cargo install gitlab-ci-ls + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gitlab_ci_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gitlab-ci-ls" } + ``` + - `filetypes` : + ```lua + { "yaml.gitlab" } + ``` + - `init_options` : + ```lua + { + cache_path = "util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/')", + log_path = "util.path.join(util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/'), 'log/gitlab-ci-ls.log')" + } + ``` + - `root_dir` : + ```lua + util.root_pattern('.gitlab*', '.git') + ``` + + +## glasgow + +https://github.com/nolanderc/glasgow + +Provides language features for WGSL (WebGPU Shading Language): +- Completions: + - Local functions/variables/types. + - Fields and swizzles. + - Builtin types and functions (`dot`, `reflect`, `textureSample`, `vec3`, `mat4x2`, etc.) +- Hover Documentation: + - Function signatures. + - Variable types. + - Includes builtin types and functions. Text is taken from the WGSL specification. +- Goto Definition +- Find all References +- Rename +- Formatter + +`glasgow` can be installed via `cargo`: +```sh +cargo install glasgow +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glasgow.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "glasgow" } + ``` + - `filetypes` : + ```lua + { "wgsl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gleam + +https://github.com/gleam-lang/gleam + +A language server for Gleam Programming Language. +[Installation](https://gleam.run/getting-started/installing/) + +It can be i + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gleam.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gleam", "lsp" } + ``` + - `filetypes` : + ```lua + { "gleam" } + ``` + - `root_dir` : + ```lua + root_pattern("gleam.toml", ".git") + ``` + + +## glint + + https://github.com/typed-ember/glint + + https://typed-ember.gitbook.io/glint/ + + `glint-language-server` is installed when adding `@glint/core` to your project's devDependencies: + + ```sh + npm install @glint/core --save-dev + ``` + + or + + ```sh + yarn add -D @glint/core + ``` + + or + + ```sh + pnpm add -D @glint/core + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "glint-language-server" } + ``` + - `filetypes` : + ```lua + { "html.handlebars", "handlebars", "typescript", "typescript.glimmer", "javascript", "javascript.glimmer" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## glsl_analyzer + +https://github.com/nolanderc/glsl_analyzer + +Language server for GLSL + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glsl_analyzer.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + {} + ``` + - `cmd` : + ```lua + { "glsl_analyzer" } + ``` + - `filetypes` : + ```lua + { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## glslls + +https://github.com/svenstaro/glsl-language-server + +Language server implementation for GLSL + +`glslls` can be compiled and installed manually, or, if your distribution has access to the AUR, +via the `glsl-language-server` AUR package + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glslls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" }, + textDocument = { + completion = { + editsNearCursor = true + } + } + } + ``` + - `cmd` : + ```lua + { "glslls", "--stdin" } + ``` + - `filetypes` : + ```lua + { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## golangci_lint_ls + +Combination of both lint server and client + +https://github.com/nametake/golangci-lint-langserver +https://github.com/golangci/golangci-lint + + +Installation of binaries needed is done via + +``` +go install github.com/nametake/golangci-lint-langserver@latest +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.golangci_lint_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "golangci-lint-langserver" } + ``` + - `filetypes` : + ```lua + { "go", "gomod" } + ``` + - `init_options` : + ```lua + { + command = { "golangci-lint", "run", "--out-format", "json" } + } + ``` + - `root_dir` : + ```lua + root_pattern('.golangci.yml', '.golangci.yaml', '.golangci.toml', '.golangci.json', 'go.work', 'go.mod', '.git') + ``` + + +## gopls + +https://github.com/golang/tools/tree/master/gopls + +Google's lsp server for golang. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gopls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gopls" } + ``` + - `filetypes` : + ```lua + { "go", "gomod", "gowork", "gotmpl" } + ``` + - `root_dir` : + ```lua + root_pattern("go.work", "go.mod", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gradle_ls + +https://github.com/microsoft/vscode-gradle + +Microsoft's lsp server for gradle files + +If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gradle_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gradle-language-server" } + ``` + - `filetypes` : + ```lua + { "groovy" } + ``` + - `init_options` : + ```lua + { + settings = { + gradleWrapperEnabled = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern("settings.gradle", "build.gradle") + ``` + + +## grammarly + +https://github.com/znck/grammarly + +`grammarly-languageserver` can be installed via `npm`: + +```sh +npm i -g grammarly-languageserver +``` + +WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.grammarly.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "grammarly-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `handlers` : + ```lua + { + ["$/updateDocumentState"] = + } + ``` + - `init_options` : + ```lua + { + clientId = "client_BaDkMgx4X19X9UxxYRCXZo" + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## graphql + +https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli + +`graphql-lsp` can be installed via `npm`: + +```sh +npm install -g graphql-language-service-cli +``` + +Note that you must also have [the graphql package](https://github.com/graphql/graphql-js) installed within your project and create a [GraphQL config file](https://the-guild.dev/graphql/config/docs). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.graphql.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "graphql-lsp", "server", "-m", "stream" } + ``` + - `filetypes` : + ```lua + { "graphql", "typescriptreact", "javascriptreact" } + ``` + - `root_dir` : + ```lua + util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*') + ``` + + +## groovyls + +https://github.com/prominic/groovy-language-server.git + +Requirements: + - Linux/macOS (for now) + - Java 11+ + +`groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build). + +If you have installed groovy language server, you can set the `cmd` custom path as follow: + +```lua +require'lspconfig'.groovyls.setup{ + -- Unix + cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" }, + ... +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.groovyls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "java", "-jar", "groovy-language-server-all.jar" } + ``` + - `filetypes` : + ```lua + { "groovy" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## guile_ls + +https://codeberg.org/rgherdt/scheme-lsp-server + +The recommended way is to install guile-lsp-server is using Guix. Unfortunately it is still not available at the official Guix channels, but you can use the provided channel guix.scm in the repo: +```sh +guix package -f guix.scm +``` + +Checkout the repo for more info. + +Note: This LSP will start on `scheme.guile` filetype. You can set this file type using `:help modeline` or adding https://gitlab.com/HiPhish/guile.vim to your plugins to automatically set it. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.guile_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "guile-lsp-server" } + ``` + - `filetypes` : + ```lua + { "scheme.guile" } + ``` + - `root_dir` : + ```lua + root_pattern("guix.scm", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## harper_ls + +https://github.com/chilipepperhott/harper + +The language server for Harper, the slim, clean language checker for developers. + +See [docs](https://github.com/chilipepperhott/harper/tree/master/harper-ls#configuration) for more information on settings. + +In short, however, they should look something like this: +```lua +lspconfig.harper_ls.setup { + settings = { + ["harper-ls"] = { + userDictPath = "~/dict.txt" + } + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.harper_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "harper-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "go", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html" } + ``` + - `root_dir` : + ```lua + bufdir + ``` + - `single_file_support` : + ```lua + true + ``` + + +## haxe_language_server + +https://github.com/vshaxe/haxe-language-server + +The Haxe language server can be built by running the following commands from +the project's root directory: + + npm install + npx lix run vshaxe-build -t language-server + +This will create `bin/server.js`. Note that the server requires Haxe 3.4.0 or +higher. + +After building the language server, set the `cmd` setting in your setup +function: + +```lua +lspconfig.haxe_language_server.setup({ + cmd = {"node", "path/to/bin/server.js"}, +}) +``` + +By default, the language server is configured with the HXML compiler arguments +contained in the first `.hxml` file found in your project's root directory. +If you want to specify which one to use, set the `init_options.displayArguments` +setting: + +```lua +lspconfig.haxe_language_server.setup({ + -- ... + init_options = { + displayArguments = { "build.hxml" }, + }, +}) +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.haxe_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "haxe-language-server" } + ``` + - `filetypes` : + ```lua + { "haxe" } + ``` + - `init_options` : + ```lua + default value is set by on_new_config + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.hxml", ".git") + ``` + - `settings` : + ```lua + { + haxe = { + executable = "haxe" + } + } + ``` + + +## hdl_checker + +https://github.com/suoto/hdl_checker +Language server for hdl-checker. +Install using: `pip install hdl-checker --upgrade` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hdl_checker.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hdl_checker", "--lsp" } + ``` + - `filetypes` : + ```lua + { "vhdl", "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## helm_ls + +https://github.com/mrjosh/helm-ls + +Helm Language server. (This LSP is in early development) + +`helm Language server` can be installed by following the instructions [here](https://github.com/mrjosh/helm-ls). + +The default `cmd` assumes that the `helm_ls` binary can be found in `$PATH`. + +If need Helm file highlight use [vim-helm](https://github.com/towolf/vim-helm) plugin. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.helm_ls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + default capabilities, with dynamicRegistration for didChangeWatchedFiles true + ``` + - `cmd` : + ```lua + { "helm_ls", "serve" } + ``` + - `filetypes` : + ```lua + { "helm" } + ``` + - `root_dir` : + ```lua + root_pattern("Chart.yaml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hhvm + +Language server for programs written in Hack +https://hhvm.com/ +https://github.com/facebook/hhvm +See below for how to setup HHVM & typechecker: +https://docs.hhvm.com/hhvm/getting-started/getting-started + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hhvm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hh_client", "lsp" } + ``` + - `filetypes` : + ```lua + { "php", "hack" } + ``` + - `root_dir` : + ```lua + root_pattern(".hhconfig") + ``` + + +## hie + +https://github.com/haskell/haskell-ide-engine + +the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration): +```lua +init_options = { + languageServerHaskell = { + hlintOn = bool; + maxNumberOfProblems = number; + diagnosticsDebounceDuration = number; + liquidOn = bool (default false); + completionSnippetsOn = bool (default true); + formatOnImportOn = bool (default true); + formattingProvider = string (default "brittany", alternate "floskell"); + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hie.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hie-wrapper", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell" } + ``` + - `root_dir` : + ```lua + root_pattern("stack.yaml", "package.yaml", ".git") + ``` + + +## hlasm + + `hlasm_language_server` is a language server for the High Level Assembler language used on IBM SystemZ mainframes. + + To learn how to configure the HLASM language server, see the [HLASM Language Support documentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hlasm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hlasm_language_server" } + ``` + - `filetypes` : + ```lua + { "hlasm" } + ``` + - `root_dir` : + ```lua + root_pattern(".hlasmplugin") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hls + +https://github.com/haskell/haskell-language-server + +Haskell Language Server + +If you are using HLS 1.9.0.0, enable the language server to launch on Cabal files as well: + +```lua +require('lspconfig')['hls'].setup{ + filetypes = { 'haskell', 'lhaskell', 'cabal' }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "haskell-language-server-wrapper", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell", "lhaskell" } + ``` + - `lspinfo` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml") + ``` + - `settings` : + ```lua + { + haskell = { + cabalFormattingProvider = "cabalfmt", + formattingProvider = "ormolu" + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hoon_ls + +https://github.com/urbit/hoon-language-server + +A language server for Hoon. + +The language server can be installed via `npm install -g @hoon-language-server` + +Start a fake ~zod with `urbit -F zod`. +Start the language server at the Urbit Dojo prompt with: `|start %language-server` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hoon_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hoon-language-server" } + ``` + - `filetypes` : + ```lua + { "hoon" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## html + +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-html-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled. +To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +The code-formatting feature of the lsp can be controlled with the `provideFormatter` option. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.html.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.html.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-html-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "templ" } + ``` + - `init_options` : + ```lua + { + configurationSection = { "html", "css", "javascript" }, + embeddedLanguages = { + css = true, + javascript = true + }, + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## htmx + +https://github.com/ThePrimeagen/htmx-lsp + +`htmx-lsp` can be installed via `cargo`: +```sh +cargo install htmx-lsp +``` + +Lsp is still very much work in progress and experimental. Use at your own risk. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.htmx.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "htmx-lsp" } + ``` + - `filetypes` : + ```lua + { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hydra_lsp + +https://github.com/Retsediv/hydra-lsp + +LSP for Hydra Python package config files. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hydra_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hydra-lsp" } + ``` + - `filetypes` : + ```lua + { "yaml" } + ``` + - `root_dir` : + ```lua + util.root_pattern '.git' + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hyprls + +https://github.com/hyprland-community/hyprls + +`hyprls` can be installed via `go`: +```sh +go install github.com/ewen-lbh/hyprls/cmd/hyprls@latest +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hyprls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hyprls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "hyprlang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## idris2_lsp + +https://github.com/idris-community/idris2-lsp + +The Idris 2 language server. + +Plugins for the Idris 2 filetype include +[Idris2-Vim](https://github.com/edwinb/idris2-vim) (fewer features, stable) and +[Nvim-Idris2](https://github.com/ShinKage/nvim-idris2) (cutting-edge, +experimental). + +Idris2-Lsp requires a build of Idris 2 that includes the "Idris 2 API" package. +Package managers with known support for this build include the +[AUR](https://aur.archlinux.org/packages/idris2/) and +[Homebrew](https://formulae.brew.sh/formula/idris2#default). + +If your package manager does not support the Idris 2 API, you will need to build +Idris 2 from source. Refer to the +[the Idris 2 installation instructions](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md) +for details. Steps 5 and 8 are listed as "optional" in that guide, but they are +necessary in order to make the Idris 2 API available. + +You need to install a version of Idris2-Lsp that is compatible with your +version of Idris 2. There should be a branch corresponding to every released +Idris 2 version after v0.4.0. Use the latest commit on that branch. For example, +if you have Idris v0.5.1, you should use the v0.5.1 branch of Idris2-Lsp. + +If your Idris 2 version is newer than the newest Idris2-Lsp branch, use the +latest commit on the `master` branch, and set a reminder to check the Idris2-Lsp +repo for the release of a compatible versioned branch. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.idris2_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "idris2-lsp" } + ``` + - `filetypes` : + ```lua + { "idris2" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## intelephense + +https://intelephense.com/ + +`intelephense` can be installed via `npm`: +```sh +npm install -g intelephense +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.intelephense.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "intelephense", "--stdio" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + + +## janet_lsp + +https://github.com/CFiggers/janet-lsp + +A Language Server Protocol implementation for Janet. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.janet_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "janet-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "janet" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## java_language_server + +https://github.com/georgewfraser/java-language-server + +Java language server + +Point `cmd` to `lang_server_linux.sh` or the equivalent script for macOS/Windows provided by java-language-server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.java_language_server.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "java" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## jdtls + +https://projects.eclipse.org/projects/eclipse.jdt.ls + +Language server for Java. + +IMPORTANT: If you want all the features jdtls has to offer, [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) +is highly recommended. If all you need is diagnostics, completion, imports, gotos and formatting and some code actions +you can keep reading here. + +For manual installation you can download precompiled binaries from the +[official downloads site](http://download.eclipse.org/jdtls/snapshots/?d) +and ensure that the `PATH` variable contains the `bin` directory of the extracted archive. + +```lua + -- init.lua + require'lspconfig'.jdtls.setup{} +``` + +You can also pass extra custom jvm arguments with the JDTLS_JVM_ARGS environment variable as a space separated list of arguments, +that will be converted to multiple --jvm-arg= args when passed to the jdtls script. This will allow for example tweaking +the jvm arguments or integration with external tools like lombok: + +```sh +export JDTLS_JVM_ARGS="-javaagent:$HOME/.local/share/java/lombok.jar" +``` + +For automatic installation you can use the following unofficial installers/launchers under your own risk: + - [jdtls-launcher](https://github.com/eruizc-dev/jdtls-launcher) (Includes lombok support by default) + ```lua + -- init.lua + require'lspconfig'.jdtls.setup{ cmd = { 'jdtls' } } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jdtls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jdtls", "-configuration", "/home/user/.cache/jdtls/config", "-data", "/home/user/.cache/jdtls/workspace" } + ``` + - `filetypes` : + ```lua + { "java" } + ``` + - `handlers` : + ```lua + { + ["language/status"] = , + ["textDocument/codeAction"] = , + ["textDocument/rename"] = , + ["workspace/applyEdit"] = + } + ``` + - `init_options` : + ```lua + { + jvm_args = {}, + workspace = "/home/user/.cache/jdtls/workspace" + } + ``` + - `root_dir` : + ```lua + { + -- Single-module projects + { + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'settings.gradle', -- Gradle + 'settings.gradle.kts', -- Gradle + }, + -- Multi-module projects + { 'build.gradle', 'build.gradle.kts' }, + } or vim.fn.getcwd() + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jedi_language_server + +https://github.com/pappasam/jedi-language-server + +`jedi-language-server`, a language server for Python, built on top of jedi + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jedi_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jedi-language-server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jinja_lsp + +jinja-lsp enhances minijinja development experience by providing Helix/Nvim users with advanced features such as autocomplete, syntax highlighting, hover, goto definition, code actions and linting. + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + extension = { + jinja = 'jinja', + jinja2 = 'jinja', + j2 = 'jinja', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jinja_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jinja-lsp" } + ``` + - `filetypes` : + ```lua + { "jinja" } + ``` + - `name` : + ```lua + "jinja_lsp" + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jqls + +https://github.com/wader/jq-lsp +Language server for jq, written using Go. +You can install the server easily using go install: +```sh +# install directly +go install github.com/wader/jq-lsp@master +# copy binary to $PATH +cp $(go env GOPATH)/bin/jq-lsp /usr/local/bin +``` +Note: To activate properly nvim needs to know the jq filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.jq setfiletype jq\]\]) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jqls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jq-lsp" } + ``` + - `filetypes` : + ```lua + { "jq" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jsonls + +https://github.com/hrsh7th/vscode-langservers-extracted + +vscode-json-language-server, a language server for JSON and JSON schema + +`vscode-json-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need to enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.jsonls.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jsonls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-json-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "json", "jsonc" } + ``` + - `init_options` : + ```lua + { + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jsonnet_ls + +https://github.com/grafana/jsonnet-language-server + +A Language Server Protocol (LSP) server for Jsonnet. + +The language server can be installed with `go`: +```sh +go install github.com/grafana/jsonnet-language-server@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jsonnet_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jsonnet-language-server" } + ``` + - `filetypes` : + ```lua + { "jsonnet", "libsonnet" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("jsonnetfile.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## julials + +https://github.com/julia-vscode/julia-vscode + +LanguageServer.jl can be installed with `julia` and `Pkg`: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")' +``` +where `~/.julia/environments/nvim-lspconfig` is the location where +the default configuration expects LanguageServer.jl to be installed. + +To update an existing install, use the following command: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()' +``` + +Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a +Julia project, you must make sure that the project is instantiated: +```sh +julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()' +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.julials.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "julia", "--startup-file=no", "--history-file=no", "-e", ' # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig\n # with the regular load path as a fallback\n ls_install_path = joinpath(\n get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),\n "environments", "nvim-lspconfig"\n )\n pushfirst!(LOAD_PATH, ls_install_path)\n using LanguageServer\n popfirst!(LOAD_PATH)\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' } + ``` + - `filetypes` : + ```lua + { "julia" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## kcl + +https://github.com/kcl-lang/kcl.nvim + +Language server for the KCL configuration and policy language. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.kcl.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "kcl-language-server" } + ``` + - `filetypes` : + ```lua + { "kcl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## koka + + https://koka-lang.github.io/koka/doc/index.html +Koka is a functional programming language with effect types and handlers. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.koka.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "koka", "--language-server", "--lsstdio" } + ``` + - `filetypes` : + ```lua + { "koka" } + ``` + - `root_dir` : + ```lua + git directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## kotlin_language_server + + A kotlin language server which was developed for internal usage and + released afterwards. Maintaining is not done by the original author, + but by fwcd. + + It is built via gradle and developed on github. + Source and additional description: + https://github.com/fwcd/kotlin-language-server + + This server requires vim to be aware of the kotlin-filetype. + You could refer for this capability to: + https://github.com/udalov/kotlin-vim (recommended) + Note that there is no LICENSE specified yet. + + For faster startup, you can setup caching by specifying a storagePath + in the init_options. The default is your home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.kotlin_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "kotlin-language-server" } + ``` + - `filetypes` : + ```lua + { "kotlin" } + ``` + - `init_options` : + ```lua + { + storagePath = "Enables caching and use project root to store cache data. See source" + } + ``` + - `root_dir` : + ```lua + See source + ``` + + +## lean3ls + +https://github.com/leanprover/lean-client-js/tree/master/lean-language-server + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +Once Lean is installed, you can install the Lean 3 language server by running +```sh +npm install -g lean-language-server +``` + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `lean3ls` both with it and `lspconfig`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lean3ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lean-language-server", "--stdio", "--", "-M", "4096", "-T", "100000" } + ``` + - `filetypes` : + ```lua + { "lean3" } + ``` + - `offset_encoding` : + ```lua + "utf-32" + ``` + - `root_dir` : + ```lua + root_pattern("leanpkg.toml") or root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## leanls + +https://github.com/leanprover/lean4 + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +The Lean language server is included in any Lean installation and +does not require any additional packages. + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `leanls` both with it and `lspconfig`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.leanls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lake", "serve", "--" } + ``` + - `filetypes` : + ```lua + { "lean" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("lakefile.toml", "lakefile.lean", "lean-toolchain", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lelwel_ls + +https://github.com/0x2a-42/lelwel + +Language server for lelwel grammars. + +You can install `lelwel-ls` via cargo: +```sh +cargo install --features="lsp" lelwel +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lelwel_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lelwel-ls" } + ``` + - `filetypes` : + ```lua + { "llw" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## lemminx + +https://github.com/eclipse/lemminx + +The easiest way to install the server is to get a binary from https://github.com/redhat-developer/vscode-xml/releases and place it on your PATH. + +NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lemminx.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lemminx" } + ``` + - `filetypes` : + ```lua + { "xml", "xsd", "xsl", "xslt", "svg" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lexical + + https://github.com/lexical-lsp/lexical + + Lexical is a next-generation language server for the Elixir programming language. + + Follow the [Detailed Installation Instructions](https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md) + + **By default, `lexical` doesn't have a `cmd` set.** + This is because nvim-lspconfig does not make assumptions about your path. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lexical.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ltex + +https://github.com/valentjn/ltex-ls + +LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others + +To install, download the latest [release](https://github.com/valentjn/ltex-ls/releases) and ensure `ltex-ls` is on your path. + +This server accepts configuration via the `settings` key. + +```lua + settings = { + ltex = { + language = "en-GB", + }, + }, +``` + +To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes): + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ltex.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ltex-ls" } + ``` + - `filetypes` : + ```lua + { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "html", "xhtml", "mail", "text" } + ``` + - `get_language_id` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + ltex = { + enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "mail", "plaintext" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lua_ls + +https://github.com/luals/lua-language-server + +Lua language server. + +`lua-language-server` can be installed by following the instructions [here](https://luals.github.io/#neovim-install). + +The default `cmd` assumes that the `lua-language-server` binary can be found in `$PATH`. + +If you primarily use `lua-language-server` for Neovim, and want to provide completions, +analysis, and location handling for plugins on runtime path, you can use the following +settings. + +```lua +require'lspconfig'.lua_ls.setup { + on_init = function(client) + local path = client.workspace_folders[1].name + if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then + return + end + + client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { + runtime = { + -- Tell the language server which version of Lua you're using + -- (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT' + }, + -- Make the server aware of Neovim runtime files + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME + -- Depending on the usage, you might want to add additional paths here. + -- "${3rd}/luv/library" + -- "${3rd}/busted/library", + } + -- or pull in all of 'runtimepath'. NOTE: this is a lot slower + -- library = vim.api.nvim_get_runtime_file("", true) + } + }) + end, + settings = { + Lua = {} + } +} +``` + +See `lua-language-server`'s [documentation](https://luals.github.io/wiki/settings/) for an explanation of the above fields: +* [Lua.runtime.path](https://luals.github.io/wiki/settings/#runtimepath) +* [Lua.workspace.library](https://luals.github.io/wiki/settings/#workspacelibrary) + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lua_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lua-language-server" } + ``` + - `filetypes` : + ```lua + { "lua" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + root_pattern(".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## luau_lsp + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.luau_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "luau-lsp", "lsp" } + ``` + - `filetypes` : + ```lua + { "luau" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lwc_ls + +https://github.com/forcedotcom/lightning-language-server/ + +Language server for Lightning Web Components. + +For manual installation, utilize the official [NPM package](https://www.npmjs.com/package/@salesforce/lwc-language-server). +Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.lwc_ls.setup { + cmd = { + 'node', + '/path/to/node_modules/@salesforce/lwc-language-server/bin/lwc-language-server.js', + '--stdio' + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lwc_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lwc-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "html" } + ``` + - `init_options` : + ```lua + { + embeddedLanguages = { + javascript = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## m68k + +https://github.com/grahambates/m68k-lsp + +Language server for Motorola 68000 family assembly + +`m68k-lsp-server` can be installed via `npm`: + +```sh +npm install -g m68k-lsp-server +``` + +Ensure you are using the 68k asm syntax variant in Neovim. + +```lua +vim.g.asmsyntax = 'asm68k' +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.m68k.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "m68k-lsp-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "asm68k" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## markdown_oxide + +https://github.com/Feel-ix-343/markdown-oxide + +Editor Agnostic PKM: you bring the text editor and we +bring the PKM. + +Inspired by and compatible with Obsidian. + +Check the readme to see how to properly setup. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.markdown_oxide.setup{} +``` +**Commands:** +- Today: Open today's daily note +- Tomorrow: Open tomorrow's daily note +- Yesterday: Open yesterday's daily note + +**Default values:** + - `cmd` : + ```lua + { "markdown-oxide" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## marksman + +https://github.com/artempyanykh/marksman + +Marksman is a Markdown LSP server providing completion, cross-references, diagnostics, and more. + +Marksman works on MacOS, Linux, and Windows and is distributed as a self-contained binary for each OS. + +Pre-built binaries can be downloaded from https://github.com/artempyanykh/marksman/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.marksman.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "marksman", "server" } + ``` + - `filetypes` : + ```lua + { "markdown", "markdown.mdx" } + ``` + - `root_dir` : + ```lua + root_pattern(".git", ".marksman.toml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## matlab_ls + +https://github.com/mathworks/MATLAB-language-server + +MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.matlab_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "matlab-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "matlab" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + MATLAB = { + indexWorkspace = false, + installPath = "", + matlabConnectionTiming = "onStart", + telemetry = true + } + } + ``` + - `single_file_support` : + ```lua + false + ``` + + +## mdx_analyzer + +https://github.com/mdx-js/mdx-analyzer + +`mdx-analyzer`, a language server for MDX + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mdx_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mdx-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown.mdx" } + ``` + - `init_options` : + ```lua + { + typescript = {} + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mesonlsp + +https://github.com/JCWasmx86/mesonlsp + +An unofficial, unendorsed language server for meson written in C++ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mesonlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mesonlsp", "--lsp" } + ``` + - `filetypes` : + ```lua + { "meson" } + ``` + - `root_dir` : + ```lua + util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git") + ``` + + +## metals + +https://scalameta.org/metals/ + +Scala language server with rich IDE features. + +See full instructions in the Metals documentation: + +https://scalameta.org/metals/docs/editors/vim#using-an-alternative-lsp-client + +Note: that if you're using [nvim-metals](https://github.com/scalameta/nvim-metals), that plugin fully handles the setup and installation of Metals, and you shouldn't set up Metals both with it and `lspconfig`. + +To install Metals, make sure to have [coursier](https://get-coursier.io/docs/cli-installation) installed, and once you do you can install the latest Metals with `cs install metals`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.metals.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + workspace = { + configuration = false + } + } + ``` + - `cmd` : + ```lua + { "metals" } + ``` + - `filetypes` : + ```lua + { "scala" } + ``` + - `init_options` : + ```lua + { + compilerOptions = { + snippetAutoIndent = false + }, + isHttpEnabled = true, + statusBarProvider = "show-message" + } + ``` + - `message_level` : + ```lua + 4 + ``` + - `root_dir` : + ```lua + util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml") + ``` + + +## millet + +https://github.com/azdavis/millet + +Millet, a language server for Standard ML + +To use with nvim: + +1. Install a Rust toolchain: https://rustup.rs +2. Clone the repo +3. Run `cargo build --release --bin lang-srv` +4. Move `target/release/lang-srv` to somewhere on your $PATH as `millet` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.millet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "millet" } + ``` + - `filetypes` : + ```lua + { "sml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mint + +https://www.mint-lang.com + +Install Mint using the [instructions](https://www.mint-lang.com/install). +The language server is included since version 0.12.0. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mint", "ls" } + ``` + - `filetypes` : + ```lua + { "mint" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mlir_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#mlir-lsp-language-server--mlir-lsp-server= + +The Language Server for the LLVM MLIR language + +`mlir-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mlir_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mlir-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mlir" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mlir_pdll_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#pdll-lsp-language-server--mlir-pdll-lsp-server + +The Language Server for the LLVM PDLL language + +`mlir-pdll-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mlir_pdll_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mlir-pdll-lsp-server" } + ``` + - `filetypes` : + ```lua + { "pdll" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## mm0_ls + +https://github.com/digama0/mm0 + +Language Server for the metamath-zero theorem prover. + +Requires [mm0-rs](https://github.com/digama0/mm0/tree/master/mm0-rs) to be installed +and available on the `PATH`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mm0_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mm0-rs", "server" } + ``` + - `filetypes` : + ```lua + { "metamath-zero" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mojo + +https://github.com/modularml/mojo + +`mojo-lsp-server` can be installed [via Modular](https://developer.modular.com/download) + +Mojo is a new programming language that bridges the gap between research and production by combining Python syntax and ecosystem with systems programming and metaprogramming features. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mojo.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mojo-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mojo" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## motoko_lsp + +https://github.com/dfinity/vscode-motoko + +Language server for the Motoko programming language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.motoko_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "motoko-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "motoko" } + ``` + - `init_options` : + ```lua + { + formatter = "auto" + } + ``` + - `root_dir` : + ```lua + root_pattern("dfx.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## move_analyzer + +https://github.com/move-language/move/tree/main/language/move-analyzer + +Language server for Move + +The `move-analyzer` can be installed by running: + +``` +cargo install --git https://github.com/move-language/move move-analyzer +``` + +See [`move-analyzer`'s doc](https://github.com/move-language/move/blob/1b258a06e3c7d2bc9174578aac92cca3ac19de71/language/move-analyzer/editors/code/README.md#how-to-install) for details. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.move_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "move-analyzer" } + ``` + - `filetypes` : + ```lua + { "move" } + ``` + - `root_dir` : + ```lua + root_pattern("Move.toml") + ``` + + +## msbuild_project_tools_server + +https://github.com/tintoy/msbuild-project-tools-server/ + +MSBuild Project Tools Server can be installed by following the README.MD on the above repository. + +Example config: +```lua +lspconfig.msbuild_project_tools_server.setup { + cmd = {'dotnet', '/path/to/server/MSBuildProjectTools.LanguageServer.Host.dll'} +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.msbuild_project_tools_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dotnet", "MSBuildProjectTools.LanguageServer.Host.dll" } + ``` + - `filetypes` : + ```lua + { "xml.csproj", "xml.fsproj", "sln" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + root_pattern('.git') + ``` + + +## mutt_ls + +https://github.com/neomutt/mutt-language-server + +A language server for (neo)mutt's muttrc. It can be installed via pip. + +```sh +pip install mutt-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mutt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mutt-language-server" } + ``` + - `filetypes` : + ```lua + { "muttrc", "neomuttrc" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nelua_lsp + +https://github.com/codehz/nelua-lsp + +nelua-lsp is an experimental nelua language server. + +You need [nelua.vim](https://github.com/stefanos82/nelua.vim/blob/main/ftdetect/nelua.vim) for nelua files to be recognized or add this to your config: + +in vimscript: +```vimscript +au BufNewFile,BufRead *.nelua setf nelua +``` + +in lua: +```lua +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { pattern = { "*.nelua" }, command = "setf nelua"}) +``` + +**By default, nelua-lsp doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +require'lspconfig'.nelua_lsp.setup { + cmd = { "nelua", "-L", "/path/to/nelua-lsp/", "--script", "/path/to/nelua-lsp/nelua-lsp.lua" }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nelua_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "nelua" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## neocmake + +https://github.com/Decodetalkers/neocmakelsp + +CMake LSP Implementation + +Neovim does not currently include built-in snippets. `neocmakelsp` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.neocmake.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.neocmake.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "neocmakelsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cmake" } + ``` + - `root_dir` : + ```lua + root_pattern('.git', 'cmake') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nextls + +https://github.com/elixir-tools/next-ls + +**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.** + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nextls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nginx_language_server + +https://pypi.org/project/nginx-language-server/ + +`nginx-language-server` can be installed via pip: + +```sh +pip install -U nginx-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nginx_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nginx-language-server" } + ``` + - `filetypes` : + ```lua + { "nginx" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nickel_ls + +Nickel Language Server + +https://github.com/tweag/nickel + +`nls` can be installed with nix, or cargo, from the Nickel repository. +```sh +git clone https://github.com/tweag/nickel.git +``` + +Nix: +```sh +cd nickel +nix-env -f . -i +``` + +cargo: +```sh +cd nickel/lsp/nls +cargo install --path . +``` + +In order to have lspconfig detect Nickel filetypes (a prerequisite for autostarting a server), +install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nickel_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nls" } + ``` + - `filetypes` : + ```lua + { "ncl", "nickel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## nil_ls + +https://github.com/oxalica/nil + +A new language server for Nix Expression Language. + +If you are using Nix with Flakes support, run `nix profile install github:oxalica/nil` to install. +Check the repository README for more information. + +_See an example config at https://github.com/oxalica/nil/blob/main/dev/nvim-lsp.nix._ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nil_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nil" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nim_langserver + +https://github.com/nim-lang/langserver + + +`nim-langserver` can be installed via the `nimble` package manager: +```sh +nimble install nimlangserver +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nim_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nimlangserver" } + ``` + - `filetypes` : + ```lua + { "nim" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nimls + +https://github.com/PMunch/nimlsp + +`nimlsp` can be installed via the `nimble` package manager: + +```sh +nimble install nimlsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nimls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nimlsp" } + ``` + - `filetypes` : + ```lua + { "nim" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nixd + +https://github.com/nix-community/nixd + +Nix language server, based on nix libraries. + +If you are using Nix with Flakes support, run `nix profile install github:nix-community/nixd` to install. +Check the repository README for more information. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nixd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nixd" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix",".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nomad_lsp + +https://github.com/juliosueiras/nomad-lsp + +Written in Go, compilation is needed for `nomad_lsp` to be used. Please see the [original repository](https://github.com/juliosuieras/nomad-lsp). + +Add the executable to your system or vim PATH and it will be set to go. + +No configuration option is needed unless you choose not to add `nomad-lsp` executable to the PATH. You should know what you are doing if you choose so. + +```lua +require('lspconfig').nomad_lsp.setup{ } +``` + +However, a `hcl.nomad` or `nomad` filetype should be defined. + +Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nomad_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nomad-lsp" } + ``` + - `filetypes` : + ```lua + { "hcl.nomad", "nomad" } + ``` + - `root_dir` : + ```lua + util.root_pattern("hcl.nomad", "nomad") + ``` + + +## ntt + +https://github.com/nokia/ntt +Installation instructions can be found [here](https://github.com/nokia/ntt#Install). +Can be configured by passing a "settings" object to `ntt.setup{}`: +```lua +require('lspconfig').ntt.setup{ + settings = { + ntt = { + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ntt.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ntt", "langserver" } + ``` + - `filetypes` : + ```lua + { "ttcn" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + + +## nushell + +https://github.com/nushell/nushell + +Nushell built-in language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nushell.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nu", "--lsp" } + ``` + - `filetypes` : + ```lua + { "nu" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nxls + +https://github.com/nrwl/nx-console/tree/master/apps/nxls + +nxls, a language server for Nx Workspaces + +`nxls` can be installed via `npm`: +```sh +npm i -g nxls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nxls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nxls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "json", "jsonc" } + ``` + - `root_dir` : + ```lua + util.root_pattern + ``` + + +## ocamlls + +https://github.com/ocaml-lsp/ocaml-language-server + +`ocaml-language-server` can be installed via `npm` +```sh +npm install -g ocaml-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ocamlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ocaml-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ocaml", "reason" } + ``` + - `root_dir` : + ```lua + root_pattern("*.opam", "esy.json", "package.json") + ``` + + +## ocamllsp + +https://github.com/ocaml/ocaml-lsp + +`ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation). + +To install the lsp server in a particular opam switch: +```sh +opam install ocaml-lsp-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ocamllsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ocamllsp" } + ``` + - `filetypes` : + ```lua + { "ocaml", "menhir", "ocamlinterface", "ocamllex", "reason", "dune" } + ``` + - `get_language_id` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace") + ``` + + +## ols + + https://github.com/DanielGavin/ols + + `Odin Language Server`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ols" } + ``` + - `filetypes` : + ```lua + { "odin" } + ``` + - `root_dir` : + ```lua + util.root_pattern("ols.json", ".git", "*.odin") + ``` + + +## omnisharp + +https://github.com/omnisharp/omnisharp-roslyn +OmniSharp server based on Roslyn workspaces + +`omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases). +OmniSharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp). + +OmniSharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +For `go_to_definition` to work fully, extended `textDocument/definition` handler is needed, for example see [omnisharp-extended-lsp.nvim](https://github.com/Hoffs/omnisharp-extended-lsp.nvim) + +```lua +require'lspconfig'.omnisharp.setup { + cmd = { "dotnet", "/path/to/omnisharp/OmniSharp.dll" }, + + settings = { + FormattingOptions = { + -- Enables support for reading code style, naming convention and analyzer + -- settings from .editorconfig. + EnableEditorConfigSupport = true, + -- Specifies whether 'using' directives should be grouped and sorted during + -- document formatting. + OrganizeImports = nil, + }, + MsBuild = { + -- 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. + LoadProjectsOnDemand = nil, + }, + RoslynExtensionsOptions = { + -- Enables support for roslyn analyzers, code fixes and rulesets. + EnableAnalyzersSupport = nil, + -- 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. + EnableImportCompletion = nil, + -- Only run analyzers against open files when 'enableRoslynAnalyzers' is + -- true + AnalyzeOpenDocumentsOnly = nil, + }, + Sdk = { + -- Specifies whether to include preview versions of the .NET SDK when + -- determining which version to use for project loading. + IncludePrereleases = true, + }, + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.omnisharp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "cs", "vb" } + ``` + - `init_options` : + ```lua + {} + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.sln", "*.csproj", "omnisharp.json", "function.json") + ``` + - `settings` : + ```lua + { + FormattingOptions = { + EnableEditorConfigSupport = true + }, + MsBuild = {}, + RoslynExtensionsOptions = {}, + Sdk = { + IncludePrereleases = true + } + } + ``` + + +## opencl_ls + +https://github.com/Galarius/opencl-language-server + +Build instructions can be found [here](https://github.com/Galarius/opencl-language-server/blob/main/_dev/build.md). + +Prebuilt binaries are available for Linux, macOS and Windows [here](https://github.com/Galarius/opencl-language-server/releases). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.opencl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "opencl-language-server" } + ``` + - `filetypes` : + ```lua + { "opencl" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + + +## openedge_ls + +[Language server](https://github.com/vscode-abl/vscode-abl) for Progress OpenEdge ABL. + +For manual installation, download abl-lsp.jar from the [VSCode +extension](https://github.com/vscode-abl/vscode-abl/releases/latest). + +Configuration + +```lua +require('lspconfig').['openedge_ls'].setup { + oe_jar_path = '/path/to/abl-lsp.jar', + dlc = '12.2:/path/to/dlc-12.2', -- Version number and OpenEdge root directory (colon separator) + debug = false, -- Set to true for debug logging + trace = false -- Set to true for trace logging (REALLY verbose) +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openedge_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "progress" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('openedge-project.json') + ``` + + +## openscad_ls + +https://github.com/dzhu/openscad-language-server + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-language-server` binary with `cargo`: +```sh +cargo install openscad-language-server +``` + +Vim does not have built-in syntax for the `openscad` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.scad set filetype=openscad ]] +``` + +or by installing a filetype plugin such as https://github.com/sirtaj/vim-openscad + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openscad_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "openscad-language-server" } + ``` + - `filetypes` : + ```lua + { "openscad" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## openscad_lsp + +https://github.com/Leathong/openscad-LSP + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-lsp` binary with `cargo`: +```sh +cargo install openscad-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openscad_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "openscad-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "openscad" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pact_ls + +https://github.com/kadena-io/pact-lsp + +The Pact language server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pact_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pact-lsp" } + ``` + - `filetypes` : + ```lua + { "pact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pasls + +https://github.com/genericptr/pascal-language-server + +An LSP server implementation for Pascal variants that are supported by Free Pascal, including Object Pascal. It uses CodeTools from Lazarus as backend. + +First set `cmd` to the Pascal lsp binary. + +Customization options are passed to pasls as environment variables for example in your `.bashrc`: +```bash +export FPCDIR='/usr/lib/fpc/src' # FPC source directory (This is the only required option for the server to work). +export PP='/usr/lib/fpc/3.2.2/ppcx64' # Path to the Free Pascal compiler executable. +export LAZARUSDIR='/usr/lib/lazarus' # Path to the Lazarus sources. +export FPCTARGET='' # Target operating system for cross compiling. +export FPCTARGETCPU='x86_64' # Target CPU for cross compiling. +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pasls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pasls" } + ``` + - `filetypes` : + ```lua + { "pascal" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pbls + +https://git.sr.ht/~rrc/pbls + +Prerequisites: Ensure protoc is on your $PATH. + +`pbls` can be installed via `cargo install`: +```sh +cargo install --git https://git.sr.ht/~rrc/pbls +``` + +pbls is a Language Server for protobuf + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pbls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pbls" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + root_pattern(".pbls.toml", ".git") + ``` + + +## perlls + +https://github.com/richterger/Perl-LanguageServer/tree/master/clients/vscode/perl + +`Perl-LanguageServer`, a language server for Perl. + +To use the language server, ensure that you have Perl::LanguageServer installed and perl command is on your path. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "perl", "-MPerl::LanguageServer", "-e", "Perl::LanguageServer::run", "--", "--port 13603", "--nostdio 0" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `settings` : + ```lua + { + perl = { + fileFilter = { ".pm", ".pl" }, + ignoreDirs = ".git", + perlCmd = "perl", + perlInc = " " + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## perlnavigator + +https://github.com/bscan/PerlNavigator + +A Perl language server. It can be installed via npm: + +```sh +npm i -g perlnavigator-server +``` + +At minimum, you will need `perl` in your path. If you want to use a non-standard `perl` you will need to set your configuration like so: +```lua +settings = { + perlnavigator = { + perlPath = '/some/odd/location/my-perl' + } +} +``` + +The `contributes.configuration.properties` section of `perlnavigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `perlnavigator` at your `perltidy` and `perlcritic` configurations. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlnavigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "perlnavigator" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## perlpls + +https://github.com/FractalBoy/perl-language-server +https://metacpan.org/pod/PLS + +`PLS`, another language server for Perl. + +To use the language server, ensure that you have PLS installed and that it is in your path + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlpls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pls" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + perl = { + perlcritic = { + enabled = false + }, + syntax = { + enabled = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pest_ls + +https://github.com/pest-parser/pest-ide-tools + +Language server for pest grammars. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pest_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pest-language-server" } + ``` + - `filetypes` : + ```lua + { "pest" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## phan + +https://github.com/phan/phan + +Installation: https://github.com/phan/phan#getting-started + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.phan.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "phan", "-m", "json", "--no-color", "--no-progress-bar", "-x", "-u", "-S", "--language-server-on-stdin", "--allow-polyfill-parser" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## phpactor + +https://github.com/phpactor/phpactor + +Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.phpactor.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "phpactor", "language-server" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + + +## pico8_ls + +https://github.com/japhib/pico8-ls + +Full language support for the PICO-8 dialect of Lua. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pico8_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pico8-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "p8" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## pkgbuild_language_server + +https://github.com/Freed-Wu/pkgbuild-language-server + +Language server for ArchLinux/Windows Msys2's PKGBUILD. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pkgbuild_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pkgbuild-language-server" } + ``` + - `filetypes` : + ```lua + { "PKGBUILD" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## please + +https://github.com/thought-machine/please + +High-performance extensible build system for reproducible multi-language builds. + +The `plz` binary will automatically install the LSP for you on first run + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.please.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "plz", "tool", "lps" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## postgres_lsp + +https://github.com/supabase/postgres_lsp + +A Language Server for Postgres + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.postgres_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "postgres_lsp" } + ``` + - `filetypes` : + ```lua + { "sql" } + ``` + - `root_dir` : + ```lua + util.root_pattern 'root-file.txt' + ``` + - `single_file_support` : + ```lua + true + ``` + + +## powershell_es + +https://github.com/PowerShell/PowerShellEditorServices + +Language server for PowerShell. + +To install, download and extract PowerShellEditorServices.zip +from the [releases](https://github.com/PowerShell/PowerShellEditorServices/releases). +To configure the language server, set the property `bundle_path` to the root +of the extracted PowerShellEditorServices.zip. + +The default configuration doesn't set `cmd` unless `bundle_path` is specified. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', +} +``` + +By default the languageserver is started in `pwsh` (PowerShell Core). This can be changed by specifying `shell`. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', + shell = 'powershell.exe', +} +``` + +Note that the execution policy needs to be set to `Unrestricted` for the languageserver run under PowerShell + +If necessary, specific `cmd` can be defined instead of `bundle_path`. +See [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices#stdio) +to learn more. + +```lua +require'lspconfig'.powershell_es.setup{ + cmd = {'pwsh', '-NoLogo', '-NoProfile', '-Command', "c:/PSES/Start-EditorServices.ps1 ..."} +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.powershell_es.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "ps1" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + git root or current directory + ``` + - `shell` : + ```lua + "pwsh" + ``` + - `single_file_support` : + ```lua + true + ``` + + +## prismals + +Language Server for the Prisma JavaScript and TypeScript ORM + +`@prisma/language-server` can be installed via npm +```sh +npm install -g @prisma/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prismals.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "prisma-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "prisma" } + ``` + - `root_dir` : + ```lua + root_pattern(".git", "package.json") + ``` + - `settings` : + ```lua + { + prisma = { + prismaFmtBinPath = "" + } + } + ``` + + +## prolog_ls + + https://github.com/jamesnvc/lsp_server + + Language Server Protocol server for SWI-Prolog + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prolog_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "swipl", "-g", "use_module(library(lsp_server)).", "-g", "lsp_server:main", "-t", "halt", "--", "stdio" } + ``` + - `filetypes` : + ```lua + { "prolog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## prosemd_lsp + +https://github.com/kitten/prosemd-lsp + +An experimental LSP for Markdown. + +Please see the manual installation instructions: https://github.com/kitten/prosemd-lsp#manual-installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prosemd_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "prosemd-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + + ``` + - `single_file_support` : + ```lua + true + ``` + + +## protols + +https://github.com/coder3101/protols + +`protols` can be installed via `cargo`: +```sh +cargo install protols +``` + +A Language Server for proto3 files. It uses tree-sitter and runs in single file mode. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.protols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "protols" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## psalm + +https://github.com/vimeo/psalm + +Can be installed with composer. +```sh +composer global require vimeo/psalm +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.psalm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "psalm", "--language-server" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("psalm.xml", "psalm.xml.dist") + ``` + + +## pug + +https://github.com/opa-oz/pug-lsp + +An implementation of the Language Protocol Server for [Pug.js](http://pugjs.org) + +PugLSP can be installed via `go get github.com/opa-oz/pug-lsp`, or manually downloaded from [releases page](https://github.com/opa-oz/pug-lsp/releases) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pug.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pug-lsp" } + ``` + - `filetypes` : + ```lua + { "pug" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## puppet + +LSP server for Puppet. + +Installation: + +- Clone the editor-services repository: + https://github.com/puppetlabs/puppet-editor-services + +- Navigate into that directory and run: `bundle install` + +- Install the 'puppet-lint' gem: `gem install puppet-lint` + +- Add that repository to $PATH. + +- Ensure you can run `puppet-languageserver` from outside the editor-services directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.puppet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "puppet-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "puppet" } + ``` + - `root_dir` : + ```lua + root_pattern("manifests", ".puppet-lint.rc", "hiera.yaml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## purescriptls + +https://github.com/nwolverson/purescript-language-server + +The `purescript-language-server` can be added to your project and `$PATH` via + +* JavaScript package manager such as npm, pnpm, Yarn, et al. +* Nix under the `nodePackages` and `nodePackages_latest` package sets + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.purescriptls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "purescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "purescript" } + ``` + - `root_dir` : + ```lua + root_pattern('bower.json', 'flake.nix', 'psc-package.json', 'shell.nix', 'spago.dhall', 'spago.yaml'), + ``` + + +## pylsp + +https://github.com/python-lsp/python-lsp-server + +A Python 3.6+ implementation of the Language Server Protocol. + +See the [project's README](https://github.com/python-lsp/python-lsp-server) for installation instructions. + +Configuration options are documented [here](https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md). +In order to configure an option, it must be translated to a nested Lua table and included in the `settings` argument to the `setup{}` function. +For example, in order to set the `pylsp.plugins.pycodestyle.ignore` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + } + } + } + } +} +``` + +Note: This is a community fork of `pyls`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pylsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pylsp" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pylyzer + + https://github.com/mtshiba/pylyzer + + `pylyzer`, a fast static code analyzer & language server for Python. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pylyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pylyzer", "--server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + python = { + checkOnType = false, + diagnostics = true, + inlayHints = true, + smartCompletion = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pyre + +https://pyre-check.org/ + +`pyre` a static type checker for Python 3. + +`pyre` offers an extremely limited featureset. It currently only supports diagnostics, +which are triggered on save. + +Do not report issues for missing features in `pyre` to `lspconfig`. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pyre.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pyre", "persistent" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## pyright + +https://github.com/microsoft/pyright + +`pyright`, a static type checker and language server for python + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pyright.setup{} +``` +**Commands:** +- PyrightOrganizeImports: Organize Imports +- PyrightSetPythonPath: Reconfigure pyright with the provided python path + +**Default values:** + - `cmd` : + ```lua + { "pyright-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + python = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + useLibraryCodeForTypes = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## qml_lsp + +https://invent.kde.org/sdk/qml-lsp + +LSP implementation for QML (autocompletion, live linting, etc. in editors) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.qml_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "qml-lsp" } + ``` + - `filetypes` : + ```lua + { "qmljs" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## qmlls + +https://github.com/qt/qtdeclarative + +LSP implementation for QML (autocompletion, live linting, etc. in editors), + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.qmlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "qmlls" } + ``` + - `filetypes` : + ```lua + { "qml", "qmljs" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## quick_lint_js + +https://quick-lint-js.com/ + +quick-lint-js finds bugs in JavaScript programs. + +See installation [instructions](https://quick-lint-js.com/install/) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.quick_lint_js.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "quick-lint-js", "--lsp-server" } + ``` + - `filetypes` : + ```lua + { "javascript", "typescript" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## r_language_server + +[languageserver](https://github.com/REditorSupport/languageserver) is an +implementation of the Microsoft's Language Server Protocol for the R +language. + +It is released on CRAN and can be easily installed by + +```r +install.packages("languageserver") +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.r_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "R", "--no-echo", "-e", "languageserver::run()" } + ``` + - `filetypes` : + ```lua + { "r", "rmd" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + root_pattern(".git") or os_homedir + ``` + + +## racket_langserver + +[https://github.com/jeapostrophe/racket-langserver](https://github.com/jeapostrophe/racket-langserver) + +The Racket language server. This project seeks to use +[DrRacket](https://github.com/racket/drracket)'s public API to provide +functionality that mimics DrRacket's code tools as closely as possible. + +Install via `raco`: `raco pkg install racket-langserver` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.racket_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "racket", "--lib", "racket-langserver" } + ``` + - `filetypes` : + ```lua + { "racket", "scheme" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## raku_navigator + +https://github.com/bscan/RakuNavigator +A Raku language server +**By default, raku_navigator doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. +You have to install the language server manually. +Clone the RakuNavigator repo, install based on the [instructions](https://github.com/bscan/raku_Navigator#installation-for-other-editors), +and point `cmd` to `server.js` inside the `server/out` directory: +```lua +cmd = {'node', '/server/out/server.js', '--stdio'} +``` +At minimum, you will need `raku` in your path. If you want to use a non-standard `raku` you will need to set your configuration like so: +```lua +settings = { + raku_navigator = { + rakuPath = '/some/odd/location/my-raku' + } +} +``` +The `contributes.configuration.properties` section of `raku_navigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `raku_navigator` at your `raku_tidy` and `raku_critic` configurations. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.raku_navigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + {} + ``` + - `filetypes` : + ```lua + { "raku" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## reason_ls + +Reason language server + +You can install reason language server from [reason-language-server](https://github.com/jaredly/reason-language-server) repository. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.reason_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "reason-language-server" } + ``` + - `filetypes` : + ```lua + { "reason" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## regal + +https://github.com/StyraInc/regal + +A linter for Rego, with support for running as an LSP server. + +`regal` can be installed by running: +```sh +go install github.com/StyraInc/regal@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.regal.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "regal", "language-server" } + ``` + - `filetypes` : + ```lua + { "rego" } + ``` + - `root_dir` : + ```lua + root_pattern("*.rego", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## regols + +https://github.com/kitagry/regols + +OPA Rego language server. + +`regols` can be installed by running: +```sh +go install github.com/kitagry/regols@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.regols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "regols" } + ``` + - `filetypes` : + ```lua + { "rego" } + ``` + - `root_dir` : + ```lua + root_pattern("*.rego", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## relay_lsp + + https://github.com/facebook/relay + `Relay` is a JavaScript framework for building data-driven React applications + + Setup: + + - Make sure you have a Relay config file somewhere in your project. + - We support standard config file formats (`.yml`, `.js`, `.json`), and the the `relay` field in your `package.json` + - Make sure you have the `relay-compiler` installed in your project. The bare minimum is v13. + - Make sure you are able to run the `relay-compiler` command from the command line. If `yarn relay-compiler` works, it's very likely that the LSP will work. + - Remove / disable any conflicting GraphQL LSPs you have installed. + + Relay LSP is a part of the Relay Compiler binary and available when adding `relay-compiler` to your project's devDependencies. + + ```lua + require'lspconfig'.relay_lsp.setup { + -- (default: false) Whether or not we should automatically start + -- the Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + + -- (default: null) Path to a relay config relative to the + -- `root_dir`. Without this, the compiler will search for your + -- config. This is helpful if your relay project is in a nested + -- directory. + path_to_config = nil, + } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.relay_lsp.setup{} +``` + + +**Default values:** + - `auto_start_compiler` : + ```lua + false + ``` + - `cmd` : + ```lua + { "relay-compiler", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["window/showStatus"] = + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("relay.config.*", "package.json") + ``` + + +## remark_ls + +https://github.com/remarkjs/remark-language-server + +`remark-language-server` can be installed via `npm`: +```sh +npm install -g remark-language-server +``` + +`remark-language-server` uses the same +[configuration files](https://github.com/remarkjs/remark/tree/main/packages/remark-cli#example-config-files-json-yaml-js) +as `remark-cli`. + +This uses a plugin based system. Each plugin needs to be installed locally using `npm` or `yarn`. + +For example, given the following `.remarkrc.json`: + +```json +{ + "presets": [ + "remark-preset-lint-recommended" + ] +} +``` + +`remark-preset-lint-recommended` needs to be installed in the local project: + +```sh +npm install remark-preset-lint-recommended +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.remark_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "remark-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rescriptls + +https://github.com/rescript-lang/rescript-vscode/tree/master/server + +ReScript Language Server can be installed via npm: +```sh +npm install -g @rescript/language-server +``` + +See [package.json](https://github.com/rescript-lang/rescript-vscode/blob/master/package.json#L139) +for init_options supported. + +For example, in order to disable the `inlayHints` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + rescript = { + settings = { + inlayHints = { enable = false }, + }, + }, + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rescriptls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "rescript" } + ``` + - `init_options` : + ```lua + { + extensionConfiguration = { + allowBuiltInFormatter = true, + askToStartBuild = false, + cache = { + projectConfig = { + enabled = true + } + }, + codeLens = true, + incrementalTypechecking = { + acrossFiles = true, + enabled = true + }, + inlayHints = { + enable = true + } + } + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## rls + +https://github.com/rust-lang/rls + +rls, a language server for Rust + +See https://github.com/rust-lang/rls#setup to setup rls itself. +See https://github.com/rust-lang/rls#configuration for rls-specific settings. +All settings listed on the rls configuration section of the readme +must be set under settings.rust as follows: + +```lua +nvim_lsp.rls.setup { + settings = { + rust = { + unstable_features = true, + build_on_save = false, + all_features = true, + }, + }, +} +``` + +If you want to use rls for a particular build, eg nightly, set cmd as follows: + +```lua +cmd = {"rustup", "run", "nightly", "rls"} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rls" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + root_pattern("Cargo.toml") + ``` + + +## rnix + +https://github.com/nix-community/rnix-lsp + +A language server for Nix providing basic completion and formatting via nixpkgs-fmt. + +To install manually, run `cargo install rnix-lsp`. If you are using nix, rnix-lsp is in nixpkgs. + +This server accepts configuration via the `settings` key. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rnix.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rnix-lsp" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `settings` : + ```lua + {} + ``` + + +## robotframework_ls + +https://github.com/robocorp/robotframework-lsp + +Language Server Protocol implementation for Robot Framework. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.robotframework_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "robotframework_ls" } + ``` + - `filetypes` : + ```lua + { "robot" } + ``` + - `root_dir` : + ```lua + util.root_pattern('robotidy.toml', 'pyproject.toml', 'conda.yaml', 'robot.yaml')(fname) + or util.find_git_ancestor(fname) + ``` + + +## roc_ls + +https://github.com/roc-lang/roc/tree/main/crates/language_server#roc_language_server + +The built-in language server for the Roc programming language. +[Installation](https://github.com/roc-lang/roc/tree/main/crates/language_server#installing) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.roc_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "roc_language_server" } + ``` + - `filetypes` : + ```lua + { "roc" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rome + +https://rome.tools + +Language server for the Rome Frontend Toolchain. + +(Unmaintained, use [Biome](https://biomejs.dev/blog/annoucing-biome) instead.) + +```sh +npm install [-g] rome +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rome.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rome", "lsp-proxy" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "json", "typescript", "typescript.tsx", "typescriptreact" } + ``` + - `root_dir` : + ```lua + root_pattern('package.json', 'node_modules', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rubocop + +https://github.com/rubocop/rubocop + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rubocop.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rubocop", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## ruby_lsp + +https://shopify.github.io/ruby-lsp/ + +This gem is an implementation of the language server protocol specification for +Ruby, used to improve editor features. + +Install the gem. There's no need to require it, since the server is used as a +standalone executable. + +```sh +group :development do + gem "ruby-lsp", require: false +end +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruby_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruby-lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `init_options` : + ```lua + { + formatter = "auto" + } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ruff + +https://github.com/astral-sh/ruff + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`. + +```sh +pip install ruff +``` + +**Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.** + +This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice. + +Server settings can be provided via: + +```lua +require('lspconfig').ruff.setup({ + init_options = { + settings = { + -- Server settings should go here + } + } +}) +``` + +Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruff.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruff", "server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ruff_lsp + +https://github.com/astral-sh/ruff-lsp + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code transformation tool, written in Rust. It can be installed via pip. + +```sh +pip install ruff-lsp +``` + +Extra CLI arguments for `ruff` can be provided via + +```lua +require'lspconfig'.ruff_lsp.setup{ + init_options = { + settings = { + -- Any extra CLI arguments for `ruff` go here. + args = {}, + } + } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruff_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruff-lsp" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rune_languageserver + +https://crates.io/crates/rune-languageserver + +A language server for the [Rune](https://rune-rs.github.io/) Language, +an embeddable dynamic programming language for Rust + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rune_languageserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rune-languageserver" } + ``` + - `filetypes` : + ```lua + { "rune" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rust_analyzer + +https://github.com/rust-lang/rust-analyzer + +rust-analyzer (aka rls 2.0), a language server for Rust + + +See [docs](https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc) for extra settings. The settings can be used like this: +```lua +require'lspconfig'.rust_analyzer.setup{ + settings = { + ['rust-analyzer'] = { + diagnostics = { + enable = false; + } + } + } +} +``` + +Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per +https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rust_analyzer.setup{} +``` +**Commands:** +- CargoReload: Reload current cargo workspace + +**Default values:** + - `before_init` : + ```lua + see source file + ``` + - `capabilities` : + ```lua + { + experimental = { + serverStatusNotification = true + } + } + ``` + - `cmd` : + ```lua + { "rust-analyzer" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + root_pattern("Cargo.toml", "rust-project.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## salt_ls + +Language server for Salt configuration files. +https://github.com/dcermak/salt-lsp + +The language server can be installed with `pip`: +```sh +pip install salt-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.salt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "salt_lsp_server" } + ``` + - `filetypes` : + ```lua + { "sls" } + ``` + - `root_dir` : + ```lua + root_pattern('.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## scheme_langserver + +https://github.com/ufo5260987423/scheme-langserver +`scheme-langserver`, a language server protocol implementation for scheme. +And for nvim user, please add .sls to scheme file extension list. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.scheme_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "scheme-langserver", "~/.scheme-langserver.log", "enable", "disable" } + ``` + - `filetypes` : + ```lua + { "scheme" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## scry + +https://github.com/crystal-lang-tools/scry + +Crystal language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.scry.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "scry" } + ``` + - `filetypes` : + ```lua + { "crystal" } + ``` + - `root_dir` : + ```lua + root_pattern('shard.yml', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## serve_d + + https://github.com/Pure-D/serve-d + + `Microsoft language server protocol implementation for D using workspace-d.` + Download a binary from https://github.com/Pure-D/serve-d/releases and put it in your $PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.serve_d.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "serve-d" } + ``` + - `filetypes` : + ```lua + { "d" } + ``` + - `root_dir` : + ```lua + util.root_pattern("dub.json", "dub.sdl", ".git") + ``` + + +## shopify_theme_ls + +https://shopify.dev/docs/api/shopify-cli + +[Language Server](https://shopify.dev/docs/themes/tools/cli/language-server) and Theme Check (linter) for Shopify themes. + +`shopify` can be installed via npm `npm install -g @shopify/cli`. + +Note: This LSP already includes Theme Check so you don't need to use the `theme_check` server configuration as well. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.shopify_theme_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "shopify", "theme", "language-server" } + ``` + - `filetypes` : + ```lua + { "liquid" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## sixtyfps + +https://github.com/sixtyfpsui/sixtyfps +`SixtyFPS`'s language server + +You can build and install `sixtyfps-lsp` binary with `cargo`: +```sh +cargo install sixtyfps-lsp +``` + +Vim does not have built-in syntax for the `sixtyfps` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.60 set filetype=sixtyfps ]] +``` + +or by installing a filetype plugin such as https://github.com/RustemB/sixtyfps-vim + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sixtyfps.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sixtyfps-lsp" } + ``` + - `filetypes` : + ```lua + { "sixtyfps" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## slangd + +https://github.com/shader-slang/slang + +The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or +by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md). + +The server can be configured by passing a "settings" object to `slangd.setup{}`: + +```lua +require('lspconfig').slangd.setup{ + settings = { + slang = { + predefinedMacros = {"MY_VALUE_MACRO=1"}, + inlayHints = { + deducedTypes = true, + parameterNames = true, + } + } + } +} +``` +Available options are documented [here](https://github.com/shader-slang/slang-vscode-extension/tree/main?tab=readme-ov-file#configurations) +or in more detail [here](https://github.com/shader-slang/slang-vscode-extension/blob/main/package.json#L70). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slangd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slangd" } + ``` + - `filetypes` : + ```lua + { "hlsl", "shaderslang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## slint_lsp + +https://github.com/slint-ui/slint +`Slint`'s language server + +You can build and install `slint-lsp` binary with `cargo`: +```sh +cargo install slint-lsp +``` + +Vim does not have built-in syntax for the `slint` filetype at this time. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.slint set filetype=slint ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slint_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slint-lsp" } + ``` + - `filetypes` : + ```lua + { "slint" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## smarty_ls + +https://github.com/landeaux/vscode-smarty-langserver-extracted + +Language server for Smarty. + +`smarty-language-server` can be installed via `npm`: + +```sh +npm i -g vscode-smarty-langserver-extracted +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.smarty_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "smarty-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "smarty" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + css = { + validate = true + }, + smarty = { + pluginDirs = {} + } + } + ``` + + +## smithy_ls + +https://github.com/awslabs/smithy-language-server + +`Smithy Language Server`, A Language Server Protocol implementation for the Smithy IDL + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.smithy_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "smithy-language-server", "0" } + ``` + - `filetypes` : + ```lua + { "smithy" } + ``` + - `root_dir` : + ```lua + root_pattern("smithy-build.json", "build.gradle", "build.gradle.kts", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## snakeskin_ls + +https://www.npmjs.com/package/@snakeskin/cli + +`snakeskin cli` can be installed via `npm`: +```sh +npm install -g @snakeskin/cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.snakeskin_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "snakeskin-cli", "lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ss" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## snyk_ls + +https://github.com/snyk/snyk-ls + +LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.snyk_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "snyk-ls" } + ``` + - `filetypes` : + ```lua + { "go", "gomod", "javascript", "typescript", "json", "python", "requirements", "helm", "yaml", "terraform", "terraform-vars" } + ``` + - `init_options` : + ```lua + Configuration from https://github.com/snyk/snyk-ls#configuration-1 + ``` + - `root_dir` : + ```lua + root_pattern(".git", ".snyk") + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## solang + +A language server for Solidity + +See the [documentation](https://solang.readthedocs.io/en/latest/installing.html) for installation instructions. + +The language server only provides the following capabilities: +* Syntax highlighting +* Diagnostics +* Hover + +There is currently no support for completion, goto definition, references, or other functionality. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solang.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solang", "language-server", "--target", "evm" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## solargraph + +https://solargraph.org/ + +solargraph, a language server for Ruby + +You can install solargraph via gem install. + +```sh +gem install --user-install solargraph +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solargraph.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solargraph", "stdio" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `init_options` : + ```lua + { + formatting = true + } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + - `settings` : + ```lua + { + solargraph = { + diagnostics = true + } + } + ``` + + +## solc + +https://docs.soliditylang.org/en/latest/installing-solidity.html + +solc is the native language server for the Solidity language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solc.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solc", "--lsp" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern('hardhat.config.*', '.git') + ``` + + +## solidity + +https://github.com/qiuxiang/solidity-ls + +npm i solidity-ls -g + +Make sure that solc is installed and it's the same version of the file. solc-select is recommended. + +Solidity language server is a LSP with autocomplete, go to definition and diagnostics. + +If you use brownie, use this root_dir: +root_dir = util.root_pattern('brownie-config.yaml', '.git') + +on includePath, you can add an extra path to search for external libs, on remapping you can remap lib <> path, like: + +```lua +{ solidity = { includePath = '/Users/your_user/.brownie/packages/', remapping = { ["@OpenZeppelin/"] = 'OpenZeppelin/openzeppelin-contracts@4.6.0/' } } } +``` + +**For brownie users** +Change the root_dir to: + +```lua +root_pattern("brownie-config.yaml", ".git") +``` + +The best way of using it is to have a package.json in your project folder with the packages that you will use. +After installing with package.json, just create a `remappings.txt` with: + +``` +@OpenZeppelin/=node_modules/OpenZeppelin/openzeppelin-contracts@4.6.0/ +``` + +You can omit the node_modules as well. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solidity-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") + ``` + - `settings` : + ```lua + { + solidity = { + includePath = "", + remapping = {} + } + } + ``` + + +## solidity_ls + +https://github.com/juanfranblanco/vscode-solidity + +`vscode-solidity-server` can be installed via `npm`: + +```sh +npm install -g vscode-solidity-server +``` + +`vscode-solidity-server` is a language server for the Solidity language ported from the VSCode "solidity" extension. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-solidity-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("hardhat.config.js", "hardhat.config.ts", "foundry.toml", "remappings.txt", "truffle.js", "truffle-config.js", "ape-config.yaml", ".git", "package.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## solidity_ls_nomicfoundation + +https://github.com/NomicFoundation/hardhat-vscode/blob/development/server/README.md + +`nomicfoundation-solidity-language-server` can be installed via `npm`: + +```sh +npm install -g @nomicfoundation/solidity-language-server +``` + +A language server for the Solidity programming language, built by the Nomic Foundation for the Ethereum community. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity_ls_nomicfoundation.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nomicfoundation-solidity-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("hardhat.config.js", "hardhat.config.ts", "foundry.toml", "remappings.txt", "truffle.js", "truffle-config.js", "ape-config.yaml", ".git", "package.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## somesass_ls + + +https://github.com/wkillerud/some-sass/tree/main/packages/language-server + +`some-sass-language-server` can be installed via `npm`: + +```sh +npm i -g some-sass-language-server +``` + +The language server provides: + +- Full support for @use and @forward, including aliases, prefixes and hiding. +- Workspace-wide code navigation and refactoring, such as Rename Symbol. +- Rich documentation through SassDoc. +- Language features for %placeholder-selectors, both when using them and writing them. +- Suggestions and hover info for built-in Sass modules, when used with @use. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.somesass_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "some-sass-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "scss", "sass" } + ``` + - `name` : + ```lua + "somesass_ls" + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + { + somesass = { + suggestAllFromOpenDocument = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## sorbet + +https://sorbet.org + +Sorbet is a fast, powerful type checker designed for Ruby. + +You can install Sorbet via gem install. You might also be interested in how to set +Sorbet up for new projects: https://sorbet.org/docs/adopting. + +```sh +gem install sorbet +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sorbet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "srb", "tc", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## sourcekit + +https://github.com/apple/sourcekit-lsp + +Language server for Swift and C/C++/Objective-C. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sourcekit.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sourcekit-lsp" } + ``` + - `filetypes` : + ```lua + { "swift", "c", "cpp", "objective-c", "objective-cpp" } + ``` + - `root_dir` : + ```lua + root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git") + ``` + + +## sourcery + +https://github.com/sourcery-ai/sourcery + +Refactor Python instantly using the power of AI. + +It requires the init_options param to be populated as shown below and will respond with the list of ServerCapabilities that it supports: + +```lua +require'lspconfig'.sourcery.setup { + init_options = { + --- The Sourcery token for authenticating the user. + --- This is retrieved from the Sourcery website and must be + --- provided by each user. The extension must provide a + --- configuration option for the user to provide this value. + token = , + + --- The extension's name and version as defined by the extension. + extension_version = 'vim.lsp', + + --- The editor's name and version as defined by the editor. + editor_version = 'vim', + }, +} +``` + +Alternatively, you can login to sourcery by running `sourcery login` with sourcery-cli. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sourcery.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sourcery", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "python", "typescript", "typescriptreact" } + ``` + - `init_options` : + ```lua + { + editor_version = "vim", + extension_version = "vim.lsp" + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## spectral + +https://github.com/luizcorreia/spectral-language-server + `A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.` + +`spectral-language-server` can be installed via `npm`: +```sh +npm i -g spectral-language-server +``` +See [vscode-spectral](https://github.com/stoplightio/vscode-spectral#extension-settings) for configuration options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.spectral.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "spectral-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml", "json", "yml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + enable = true, + run = "onType", + validateLanguages = { "yaml", "json", "yml" } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## spyglassmc_language_server + +https://github.com/SpyglassMC/Spyglass/tree/main/packages/language-server + +Language server for Minecraft datapacks. + +`spyglassmc-language-server` can be installed via `npm`: + +```sh +npm i -g @spyglassmc/language-server +``` + +You may also need to configure the filetype: + +`autocmd BufNewFile,BufRead *.mcfunction set filetype=mcfunction` + +This is automatically done by [CrystalAlpha358/vim-mcfunction](https://github.com/CrystalAlpha358/vim-mcfunction), which also provide syntax highlight. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.spyglassmc_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "spyglassmc-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "mcfunction" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## sqlls + +https://github.com/joe-re/sql-language-server + +This LSP can be installed via `npm`. Find further instructions on manual installation of the sql-language-server at [joe-re/sql-language-server](https://github.com/joe-re/sql-language-server). +
    + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sqlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sql-language-server", "up", "--method", "stdio" } + ``` + - `filetypes` : + ```lua + { "sql", "mysql" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## sqls + +https://github.com/sqls-server/sqls + +```lua +require'lspconfig'.sqls.setup{ + cmd = {"path/to/command", "-config", "path/to/config.yml"}; + ... +} +``` +Sqls can be installed via `go get github.com/sqls-server/sqls`. Instructions for compiling Sqls from the source can be found at [sqls-server/sqls](https://github.com/sqls-server/sqls). + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sqls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sqls" } + ``` + - `filetypes` : + ```lua + { "sql", "mysql" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## standardrb + +https://github.com/testdouble/standard + +Ruby Style Guide, with linter & automatic code fixer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.standardrb.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "standardrb", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## starlark_rust + +https://github.com/facebookexperimental/starlark-rust/ +The LSP part of `starlark-rust` is not currently documented, + but the implementation works well for linting. +This gives valuable warnings for potential issues in the code, +but does not support refactorings. + +It can be installed with cargo: https://crates.io/crates/starlark + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.starlark_rust.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "starlark", "--lsp" } + ``` + - `filetypes` : + ```lua + { "star", "bzl", "BUILD.bazel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## starpls + +https://github.com/withered-magic/starpls + +`starpls` is an LSP implementation for Starlark. Installation instructions can be found in the project's README. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.starpls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "starpls" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## statix + +https://github.com/nerdypepper/statix + +lints and suggestions for the nix programming language + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.statix.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "statix" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## steep + +https://github.com/soutaro/steep + +`steep` is a static type checker for Ruby. + +You need `Steepfile` to make it work. Generate it with `steep init`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.steep.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "steep", "langserver" } + ``` + - `filetypes` : + ```lua + { "ruby", "eruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Steepfile", ".git") + ``` + + +## stimulus_ls + +https://www.npmjs.com/package/stimulus-language-server + +`stimulus-lsp` can be installed via `npm`: + +```sh +npm install -g stimulus-language-server +``` + +or via `yarn`: + +```sh +yarn global add stimulus-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.stimulus_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stimulus-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "ruby", "eruby", "blade", "php" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## stylelint_lsp + +https://github.com/bmatcuk/stylelint-lsp + +`stylelint-lsp` can be installed via `npm`: + +```sh +npm i -g stylelint-lsp +``` + +Can be configured by passing a `settings.stylelintplus` object to `stylelint_lsp.setup`: + +```lua +require'lspconfig'.stylelint_lsp.setup{ + settings = { + stylelintplus = { + -- see available options in stylelint-lsp documentation + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.stylelint_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stylelint-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "less", "scss", "sugarss", "vue", "wxss", "javascript", "javascriptreact", "typescript", "typescriptreact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## superhtml + +https://github.com/kristoff-it/superhtml + +HTML Language Server & Templating Language Library + +This LSP is designed to tightly adhere to the HTML spec as well as enforcing +some additional rules that ensure HTML clarity. + +If you want to disable HTML support for another HTML LSP, add the following +to your configuration: + +```lua +require'lspconfig'.superhtml.setup { + filetypes = { 'superhtml' } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.superhtml.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "superhtml", "lsp" } + ``` + - `filetypes` : + ```lua + { "superhtml", "html" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## svelte + +https://github.com/sveltejs/language-tools/tree/master/packages/language-server + +Note: assuming that [ts_ls](#ts_ls) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage). + +`svelte-language-server` can be installed via `npm`: +```sh +npm install -g svelte-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svelte.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "svelteserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "svelte" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") + ``` + + +## svlangserver + +https://github.com/imc-trading/svlangserver + +Language server for SystemVerilog. + +`svlangserver` can be installed via `npm`: + +```sh +$ npm install -g @imc-trading/svlangserver +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svlangserver.setup{} +``` +**Commands:** +- SvlangserverBuildIndex: Instructs language server to rerun indexing +- SvlangserverReportHierarchy: Generates hierarchy for the given module + +**Default values:** + - `cmd` : + ```lua + { "svlangserver" } + ``` + - `filetypes` : + ```lua + { "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + root_pattern(".svlangserver", ".git") + ``` + - `settings` : + ```lua + { + systemverilog = { + includeIndexing = { "*.{v,vh,sv,svh}", "**/*.{v,vh,sv,svh}" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## svls + +https://github.com/dalance/svls + +Language server for verilog and SystemVerilog + +`svls` can be installed via `cargo`: + ```sh + cargo install svls + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "svls" } + ``` + - `filetypes` : + ```lua + { "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## swift_mesonls + +https://github.com/JCWasmx86/Swift-MesonLSP + +Meson language server written in Swift + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.swift_mesonls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "Swift-MesonLSP", "--lsp" } + ``` + - `filetypes` : + ```lua + { "meson" } + ``` + - `root_dir` : + ```lua + util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git") + ``` + + +## syntax_tree + +https://ruby-syntax-tree.github.io/syntax_tree/ + +A fast Ruby parser and formatter. + +Syntax Tree is a suite of tools built on top of the internal CRuby parser. It +provides the ability to generate a syntax tree from source, as well as the +tools necessary to inspect and manipulate that syntax tree. It can be used to +build formatters, linters, language servers, and more. + +```sh +gem install syntax_tree +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.syntax_tree.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stree", "lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern(".streerc", "Gemfile", ".git") + ``` + + +## tabby_ml + +https://tabby.tabbyml.com/blog/running-tabby-as-a-language-server + +Language server for Tabby, an opensource, self-hosted AI coding assistant. + +`tabby-agent` can be installed via `npm`: + +```sh +npm install --global tabby-agent +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tabby_ml.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tabby-agent", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + {} + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tailwindcss + +https://github.com/tailwindlabs/tailwindcss-intellisense + +Tailwind CSS Language Server can be installed via npm: +```sh +npm install -g @tailwindcss/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tailwindcss.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tailwindcss-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.cjs', 'postcss.config.mjs', 'postcss.config.ts', 'package.json', 'node_modules', '.git') + ``` + - `settings` : + ```lua + { + tailwindCSS = { + classAttributes = { "class", "className", "class:list", "classList", "ngClass" }, + includeLanguages = { + eelixir = "html-eex", + eruby = "erb", + htmlangular = "html", + templ = "html" + }, + lint = { + cssConflict = "warning", + invalidApply = "error", + invalidConfigPath = "error", + invalidScreen = "error", + invalidTailwindDirective = "error", + invalidVariant = "error", + recommendedVariantOrder = "warning" + }, + validate = true + } + } + ``` + + +## taplo + +https://taplo.tamasfe.dev/cli/usage/language-server.html + +Language server for Taplo, a TOML toolkit. + +`taplo-cli` can be installed via `cargo`: +```sh +cargo install --features lsp --locked taplo-cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.taplo.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "taplo", "lsp", "stdio" } + ``` + - `filetypes` : + ```lua + { "toml" } + ``` + - `root_dir` : + ```lua + root_pattern("*.toml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tblgen_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#tablegen-lsp-language-server--tblgen-lsp-server + +The Language Server for the LLVM TableGen language + +`tblgen-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tblgen_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tblgen-lsp-server" } + ``` + - `filetypes` : + ```lua + { "tablegen" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## teal_ls + +https://github.com/teal-language/teal-language-server + +Install with: +``` +luarocks install teal-language-server +``` + +Optional Command Args: +* "--log-mode=by_date" - Enable logging in $HOME/.cache/teal-language-server. Log name will be date + pid of process +* "--log-mode=by_proj_path" - Enable logging in $HOME/.cache/teal-language-server. Log name will be project path + pid of process +* "--verbose=true" - Increases log level. Does nothing unless log-mode is set + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.teal_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "teal-language-server" } + ``` + - `filetypes` : + ```lua + { "teal" } + ``` + - `root_dir` : + ```lua + root_pattern("tlconfig.lua") + ``` + + +## templ + +https://templ.guide + +The official language server for the templ HTML templating language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.templ.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "templ", "lsp" } + ``` + - `filetypes` : + ```lua + { "templ" } + ``` + - `root_dir` : + ```lua + root_pattern('go.work', 'go.mod', '.git') + ``` + + +## terraform_lsp + +https://github.com/juliosueiras/terraform-lsp + +Terraform language server +Download a released binary from +https://github.com/juliosueiras/terraform-lsp/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.terraform_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "terraform-lsp" } + ``` + - `filetypes` : + ```lua + { "terraform", "hcl" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git") + ``` + + +## terraformls + +https://github.com/hashicorp/terraform-ls + +Terraform language server +Download a released binary from https://github.com/hashicorp/terraform-ls/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) + +Note, that the `settings` configuration option uses the `workspace/didChangeConfiguration` event, +[which is not supported by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/features.md). +Instead you should use `init_options` which passes the settings as part of the LSP initialize call +[as is required by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md#how-to-pass-settings). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.terraformls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "terraform-ls", "serve" } + ``` + - `filetypes` : + ```lua + { "terraform", "terraform-vars" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git") + ``` + + +## texlab + +https://github.com/latex-lsp/texlab + +A completion engine built from scratch for (La)TeX. + +See https://github.com/latex-lsp/texlab/wiki/Configuration for configuration options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.texlab.setup{} +``` +**Commands:** +- TexlabBuild: Build the current buffer +- TexlabCancelBuild: Cancel the current build +- TexlabChangeEnvironment: Change the environment at current position +- TexlabCleanArtifacts: Clean the artifacts +- TexlabCleanAuxiliary: Clean the auxiliary files +- TexlabDependencyGraph: Show the dependency graph +- TexlabFindEnvironments: Find the environments at current position +- TexlabForward: Forward search from current position + +**Default values:** + - `cmd` : + ```lua + { "texlab" } + ``` + - `filetypes` : + ```lua + { "tex", "plaintex", "bib" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + texlab = { + auxDirectory = ".", + bibtexFormatter = "texlab", + build = { + args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, + executable = "latexmk", + forwardSearchAfter = false, + onSave = false + }, + chktex = { + onEdit = false, + onOpenAndSave = false + }, + diagnosticsDelay = 300, + formatterLineLength = 80, + forwardSearch = { + args = {} + }, + latexFormatter = "latexindent", + latexindent = { + modifyLineBreaks = false + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## textlsp + +https://github.com/hangyav/textLSP + +`textLSP` is an LSP server for text spell and grammar checking with various AI tools. +It supports multiple text file formats, such as LaTeX, Org or txt. + +For the available text analyzer tools and their configuration, see the [GitHub](https://github.com/hangyav/textLSP) page. +By default, all analyzers are disabled in textLSP, since most of them need special settings. +For quick testing, LanguageTool is enabled in the default `nvim-lspconfig` configuration. + +To install run: `pip install textLSP` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.textlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "textlsp" } + ``` + - `filetypes` : + ```lua + { "text", "tex", "org" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + textLSP = { + analysers = { + languagetool = { + check_text = { + on_change = false, + on_open = true, + on_save = true + }, + enabled = true + } + }, + documents = { + org = { + org_todo_keywords = { "TODO", "IN_PROGRESS", "DONE" } + } + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tflint + +https://github.com/terraform-linters/tflint + +A pluggable Terraform linter that can act as lsp server. +Installation instructions can be found in https://github.com/terraform-linters/tflint#installation. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tflint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tflint", "--langserver" } + ``` + - `filetypes` : + ```lua + { "terraform" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git", ".tflint.hcl") + ``` + + +## theme_check + +https://github.com/Shopify/shopify-cli + +`theme-check-language-server` is bundled with `shopify-cli` or it can also be installed via + +https://github.com/Shopify/theme-check#installation + +**NOTE:** +If installed via Homebrew, `cmd` must be set to 'theme-check-liquid-server' + +```lua +require lspconfig.theme_check.setup { + cmd = { 'theme-check-liquid-server' } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.theme_check.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "theme-check-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "liquid" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## thriftls + +https://github.com/joyme123/thrift-ls + +you can install thriftls by mason or download binary here: https://github.com/joyme123/thrift-ls/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.thriftls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "thriftls" } + ``` + - `filetypes` : + ```lua + { "thrift" } + ``` + - `root_dir` : + ```lua + root_pattern(".thrift") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tilt_ls + +https://github.com/tilt-dev/tilt + +Tilt language server. + +You might need to add filetype detection manually: + +```vim +autocmd BufRead Tiltfile setf=tiltfile +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tilt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tilt", "lsp", "start" } + ``` + - `filetypes` : + ```lua + { "tiltfile" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tinymist + +https://github.com/Myriad-Dreamin/tinymist +An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tinymist.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tinymist" } + ``` + - `filetypes` : + ```lua + { "typst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + false + ``` + + +## ts_ls + +https://github.com/typescript-language-server/typescript-language-server + +`ts_ls`, aka `typescript-language-server`, is a Language Server Protocol implementation for TypeScript wrapping `tsserver`. Note that `ts_ls` is not `tsserver`. + +`typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript typescript-language-server +``` + +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. + +Here's an example that disables type checking in JavaScript files. + +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` + +### Vue support + +As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin +adds Vue support to this language server. + +*IMPORTANT*: It is crucial to ensure that `@vue/typescript-plugin` and `volar `are of identical versions. + +```lua +require'lspconfig'.ts_ls.setup{ + init_options = { + plugins = { + { + name = "@vue/typescript-plugin", + location = "/usr/local/lib/node_modules/@vue/typescript-plugin", + languages = {"javascript", "typescript", "vue"}, + }, + }, + }, + filetypes = { + "javascript", + "typescript", + "vue", + }, +} + +-- You must make sure volar is setup +-- e.g. require'lspconfig'.volar.setup{} +-- See volar's section for more information +``` + +`location` MUST be defined. If the plugin is installed in `node_modules`, +`location` can have any value. + +`languages` must include `vue` even if it is listed in `filetypes`. + +`filetypes` is extended here to include Vue SFC. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ts_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "jsconfig.json", "package.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tsp_server + +https://github.com/microsoft/typespec + +The language server for TypeSpec, a language for defining cloud service APIs and shapes. + +`tsp-server` can be installed together with the typespec compiler via `npm`: +```sh +npm install -g @typespec/compiler +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tsp-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "typespec" } + ``` + - `root_dir` : + ```lua + util.root_pattern("tspconfig.yaml", ".git") + ``` + + +## ttags + +https://github.com/npezza93/ttags + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ttags.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ttags", "lsp" } + ``` + - `filetypes` : + ```lua + { "ruby", "rust", "javascript", "haskell" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## turtle_ls + +https://github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server +`turtle-language-server`, An editor-agnostic server providing language intelligence (diagnostics, hover tooltips, etc.) for the W3C standard Turtle RDF syntax via the Language Server Protocol. +installable via npm install -g turtle-language-server or yarn global add turtle-language-server. +requires node. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.turtle_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "node", + [3] = "--stdio" + } + ``` + - `filetypes` : + ```lua + { "turtle", "ttl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## tvm_ffi_navigator + +https://github.com/tqchen/ffi-navigator + +The Language Server for FFI calls in TVM to be able jump between python and C++ + +FFI navigator can be installed with `pip install ffi-navigator`, buf for more details, please see +https://github.com/tqchen/ffi-navigator?tab=readme-ov-file#installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tvm_ffi_navigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "python", "-m", "ffi_navigator.langserver" } + ``` + - `filetypes` : + ```lua + { "python", "cpp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## twiggy_language_server + +https://github.com/moetelo/twiggy + +`twiggy-language-server` can be installed via `npm`: +```sh +npm install -g twiggy-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.twiggy_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "twiggy-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "twig" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## typeprof + +https://github.com/ruby/typeprof + +`typeprof` is the built-in analysis and LSP tool for Ruby 3.1+. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typeprof.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typeprof", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ruby", "eruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## typos_lsp + +https://github.com/crate-ci/typos +https://github.com/tekumara/typos-lsp + +A Language Server Protocol implementation for Typos, a low false-positive +source code spell checker, written in Rust. Download it from the releases page +on GitHub: https://github.com/tekumara/typos-lsp/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typos_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typos-lsp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## typst_lsp + +https://github.com/nvarner/typst-lsp + +Language server for Typst. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typst_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typst-lsp" } + ``` + - `filetypes` : + ```lua + { "typst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## uiua + +https://github.com/uiua-lang/uiua/ + +The builtin language server of the Uiua interpreter. + +The Uiua interpreter can be installed with `cargo install uiua` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.uiua.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "uiua", "lsp" } + ``` + - `filetypes` : + ```lua + { "uiua" } + ``` + - `root_dir` : + ```lua + root_pattern( + 'main.ua', + 'fmt.ua', + '.git' + ) + + ``` + + +## unison + +https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown + + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.unison.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nc", "localhost", "5757" } + ``` + - `filetypes` : + ```lua + { "unison" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## unocss + +https://github.com/xna00/unocss-language-server + +UnoCSS Language Server can be installed via npm: +```sh +npm i unocss-language-server -g +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.unocss.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "unocss-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "javascriptreact", "rescript", "typescriptreact", "vue", "svelte" } + ``` + - `root_dir` : + ```lua + root_pattern('unocss.config.js', 'unocss.config.ts', 'uno.config.js', 'uno.config.ts') + ``` + + +## uvls + +https://codeberg.org/caradhras/uvls +Language server for UVL, written using tree sitter and rust. +You can install the server easily using cargo: +```sh +git clone https://codeberg.org/caradhras/uvls +cd uvls +cargo install --path . +``` +Note: To activate properly nvim needs to know the uvl filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.uvl setfiletype uvl\]\]) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.uvls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "uvls" } + ``` + - `filetypes` : + ```lua + { "uvl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## v_analyzer + +https://github.com/vlang/v-analyzer + +V language server. + +`v-analyzer` can be installed by following the instructions [here](https://github.com/vlang/v-analyzer#installation). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.v_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "v-analyzer" } + ``` + - `filetypes` : + ```lua + { "v", "vsh", "vv" } + ``` + - `root_dir` : + ```lua + root_pattern("v.mod", ".git") + ``` + + +## vacuum + +Vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. + +You can install vacuum using mason or follow the instructions here: https://github.com/daveshanley/vacuum + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['openapi.*%.ya?ml'] = 'yaml.openapi', + ['openapi.*%.json'] = 'json.openapi', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vacuum.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vacuum", "language-server" } + ``` + - `filetypes` : + ```lua + { "yaml.openapi", "json.openapi" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vala_ls + +https://github.com/Prince781/vala-language-server + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vala_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vala-language-server" } + ``` + - `filetypes` : + ```lua + { "vala", "genie" } + ``` + - `root_dir` : + ```lua + root_pattern("meson.build", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vale_ls + +https://github.com/errata-ai/vale-ls + +An implementation of the Language Server Protocol (LSP) for the Vale command-line tool. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vale_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vale-ls" } + ``` + - `filetypes` : + ```lua + { "markdown", "text", "tex" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vdmj + +https://github.com/nickbattle/vdmj + +The VDMJ language server can be installed by cloning the VDMJ repository and +running `mvn clean install`. + +Various options are provided to configure the language server (see below). In +particular: +- `annotation_paths` is a list of folders and/or jar file paths for annotations +that should be used with the language server; +- any value of `debugger_port` less than zero will disable the debugger; note +that if a non-zero value is used, only one instance of the server can be active +at a time. + +More settings for VDMJ can be changed in a file called `vdmj.properties` under +`root_dir/.vscode`. For a description of the available settings, see +[Section 7 of the VDMJ User Guide](https://raw.githubusercontent.com/nickbattle/vdmj/master/vdmj/documentation/UserGuide.pdf). + +Note: proof obligations and combinatorial testing are not currently supported +by neovim. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vdmj.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + Generated from the options given + ``` + - `filetypes` : + ```lua + { "vdmsl", "vdmpp", "vdmrt" } + ``` + - `options` : + ```lua + { + annotation_paths = {}, + debugger_port = -1, + high_precision = false, + java = "$JAVA_HOME/bin/java", + java_opts = { "-Xmx3000m", "-Xss1m" }, + logfile = "path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log')", + mavenrepo = "$HOME/.m2/repository/dk/au/ece/vdmj", + version = "The latest version installed in `mavenrepo`" + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor(fname) or find_vscode_ancestor(fname) + ``` + + +## verible + +https://github.com/chipsalliance/verible + +A linter and formatter for verilog and SystemVerilog files. + +Release binaries can be downloaded from [here](https://github.com/chipsalliance/verible/releases) +and placed in a directory on PATH. + +See https://github.com/chipsalliance/verible/tree/master/verilog/tools/ls/README.md for options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.verible.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "verible-verilog-ls" } + ``` + - `filetypes` : + ```lua + { "systemverilog", "verilog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## veridian + +https://github.com/vivekmalneedi/veridian + +A SystemVerilog LanguageServer. + +Download the latest release for your OS from the releases page + +# install with slang feature, if C++17 compiler is available +cargo install --git https://github.com/vivekmalneedi/veridian.git --all-features +# install if C++17 compiler is not available +cargo install --git https://github.com/vivekmalneedi/veridian.git + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.veridian.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "veridian" } + ``` + - `filetypes` : + ```lua + { "systemverilog", "verilog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## veryl_ls + +https://github.com/veryl-lang/veryl + +Language server for Veryl + +`veryl-ls` can be installed via `cargo`: + ```sh + cargo install veryl-ls + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.veryl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "veryl-ls" } + ``` + - `filetypes` : + ```lua + { "veryl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## vhdl_ls + +Install vhdl_ls from https://github.com/VHDL-LS/rust_hdl and add it to path + +Configuration + +The language server needs to know your library mapping to perform full analysis of the code. For this it uses a configuration file in the TOML format named vhdl_ls.toml. + +vhdl_ls will load configuration files in the following order of priority (first to last): + + A file named .vhdl_ls.toml in the user home folder. + A file name from the VHDL_LS_CONFIG environment variable. + A file named vhdl_ls.toml in the workspace root. + +Settings in a later files overwrites those from previously loaded files. + +Example vhdl_ls.toml +``` +# File names are either absolute or relative to the parent folder of the vhdl_ls.toml file +[libraries] +lib2.files = [ + 'pkg2.vhd', +] +lib1.files = [ + 'pkg1.vhd', + 'tb_ent.vhd' +] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vhdl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vhdl_ls" } + ``` + - `filetypes` : + ```lua + { "vhd", "vhdl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vimls + +https://github.com/iamcco/vim-language-server + +You can install vim-language-server via npm: +```sh +npm install -g vim-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vimls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vim-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "vim" } + ``` + - `init_options` : + ```lua + { + diagnostic = { + enable = true + }, + indexes = { + count = 3, + gap = 100, + projectRootPatterns = { "runtime", "nvim", ".git", "autoload", "plugin" }, + runtimepath = true + }, + isNeovim = true, + iskeyword = "@,48-57,_,192-255,-#", + runtimepath = "", + suggest = { + fromRuntimepath = true, + fromVimruntime = true + }, + vimruntime = "" + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## visualforce_ls + +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Visualforce. + +For manual installation, download the .vsix archive file from the +[forcedotcom/salesforcedx-vscode](https://github.com/forcedotcom/salesforcedx-vscode) +GitHub releases. Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.visualforce_ls.setup { + cmd = { + 'node', + '/path/to/unpacked/archive/extension/node_modules/@salesforce/salesforcedx-visualforce-language-server/out/src/visualforceServer.js', + '--stdio' + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.visualforce_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "visualforce" } + ``` + - `init_options` : + ```lua + { + embeddedLanguages = { + css = true, + javascript = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## vls + +https://github.com/vlang/vls + +V language server. + +`v-language-server` can be installed by following the instructions [here](https://github.com/vlang/vls#installation). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "v", "ls" } + ``` + - `filetypes` : + ```lua + { "v", "vlang" } + ``` + - `root_dir` : + ```lua + root_pattern("v.mod", ".git") + ``` + + +## volar + +https://github.com/johnsoncodehk/volar/tree/20d713b/packages/vue-language-server + +Volar language server for Vue + +Volar can be installed via npm: + +```sh +npm install -g @vue/language-server +``` + +Volar by default supports Vue 3 projects. Vue 2 projects need +[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage). + +**TypeScript support** +As of release 2.0.0, Volar no longer wraps around ts_ls. For typescript +support, `ts_ls` needs to be configured with the `@vue/typescript-plugin` +plugin. + +**Take Over Mode** + +Volar (prior to 2.0.0), can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471). + +To enable Take Over Mode, override the default filetypes in `setup{}` as follows: + +```lua +require'lspconfig'.volar.setup{ + filetypes = {'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json'} +} +``` + +**Overriding the default TypeScript Server used by Volar** + +The default config looks for TS in the local `node_modules`. This can lead to issues +e.g. when working on a [monorepo](https://monorepo.tools/). The alternatives are: + +- use a global TypeScript Server installation + +```lua +require'lspconfig'.volar.setup{ + init_options = { + typescript = { + tsdk = '/path/to/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- tsdk = '/usr/local/lib/node_modules/typescript/lib' + } + } +} +``` + +- use a local server and fall back to a global TypeScript Server installation + +```lua +local util = require 'lspconfig.util' +local function get_typescript_server_path(root_dir) + + local global_ts = '/home/[yourusernamehere]/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- local global_ts = '/usr/local/lib/node_modules/typescript/lib' + local found_ts = '' + local function check_dir(path) + found_ts = util.path.join(path, 'node_modules', 'typescript', 'lib') + if util.path.exists(found_ts) then + return path + end + end + if util.search_ancestors(root_dir, check_dir) then + return found_ts + else + return global_ts + end +end + +require'lspconfig'.volar.setup{ + on_new_config = function(new_config, new_root_dir) + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.volar.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vue-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "vue" } + ``` + - `init_options` : + ```lua + { + typescript = { + tsdk = "" + } + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## vtsls + +https://github.com/yioneko/vtsls + +`vtsls` can be installed with npm: +```sh +npm install -g @vtsls/language-server +``` + +To configure a TypeScript project, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) +or [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to +the root of your project. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vtsls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vtsls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vuels + +https://github.com/vuejs/vetur/tree/master/server + +Vue language server(vls) +`vue-language-server` can be installed via `npm`: +```sh +npm install -g vls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vuels.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vls" } + ``` + - `filetypes` : + ```lua + { "vue" } + ``` + - `init_options` : + ```lua + { + config = { + css = {}, + emmet = {}, + html = { + suggest = {} + }, + javascript = { + format = {} + }, + stylusSupremacy = {}, + typescript = { + format = {} + }, + vetur = { + completion = { + autoImport = false, + tagCasing = "kebab", + useScaffoldSnippets = false + }, + format = { + defaultFormatter = { + js = "none", + ts = "none" + }, + defaultFormatterOptions = {}, + scriptInitialIndent = false, + styleInitialIndent = false + }, + useWorkspaceDependencies = false, + validation = { + script = true, + style = true, + template = true + } + } + } + } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", "vue.config.js") + ``` + + +## wgsl_analyzer + +https://github.com/wgsl-analyzer/wgsl-analyzer + +`wgsl_analyzer` can be installed via `cargo`: +```sh +cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl_analyzer +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.wgsl_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "wgsl_analyzer" } + ``` + - `filetypes` : + ```lua + { "wgsl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `settings` : + ```lua + {} + ``` + + +## yamlls + +https://github.com/redhat-developer/yaml-language-server + +`yaml-language-server` can be installed via `yarn`: +```sh +yarn global add yaml-language-server +``` + +To use a schema for validation, there are two options: + +1. Add a modeline to the file. A modeline is a comment of the form: + +``` +# yaml-language-server: $schema= +``` + +where the relative filepath is the path relative to the open yaml file, and the absolute filepath +is the filepath relative to the filesystem root ('/' on unix systems) + +2. Associated a schema url, relative , or absolute (to root of project, not to filesystem root) path to +the a glob pattern relative to the detected project root. Check `:LspInfo` to determine the resolved project +root. + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*", + ["../path/relative/to/file.yml"] = "/.github/workflows/*", + ["/path/from/root/of/project"] = "/.github/workflows/*", + }, + }, + } +} +``` + +Currently, kubernetes is special-cased in yammls, see the following upstream issues: +* [#211](https://github.com/redhat-developer/yaml-language-server/issues/211). +* [#307](https://github.com/redhat-developer/yaml-language-server/issues/307). + +To override a schema to use a specific k8s schema version (for example, to use 1.18): + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml", + ... -- other schemas + }, + }, + } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yamlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yaml-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml", "yaml.docker-compose", "yaml.gitlab" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + redhat = { + telemetry = { + enabled = false + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## yang_lsp + +https://github.com/TypeFox/yang-lsp + +A Language Server for the YANG data modeling language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yang_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yang-language-server" } + ``` + - `filetypes` : + ```lua + { "yang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## yls + +https://pypi.org/project/yls-yara/ + +An YLS plugin adding YARA linting capabilities. + +This plugin runs yara.compile on every save, parses the errors, and returns list of diagnostic messages. + +Language Server: https://github.com/avast/yls + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yls", "-vv" } + ``` + - `filetypes` : + ```lua + { "yar", "yara" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ziggy + +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for the Ziggy data serialization format + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ziggy.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ziggy", "lsp" } + ``` + - `filetypes` : + ```lua + { "ziggy" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ziggy_schema + +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for schema files of the Ziggy data serialization format + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ziggy_schema.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ziggy", "lsp", "--schema" } + ``` + - `filetypes` : + ```lua + { "ziggy_schema" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## zk + +https://github.com/mickael-menu/zk + +A plain text note-taking assistant + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.zk.setup{} +``` +**Commands:** +- ZkIndex: ZkIndex +- ZkList: ZkList +- ZkNew: ZkNew + +**Default values:** + - `cmd` : + ```lua + { "zk", "lsp" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + root_pattern(".zk") + ``` + + +## zls + +https://github.com/zigtools/zls + +Zig LSP implementation + Zig Language Server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.zls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "zls" } + ``` + - `filetypes` : + ```lua + { "zig", "zir" } + ``` + - `root_dir` : + ```lua + util.root_pattern("zls.json", "build.zig", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + + +vim:ft=markdown diff --git a/pack/ant/start/nvim-lspconfig/doc/server_configurations.txt b/pack/ant/start/nvim-lspconfig/doc/server_configurations.txt new file mode 100644 index 0000000..fa74977 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/doc/server_configurations.txt @@ -0,0 +1,14126 @@ +# Configurations + + +LSP configs provided by nvim-lspconfig are listed below. This documentation is +autogenerated from the Lua files. You can view this file in Nvim by running +`:help lspconfig-all`. + +- [agda_ls](#agda_ls) +- [aiken](#aiken) +- [als](#als) +- [anakin_language_server](#anakin_language_server) +- [angularls](#angularls) +- [ansiblels](#ansiblels) +- [antlersls](#antlersls) +- [apex_ls](#apex_ls) +- [arduino_language_server](#arduino_language_server) +- [asm_lsp](#asm_lsp) +- [ast_grep](#ast_grep) +- [astro](#astro) +- [autotools_ls](#autotools_ls) +- [awk_ls](#awk_ls) +- [azure_pipelines_ls](#azure_pipelines_ls) +- [bacon_ls](#bacon_ls) +- [ballerina](#ballerina) +- [basedpyright](#basedpyright) +- [bashls](#bashls) +- [bazelrc_lsp](#bazelrc_lsp) +- [beancount](#beancount) +- [bicep](#bicep) +- [biome](#biome) +- [bitbake_language_server](#bitbake_language_server) +- [bitbake_ls](#bitbake_ls) +- [blueprint_ls](#blueprint_ls) +- [bqnlsp](#bqnlsp) +- [bright_script](#bright_script) +- [bsl_ls](#bsl_ls) +- [buck2](#buck2) +- [buddy_ls](#buddy_ls) +- [bufls](#bufls) +- [bzl](#bzl) +- [cadence](#cadence) +- [cairo_ls](#cairo_ls) +- [ccls](#ccls) +- [cds_lsp](#cds_lsp) +- [circom-lsp](#circom-lsp) +- [clangd](#clangd) +- [clarity_lsp](#clarity_lsp) +- [clojure_lsp](#clojure_lsp) +- [cmake](#cmake) +- [cobol_ls](#cobol_ls) +- [codeqlls](#codeqlls) +- [coffeesense](#coffeesense) +- [contextive](#contextive) +- [coq_lsp](#coq_lsp) +- [crystalline](#crystalline) +- [csharp_ls](#csharp_ls) +- [css_variables](#css_variables) +- [cssls](#cssls) +- [cssmodules_ls](#cssmodules_ls) +- [cucumber_language_server](#cucumber_language_server) +- [custom_elements_ls](#custom_elements_ls) +- [cypher_ls](#cypher_ls) +- [dafny](#dafny) +- [dagger](#dagger) +- [dartls](#dartls) +- [dcmls](#dcmls) +- [debputy](#debputy) +- [delphi_ls](#delphi_ls) +- [denols](#denols) +- [dhall_lsp_server](#dhall_lsp_server) +- [diagnosticls](#diagnosticls) +- [digestif](#digestif) +- [djlsp](#djlsp) +- [docker_compose_language_service](#docker_compose_language_service) +- [dockerls](#dockerls) +- [dolmenls](#dolmenls) +- [dotls](#dotls) +- [dprint](#dprint) +- [drools_lsp](#drools_lsp) +- [ds_pinyin_lsp](#ds_pinyin_lsp) +- [earthlyls](#earthlyls) +- [ecsact](#ecsact) +- [efm](#efm) +- [elixirls](#elixirls) +- [elmls](#elmls) +- [elp](#elp) +- [ember](#ember) +- [emmet_language_server](#emmet_language_server) +- [emmet_ls](#emmet_ls) +- [erg_language_server](#erg_language_server) +- [erlangls](#erlangls) +- [esbonio](#esbonio) +- [eslint](#eslint) +- [facility_language_server](#facility_language_server) +- [fennel_language_server](#fennel_language_server) +- [fennel_ls](#fennel_ls) +- [fish_lsp](#fish_lsp) +- [flow](#flow) +- [flux_lsp](#flux_lsp) +- [foam_ls](#foam_ls) +- [fortls](#fortls) +- [fsautocomplete](#fsautocomplete) +- [fsharp_language_server](#fsharp_language_server) +- [fstar](#fstar) +- [futhark_lsp](#futhark_lsp) +- [gdscript](#gdscript) +- [gdshader_lsp](#gdshader_lsp) +- [ghcide](#ghcide) +- [ghdl_ls](#ghdl_ls) +- [ginko_ls](#ginko_ls) +- [gitlab_ci_ls](#gitlab_ci_ls) +- [glasgow](#glasgow) +- [gleam](#gleam) +- [glint](#glint) +- [glsl_analyzer](#glsl_analyzer) +- [glslls](#glslls) +- [golangci_lint_ls](#golangci_lint_ls) +- [gopls](#gopls) +- [gradle_ls](#gradle_ls) +- [grammarly](#grammarly) +- [graphql](#graphql) +- [groovyls](#groovyls) +- [guile_ls](#guile_ls) +- [harper_ls](#harper_ls) +- [haxe_language_server](#haxe_language_server) +- [hdl_checker](#hdl_checker) +- [helm_ls](#helm_ls) +- [hhvm](#hhvm) +- [hie](#hie) +- [hlasm](#hlasm) +- [hls](#hls) +- [hoon_ls](#hoon_ls) +- [html](#html) +- [htmx](#htmx) +- [hydra_lsp](#hydra_lsp) +- [hyprls](#hyprls) +- [idris2_lsp](#idris2_lsp) +- [intelephense](#intelephense) +- [janet_lsp](#janet_lsp) +- [java_language_server](#java_language_server) +- [jdtls](#jdtls) +- [jedi_language_server](#jedi_language_server) +- [jinja_lsp](#jinja_lsp) +- [jqls](#jqls) +- [jsonls](#jsonls) +- [jsonnet_ls](#jsonnet_ls) +- [julials](#julials) +- [kcl](#kcl) +- [koka](#koka) +- [kotlin_language_server](#kotlin_language_server) +- [lean3ls](#lean3ls) +- [leanls](#leanls) +- [lelwel_ls](#lelwel_ls) +- [lemminx](#lemminx) +- [lexical](#lexical) +- [ltex](#ltex) +- [lua_ls](#lua_ls) +- [luau_lsp](#luau_lsp) +- [lwc_ls](#lwc_ls) +- [m68k](#m68k) +- [markdown_oxide](#markdown_oxide) +- [marksman](#marksman) +- [matlab_ls](#matlab_ls) +- [mdx_analyzer](#mdx_analyzer) +- [mesonlsp](#mesonlsp) +- [metals](#metals) +- [millet](#millet) +- [mint](#mint) +- [mlir_lsp_server](#mlir_lsp_server) +- [mlir_pdll_lsp_server](#mlir_pdll_lsp_server) +- [mm0_ls](#mm0_ls) +- [mojo](#mojo) +- [motoko_lsp](#motoko_lsp) +- [move_analyzer](#move_analyzer) +- [msbuild_project_tools_server](#msbuild_project_tools_server) +- [mutt_ls](#mutt_ls) +- [nelua_lsp](#nelua_lsp) +- [neocmake](#neocmake) +- [nextls](#nextls) +- [nginx_language_server](#nginx_language_server) +- [nickel_ls](#nickel_ls) +- [nil_ls](#nil_ls) +- [nim_langserver](#nim_langserver) +- [nimls](#nimls) +- [nixd](#nixd) +- [nomad_lsp](#nomad_lsp) +- [ntt](#ntt) +- [nushell](#nushell) +- [nxls](#nxls) +- [ocamlls](#ocamlls) +- [ocamllsp](#ocamllsp) +- [ols](#ols) +- [omnisharp](#omnisharp) +- [opencl_ls](#opencl_ls) +- [openedge_ls](#openedge_ls) +- [openscad_ls](#openscad_ls) +- [openscad_lsp](#openscad_lsp) +- [pact_ls](#pact_ls) +- [pasls](#pasls) +- [pbls](#pbls) +- [perlls](#perlls) +- [perlnavigator](#perlnavigator) +- [perlpls](#perlpls) +- [pest_ls](#pest_ls) +- [phan](#phan) +- [phpactor](#phpactor) +- [pico8_ls](#pico8_ls) +- [pkgbuild_language_server](#pkgbuild_language_server) +- [please](#please) +- [postgres_lsp](#postgres_lsp) +- [powershell_es](#powershell_es) +- [prismals](#prismals) +- [prolog_ls](#prolog_ls) +- [prosemd_lsp](#prosemd_lsp) +- [protols](#protols) +- [psalm](#psalm) +- [pug](#pug) +- [puppet](#puppet) +- [purescriptls](#purescriptls) +- [pylsp](#pylsp) +- [pylyzer](#pylyzer) +- [pyre](#pyre) +- [pyright](#pyright) +- [qml_lsp](#qml_lsp) +- [qmlls](#qmlls) +- [quick_lint_js](#quick_lint_js) +- [r_language_server](#r_language_server) +- [racket_langserver](#racket_langserver) +- [raku_navigator](#raku_navigator) +- [reason_ls](#reason_ls) +- [regal](#regal) +- [regols](#regols) +- [relay_lsp](#relay_lsp) +- [remark_ls](#remark_ls) +- [rescriptls](#rescriptls) +- [rls](#rls) +- [rnix](#rnix) +- [robotframework_ls](#robotframework_ls) +- [roc_ls](#roc_ls) +- [rome](#rome) +- [rubocop](#rubocop) +- [ruby_lsp](#ruby_lsp) +- [ruff](#ruff) +- [ruff_lsp](#ruff_lsp) +- [rune_languageserver](#rune_languageserver) +- [rust_analyzer](#rust_analyzer) +- [salt_ls](#salt_ls) +- [scheme_langserver](#scheme_langserver) +- [scry](#scry) +- [serve_d](#serve_d) +- [shopify_theme_ls](#shopify_theme_ls) +- [sixtyfps](#sixtyfps) +- [slangd](#slangd) +- [slint_lsp](#slint_lsp) +- [smarty_ls](#smarty_ls) +- [smithy_ls](#smithy_ls) +- [snakeskin_ls](#snakeskin_ls) +- [snyk_ls](#snyk_ls) +- [solang](#solang) +- [solargraph](#solargraph) +- [solc](#solc) +- [solidity](#solidity) +- [solidity_ls](#solidity_ls) +- [solidity_ls_nomicfoundation](#solidity_ls_nomicfoundation) +- [somesass_ls](#somesass_ls) +- [sorbet](#sorbet) +- [sourcekit](#sourcekit) +- [sourcery](#sourcery) +- [spectral](#spectral) +- [spyglassmc_language_server](#spyglassmc_language_server) +- [sqlls](#sqlls) +- [sqls](#sqls) +- [standardrb](#standardrb) +- [starlark_rust](#starlark_rust) +- [starpls](#starpls) +- [statix](#statix) +- [steep](#steep) +- [stimulus_ls](#stimulus_ls) +- [stylelint_lsp](#stylelint_lsp) +- [superhtml](#superhtml) +- [svelte](#svelte) +- [svlangserver](#svlangserver) +- [svls](#svls) +- [swift_mesonls](#swift_mesonls) +- [syntax_tree](#syntax_tree) +- [tabby_ml](#tabby_ml) +- [tailwindcss](#tailwindcss) +- [taplo](#taplo) +- [tblgen_lsp_server](#tblgen_lsp_server) +- [teal_ls](#teal_ls) +- [templ](#templ) +- [terraform_lsp](#terraform_lsp) +- [terraformls](#terraformls) +- [texlab](#texlab) +- [textlsp](#textlsp) +- [tflint](#tflint) +- [theme_check](#theme_check) +- [thriftls](#thriftls) +- [tilt_ls](#tilt_ls) +- [tinymist](#tinymist) +- [ts_ls](#ts_ls) +- [tsp_server](#tsp_server) +- [ttags](#ttags) +- [turtle_ls](#turtle_ls) +- [tvm_ffi_navigator](#tvm_ffi_navigator) +- [twiggy_language_server](#twiggy_language_server) +- [typeprof](#typeprof) +- [typos_lsp](#typos_lsp) +- [typst_lsp](#typst_lsp) +- [uiua](#uiua) +- [unison](#unison) +- [unocss](#unocss) +- [uvls](#uvls) +- [v_analyzer](#v_analyzer) +- [vacuum](#vacuum) +- [vala_ls](#vala_ls) +- [vale_ls](#vale_ls) +- [vdmj](#vdmj) +- [verible](#verible) +- [veridian](#veridian) +- [veryl_ls](#veryl_ls) +- [vhdl_ls](#vhdl_ls) +- [vimls](#vimls) +- [visualforce_ls](#visualforce_ls) +- [vls](#vls) +- [volar](#volar) +- [vtsls](#vtsls) +- [vuels](#vuels) +- [wgsl_analyzer](#wgsl_analyzer) +- [yamlls](#yamlls) +- [yang_lsp](#yang_lsp) +- [yls](#yls) +- [ziggy](#ziggy) +- [ziggy_schema](#ziggy_schema) +- [zk](#zk) +- [zls](#zls) + +## agda_ls + +https://github.com/agda/agda-language-server + +Language Server for Agda. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.agda_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "als" } + ``` + - `filetypes` : + ```lua + { "agda" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## aiken + +https://github.com/aiken-lang/aiken + +A language server for Aiken Programming Language. +[Installation](https://aiken-lang.org/installation-instructions) + +It can be i + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.aiken.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "aiken", "lsp" } + ``` + - `filetypes` : + ```lua + { "aiken" } + ``` + - `root_dir` : + ```lua + root_pattern("aiken.toml", ".git") + ``` + + +## als + +https://github.com/AdaCore/ada_language_server + +Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install). + +Can be configured by passing a "settings" object to `als.setup{}`: + +```lua +require('lspconfig').als.setup{ + settings = { + ada = { + projectFile = "project.gpr"; + scenarioVariables = { ... }; + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.als.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ada_language_server" } + ``` + - `deprecate` : + ```lua + { + to = "github.com/TamaMcGlinn/nvim-lspconfig-ada", + version = "0.2.0" + } + ``` + - `filetypes` : + ```lua + { "ada" } + ``` + - `root_dir` : + ```lua + util.root_pattern("Makefile", ".git", "*.gpr", "*.adc") + ``` + + +## anakin_language_server + +https://pypi.org/project/anakin-language-server/ + +`anakin-language-server` is yet another Jedi Python language server. + +Available options: + +* Initialization: https://github.com/muffinmad/anakin-language-server#initialization-option +* Configuration: https://github.com/muffinmad/anakin-language-server#configuration-options + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.anakin_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "anakinls" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + anakinls = { + pyflakes_errors = { "ImportStarNotPermitted", "UndefinedExport", "UndefinedLocal", "UndefinedName", "DuplicateArgument", "MultiValueRepeatedKeyLiteral", "MultiValueRepeatedKeyVariable", "FutureFeatureNotDefined", "LateFutureImport", "ReturnOutsideFunction", "YieldOutsideFunction", "ContinueOutsideLoop", "BreakOutsideLoop", "TwoStarredExpressions", "TooManyExpressionsInStarredAssignment", "ForwardAnnotationSyntaxError", "RaiseNotImplemented", "StringDotFormatExtraPositionalArguments", "StringDotFormatExtraNamedArguments", "StringDotFormatMissingArgument", "StringDotFormatMixingAutomatic", "StringDotFormatInvalidFormat", "PercentFormatInvalidFormat", "PercentFormatMixedPositionalAndNamed", "PercentFormatUnsupportedFormat", "PercentFormatPositionalCountMismatch", "PercentFormatExtraNamedArguments", "PercentFormatMissingArgument", "PercentFormatExpectedMapping", "PercentFormatExpectedSequence", "PercentFormatStarRequiresSequence" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## angularls + +https://github.com/angular/vscode-ng-language-service + +`angular-language-server` can be installed via npm `npm install -g @angular/language-server`. + +Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup. + +```lua +local project_library_path = "/path/to/project/lib" +local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.angularls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ngserver", "--stdio", "--tsProbeLocations", "", "--ngProbeLocations", "" } + ``` + - `filetypes` : + ```lua + { "typescript", "html", "typescriptreact", "typescript.tsx", "htmlangular" } + ``` + - `root_dir` : + ```lua + root_pattern("angular.json") + ``` + + +## ansiblels + +https://github.com/ansible/vscode-ansible + +Language server for the ansible configuration management tool. + +`ansible-language-server` can be installed via `npm`: + +```sh +npm install -g @ansible/ansible-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ansiblels.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ansible-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml.ansible" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + ansible = { + ansible = { + path = "ansible" + }, + executionEnvironment = { + enabled = false + }, + python = { + interpreterPath = "python" + }, + validation = { + enabled = true, + lint = { + enabled = true, + path = "ansible-lint" + } + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## antlersls + +https://www.npmjs.com/package/antlers-language-server + +`antlersls` can be installed via `npm`: +```sh +npm install -g antlers-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.antlersls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "antlersls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "antlers" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## apex_ls + +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Apex. + +For manual installation, download the JAR file from the [VSCode +extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex). + +```lua +require'lspconfig'.apex_ls.setup { + apex_jar_path = '/path/to/apex-jorje-lsp.jar', + apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors + apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.apex_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "apexcode" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## arduino_language_server + +https://github.com/arduino/arduino-language-server + +Language server for Arduino + +The `arduino-language-server` can be installed by running: + +``` +go install github.com/arduino/arduino-language-server@latest +``` + +The `arduino-cli` tool must also be installed. Follow [these +installation instructions](https://arduino.github.io/arduino-cli/latest/installation/) for +your platform. + +After installing `arduino-cli`, follow [these +instructions](https://arduino.github.io/arduino-cli/latest/getting-started/#create-a-configuration-file) +for generating a configuration file if you haven't done so already, and make +sure you [install any relevant platforms +libraries](https://arduino.github.io/arduino-cli/latest/getting-started/#install-the-core-for-your-board). + +The language server also requires `clangd` to be installed. Follow [these +installation instructions](https://clangd.llvm.org/installation) for your +platform. + +If you don't have a sketch yet create one. + +```sh +$ arduino-cli sketch new test +$ cd test +``` + +You will need a `sketch.yaml` file in order for the language server to understand your project. It will also save you passing options to `arduino-cli` each time you compile or upload a file. You can generate the file by using the following commands. + + +First gather some information about your board. Make sure your board is connected and run the following: + +```sh +$ arduino-cli board list +Port Protocol Type Board Name FQBN Core +/dev/ttyACM0 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr +``` + +Then generate the file: + +```sh +arduino-cli board attach -p /dev/ttyACM0 -b arduino:avr:uno test.ino +``` + +The resulting file should look like this: + +```yaml +default_fqbn: arduino:avr:uno +default_port: /dev/ttyACM0 +``` + +Your folder structure should look like this: + +``` +. +├── test.ino +└── sketch.yaml +``` + +For further instructions about configuration options, run `arduino-language-server --help`. + +Note that an upstream bug makes keywords in some cases become undefined by the language server. +Ref: https://github.com/arduino/arduino-ide/issues/159 + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.arduino_language_server.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + textDocument = { + semanticTokens = vim.NIL + }, + workspace = { + semanticTokens = vim.NIL + } + } + ``` + - `cmd` : + ```lua + { "arduino-language-server" } + ``` + - `filetypes` : + ```lua + { "arduino" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## asm_lsp + +https://github.com/bergercookie/asm-lsp + +Language Server for GAS/GO Assembly + +`asm-lsp` can be installed via cargo: +cargo install asm-lsp + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.asm_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "asm-lsp" } + ``` + - `filetypes` : + ```lua + { "asm", "vmasm" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ast_grep + +https://ast-grep.github.io/ + +ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. +ast-grep LSP only works in projects that have `sgconfig.y[a]ml` in their root directories. +```sh +npm install [-g] @ast-grep/cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ast_grep.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ast-grep", "lsp" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "rust", "go", "java", "python", "javascript", "typescript", "html", "css", "kotlin", "dart", "lua" } + ``` + - `root_dir` : + ```lua + root_pattern('sgconfig.yaml', 'sgconfig.yml') + ``` + + +## astro + +https://github.com/withastro/language-tools/tree/main/packages/language-server + +`astro-ls` can be installed via `npm`: +```sh +npm install -g @astrojs/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.astro.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "astro-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "astro" } + ``` + - `init_options` : + ```lua + { + typescript = {} + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git") + ``` + + +## autotools_ls + +https://github.com/Freed-Wu/autotools-language-server + +`autotools-language-server` can be installed via `pip`: +```sh +pip install autotools-language-server +``` + +Language server for autoconf, automake and make using tree sitter in python. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.autotools_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "autotools-language-server" } + ``` + - `filetypes` : + ```lua + { "config", "automake", "make" } + ``` + - `root_dir` : + ```lua + { "configure.ac", "Makefile", "Makefile.am", "*.mk" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## awk_ls + +https://github.com/Beaglefoot/awk-language-server/ + +`awk-language-server` can be installed via `npm`: +```sh +npm install -g awk-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.awk_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "awk-language-server" } + ``` + - `filetypes` : + ```lua + { "awk" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## azure_pipelines_ls + +https://github.com/microsoft/azure-pipelines-language-server + +An Azure Pipelines language server + +`azure-pipelines-ls` can be installed via `npm`: + +```sh +npm install -g azure-pipelines-language-server +``` + +By default `azure-pipelines-ls` will only work in files named `azure-pipelines.yml`, this can be changed by providing additional settings like so: +```lua +require("lspconfig").azure_pipelines_ls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + schemas = { + ["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = { + "/azure-pipeline*.y*l", + "/*.azure*", + "Azure-Pipelines/**/*.y*l", + "Pipelines/*.y*l", + }, + }, + }, + }, +} +``` +The Azure Pipelines LSP is a fork of `yaml-language-server` and as such the same settings can be passed to it as `yaml-language-server`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.azure_pipelines_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "azure-pipelines-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bacon_ls + +https://github.com/crisidev/bacon-ls + +A Language Server Protocol wrapper for [bacon](https://dystroy.org/bacon/). +It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust +workspaces using the Bacon export locations file. + +It requires `bacon` and `bacon-ls` to be installed on the system using +[mason.nvim](https://github.com/williamboman/mason.nvim) or manually:util + +```sh +$ cargo install --locked bacon bacon-ls +``` + +Settings can be changed using the `settings` dictionary:util + +```lua +settings = { + -- Bacon export filename, default .bacon-locations + locationsFile = ".bacon-locations", + -- Maximum time in seconds the LSP server waits for Bacon to update the + -- export file before loading the new diagnostics + waitTimeSeconds = 10 +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bacon_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bacon-ls" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ballerina + +Ballerina language server + +The Ballerina language's CLI tool comes with its own language server implementation. +The `bal` command line tool must be installed and available in your system's PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ballerina.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bal", "start-language-server" } + ``` + - `filetypes` : + ```lua + { "ballerina" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## basedpyright + +https://detachhead.github.io/basedpyright + +`basedpyright`, a static type checker and language server for python + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.basedpyright.setup{} +``` +**Commands:** +- PyrightOrganizeImports: Organize Imports +- PyrightSetPythonPath: Reconfigure basedpyright with the provided python path + +**Default values:** + - `cmd` : + ```lua + { "basedpyright-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + basedpyright = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + useLibraryCodeForTypes = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bashls + +https://github.com/bash-lsp/bash-language-server + +`bash-language-server` can be installed via `npm`: +```sh +npm i -g bash-language-server +``` + +Language server for bash, written using tree sitter in typescript. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bashls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bash-language-server", "start" } + ``` + - `filetypes` : + ```lua + { "sh" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + bashIde = { + globPattern = "*@(.sh|.inc|.bash|.command)" + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bazelrc_lsp + +https://github.com/salesforce-misc/bazelrc-lsp + +`bazelrc-lsp` is a LSP for `.bazelrc` configuration files. + +The `.bazelrc` file type is not detected automatically, you can register it manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['.*.bazelrc'] = 'bazelrc', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bazelrc_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bazelrc-lsp" } + ``` + - `filetypes` : + ```lua + { "bazelrc" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## beancount + +https://github.com/polarmutex/beancount-language-server#installation + +See https://github.com/polarmutex/beancount-language-server#configuration for configuration options + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.beancount.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "beancount-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "beancount", "bean" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bicep + +https://github.com/azure/bicep +Bicep language server + +Bicep language server can be installed by downloading and extracting a release of bicep-langserver.zip from [Bicep GitHub releases](https://github.com/Azure/bicep/releases). + +Bicep language server requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +Neovim does not have built-in support for the bicep filetype which is required for lspconfig to automatically launch the language server. + +Filetype detection can be added via an autocmd: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.bicep set filetype=bicep ]] +``` + +**By default, bicep language server does not have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +local bicep_lsp_bin = "/path/to/bicep-langserver/Bicep.LangServer.dll" +require'lspconfig'.bicep.setup{ + cmd = { "dotnet", bicep_lsp_bin }; + ... +} +``` + +To download the latest release and place in /usr/local/bin/bicep-langserver: +```bash +(cd $(mktemp -d) \ + && curl -fLO https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip \ + && rm -rf /usr/local/bin/bicep-langserver \ + && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bicep.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "bicep" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## biome + +https://biomejs.dev + +Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome). + +```sh +npm install [-g] @biomejs/biome +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.biome.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "biome", "lsp-proxy" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "json", "jsonc", "typescript", "typescript.tsx", "typescriptreact", "astro", "svelte", "vue", "css" } + ``` + - `root_dir` : + ```lua + root_pattern('biome.json', 'biome.jsonc') + ``` + - `single_file_support` : + ```lua + false + ``` + + +## bitbake_language_server + +🛠️ bitbake language server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bitbake_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bitbake-language-server" } + ``` + - `filetypes` : + ```lua + { "bitbake" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## bitbake_ls + +https://github.com/yoctoproject/vscode-bitbake/tree/staging/server +https://www.npmjs.com/package/language-server-bitbake + +Official Bitbake Language Server for the Yocto Project. + +Can be installed from npm or github. + +``` +npm install -g language-server-bitbake +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bitbake_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "language-server-bitbake", "--stdio" } + ``` + - `filetypes` : + ```lua + { "bitbake" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + false + ``` + + +## blueprint_ls + +https://gitlab.gnome.org/jwestman/blueprint-compiler + +`blueprint-compiler` can be installed via your system package manager. + +Language server for the blueprint markup language, written in python and part +of the blueprint-compiler. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.blueprint_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "blueprint-compiler", "lsp" } + ``` + - `cmd_env` : + ```lua + { + GLOB_PATTERN = "*@(.blp)" + } + ``` + - `filetypes` : + ```lua + { "blueprint" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bqnlsp + +https://git.sr.ht/~detegr/bqnlsp + + +`bqnlsp`, a language server for BQN. + +The binary depends on the shared library of [CBQN](https://github.com/dzaima/CBQN) `libcbqn.so`. +If CBQN is installed system-wide (using `sudo make install` in its source directory) and `bqnlsp` errors that it can't find the shared library, update the linker cache by executing `sudo ldconfig`. +If CBQN has been installed in a non-standard directory or can't be installed globally pass `libcbqnPath = '/path/to/CBQN'` to the setup function. +This will set the environment variables `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (macOS) to the provided path. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bqnlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bqnlsp" } + ``` + - `filetypes` : + ```lua + { "bqn" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bright_script + +https://github.com/RokuCommunity/brighterscript + +`brightscript` can be installed via `npm`: +```sh +npm install -g brighterscript +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bright_script.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bsc", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "brs" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bsl_ls + + https://github.com/1c-syntax/bsl-language-server + + Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bsl_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "bsl", "os" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## buck2 + +https://github.com/facebook/buck2 + +Build system, successor to Buck + +To better detect Buck2 project files, the following can be added: + +``` +vim.cmd [[ autocmd BufRead,BufNewFile *.bxl,BUCK,TARGETS set filetype=bzl ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.buck2.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "buck2", "lsp" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + root_pattern(".buckconfig") + ``` + + +## buddy_ls + +https://github.com/buddy-compiler/buddy-mlir#buddy-lsp-server +The Language Server for the buddy-mlir, a drop-in replacement for mlir-lsp-server, +supporting new dialects defined in buddy-mlir. +`buddy-lsp-server` can be installed at the buddy-mlir repository (buddy-compiler/buddy-mlir) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.buddy_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "buddy-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mlir" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## bufls + +https://github.com/bufbuild/buf-language-server + +`buf-language-server` can be installed via `go install`: +```sh +go install github.com/bufbuild/buf-language-server/cmd/bufls@latest +``` + +bufls is a Protobuf language server compatible with Buf modules and workspaces + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bufls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bufls", "serve" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + root_pattern("buf.work.yaml", ".git") + ``` + + +## bzl + +https://bzl.io/ + +https://docs.stack.build/docs/cli/installation + +https://docs.stack.build/docs/vscode/starlark-language-server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.bzl.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "bzl", "lsp", "serve" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## cadence + +[Cadence Language Server](https://github.com/onflow/cadence-tools/tree/master/languageserver) +using the [flow-cli](https://developers.flow.com/tools/flow-cli). + +The `flow` command from flow-cli must be available. For install instructions see +[the docs](https://developers.flow.com/tools/flow-cli/install#install-the-flow-cli) or the +[Github page](https://github.com/onflow/flow-cli). + +By default the configuration is taken from the closest `flow.json` or the `flow.json` in the users home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cadence.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flow", "cadence", "language-server" } + ``` + - `filetypes` : + ```lua + { "cdc" } + ``` + - `init_options` : + ```lua + { + numberOfAccounts = "1" + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + util.root_pattern('flow.json') or vim.env.HOME + ``` + + +## cairo_ls + +[Cairo Language Server](https://github.com/starkware-libs/cairo/tree/main/crates/cairo-lang-language-server) + +First, install cairo following [this tutorial](https://medium.com/@elias.tazartes/ahead-of-the-curve-install-cairo-1-0-alpha-and-prepare-for-regenesis-85f4e3940e20) + +Then enable cairo language server in your lua configuration. +```lua +require'lspconfig'.cairo_ls.setup{} +``` + +*cairo-language-server is still under active development, some features might not work yet !* + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cairo_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cairo-language-server", "/C", "--node-ipc" } + ``` + - `filetypes` : + ```lua + { "cairo" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("Scarb.toml", "cairo_project.toml", ".git") + ``` + + +## ccls + +https://github.com/MaskRay/ccls/wiki + +ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified +as compile_commands.json or, for simpler projects, a .ccls. +For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). + +Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example: + +```lua +local lspconfig = require'lspconfig' +lspconfig.ccls.setup { + init_options = { + compilationDatabaseDirectory = "build"; + index = { + threads = 0; + }; + clang = { + excludeArgs = { "-frounding-math"} ; + }; + } +} + +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ccls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ccls" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "objc", "objcpp", "cuda" } + ``` + - `offset_encoding` : + ```lua + "utf-32" + ``` + - `root_dir` : + ```lua + root_pattern('compile_commands.json', '.ccls', '.git') + ``` + - `single_file_support` : + ```lua + false + ``` + + +## cds_lsp + + +https://cap.cloud.sap/docs/ + +`cds-lsp` can be installed via `npm`: + +```sh +npm i -g @sap/cds-lsp +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cds_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cds-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cds" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + cds = { + validate = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## circom-lsp + +[Circom Language Server](https://github.com/rubydusa/circom-lsp) + +`circom-lsp`, the language server for the Circom language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.circom-lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "circom-lsp" } + ``` + - `filetypes` : + ```lua + { "circom" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## clangd + +https://clangd.llvm.org/installation.html + +- **NOTE:** Clang >= 11 is recommended! See [#23](https://github.com/neovim/nvim-lsp/issues/23). +- If `compile_commands.json` lives in a build directory, you should + symlink it to the root of your source tree. + ``` + ln -s /path/to/myproject/build/compile_commands.json /path/to/myproject/ + ``` +- clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) + specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clangd.setup{} +``` +**Commands:** +- ClangdShowSymbolInfo: Show symbol info +- ClangdSwitchSourceHeader: Switch between source/header + +**Default values:** + - `capabilities` : + ```lua + default capabilities, with offsetEncoding utf-8 + ``` + - `cmd` : + ```lua + { "clangd" } + ``` + - `filetypes` : + ```lua + { "c", "cpp", "objc", "objcpp", "cuda", "proto" } + ``` + - `root_dir` : + ```lua + root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git' + ) + + ``` + - `single_file_support` : + ```lua + true + ``` + + +## clarity_lsp + +`clarity-lsp` is a language server for the Clarity language. Clarity is a decidable smart contract language that optimizes for predictability and security. Smart contracts allow developers to encode essential business logic on a blockchain. + +To learn how to configure the clarity language server, see the [clarity-lsp documentation](https://github.com/hirosystems/clarity-lsp). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clarity_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "clarity-lsp" } + ``` + - `filetypes` : + ```lua + { "clar", "clarity" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## clojure_lsp + +https://github.com/clojure-lsp/clojure-lsp + +Clojure Language Server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.clojure_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "clojure-lsp" } + ``` + - `filetypes` : + ```lua + { "clojure", "edn" } + ``` + - `root_dir` : + ```lua + root_pattern("project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", ".git", "bb.edn") + ``` + + +## cmake + +https://github.com/regen100/cmake-language-server + +CMake LSP Implementation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cmake.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cmake-language-server" } + ``` + - `filetypes` : + ```lua + { "cmake" } + ``` + - `init_options` : + ```lua + { + buildDirectory = "build" + } + ``` + - `root_dir` : + ```lua + root_pattern('CMakePresets.json', 'CTestConfig.cmake', '.git', 'build', 'cmake') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## cobol_ls + +Cobol language support + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cobol_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cobol-language-support" } + ``` + - `filetypes` : + ```lua + { "cobol" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## codeqlls + +Reference: +https://codeql.github.com/docs/codeql-cli/ + +Binaries: +https://github.com/github/codeql-cli-binaries + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.codeqlls.setup{} +``` + + +**Default values:** + - `before_init` : + ```lua + see source file + ``` + - `cmd` : + ```lua + { "codeql", "execute", "language-server", "--check-errors", "ON_CHANGE", "-q" } + ``` + - `filetypes` : + ```lua + { "ql" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + search_path = "list containing all search paths, eg: '~/codeql-home/codeql-repo'" + } + ``` + + +## coffeesense + +https://github.com/phil294/coffeesense + +CoffeeSense Language Server +`coffeesense-language-server` can be installed via `npm`: +```sh +npm install -g coffeesense-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.coffeesense.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "coffeesense-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "coffee" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## contextive + +https://github.com/dev-cycles/contextive + +Language Server for Contextive. + +Contextive allows you to define terms in a central file and provides auto-completion suggestions and hover panels for these terms wherever they're used. + +To install the language server, you need to download the appropriate [GitHub release asset](https://github.com/dev-cycles/contextive/releases/) for your operating system and architecture. + +After the download unzip the Contextive.LanguageServer binary and copy the file into a folder that is included in your system's PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.contextive.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "Contextive.LanguageServer" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## coq_lsp + +https://github.com/ejgallego/coq-lsp/ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.coq_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "coq-lsp" } + ``` + - `filetypes` : + ```lua + { "coq" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## crystalline + +https://github.com/elbywan/crystalline + +Crystal language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.crystalline.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "crystalline" } + ``` + - `filetypes` : + ```lua + { "crystal" } + ``` + - `root_dir` : + ```lua + root_pattern('shard.yml', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## csharp_ls + +https://github.com/razzmatazz/csharp-language-server + +Language Server for C#. + +csharp-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install csharp-ls is with `dotnet tool install --global csharp-ls`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.csharp_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "csharp-ls" } + ``` + - `filetypes` : + ```lua + { "cs" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## css_variables + +https://github.com/vunguyentuan/vscode-css-variables/tree/master/packages/css-variables-language-server + +CSS variables autocompletion and go-to-definition + +`css-variables-language-server` can be installed via `npm`: + +```sh +npm i -g css-variables-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.css_variables.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "css-variables-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "scss", "less" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, + }, + + ``` + + +## cssls + + +https://github.com/hrsh7th/vscode-langservers-extracted + +`css-languageserver` can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.cssls.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cssls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-css-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "scss", "less" } + ``` + - `init_options` : + ```lua + { + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + { + css = { + validate = true + }, + less = { + validate = true + }, + scss = { + validate = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## cssmodules_ls + +https://github.com/antonk52/cssmodules-language-server + +Language server for autocompletion and go-to-definition functionality for CSS modules. + +You can install cssmodules-language-server via npm: +```sh +npm install -g cssmodules-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cssmodules_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cssmodules-language-server" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "typescript", "typescriptreact" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json") + ``` + + +## cucumber_language_server + +https://cucumber.io +https://github.com/cucumber/common +https://www.npmjs.com/package/@cucumber/language-server + +Language server for Cucumber. + +`cucumber-language-server` can be installed via `npm`: +```sh +npm install -g @cucumber/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cucumber_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cucumber-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cucumber" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## custom_elements_ls + +https://github.com/Matsuuu/custom-elements-language-server + +`custom-elements-languageserver` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript custom-elements-languageserver +``` +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. +Here's an example that disables type checking in JavaScript files. +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.custom_elements_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "custom-elements-languageserver", "--stdio" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git") + ``` + + +## cypher_ls + +https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server + +`cypher-language-server`, language server for Cypher query language. +Part of the umbrella project cypher-language-support: https://github.com/neo4j/cypher-language-support + +`cypher-language-server` can be installed via `npm`: +```sh +npm i -g @neo4j-cypher/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.cypher_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cypher-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cypher" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dafny + + Support for the Dafny language server. + + The default `cmd` uses "dafny server", which works on Dafny 4.0.0+. For + older versions of Dafny, you can compile the language server from source at + [dafny-lang/language-server-csharp](https://github.com/dafny-lang/language-server-csharp) + and set `cmd = {"dotnet", ""}`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dafny.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dafny", "server" } + ``` + - `filetypes` : + ```lua + { "dfy", "dafny" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dagger + +https://github.com/dagger/cuelsp + +Dagger's lsp server for cuelang. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dagger.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "cuelsp" } + ``` + - `filetypes` : + ```lua + { "cue" } + ``` + - `root_dir` : + ```lua + root_pattern("cue.mod", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dartls + +https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec + +Language server for dart. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dartls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dart", "language-server", "--protocol=lsp" } + ``` + - `filetypes` : + ```lua + { "dart" } + ``` + - `init_options` : + ```lua + { + closingLabels = true, + flutterOutline = true, + onlyAnalyzeProjectsWithOpenFiles = true, + outline = true, + suggestFromUnimportedLibraries = true + } + ``` + - `root_dir` : + ```lua + root_pattern("pubspec.yaml") + ``` + - `settings` : + ```lua + { + dart = { + completeFunctionCalls = true, + showTodos = true + } + } + ``` + + +## dcmls + +https://dcm.dev/ + +Language server for DCM analyzer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dcmls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dcm", "start-server", "--client=neovim" } + ``` + - `filetypes` : + ```lua + { "dart" } + ``` + - `root_dir` : + ```lua + root_pattern("pubspec.yaml") + ``` + + +## debputy + +https://salsa.debian.org/debian/debputy + +Language Server for Debian packages. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.debputy.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "debputy", "lsp", "server" } + ``` + - `filetypes` : + ```lua + { "debcontrol", "debcopyright", "debchangelog", "make", "yaml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## delphi_ls + +Language server for Delphi from Embarcadero. +https://marketplace.visualstudio.com/items?itemName=EmbarcaderoTechnologies.delphilsp + +Note, the '*.delphilsp.json' file is required, more details at: +https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_DelphiLSP_Code_Insight_with_Other_Editors + +Below, you'll find a sample configuration for the lazy manager. +When on_attach is triggered, it signals DelphiLSP to load settings from a configuration file. +Without this step, DelphiLSP initializes but remains non-functional: + +```lua +"neovim/nvim-lspconfig", +lazy = false, +config = function() + local capabilities = require("cmp_nvim_lsp").default_capabilities() + local lspconfig = require("lspconfig") + + lspconfig.delphi_ls.setup({ + capabilities = capabilities, + + on_attach = function(client) + local lsp_config = vim.fs.find(function(name) + return name:match(".*%.delphilsp.json$") + end, { type = "file", path = client.config.root_dir, upward = false })[1] + + if lsp_config then + client.config.settings = { settingsFile = lsp_config } + client.notify("workspace/didChangeConfiguration", { settings = client.config.settings }) + else + vim.notify_once("delphi_ls: '*.delphilsp.json' config file not found") + end + end, + }) +end, +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.delphi_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "DelphiLSP.exe" } + ``` + - `filetypes` : + ```lua + { "pascal" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + false + ``` + + +## denols + +https://github.com/denoland/deno + +Deno's built-in language server + +To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages + in your init.lua. Example: + +```lua +vim.g.markdown_fenced_languages = { + "ts=typescript" +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.denols.setup{} +``` +**Commands:** +- DenolsCache: Cache a module and all of its dependencies. + +**Default values:** + - `cmd` : + ```lua + { "deno", "lsp" } + ``` + - `cmd_env` : + ```lua + { + NO_COLOR = true + } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["textDocument/definition"] = , + ["textDocument/references"] = , + ["textDocument/typeDefinition"] = + } + ``` + - `root_dir` : + ```lua + root_pattern("deno.json", "deno.jsonc", ".git") + ``` + - `settings` : + ```lua + { + deno = { + enable = true, + suggest = { + imports = { + hosts = { + ["https://deno.land"] = true + } + } + } + } + } + ``` + + +## dhall_lsp_server + +https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server + +language server for dhall + +`dhall-lsp-server` can be installed via cabal: +```sh +cabal install dhall-lsp-server +``` +prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dhall_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dhall-lsp-server" } + ``` + - `filetypes` : + ```lua + { "dhall" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## diagnosticls + +https://github.com/iamcco/diagnostic-languageserver + +Diagnostic language server integrate with linters. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.diagnosticls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "diagnostic-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + Empty by default, override to add filetypes + ``` + - `root_dir` : + ```lua + Vim's starting directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## digestif + +https://github.com/astoff/digestif + +Digestif is a code analyzer, and a language server, for LaTeX, ConTeXt et caterva. It provides + +context-sensitive completion, documentation, code navigation, and related functionality to any + +text editor that speaks the LSP protocol. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.digestif.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "digestif" } + ``` + - `filetypes` : + ```lua + { "tex", "plaintex", "context" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## djlsp + + https://github.com/fourdigits/django-template-lsp + + `djlsp`, a language server for Django templates. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.djlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "djlsp" } + ``` + - `filetypes` : + ```lua + { "html", "htmldjango" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## docker_compose_language_service + +https://github.com/microsoft/compose-language-service +This project contains a language service for Docker Compose. + +`compose-language-service` can be installed via `npm`: + +```sh +npm install @microsoft/compose-language-service +``` + +Note: If the docker-compose-langserver doesn't startup when entering a `docker-compose.yaml` file, make sure that the filetype is `yaml.docker-compose`. You can set with: `:set filetype=yaml.docker-compose`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.docker_compose_language_service.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "docker-compose-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml.docker-compose" } + ``` + - `root_dir` : + ```lua + root_pattern("docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dockerls + +https://github.com/rcjsuen/dockerfile-language-server-nodejs + +`docker-langserver` can be installed via `npm`: +```sh +npm install -g dockerfile-language-server-nodejs +``` + +Additional configuration can be applied in the following way: +```lua +require("lspconfig").dockerls.setup { + settings = { + docker = { + languageserver = { + formatter = { + ignoreMultilineInstructions = true, + }, + }, + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dockerls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "docker-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "dockerfile" } + ``` + - `root_dir` : + ```lua + root_pattern("Dockerfile") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dolmenls + +https://github.com/Gbury/dolmen/blob/master/doc/lsp.md + +`dolmenls` can be installed via `opam` +```sh +opam install dolmen_lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dolmenls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dolmenls" } + ``` + - `filetypes` : + ```lua + { "smt2", "tptp", "p", "cnf", "icnf", "zf" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dotls + +https://github.com/nikeee/dot-language-server + +`dot-language-server` can be installed via `npm`: +```sh +npm install -g dot-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dotls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dot-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "dot" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## dprint + +https://github.com/dprint/dprint + +Pluggable and configurable code formatting platform written in Rust. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.dprint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dprint", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "markdown", "python", "toml", "rust", "roslyn" } + ``` + - `root_dir` : + ```lua + + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## drools_lsp + +https://github.com/kiegroup/drools-lsp + +Language server for the [Drools Rule Language (DRL)](https://docs.drools.org/latest/drools-docs/docs-website/drools/language-reference/#con-drl_drl-rules). + +The `drools-lsp` server is a self-contained java jar file (`drools-lsp-server-jar-with-dependencies.jar`), and can be downloaded from [https://github.com/kiegroup/drools-lsp/releases/](https://github.com/kiegroup/drools-lsp/releases/). + +Configuration information: +```lua +-- Option 1) Specify the entire command: +require('lspconfig').drools_lsp.setup { + cmd = { '/path/to/java', '-jar', '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 2) Specify just the jar path (the JAVA_HOME environment variable will be respected if present): +require('lspconfig').drools_lsp.setup { + drools = { jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 3) Specify the java bin and/or java opts in addition to the jar path: +require('lspconfig').drools_lsp.setup { + drools = { + java = { bin = '/path/to/java', opts = { '-Xmx100m' } }, + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, +} +``` + +Neovim does not yet have automatic detection for the `drools` filetype, but it can be added with: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.drl set filetype=drools ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.drools_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "drools" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ds_pinyin_lsp + +https://github.com/iamcco/ds-pinyin-lsp +Dead simple Pinyin language server for input Chinese without IME(input method). +To install, download the latest [release](https://github.com/iamcco/ds-pinyin-lsp/releases) and ensure `ds-pinyin-lsp` is on your path. +And make ensure the database file `dict.db3` is also downloaded. And put the path to `dict.dbs` in the following code. + +```lua + +require('lspconfig').ds_pinyin_lsp.setup { + init_options = { + db_path = "your_path_to_database" + } +} + +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ds_pinyin_lsp.setup{} +``` +**Commands:** +- DsPinyinCompletionOff: Turn off the ds-pinyin-lsp completion +- DsPinyinCompletionOn: Turn on the ds-pinyin-lsp completion + +**Default values:** + - `cmd` : + ```lua + { "ds-pinyin-lsp" } + ``` + - `filetypes` : + ```lua + { "markdown", "org" } + ``` + - `init_options` : + ```lua + { + completion_on = true, + match_as_same_as_input = true, + match_long_input = true, + max_suggest = 15, + show_symbols = true, + show_symbols_by_n_times = 0, + show_symbols_only_follow_by_hanzi = false + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## earthlyls + +https://github.com/glehmann/earthlyls + +A fast language server for earthly. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.earthlyls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "earthlyls" } + ``` + - `filetypes` : + ```lua + { "earthfile" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ecsact + +https://github.com/ecsact-dev/ecsact_lsp_server + +Language server for Ecsact. + +The default cmd assumes `ecsact_lsp_server` is in your PATH. Typically from the +Ecsact SDK: https://ecsact.dev/start + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ecsact.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ecsact_lsp_server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ecsact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## efm + +https://github.com/mattn/efm-langserver + +General purpose Language Server that can use specified error message format generated from specified command. + +Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support +launching the language server on single files. If on an older version of EFM, disable single file support: + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = ..., -- Populate this according to the note below + single_file_support = false, -- This is the important line for supporting older version of EFM +} +``` + +Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must +specify `filetypes` in your call to `setup{}`**. Otherwise `lspconfig` will launch EFM on the `BufEnter` instead +of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set. + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = { 'python','cpp','lua' } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.efm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "efm-langserver" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## elixirls + +https://github.com/elixir-lsp/elixir-ls + +`elixir-ls` can be installed by following the instructions [here](https://github.com/elixir-lsp/elixir-ls#building-and-running). + +```bash +curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip +unzip elixir-ls.zip -d /path/to/elixir-ls +# Unix +chmod +x /path/to/elixir-ls/language_server.sh +``` + +**By default, elixir-ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls. + +```lua +require'lspconfig'.elixirls.setup{ + -- Unix + cmd = { "/path/to/elixir-ls/language_server.sh" }; + -- Windows + cmd = { "/path/to/elixir-ls/language_server.bat" }; + ... +} +``` + +'root_dir' is chosen like this: if two or more directories containing `mix.exs` were found when searching directories upward, the second one (higher up) is chosen, with the assumption that it is the root of an umbrella app. Otherwise the directory containing the single mix.exs that was found is chosen. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elixirls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + {{see description above}} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## elmls + +https://github.com/elm-tooling/elm-language-server#installation + +If you don't want to use Nvim to install it, then you can use: +```sh +npm install -g elm elm-test elm-format @elm-tooling/elm-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elmls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" } + } + ``` + - `cmd` : + ```lua + { "elm-language-server" } + ``` + - `filetypes` : + ```lua + { "elm" } + ``` + - `init_options` : + ```lua + { + disableElmLSDiagnostics = false, + elmReviewDiagnostics = "off", + onlyUpdateDiagnosticsOnSave = false, + skipInstallPackageConfirmation = false + } + ``` + - `root_dir` : + ```lua + root_pattern("elm.json") + ``` + + +## elp + +https://whatsapp.github.io/erlang-language-platform + +ELP integrates Erlang into modern IDEs via the language server protocol and was +inspired by rust-analyzer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.elp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "elp", "server" } + ``` + - `filetypes` : + ```lua + { "erlang" } + ``` + - `root_dir` : + ```lua + root_pattern('rebar.config', 'erlang.mk', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ember + +https://github.com/ember-tooling/ember-language-server + +`ember-language-server` can be installed via `npm`: + +```sh +npm install -g @ember-tooling/ember-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ember.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ember-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "handlebars", "typescript", "javascript", "typescript.glimmer", "javascript.glimmer" } + ``` + - `root_dir` : + ```lua + root_pattern("ember-cli-build.js", ".git") + ``` + + +## emmet_language_server + +https://github.com/olrtg/emmet-language-server + +Package can be installed via `npm`: +```sh +npm install -g @olrtg/emmet-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.emmet_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "emmet-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "eruby", "html", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "typescriptreact", "htmlangular" } + ``` + - `root_dir` : + ```lua + git root + ``` + - `single_file_support` : + ```lua + true + ``` + + +## emmet_ls + +https://github.com/aca/emmet-ls + +Package can be installed via `npm`: +```sh +npm install -g emmet-ls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.emmet_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "emmet-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "astro", "css", "eruby", "html", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "svelte", "typescriptreact", "vue", "htmlangular" } + ``` + - `root_dir` : + ```lua + git root + ``` + - `single_file_support` : + ```lua + true + ``` + + +## erg_language_server + +https://github.com/erg-lang/erg#flags ELS + +ELS (erg-language-server) is a language server for the Erg programming language. + +erg-language-server can be installed via `cargo` and used as follows: + ```sh + cargo install erg --features els + erg --language-server + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.erg_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "erg", "--language-server" } + ``` + - `filetypes` : + ```lua + { "erg" } + ``` + - `root_dir` : + ```lua + root_pattern("package.er") or find_git_ancestor + ``` + + +## erlangls + +https://erlang-ls.github.io + +Language Server for Erlang. + +Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls) +Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin` + +Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls). + +Installation requirements: + - [Erlang OTP 21+](https://github.com/erlang/otp) + - [rebar3 3.9.1+](https://github.com/erlang/rebar3) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.erlangls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "erlang_ls" } + ``` + - `filetypes` : + ```lua + { "erlang" } + ``` + - `root_dir` : + ```lua + root_pattern('rebar.config', 'erlang.mk', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## esbonio + +https://github.com/swyddfa/esbonio + +Esbonio is a language server for [Sphinx](https://www.sphinx-doc.org/en/master/) documentation projects. +The language server can be installed via pip + +``` +pip install esbonio +``` + +Since Sphinx is highly extensible you will get best results if you install the language server in the same +Python environment as the one used to build your documentation. To ensure that the correct Python environment +is picked up, you can either launch `nvim` with the correct environment activated. + +``` +source env/bin/activate +nvim +``` + +Or you can modify the default `cmd` to include the full path to the Python interpreter. + +```lua +require'lspconfig'.esbonio.setup { + cmd = { '/path/to/virtualenv/bin/python', '-m', 'esbonio' } +} +``` + +Esbonio supports a number of config values passed as `init_options` on startup, for example. + +```lua +require'lspconfig'.esbonio.setup { + init_options = { + server = { + logLevel = "debug" + }, + sphinx = { + confDir = "/path/to/docs", + srcDir = "${confDir}/../docs-src" + } +} +``` + +A full list and explanation of the available options can be found [here](https://docs.esbon.io/en/esbonio-language-server-v0.16.4/lsp/getting-started.html?editor=neovim-lspconfig#configuration) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.esbonio.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "python3", "-m", "esbonio" } + ``` + - `filetypes` : + ```lua + { "rst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## eslint + +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-eslint-language-server` is a linting engine for JavaScript / Typescript. +It can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-eslint-language-server` provides an `EslintFixAll` command that can be used to format a document on save: +```lua +lspconfig.eslint.setup({ + --- ... + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + command = "EslintFixAll", + }) + end, +}) +``` + +See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options. + +Messages handled in lspconfig: `eslint/openDoc`, `eslint/confirmESLintExecution`, `eslint/probeFailed`, `eslint/noLibrary` + +Additional messages you can handle: `eslint/noConfig` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.eslint.setup{} +``` +**Commands:** +- EslintFixAll: Fix all eslint problems for this buffer + +**Default values:** + - `cmd` : + ```lua + { "vscode-eslint-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" } + ``` + - `handlers` : + ```lua + { + ["eslint/confirmESLintExecution"] = , + ["eslint/noLibrary"] = , + ["eslint/openDoc"] = , + ["eslint/probeFailed"] = + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + codeAction = { + disableRuleComment = { + enable = true, + location = "separateLine" + }, + showDocumentation = { + enable = true + } + }, + codeActionOnSave = { + enable = false, + mode = "all" + }, + experimental = { + useFlatConfig = false + }, + format = true, + nodePath = "", + onIgnoredFiles = "off", + problems = { + shortenToSingleLine = false + }, + quiet = false, + rulesCustomizations = {}, + run = "onType", + useESLintClass = false, + validate = "on", + workingDirectory = { + mode = "location" + } + } + ``` + + +## facility_language_server + +https://github.com/FacilityApi/FacilityLanguageServer + +Facility language server protocol (LSP) support. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.facility_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "facility-language-server" } + ``` + - `filetypes` : + ```lua + { "fsd" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## fennel_language_server + +https://github.com/rydesun/fennel-language-server + +Fennel language server protocol (LSP) support. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fennel_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fennel-language-server" } + ``` + - `filetypes` : + ```lua + { "fennel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## fennel_ls + +https://sr.ht/~xerool/fennel-ls/ + +A language server for fennel. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fennel_ls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" } + } + ``` + - `cmd` : + ```lua + { "fennel-ls" } + ``` + - `filetypes` : + ```lua + { "fennel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## fish_lsp + +https://github.com/ndonfris/fish-lsp + +A Language Server Protocol (LSP) tailored for the fish shell. +This project aims to enhance the coding experience for fish, +by introducing a suite of intelligent features like auto-completion, +scope aware symbol analysis, per-token hover generation, and many others. + +[homepage](https://www.fish-lsp.dev/) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fish_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fish-lsp", "start" } + ``` + - `cmd_env` : + ```lua + { + fish_lsp_show_client_popups = false + } + ``` + - `filetypes` : + ```lua + { "fish" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## flow + +https://flow.org/ +https://github.com/facebook/flow + +See below for how to setup Flow itself. +https://flow.org/en/docs/install/ + +See below for lsp command options. + +```sh +npx flow lsp --help +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.flow.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "npx", "--no-install", "flow", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx" } + ``` + - `root_dir` : + ```lua + root_pattern(".flowconfig") + ``` + + +## flux_lsp + +https://github.com/influxdata/flux-lsp +`flux-lsp` can be installed via `cargo`: +```sh +cargo install --git https://github.com/influxdata/flux-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.flux_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "flux-lsp" } + ``` + - `filetypes` : + ```lua + { "flux" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## foam_ls + +https://github.com/FoamScience/foam-language-server + +`foam-language-server` can be installed via `npm` +```sh +npm install -g foam-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.foam_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "foam-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "foam", "OpenFOAM" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## fortls + +https://fortls.fortran-lang.org/index.html + +fortls is a Fortran Language Server, the server can be installed via pip + +```sh +pip install fortls +``` + +Settings to the server can be passed either through the `cmd` option or through +a local configuration file e.g. `.fortls`. For more information +see the `fortls` [documentation](https://fortls.fortran-lang.org/options.html). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fortls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fortls", "--notify_init", "--hover_signature", "--hover_language=fortran", "--use_signature_help" } + ``` + - `filetypes` : + ```lua + { "fortran" } + ``` + - `root_dir` : + ```lua + root_pattern(".fortls") + ``` + - `settings` : + ```lua + {} + ``` + + +## fsautocomplete + +https://github.com/fsharp/FsAutoComplete + +Language Server for F# provided by FsAutoComplete (FSAC). + +FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`. + +Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete). + +You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files: + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` + +This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fsautocomplete.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fsautocomplete", "--adaptive-lsp-server-enabled" } + ``` + - `filetypes` : + ```lua + { "fsharp" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + FSharp = { + EnableReferenceCodeLens = true, + ExternalAutocomplete = false, + InterfaceStubGeneration = true, + InterfaceStubGenerationMethodBody = 'failwith "Not Implemented"', + InterfaceStubGenerationObjectIdentifier = "this", + Linter = true, + RecordStubGeneration = true, + RecordStubGenerationBody = 'failwith "Not Implemented"', + ResolveNamespaces = true, + SimplifyNameAnalyzer = true, + UnionCaseStubGeneration = true, + UnionCaseStubGenerationBody = 'failwith "Not Implemented"', + UnusedDeclarationsAnalyzer = true, + UnusedOpensAnalyzer = true, + UseSdkScripts = true, + keywordsAutocomplete = true + } + } + ``` + + +## fsharp_language_server + +F# Language Server +https://github.com/faldor20/fsharp-language-server + +An implementation of the language server protocol using the F# Compiler Service. + +Build the project from source and override the command path to location of DLL. + +If filetype determination is not already performed by an available plugin ([PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). +), then the following must be added to initialization configuration: + + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fsharp_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dotnet", "FSharpLanguageServer.dll" } + ``` + - `filetypes` : + ```lua + { "fsharp" } + ``` + - `init_options` : + ```lua + { + AutomaticWorkspaceInit = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## fstar + +https://github.com/FStarLang/FStar + +LSP support is included in FStar. Make sure `fstar.exe` is in your PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.fstar.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "fstar.exe", "--lsp" } + ``` + - `filetypes` : + ```lua + { "fstar" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## futhark_lsp + +https://github.com/diku-dk/futhark + +Futhark Language Server + +This language server comes with the futhark compiler and is run with the command +``` +futhark lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.futhark_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "futhark", "lsp" } + ``` + - `filetypes` : + ```lua + { "futhark", "fut" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gdscript + +https://github.com/godotengine/godot + +Language server for GDScript, used by Godot Engine. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gdscript.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + see source file + ``` + - `filetypes` : + ```lua + { "gd", "gdscript", "gdscript3" } + ``` + - `root_dir` : + ```lua + util.root_pattern("project.godot", ".git") + ``` + + +## gdshader_lsp + +https://github.com/godofavacyn/gdshader-lsp + +A language server for the Godot Shading language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gdshader_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gdshader-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "gdshader", "gdshaderinc" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## ghcide + +https://github.com/digital-asset/ghcide + +A library for building Haskell IDE tooling. +"ghcide" isn't for end users now. Use "haskell-language-server" instead of "ghcide". + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ghcide.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ghcide", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell", "lhaskell" } + ``` + - `root_dir` : + ```lua + root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml") + ``` + + +## ghdl_ls + +https://github.com/ghdl/ghdl-language-server + +A language server for VHDL, using ghdl as its backend. + +`ghdl-ls` is part of pyghdl, for installation instructions see +[the upstream README](https://github.com/ghdl/ghdl/tree/master/pyGHDL/lsp). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ghdl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ghdl-ls" } + ``` + - `filetypes` : + ```lua + { "vhdl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ginko_ls + +`ginko_ls` is meant to be a feature-complete language server for device-trees. +Language servers can be used in many editors, such as Visual Studio Code, Emacs +or Vim + +Install `ginko_ls` from https://github.com/Schottkyc137/ginko and add it to path + +`ginko_ls` doesn't require any configuration. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ginko_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ginko_ls" } + ``` + - `filetypes` : + ```lua + { "dts" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## gitlab_ci_ls + +https://github.com/alesbrelih/gitlab-ci-ls + +Language Server for Gitlab CI + +`gitlab-ci-ls` can be installed via cargo: +cargo install gitlab-ci-ls + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gitlab_ci_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gitlab-ci-ls" } + ``` + - `filetypes` : + ```lua + { "yaml.gitlab" } + ``` + - `init_options` : + ```lua + { + cache_path = "util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/')", + log_path = "util.path.join(util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/'), 'log/gitlab-ci-ls.log')" + } + ``` + - `root_dir` : + ```lua + util.root_pattern('.gitlab*', '.git') + ``` + + +## glasgow + +https://github.com/nolanderc/glasgow + +Provides language features for WGSL (WebGPU Shading Language): +- Completions: + - Local functions/variables/types. + - Fields and swizzles. + - Builtin types and functions (`dot`, `reflect`, `textureSample`, `vec3`, `mat4x2`, etc.) +- Hover Documentation: + - Function signatures. + - Variable types. + - Includes builtin types and functions. Text is taken from the WGSL specification. +- Goto Definition +- Find all References +- Rename +- Formatter + +`glasgow` can be installed via `cargo`: +```sh +cargo install glasgow +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glasgow.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "glasgow" } + ``` + - `filetypes` : + ```lua + { "wgsl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gleam + +https://github.com/gleam-lang/gleam + +A language server for Gleam Programming Language. +[Installation](https://gleam.run/getting-started/installing/) + +It can be i + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gleam.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gleam", "lsp" } + ``` + - `filetypes` : + ```lua + { "gleam" } + ``` + - `root_dir` : + ```lua + root_pattern("gleam.toml", ".git") + ``` + + +## glint + + https://github.com/typed-ember/glint + + https://typed-ember.gitbook.io/glint/ + + `glint-language-server` is installed when adding `@glint/core` to your project's devDependencies: + + ```sh + npm install @glint/core --save-dev + ``` + + or + + ```sh + yarn add -D @glint/core + ``` + + or + + ```sh + pnpm add -D @glint/core + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "glint-language-server" } + ``` + - `filetypes` : + ```lua + { "html.handlebars", "handlebars", "typescript", "typescript.glimmer", "javascript", "javascript.glimmer" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## glsl_analyzer + +https://github.com/nolanderc/glsl_analyzer + +Language server for GLSL + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glsl_analyzer.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + {} + ``` + - `cmd` : + ```lua + { "glsl_analyzer" } + ``` + - `filetypes` : + ```lua + { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## glslls + +https://github.com/svenstaro/glsl-language-server + +Language server implementation for GLSL + +`glslls` can be compiled and installed manually, or, if your distribution has access to the AUR, +via the `glsl-language-server` AUR package + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.glslls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + offsetEncoding = { "utf-8", "utf-16" }, + textDocument = { + completion = { + editsNearCursor = true + } + } + } + ``` + - `cmd` : + ```lua + { "glslls", "--stdin" } + ``` + - `filetypes` : + ```lua + { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## golangci_lint_ls + +Combination of both lint server and client + +https://github.com/nametake/golangci-lint-langserver +https://github.com/golangci/golangci-lint + + +Installation of binaries needed is done via + +``` +go install github.com/nametake/golangci-lint-langserver@latest +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.golangci_lint_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "golangci-lint-langserver" } + ``` + - `filetypes` : + ```lua + { "go", "gomod" } + ``` + - `init_options` : + ```lua + { + command = { "golangci-lint", "run", "--out-format", "json" } + } + ``` + - `root_dir` : + ```lua + root_pattern('.golangci.yml', '.golangci.yaml', '.golangci.toml', '.golangci.json', 'go.work', 'go.mod', '.git') + ``` + + +## gopls + +https://github.com/golang/tools/tree/master/gopls + +Google's lsp server for golang. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gopls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gopls" } + ``` + - `filetypes` : + ```lua + { "go", "gomod", "gowork", "gotmpl" } + ``` + - `root_dir` : + ```lua + root_pattern("go.work", "go.mod", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## gradle_ls + +https://github.com/microsoft/vscode-gradle + +Microsoft's lsp server for gradle files + +If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.gradle_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "gradle-language-server" } + ``` + - `filetypes` : + ```lua + { "groovy" } + ``` + - `init_options` : + ```lua + { + settings = { + gradleWrapperEnabled = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern("settings.gradle", "build.gradle") + ``` + + +## grammarly + +https://github.com/znck/grammarly + +`grammarly-languageserver` can be installed via `npm`: + +```sh +npm i -g grammarly-languageserver +``` + +WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.grammarly.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "grammarly-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `handlers` : + ```lua + { + ["$/updateDocumentState"] = + } + ``` + - `init_options` : + ```lua + { + clientId = "client_BaDkMgx4X19X9UxxYRCXZo" + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## graphql + +https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli + +`graphql-lsp` can be installed via `npm`: + +```sh +npm install -g graphql-language-service-cli +``` + +Note that you must also have [the graphql package](https://github.com/graphql/graphql-js) installed within your project and create a [GraphQL config file](https://the-guild.dev/graphql/config/docs). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.graphql.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "graphql-lsp", "server", "-m", "stream" } + ``` + - `filetypes` : + ```lua + { "graphql", "typescriptreact", "javascriptreact" } + ``` + - `root_dir` : + ```lua + util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*') + ``` + + +## groovyls + +https://github.com/prominic/groovy-language-server.git + +Requirements: + - Linux/macOS (for now) + - Java 11+ + +`groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build). + +If you have installed groovy language server, you can set the `cmd` custom path as follow: + +```lua +require'lspconfig'.groovyls.setup{ + -- Unix + cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" }, + ... +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.groovyls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "java", "-jar", "groovy-language-server-all.jar" } + ``` + - `filetypes` : + ```lua + { "groovy" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## guile_ls + +https://codeberg.org/rgherdt/scheme-lsp-server + +The recommended way is to install guile-lsp-server is using Guix. Unfortunately it is still not available at the official Guix channels, but you can use the provided channel guix.scm in the repo: +```sh +guix package -f guix.scm +``` + +Checkout the repo for more info. + +Note: This LSP will start on `scheme.guile` filetype. You can set this file type using `:help modeline` or adding https://gitlab.com/HiPhish/guile.vim to your plugins to automatically set it. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.guile_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "guile-lsp-server" } + ``` + - `filetypes` : + ```lua + { "scheme.guile" } + ``` + - `root_dir` : + ```lua + root_pattern("guix.scm", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## harper_ls + +https://github.com/chilipepperhott/harper + +The language server for Harper, the slim, clean language checker for developers. + +See [docs](https://github.com/chilipepperhott/harper/tree/master/harper-ls#configuration) for more information on settings. + +In short, however, they should look something like this: +```lua +lspconfig.harper_ls.setup { + settings = { + ["harper-ls"] = { + userDictPath = "~/dict.txt" + } + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.harper_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "harper-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown", "rust", "typescript", "typescriptreact", "javascript", "python", "go", "c", "cpp", "ruby", "swift", "csharp", "toml", "lua", "gitcommit", "java", "html" } + ``` + - `root_dir` : + ```lua + bufdir + ``` + - `single_file_support` : + ```lua + true + ``` + + +## haxe_language_server + +https://github.com/vshaxe/haxe-language-server + +The Haxe language server can be built by running the following commands from +the project's root directory: + + npm install + npx lix run vshaxe-build -t language-server + +This will create `bin/server.js`. Note that the server requires Haxe 3.4.0 or +higher. + +After building the language server, set the `cmd` setting in your setup +function: + +```lua +lspconfig.haxe_language_server.setup({ + cmd = {"node", "path/to/bin/server.js"}, +}) +``` + +By default, the language server is configured with the HXML compiler arguments +contained in the first `.hxml` file found in your project's root directory. +If you want to specify which one to use, set the `init_options.displayArguments` +setting: + +```lua +lspconfig.haxe_language_server.setup({ + -- ... + init_options = { + displayArguments = { "build.hxml" }, + }, +}) +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.haxe_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "haxe-language-server" } + ``` + - `filetypes` : + ```lua + { "haxe" } + ``` + - `init_options` : + ```lua + default value is set by on_new_config + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.hxml", ".git") + ``` + - `settings` : + ```lua + { + haxe = { + executable = "haxe" + } + } + ``` + + +## hdl_checker + +https://github.com/suoto/hdl_checker +Language server for hdl-checker. +Install using: `pip install hdl-checker --upgrade` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hdl_checker.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hdl_checker", "--lsp" } + ``` + - `filetypes` : + ```lua + { "vhdl", "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## helm_ls + +https://github.com/mrjosh/helm-ls + +Helm Language server. (This LSP is in early development) + +`helm Language server` can be installed by following the instructions [here](https://github.com/mrjosh/helm-ls). + +The default `cmd` assumes that the `helm_ls` binary can be found in `$PATH`. + +If need Helm file highlight use [vim-helm](https://github.com/towolf/vim-helm) plugin. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.helm_ls.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + default capabilities, with dynamicRegistration for didChangeWatchedFiles true + ``` + - `cmd` : + ```lua + { "helm_ls", "serve" } + ``` + - `filetypes` : + ```lua + { "helm" } + ``` + - `root_dir` : + ```lua + root_pattern("Chart.yaml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hhvm + +Language server for programs written in Hack +https://hhvm.com/ +https://github.com/facebook/hhvm +See below for how to setup HHVM & typechecker: +https://docs.hhvm.com/hhvm/getting-started/getting-started + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hhvm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hh_client", "lsp" } + ``` + - `filetypes` : + ```lua + { "php", "hack" } + ``` + - `root_dir` : + ```lua + root_pattern(".hhconfig") + ``` + + +## hie + +https://github.com/haskell/haskell-ide-engine + +the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration): +```lua +init_options = { + languageServerHaskell = { + hlintOn = bool; + maxNumberOfProblems = number; + diagnosticsDebounceDuration = number; + liquidOn = bool (default false); + completionSnippetsOn = bool (default true); + formatOnImportOn = bool (default true); + formattingProvider = string (default "brittany", alternate "floskell"); + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hie.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hie-wrapper", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell" } + ``` + - `root_dir` : + ```lua + root_pattern("stack.yaml", "package.yaml", ".git") + ``` + + +## hlasm + + `hlasm_language_server` is a language server for the High Level Assembler language used on IBM SystemZ mainframes. + + To learn how to configure the HLASM language server, see the [HLASM Language Support documentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hlasm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hlasm_language_server" } + ``` + - `filetypes` : + ```lua + { "hlasm" } + ``` + - `root_dir` : + ```lua + root_pattern(".hlasmplugin") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hls + +https://github.com/haskell/haskell-language-server + +Haskell Language Server + +If you are using HLS 1.9.0.0, enable the language server to launch on Cabal files as well: + +```lua +require('lspconfig')['hls'].setup{ + filetypes = { 'haskell', 'lhaskell', 'cabal' }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "haskell-language-server-wrapper", "--lsp" } + ``` + - `filetypes` : + ```lua + { "haskell", "lhaskell" } + ``` + - `lspinfo` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml") + ``` + - `settings` : + ```lua + { + haskell = { + cabalFormattingProvider = "cabalfmt", + formattingProvider = "ormolu" + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hoon_ls + +https://github.com/urbit/hoon-language-server + +A language server for Hoon. + +The language server can be installed via `npm install -g @hoon-language-server` + +Start a fake ~zod with `urbit -F zod`. +Start the language server at the Urbit Dojo prompt with: `|start %language-server` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hoon_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hoon-language-server" } + ``` + - `filetypes` : + ```lua + { "hoon" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## html + +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-html-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled. +To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +The code-formatting feature of the lsp can be controlled with the `provideFormatter` option. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.html.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.html.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-html-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "templ" } + ``` + - `init_options` : + ```lua + { + configurationSection = { "html", "css", "javascript" }, + embeddedLanguages = { + css = true, + javascript = true + }, + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## htmx + +https://github.com/ThePrimeagen/htmx-lsp + +`htmx-lsp` can be installed via `cargo`: +```sh +cargo install htmx-lsp +``` + +Lsp is still very much work in progress and experimental. Use at your own risk. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.htmx.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "htmx-lsp" } + ``` + - `filetypes` : + ```lua + { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hydra_lsp + +https://github.com/Retsediv/hydra-lsp + +LSP for Hydra Python package config files. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hydra_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hydra-lsp" } + ``` + - `filetypes` : + ```lua + { "yaml" } + ``` + - `root_dir` : + ```lua + util.root_pattern '.git' + ``` + - `single_file_support` : + ```lua + true + ``` + + +## hyprls + +https://github.com/hyprland-community/hyprls + +`hyprls` can be installed via `go`: +```sh +go install github.com/ewen-lbh/hyprls/cmd/hyprls@latest +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.hyprls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "hyprls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "hyprlang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## idris2_lsp + +https://github.com/idris-community/idris2-lsp + +The Idris 2 language server. + +Plugins for the Idris 2 filetype include +[Idris2-Vim](https://github.com/edwinb/idris2-vim) (fewer features, stable) and +[Nvim-Idris2](https://github.com/ShinKage/nvim-idris2) (cutting-edge, +experimental). + +Idris2-Lsp requires a build of Idris 2 that includes the "Idris 2 API" package. +Package managers with known support for this build include the +[AUR](https://aur.archlinux.org/packages/idris2/) and +[Homebrew](https://formulae.brew.sh/formula/idris2#default). + +If your package manager does not support the Idris 2 API, you will need to build +Idris 2 from source. Refer to the +[the Idris 2 installation instructions](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md) +for details. Steps 5 and 8 are listed as "optional" in that guide, but they are +necessary in order to make the Idris 2 API available. + +You need to install a version of Idris2-Lsp that is compatible with your +version of Idris 2. There should be a branch corresponding to every released +Idris 2 version after v0.4.0. Use the latest commit on that branch. For example, +if you have Idris v0.5.1, you should use the v0.5.1 branch of Idris2-Lsp. + +If your Idris 2 version is newer than the newest Idris2-Lsp branch, use the +latest commit on the `master` branch, and set a reminder to check the Idris2-Lsp +repo for the release of a compatible versioned branch. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.idris2_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "idris2-lsp" } + ``` + - `filetypes` : + ```lua + { "idris2" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## intelephense + +https://intelephense.com/ + +`intelephense` can be installed via `npm`: +```sh +npm install -g intelephense +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.intelephense.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "intelephense", "--stdio" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + + +## janet_lsp + +https://github.com/CFiggers/janet-lsp + +A Language Server Protocol implementation for Janet. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.janet_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "janet-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "janet" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## java_language_server + +https://github.com/georgewfraser/java-language-server + +Java language server + +Point `cmd` to `lang_server_linux.sh` or the equivalent script for macOS/Windows provided by java-language-server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.java_language_server.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "java" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## jdtls + +https://projects.eclipse.org/projects/eclipse.jdt.ls + +Language server for Java. + +IMPORTANT: If you want all the features jdtls has to offer, [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) +is highly recommended. If all you need is diagnostics, completion, imports, gotos and formatting and some code actions +you can keep reading here. + +For manual installation you can download precompiled binaries from the +[official downloads site](http://download.eclipse.org/jdtls/snapshots/?d) +and ensure that the `PATH` variable contains the `bin` directory of the extracted archive. + +```lua + -- init.lua + require'lspconfig'.jdtls.setup{} +``` + +You can also pass extra custom jvm arguments with the JDTLS_JVM_ARGS environment variable as a space separated list of arguments, +that will be converted to multiple --jvm-arg= args when passed to the jdtls script. This will allow for example tweaking +the jvm arguments or integration with external tools like lombok: + +```sh +export JDTLS_JVM_ARGS="-javaagent:$HOME/.local/share/java/lombok.jar" +``` + +For automatic installation you can use the following unofficial installers/launchers under your own risk: + - [jdtls-launcher](https://github.com/eruizc-dev/jdtls-launcher) (Includes lombok support by default) + ```lua + -- init.lua + require'lspconfig'.jdtls.setup{ cmd = { 'jdtls' } } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jdtls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jdtls", "-configuration", "/home/user/.cache/jdtls/config", "-data", "/home/user/.cache/jdtls/workspace" } + ``` + - `filetypes` : + ```lua + { "java" } + ``` + - `handlers` : + ```lua + { + ["language/status"] = , + ["textDocument/codeAction"] = , + ["textDocument/rename"] = , + ["workspace/applyEdit"] = + } + ``` + - `init_options` : + ```lua + { + jvm_args = {}, + workspace = "/home/user/.cache/jdtls/workspace" + } + ``` + - `root_dir` : + ```lua + { + -- Single-module projects + { + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'settings.gradle', -- Gradle + 'settings.gradle.kts', -- Gradle + }, + -- Multi-module projects + { 'build.gradle', 'build.gradle.kts' }, + } or vim.fn.getcwd() + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jedi_language_server + +https://github.com/pappasam/jedi-language-server + +`jedi-language-server`, a language server for Python, built on top of jedi + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jedi_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jedi-language-server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jinja_lsp + +jinja-lsp enhances minijinja development experience by providing Helix/Nvim users with advanced features such as autocomplete, syntax highlighting, hover, goto definition, code actions and linting. + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + extension = { + jinja = 'jinja', + jinja2 = 'jinja', + j2 = 'jinja', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jinja_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jinja-lsp" } + ``` + - `filetypes` : + ```lua + { "jinja" } + ``` + - `name` : + ```lua + "jinja_lsp" + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jqls + +https://github.com/wader/jq-lsp +Language server for jq, written using Go. +You can install the server easily using go install: +```sh +# install directly +go install github.com/wader/jq-lsp@master +# copy binary to $PATH +cp $(go env GOPATH)/bin/jq-lsp /usr/local/bin +``` +Note: To activate properly nvim needs to know the jq filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.jq setfiletype jq\]\]) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jqls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jq-lsp" } + ``` + - `filetypes` : + ```lua + { "jq" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jsonls + +https://github.com/hrsh7th/vscode-langservers-extracted + +vscode-json-language-server, a language server for JSON and JSON schema + +`vscode-json-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need to enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.jsonls.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jsonls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-json-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "json", "jsonc" } + ``` + - `init_options` : + ```lua + { + provideFormatter = true + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## jsonnet_ls + +https://github.com/grafana/jsonnet-language-server + +A Language Server Protocol (LSP) server for Jsonnet. + +The language server can be installed with `go`: +```sh +go install github.com/grafana/jsonnet-language-server@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.jsonnet_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "jsonnet-language-server" } + ``` + - `filetypes` : + ```lua + { "jsonnet", "libsonnet" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("jsonnetfile.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## julials + +https://github.com/julia-vscode/julia-vscode + +LanguageServer.jl can be installed with `julia` and `Pkg`: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")' +``` +where `~/.julia/environments/nvim-lspconfig` is the location where +the default configuration expects LanguageServer.jl to be installed. + +To update an existing install, use the following command: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()' +``` + +Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a +Julia project, you must make sure that the project is instantiated: +```sh +julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()' +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.julials.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "julia", "--startup-file=no", "--history-file=no", "-e", ' # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig\n # with the regular load path as a fallback\n ls_install_path = joinpath(\n get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),\n "environments", "nvim-lspconfig"\n )\n pushfirst!(LOAD_PATH, ls_install_path)\n using LanguageServer\n popfirst!(LOAD_PATH)\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' } + ``` + - `filetypes` : + ```lua + { "julia" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## kcl + +https://github.com/kcl-lang/kcl.nvim + +Language server for the KCL configuration and policy language. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.kcl.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "kcl-language-server" } + ``` + - `filetypes` : + ```lua + { "kcl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## koka + + https://koka-lang.github.io/koka/doc/index.html +Koka is a functional programming language with effect types and handlers. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.koka.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "koka", "--language-server", "--lsstdio" } + ``` + - `filetypes` : + ```lua + { "koka" } + ``` + - `root_dir` : + ```lua + git directory + ``` + - `single_file_support` : + ```lua + true + ``` + + +## kotlin_language_server + + A kotlin language server which was developed for internal usage and + released afterwards. Maintaining is not done by the original author, + but by fwcd. + + It is built via gradle and developed on github. + Source and additional description: + https://github.com/fwcd/kotlin-language-server + + This server requires vim to be aware of the kotlin-filetype. + You could refer for this capability to: + https://github.com/udalov/kotlin-vim (recommended) + Note that there is no LICENSE specified yet. + + For faster startup, you can setup caching by specifying a storagePath + in the init_options. The default is your home directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.kotlin_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "kotlin-language-server" } + ``` + - `filetypes` : + ```lua + { "kotlin" } + ``` + - `init_options` : + ```lua + { + storagePath = "Enables caching and use project root to store cache data. See source" + } + ``` + - `root_dir` : + ```lua + See source + ``` + + +## lean3ls + +https://github.com/leanprover/lean-client-js/tree/master/lean-language-server + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +Once Lean is installed, you can install the Lean 3 language server by running +```sh +npm install -g lean-language-server +``` + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `lean3ls` both with it and `lspconfig`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lean3ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lean-language-server", "--stdio", "--", "-M", "4096", "-T", "100000" } + ``` + - `filetypes` : + ```lua + { "lean3" } + ``` + - `offset_encoding` : + ```lua + "utf-32" + ``` + - `root_dir` : + ```lua + root_pattern("leanpkg.toml") or root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## leanls + +https://github.com/leanprover/lean4 + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +The Lean language server is included in any Lean installation and +does not require any additional packages. + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `leanls` both with it and `lspconfig`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.leanls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lake", "serve", "--" } + ``` + - `filetypes` : + ```lua + { "lean" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("lakefile.toml", "lakefile.lean", "lean-toolchain", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lelwel_ls + +https://github.com/0x2a-42/lelwel + +Language server for lelwel grammars. + +You can install `lelwel-ls` via cargo: +```sh +cargo install --features="lsp" lelwel +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lelwel_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lelwel-ls" } + ``` + - `filetypes` : + ```lua + { "llw" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## lemminx + +https://github.com/eclipse/lemminx + +The easiest way to install the server is to get a binary from https://github.com/redhat-developer/vscode-xml/releases and place it on your PATH. + +NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lemminx.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lemminx" } + ``` + - `filetypes` : + ```lua + { "xml", "xsd", "xsl", "xslt", "svg" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lexical + + https://github.com/lexical-lsp/lexical + + Lexical is a next-generation language server for the Elixir programming language. + + Follow the [Detailed Installation Instructions](https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md) + + **By default, `lexical` doesn't have a `cmd` set.** + This is because nvim-lspconfig does not make assumptions about your path. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lexical.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ltex + +https://github.com/valentjn/ltex-ls + +LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others + +To install, download the latest [release](https://github.com/valentjn/ltex-ls/releases) and ensure `ltex-ls` is on your path. + +This server accepts configuration via the `settings` key. + +```lua + settings = { + ltex = { + language = "en-GB", + }, + }, +``` + +To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes): + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ltex.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ltex-ls" } + ``` + - `filetypes` : + ```lua + { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "html", "xhtml", "mail", "text" } + ``` + - `get_language_id` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + ltex = { + enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "mail", "plaintext" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lua_ls + +https://github.com/luals/lua-language-server + +Lua language server. + +`lua-language-server` can be installed by following the instructions [here](https://luals.github.io/#neovim-install). + +The default `cmd` assumes that the `lua-language-server` binary can be found in `$PATH`. + +If you primarily use `lua-language-server` for Neovim, and want to provide completions, +analysis, and location handling for plugins on runtime path, you can use the following +settings. + +```lua +require'lspconfig'.lua_ls.setup { + on_init = function(client) + local path = client.workspace_folders[1].name + if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then + return + end + + client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { + runtime = { + -- Tell the language server which version of Lua you're using + -- (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT' + }, + -- Make the server aware of Neovim runtime files + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME + -- Depending on the usage, you might want to add additional paths here. + -- "${3rd}/luv/library" + -- "${3rd}/busted/library", + } + -- or pull in all of 'runtimepath'. NOTE: this is a lot slower + -- library = vim.api.nvim_get_runtime_file("", true) + } + }) + end, + settings = { + Lua = {} + } +} +``` + +See `lua-language-server`'s [documentation](https://luals.github.io/wiki/settings/) for an explanation of the above fields: +* [Lua.runtime.path](https://luals.github.io/wiki/settings/#runtimepath) +* [Lua.workspace.library](https://luals.github.io/wiki/settings/#workspacelibrary) + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lua_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lua-language-server" } + ``` + - `filetypes` : + ```lua + { "lua" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + root_pattern(".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## luau_lsp + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.luau_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "luau-lsp", "lsp" } + ``` + - `filetypes` : + ```lua + { "luau" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## lwc_ls + +https://github.com/forcedotcom/lightning-language-server/ + +Language server for Lightning Web Components. + +For manual installation, utilize the official [NPM package](https://www.npmjs.com/package/@salesforce/lwc-language-server). +Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.lwc_ls.setup { + cmd = { + 'node', + '/path/to/node_modules/@salesforce/lwc-language-server/bin/lwc-language-server.js', + '--stdio' + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.lwc_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "lwc-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "html" } + ``` + - `init_options` : + ```lua + { + embeddedLanguages = { + javascript = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## m68k + +https://github.com/grahambates/m68k-lsp + +Language server for Motorola 68000 family assembly + +`m68k-lsp-server` can be installed via `npm`: + +```sh +npm install -g m68k-lsp-server +``` + +Ensure you are using the 68k asm syntax variant in Neovim. + +```lua +vim.g.asmsyntax = 'asm68k' +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.m68k.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "m68k-lsp-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "asm68k" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## markdown_oxide + +https://github.com/Feel-ix-343/markdown-oxide + +Editor Agnostic PKM: you bring the text editor and we +bring the PKM. + +Inspired by and compatible with Obsidian. + +Check the readme to see how to properly setup. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.markdown_oxide.setup{} +``` +**Commands:** +- Today: Open today's daily note +- Tomorrow: Open tomorrow's daily note +- Yesterday: Open yesterday's daily note + +**Default values:** + - `cmd` : + ```lua + { "markdown-oxide" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## marksman + +https://github.com/artempyanykh/marksman + +Marksman is a Markdown LSP server providing completion, cross-references, diagnostics, and more. + +Marksman works on MacOS, Linux, and Windows and is distributed as a self-contained binary for each OS. + +Pre-built binaries can be downloaded from https://github.com/artempyanykh/marksman/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.marksman.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "marksman", "server" } + ``` + - `filetypes` : + ```lua + { "markdown", "markdown.mdx" } + ``` + - `root_dir` : + ```lua + root_pattern(".git", ".marksman.toml") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## matlab_ls + +https://github.com/mathworks/MATLAB-language-server + +MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.matlab_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "matlab-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "matlab" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + MATLAB = { + indexWorkspace = false, + installPath = "", + matlabConnectionTiming = "onStart", + telemetry = true + } + } + ``` + - `single_file_support` : + ```lua + false + ``` + + +## mdx_analyzer + +https://github.com/mdx-js/mdx-analyzer + +`mdx-analyzer`, a language server for MDX + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mdx_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mdx-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown.mdx" } + ``` + - `init_options` : + ```lua + { + typescript = {} + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mesonlsp + +https://github.com/JCWasmx86/mesonlsp + +An unofficial, unendorsed language server for meson written in C++ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mesonlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mesonlsp", "--lsp" } + ``` + - `filetypes` : + ```lua + { "meson" } + ``` + - `root_dir` : + ```lua + util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git") + ``` + + +## metals + +https://scalameta.org/metals/ + +Scala language server with rich IDE features. + +See full instructions in the Metals documentation: + +https://scalameta.org/metals/docs/editors/vim#using-an-alternative-lsp-client + +Note: that if you're using [nvim-metals](https://github.com/scalameta/nvim-metals), that plugin fully handles the setup and installation of Metals, and you shouldn't set up Metals both with it and `lspconfig`. + +To install Metals, make sure to have [coursier](https://get-coursier.io/docs/cli-installation) installed, and once you do you can install the latest Metals with `cs install metals`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.metals.setup{} +``` + + +**Default values:** + - `capabilities` : + ```lua + { + workspace = { + configuration = false + } + } + ``` + - `cmd` : + ```lua + { "metals" } + ``` + - `filetypes` : + ```lua + { "scala" } + ``` + - `init_options` : + ```lua + { + compilerOptions = { + snippetAutoIndent = false + }, + isHttpEnabled = true, + statusBarProvider = "show-message" + } + ``` + - `message_level` : + ```lua + 4 + ``` + - `root_dir` : + ```lua + util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml") + ``` + + +## millet + +https://github.com/azdavis/millet + +Millet, a language server for Standard ML + +To use with nvim: + +1. Install a Rust toolchain: https://rustup.rs +2. Clone the repo +3. Run `cargo build --release --bin lang-srv` +4. Move `target/release/lang-srv` to somewhere on your $PATH as `millet` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.millet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "millet" } + ``` + - `filetypes` : + ```lua + { "sml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mint + +https://www.mint-lang.com + +Install Mint using the [instructions](https://www.mint-lang.com/install). +The language server is included since version 0.12.0. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mint", "ls" } + ``` + - `filetypes` : + ```lua + { "mint" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mlir_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#mlir-lsp-language-server--mlir-lsp-server= + +The Language Server for the LLVM MLIR language + +`mlir-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mlir_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mlir-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mlir" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mlir_pdll_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#pdll-lsp-language-server--mlir-pdll-lsp-server + +The Language Server for the LLVM PDLL language + +`mlir-pdll-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mlir_pdll_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mlir-pdll-lsp-server" } + ``` + - `filetypes` : + ```lua + { "pdll" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## mm0_ls + +https://github.com/digama0/mm0 + +Language Server for the metamath-zero theorem prover. + +Requires [mm0-rs](https://github.com/digama0/mm0/tree/master/mm0-rs) to be installed +and available on the `PATH`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mm0_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mm0-rs", "server" } + ``` + - `filetypes` : + ```lua + { "metamath-zero" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## mojo + +https://github.com/modularml/mojo + +`mojo-lsp-server` can be installed [via Modular](https://developer.modular.com/download) + +Mojo is a new programming language that bridges the gap between research and production by combining Python syntax and ecosystem with systems programming and metaprogramming features. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mojo.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mojo-lsp-server" } + ``` + - `filetypes` : + ```lua + { "mojo" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## motoko_lsp + +https://github.com/dfinity/vscode-motoko + +Language server for the Motoko programming language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.motoko_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "motoko-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "motoko" } + ``` + - `init_options` : + ```lua + { + formatter = "auto" + } + ``` + - `root_dir` : + ```lua + root_pattern("dfx.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## move_analyzer + +https://github.com/move-language/move/tree/main/language/move-analyzer + +Language server for Move + +The `move-analyzer` can be installed by running: + +``` +cargo install --git https://github.com/move-language/move move-analyzer +``` + +See [`move-analyzer`'s doc](https://github.com/move-language/move/blob/1b258a06e3c7d2bc9174578aac92cca3ac19de71/language/move-analyzer/editors/code/README.md#how-to-install) for details. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.move_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "move-analyzer" } + ``` + - `filetypes` : + ```lua + { "move" } + ``` + - `root_dir` : + ```lua + root_pattern("Move.toml") + ``` + + +## msbuild_project_tools_server + +https://github.com/tintoy/msbuild-project-tools-server/ + +MSBuild Project Tools Server can be installed by following the README.MD on the above repository. + +Example config: +```lua +lspconfig.msbuild_project_tools_server.setup { + cmd = {'dotnet', '/path/to/server/MSBuildProjectTools.LanguageServer.Host.dll'} +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.msbuild_project_tools_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "dotnet", "MSBuildProjectTools.LanguageServer.Host.dll" } + ``` + - `filetypes` : + ```lua + { "xml.csproj", "xml.fsproj", "sln" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + root_pattern('.git') + ``` + + +## mutt_ls + +https://github.com/neomutt/mutt-language-server + +A language server for (neo)mutt's muttrc. It can be installed via pip. + +```sh +pip install mutt-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.mutt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "mutt-language-server" } + ``` + - `filetypes` : + ```lua + { "muttrc", "neomuttrc" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nelua_lsp + +https://github.com/codehz/nelua-lsp + +nelua-lsp is an experimental nelua language server. + +You need [nelua.vim](https://github.com/stefanos82/nelua.vim/blob/main/ftdetect/nelua.vim) for nelua files to be recognized or add this to your config: + +in vimscript: +```vimscript +au BufNewFile,BufRead *.nelua setf nelua +``` + +in lua: +```lua +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { pattern = { "*.nelua" }, command = "setf nelua"}) +``` + +**By default, nelua-lsp doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +require'lspconfig'.nelua_lsp.setup { + cmd = { "nelua", "-L", "/path/to/nelua-lsp/", "--script", "/path/to/nelua-lsp/nelua-lsp.lua" }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nelua_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "nelua" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## neocmake + +https://github.com/Decodetalkers/neocmakelsp + +CMake LSP Implementation + +Neovim does not currently include built-in snippets. `neocmakelsp` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.neocmake.setup { + capabilities = capabilities, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.neocmake.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "neocmakelsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "cmake" } + ``` + - `root_dir` : + ```lua + root_pattern('.git', 'cmake') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nextls + +https://github.com/elixir-tools/next-ls + +**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.** + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nextls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "elixir", "eelixir", "heex", "surface" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nginx_language_server + +https://pypi.org/project/nginx-language-server/ + +`nginx-language-server` can be installed via pip: + +```sh +pip install -U nginx-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nginx_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nginx-language-server" } + ``` + - `filetypes` : + ```lua + { "nginx" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nickel_ls + +Nickel Language Server + +https://github.com/tweag/nickel + +`nls` can be installed with nix, or cargo, from the Nickel repository. +```sh +git clone https://github.com/tweag/nickel.git +``` + +Nix: +```sh +cd nickel +nix-env -f . -i +``` + +cargo: +```sh +cd nickel/lsp/nls +cargo install --path . +``` + +In order to have lspconfig detect Nickel filetypes (a prerequisite for autostarting a server), +install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nickel_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nls" } + ``` + - `filetypes` : + ```lua + { "ncl", "nickel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## nil_ls + +https://github.com/oxalica/nil + +A new language server for Nix Expression Language. + +If you are using Nix with Flakes support, run `nix profile install github:oxalica/nil` to install. +Check the repository README for more information. + +_See an example config at https://github.com/oxalica/nil/blob/main/dev/nvim-lsp.nix._ + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nil_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nil" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nim_langserver + +https://github.com/nim-lang/langserver + + +`nim-langserver` can be installed via the `nimble` package manager: +```sh +nimble install nimlangserver +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nim_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nimlangserver" } + ``` + - `filetypes` : + ```lua + { "nim" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nimls + +https://github.com/PMunch/nimlsp + +`nimlsp` can be installed via the `nimble` package manager: + +```sh +nimble install nimlsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nimls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nimlsp" } + ``` + - `filetypes` : + ```lua + { "nim" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nixd + +https://github.com/nix-community/nixd + +Nix language server, based on nix libraries. + +If you are using Nix with Flakes support, run `nix profile install github:nix-community/nixd` to install. +Check the repository README for more information. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nixd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nixd" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix",".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nomad_lsp + +https://github.com/juliosueiras/nomad-lsp + +Written in Go, compilation is needed for `nomad_lsp` to be used. Please see the [original repository](https://github.com/juliosuieras/nomad-lsp). + +Add the executable to your system or vim PATH and it will be set to go. + +No configuration option is needed unless you choose not to add `nomad-lsp` executable to the PATH. You should know what you are doing if you choose so. + +```lua +require('lspconfig').nomad_lsp.setup{ } +``` + +However, a `hcl.nomad` or `nomad` filetype should be defined. + +Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nomad_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nomad-lsp" } + ``` + - `filetypes` : + ```lua + { "hcl.nomad", "nomad" } + ``` + - `root_dir` : + ```lua + util.root_pattern("hcl.nomad", "nomad") + ``` + + +## ntt + +https://github.com/nokia/ntt +Installation instructions can be found [here](https://github.com/nokia/ntt#Install). +Can be configured by passing a "settings" object to `ntt.setup{}`: +```lua +require('lspconfig').ntt.setup{ + settings = { + ntt = { + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ntt.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ntt", "langserver" } + ``` + - `filetypes` : + ```lua + { "ttcn" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + + +## nushell + +https://github.com/nushell/nushell + +Nushell built-in language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nushell.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nu", "--lsp" } + ``` + - `filetypes` : + ```lua + { "nu" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## nxls + +https://github.com/nrwl/nx-console/tree/master/apps/nxls + +nxls, a language server for Nx Workspaces + +`nxls` can be installed via `npm`: +```sh +npm i -g nxls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.nxls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nxls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "json", "jsonc" } + ``` + - `root_dir` : + ```lua + util.root_pattern + ``` + + +## ocamlls + +https://github.com/ocaml-lsp/ocaml-language-server + +`ocaml-language-server` can be installed via `npm` +```sh +npm install -g ocaml-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ocamlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ocaml-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ocaml", "reason" } + ``` + - `root_dir` : + ```lua + root_pattern("*.opam", "esy.json", "package.json") + ``` + + +## ocamllsp + +https://github.com/ocaml/ocaml-lsp + +`ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation). + +To install the lsp server in a particular opam switch: +```sh +opam install ocaml-lsp-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ocamllsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ocamllsp" } + ``` + - `filetypes` : + ```lua + { "ocaml", "menhir", "ocamlinterface", "ocamllex", "reason", "dune" } + ``` + - `get_language_id` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace") + ``` + + +## ols + + https://github.com/DanielGavin/ols + + `Odin Language Server`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ols" } + ``` + - `filetypes` : + ```lua + { "odin" } + ``` + - `root_dir` : + ```lua + util.root_pattern("ols.json", ".git", "*.odin") + ``` + + +## omnisharp + +https://github.com/omnisharp/omnisharp-roslyn +OmniSharp server based on Roslyn workspaces + +`omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases). +OmniSharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp). + +OmniSharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +For `go_to_definition` to work fully, extended `textDocument/definition` handler is needed, for example see [omnisharp-extended-lsp.nvim](https://github.com/Hoffs/omnisharp-extended-lsp.nvim) + +```lua +require'lspconfig'.omnisharp.setup { + cmd = { "dotnet", "/path/to/omnisharp/OmniSharp.dll" }, + + settings = { + FormattingOptions = { + -- Enables support for reading code style, naming convention and analyzer + -- settings from .editorconfig. + EnableEditorConfigSupport = true, + -- Specifies whether 'using' directives should be grouped and sorted during + -- document formatting. + OrganizeImports = nil, + }, + MsBuild = { + -- 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. + LoadProjectsOnDemand = nil, + }, + RoslynExtensionsOptions = { + -- Enables support for roslyn analyzers, code fixes and rulesets. + EnableAnalyzersSupport = nil, + -- 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. + EnableImportCompletion = nil, + -- Only run analyzers against open files when 'enableRoslynAnalyzers' is + -- true + AnalyzeOpenDocumentsOnly = nil, + }, + Sdk = { + -- Specifies whether to include preview versions of the .NET SDK when + -- determining which version to use for project loading. + IncludePrereleases = true, + }, + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.omnisharp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "cs", "vb" } + ``` + - `init_options` : + ```lua + {} + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("*.sln", "*.csproj", "omnisharp.json", "function.json") + ``` + - `settings` : + ```lua + { + FormattingOptions = { + EnableEditorConfigSupport = true + }, + MsBuild = {}, + RoslynExtensionsOptions = {}, + Sdk = { + IncludePrereleases = true + } + } + ``` + + +## opencl_ls + +https://github.com/Galarius/opencl-language-server + +Build instructions can be found [here](https://github.com/Galarius/opencl-language-server/blob/main/_dev/build.md). + +Prebuilt binaries are available for Linux, macOS and Windows [here](https://github.com/Galarius/opencl-language-server/releases). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.opencl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "opencl-language-server" } + ``` + - `filetypes` : + ```lua + { "opencl" } + ``` + - `root_dir` : + ```lua + util.root_pattern(".git") + ``` + + +## openedge_ls + +[Language server](https://github.com/vscode-abl/vscode-abl) for Progress OpenEdge ABL. + +For manual installation, download abl-lsp.jar from the [VSCode +extension](https://github.com/vscode-abl/vscode-abl/releases/latest). + +Configuration + +```lua +require('lspconfig').['openedge_ls'].setup { + oe_jar_path = '/path/to/abl-lsp.jar', + dlc = '12.2:/path/to/dlc-12.2', -- Version number and OpenEdge root directory (colon separator) + debug = false, -- Set to true for debug logging + trace = false -- Set to true for trace logging (REALLY verbose) +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openedge_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "progress" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('openedge-project.json') + ``` + + +## openscad_ls + +https://github.com/dzhu/openscad-language-server + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-language-server` binary with `cargo`: +```sh +cargo install openscad-language-server +``` + +Vim does not have built-in syntax for the `openscad` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.scad set filetype=openscad ]] +``` + +or by installing a filetype plugin such as https://github.com/sirtaj/vim-openscad + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openscad_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "openscad-language-server" } + ``` + - `filetypes` : + ```lua + { "openscad" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## openscad_lsp + +https://github.com/Leathong/openscad-LSP + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-lsp` binary with `cargo`: +```sh +cargo install openscad-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.openscad_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "openscad-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "openscad" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pact_ls + +https://github.com/kadena-io/pact-lsp + +The Pact language server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pact_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pact-lsp" } + ``` + - `filetypes` : + ```lua + { "pact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pasls + +https://github.com/genericptr/pascal-language-server + +An LSP server implementation for Pascal variants that are supported by Free Pascal, including Object Pascal. It uses CodeTools from Lazarus as backend. + +First set `cmd` to the Pascal lsp binary. + +Customization options are passed to pasls as environment variables for example in your `.bashrc`: +```bash +export FPCDIR='/usr/lib/fpc/src' # FPC source directory (This is the only required option for the server to work). +export PP='/usr/lib/fpc/3.2.2/ppcx64' # Path to the Free Pascal compiler executable. +export LAZARUSDIR='/usr/lib/lazarus' # Path to the Lazarus sources. +export FPCTARGET='' # Target operating system for cross compiling. +export FPCTARGETCPU='x86_64' # Target CPU for cross compiling. +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pasls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pasls" } + ``` + - `filetypes` : + ```lua + { "pascal" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pbls + +https://git.sr.ht/~rrc/pbls + +Prerequisites: Ensure protoc is on your $PATH. + +`pbls` can be installed via `cargo install`: +```sh +cargo install --git https://git.sr.ht/~rrc/pbls +``` + +pbls is a Language Server for protobuf + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pbls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pbls" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + root_pattern(".pbls.toml", ".git") + ``` + + +## perlls + +https://github.com/richterger/Perl-LanguageServer/tree/master/clients/vscode/perl + +`Perl-LanguageServer`, a language server for Perl. + +To use the language server, ensure that you have Perl::LanguageServer installed and perl command is on your path. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "perl", "-MPerl::LanguageServer", "-e", "Perl::LanguageServer::run", "--", "--port 13603", "--nostdio 0" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `settings` : + ```lua + { + perl = { + fileFilter = { ".pm", ".pl" }, + ignoreDirs = ".git", + perlCmd = "perl", + perlInc = " " + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## perlnavigator + +https://github.com/bscan/PerlNavigator + +A Perl language server. It can be installed via npm: + +```sh +npm i -g perlnavigator-server +``` + +At minimum, you will need `perl` in your path. If you want to use a non-standard `perl` you will need to set your configuration like so: +```lua +settings = { + perlnavigator = { + perlPath = '/some/odd/location/my-perl' + } +} +``` + +The `contributes.configuration.properties` section of `perlnavigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `perlnavigator` at your `perltidy` and `perlcritic` configurations. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlnavigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "perlnavigator" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## perlpls + +https://github.com/FractalBoy/perl-language-server +https://metacpan.org/pod/PLS + +`PLS`, another language server for Perl. + +To use the language server, ensure that you have PLS installed and that it is in your path + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.perlpls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pls" } + ``` + - `filetypes` : + ```lua + { "perl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + perl = { + perlcritic = { + enabled = false + }, + syntax = { + enabled = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pest_ls + +https://github.com/pest-parser/pest-ide-tools + +Language server for pest grammars. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pest_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pest-language-server" } + ``` + - `filetypes` : + ```lua + { "pest" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## phan + +https://github.com/phan/phan + +Installation: https://github.com/phan/phan#getting-started + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.phan.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "phan", "-m", "json", "--no-color", "--no-progress-bar", "-x", "-u", "-S", "--language-server-on-stdin", "--allow-polyfill-parser" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## phpactor + +https://github.com/phpactor/phpactor + +Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.phpactor.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "phpactor", "language-server" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + + +## pico8_ls + +https://github.com/japhib/pico8-ls + +Full language support for the PICO-8 dialect of Lua. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pico8_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pico8-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "p8" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## pkgbuild_language_server + +https://github.com/Freed-Wu/pkgbuild-language-server + +Language server for ArchLinux/Windows Msys2's PKGBUILD. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pkgbuild_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pkgbuild-language-server" } + ``` + - `filetypes` : + ```lua + { "PKGBUILD" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## please + +https://github.com/thought-machine/please + +High-performance extensible build system for reproducible multi-language builds. + +The `plz` binary will automatically install the LSP for you on first run + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.please.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "plz", "tool", "lps" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## postgres_lsp + +https://github.com/supabase/postgres_lsp + +A Language Server for Postgres + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.postgres_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "postgres_lsp" } + ``` + - `filetypes` : + ```lua + { "sql" } + ``` + - `root_dir` : + ```lua + util.root_pattern 'root-file.txt' + ``` + - `single_file_support` : + ```lua + true + ``` + + +## powershell_es + +https://github.com/PowerShell/PowerShellEditorServices + +Language server for PowerShell. + +To install, download and extract PowerShellEditorServices.zip +from the [releases](https://github.com/PowerShell/PowerShellEditorServices/releases). +To configure the language server, set the property `bundle_path` to the root +of the extracted PowerShellEditorServices.zip. + +The default configuration doesn't set `cmd` unless `bundle_path` is specified. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', +} +``` + +By default the languageserver is started in `pwsh` (PowerShell Core). This can be changed by specifying `shell`. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', + shell = 'powershell.exe', +} +``` + +Note that the execution policy needs to be set to `Unrestricted` for the languageserver run under PowerShell + +If necessary, specific `cmd` can be defined instead of `bundle_path`. +See [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices#stdio) +to learn more. + +```lua +require'lspconfig'.powershell_es.setup{ + cmd = {'pwsh', '-NoLogo', '-NoProfile', '-Command', "c:/PSES/Start-EditorServices.ps1 ..."} +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.powershell_es.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "ps1" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + git root or current directory + ``` + - `shell` : + ```lua + "pwsh" + ``` + - `single_file_support` : + ```lua + true + ``` + + +## prismals + +Language Server for the Prisma JavaScript and TypeScript ORM + +`@prisma/language-server` can be installed via npm +```sh +npm install -g @prisma/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prismals.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "prisma-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "prisma" } + ``` + - `root_dir` : + ```lua + root_pattern(".git", "package.json") + ``` + - `settings` : + ```lua + { + prisma = { + prismaFmtBinPath = "" + } + } + ``` + + +## prolog_ls + + https://github.com/jamesnvc/lsp_server + + Language Server Protocol server for SWI-Prolog + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prolog_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "swipl", "-g", "use_module(library(lsp_server)).", "-g", "lsp_server:main", "-t", "halt", "--", "stdio" } + ``` + - `filetypes` : + ```lua + { "prolog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## prosemd_lsp + +https://github.com/kitten/prosemd-lsp + +An experimental LSP for Markdown. + +Please see the manual installation instructions: https://github.com/kitten/prosemd-lsp#manual-installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.prosemd_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "prosemd-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + + ``` + - `single_file_support` : + ```lua + true + ``` + + +## protols + +https://github.com/coder3101/protols + +`protols` can be installed via `cargo`: +```sh +cargo install protols +``` + +A Language Server for proto3 files. It uses tree-sitter and runs in single file mode. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.protols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "protols" } + ``` + - `filetypes` : + ```lua + { "proto" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## psalm + +https://github.com/vimeo/psalm + +Can be installed with composer. +```sh +composer global require vimeo/psalm +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.psalm.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "psalm", "--language-server" } + ``` + - `filetypes` : + ```lua + { "php" } + ``` + - `root_dir` : + ```lua + root_pattern("psalm.xml", "psalm.xml.dist") + ``` + + +## pug + +https://github.com/opa-oz/pug-lsp + +An implementation of the Language Protocol Server for [Pug.js](http://pugjs.org) + +PugLSP can be installed via `go get github.com/opa-oz/pug-lsp`, or manually downloaded from [releases page](https://github.com/opa-oz/pug-lsp/releases) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pug.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pug-lsp" } + ``` + - `filetypes` : + ```lua + { "pug" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## puppet + +LSP server for Puppet. + +Installation: + +- Clone the editor-services repository: + https://github.com/puppetlabs/puppet-editor-services + +- Navigate into that directory and run: `bundle install` + +- Install the 'puppet-lint' gem: `gem install puppet-lint` + +- Add that repository to $PATH. + +- Ensure you can run `puppet-languageserver` from outside the editor-services directory. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.puppet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "puppet-languageserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "puppet" } + ``` + - `root_dir` : + ```lua + root_pattern("manifests", ".puppet-lint.rc", "hiera.yaml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## purescriptls + +https://github.com/nwolverson/purescript-language-server + +The `purescript-language-server` can be added to your project and `$PATH` via + +* JavaScript package manager such as npm, pnpm, Yarn, et al. +* Nix under the `nodePackages` and `nodePackages_latest` package sets + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.purescriptls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "purescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "purescript" } + ``` + - `root_dir` : + ```lua + root_pattern('bower.json', 'flake.nix', 'psc-package.json', 'shell.nix', 'spago.dhall', 'spago.yaml'), + ``` + + +## pylsp + +https://github.com/python-lsp/python-lsp-server + +A Python 3.6+ implementation of the Language Server Protocol. + +See the [project's README](https://github.com/python-lsp/python-lsp-server) for installation instructions. + +Configuration options are documented [here](https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md). +In order to configure an option, it must be translated to a nested Lua table and included in the `settings` argument to the `setup{}` function. +For example, in order to set the `pylsp.plugins.pycodestyle.ignore` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + } + } + } + } +} +``` + +Note: This is a community fork of `pyls`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pylsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pylsp" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pylyzer + + https://github.com/mtshiba/pylyzer + + `pylyzer`, a fast static code analyzer & language server for Python. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pylyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pylyzer", "--server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + python = { + checkOnType = false, + diagnostics = true, + inlayHints = true, + smartCompletion = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## pyre + +https://pyre-check.org/ + +`pyre` a static type checker for Python 3. + +`pyre` offers an extremely limited featureset. It currently only supports diagnostics, +which are triggered on save. + +Do not report issues for missing features in `pyre` to `lspconfig`. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pyre.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "pyre", "persistent" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## pyright + +https://github.com/microsoft/pyright + +`pyright`, a static type checker and language server for python + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.pyright.setup{} +``` +**Commands:** +- PyrightOrganizeImports: Organize Imports +- PyrightSetPythonPath: Reconfigure pyright with the provided python path + +**Default values:** + - `cmd` : + ```lua + { "pyright-langserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + python = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + useLibraryCodeForTypes = true + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## qml_lsp + +https://invent.kde.org/sdk/qml-lsp + +LSP implementation for QML (autocompletion, live linting, etc. in editors) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.qml_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "qml-lsp" } + ``` + - `filetypes` : + ```lua + { "qmljs" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## qmlls + +https://github.com/qt/qtdeclarative + +LSP implementation for QML (autocompletion, live linting, etc. in editors), + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.qmlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "qmlls" } + ``` + - `filetypes` : + ```lua + { "qml", "qmljs" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## quick_lint_js + +https://quick-lint-js.com/ + +quick-lint-js finds bugs in JavaScript programs. + +See installation [instructions](https://quick-lint-js.com/install/) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.quick_lint_js.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "quick-lint-js", "--lsp-server" } + ``` + - `filetypes` : + ```lua + { "javascript", "typescript" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## r_language_server + +[languageserver](https://github.com/REditorSupport/languageserver) is an +implementation of the Microsoft's Language Server Protocol for the R +language. + +It is released on CRAN and can be easily installed by + +```r +install.packages("languageserver") +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.r_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "R", "--no-echo", "-e", "languageserver::run()" } + ``` + - `filetypes` : + ```lua + { "r", "rmd" } + ``` + - `log_level` : + ```lua + 2 + ``` + - `root_dir` : + ```lua + root_pattern(".git") or os_homedir + ``` + + +## racket_langserver + +[https://github.com/jeapostrophe/racket-langserver](https://github.com/jeapostrophe/racket-langserver) + +The Racket language server. This project seeks to use +[DrRacket](https://github.com/racket/drracket)'s public API to provide +functionality that mimics DrRacket's code tools as closely as possible. + +Install via `raco`: `raco pkg install racket-langserver` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.racket_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "racket", "--lib", "racket-langserver" } + ``` + - `filetypes` : + ```lua + { "racket", "scheme" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## raku_navigator + +https://github.com/bscan/RakuNavigator +A Raku language server +**By default, raku_navigator doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. +You have to install the language server manually. +Clone the RakuNavigator repo, install based on the [instructions](https://github.com/bscan/raku_Navigator#installation-for-other-editors), +and point `cmd` to `server.js` inside the `server/out` directory: +```lua +cmd = {'node', '/server/out/server.js', '--stdio'} +``` +At minimum, you will need `raku` in your path. If you want to use a non-standard `raku` you will need to set your configuration like so: +```lua +settings = { + raku_navigator = { + rakuPath = '/some/odd/location/my-raku' + } +} +``` +The `contributes.configuration.properties` section of `raku_navigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `raku_navigator` at your `raku_tidy` and `raku_critic` configurations. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.raku_navigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + {} + ``` + - `filetypes` : + ```lua + { "raku" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## reason_ls + +Reason language server + +You can install reason language server from [reason-language-server](https://github.com/jaredly/reason-language-server) repository. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.reason_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "reason-language-server" } + ``` + - `filetypes` : + ```lua + { "reason" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## regal + +https://github.com/StyraInc/regal + +A linter for Rego, with support for running as an LSP server. + +`regal` can be installed by running: +```sh +go install github.com/StyraInc/regal@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.regal.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "regal", "language-server" } + ``` + - `filetypes` : + ```lua + { "rego" } + ``` + - `root_dir` : + ```lua + root_pattern("*.rego", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## regols + +https://github.com/kitagry/regols + +OPA Rego language server. + +`regols` can be installed by running: +```sh +go install github.com/kitagry/regols@latest +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.regols.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "regols" } + ``` + - `filetypes` : + ```lua + { "rego" } + ``` + - `root_dir` : + ```lua + root_pattern("*.rego", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## relay_lsp + + https://github.com/facebook/relay + `Relay` is a JavaScript framework for building data-driven React applications + + Setup: + + - Make sure you have a Relay config file somewhere in your project. + - We support standard config file formats (`.yml`, `.js`, `.json`), and the the `relay` field in your `package.json` + - Make sure you have the `relay-compiler` installed in your project. The bare minimum is v13. + - Make sure you are able to run the `relay-compiler` command from the command line. If `yarn relay-compiler` works, it's very likely that the LSP will work. + - Remove / disable any conflicting GraphQL LSPs you have installed. + + Relay LSP is a part of the Relay Compiler binary and available when adding `relay-compiler` to your project's devDependencies. + + ```lua + require'lspconfig'.relay_lsp.setup { + -- (default: false) Whether or not we should automatically start + -- the Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + + -- (default: null) Path to a relay config relative to the + -- `root_dir`. Without this, the compiler will search for your + -- config. This is helpful if your relay project is in a nested + -- directory. + path_to_config = nil, + } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.relay_lsp.setup{} +``` + + +**Default values:** + - `auto_start_compiler` : + ```lua + false + ``` + - `cmd` : + ```lua + { "relay-compiler", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["window/showStatus"] = + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("relay.config.*", "package.json") + ``` + + +## remark_ls + +https://github.com/remarkjs/remark-language-server + +`remark-language-server` can be installed via `npm`: +```sh +npm install -g remark-language-server +``` + +`remark-language-server` uses the same +[configuration files](https://github.com/remarkjs/remark/tree/main/packages/remark-cli#example-config-files-json-yaml-js) +as `remark-cli`. + +This uses a plugin based system. Each plugin needs to be installed locally using `npm` or `yarn`. + +For example, given the following `.remarkrc.json`: + +```json +{ + "presets": [ + "remark-preset-lint-recommended" + ] +} +``` + +`remark-preset-lint-recommended` needs to be installed in the local project: + +```sh +npm install remark-preset-lint-recommended +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.remark_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "remark-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rescriptls + +https://github.com/rescript-lang/rescript-vscode/tree/master/server + +ReScript Language Server can be installed via npm: +```sh +npm install -g @rescript/language-server +``` + +See [package.json](https://github.com/rescript-lang/rescript-vscode/blob/master/package.json#L139) +for init_options supported. + +For example, in order to disable the `inlayHints` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + rescript = { + settings = { + inlayHints = { enable = false }, + }, + }, + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rescriptls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "rescript" } + ``` + - `init_options` : + ```lua + { + extensionConfiguration = { + allowBuiltInFormatter = true, + askToStartBuild = false, + cache = { + projectConfig = { + enabled = true + } + }, + codeLens = true, + incrementalTypechecking = { + acrossFiles = true, + enabled = true + }, + inlayHints = { + enable = true + } + } + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## rls + +https://github.com/rust-lang/rls + +rls, a language server for Rust + +See https://github.com/rust-lang/rls#setup to setup rls itself. +See https://github.com/rust-lang/rls#configuration for rls-specific settings. +All settings listed on the rls configuration section of the readme +must be set under settings.rust as follows: + +```lua +nvim_lsp.rls.setup { + settings = { + rust = { + unstable_features = true, + build_on_save = false, + all_features = true, + }, + }, +} +``` + +If you want to use rls for a particular build, eg nightly, set cmd as follows: + +```lua +cmd = {"rustup", "run", "nightly", "rls"} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rls" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + root_pattern("Cargo.toml") + ``` + + +## rnix + +https://github.com/nix-community/rnix-lsp + +A language server for Nix providing basic completion and formatting via nixpkgs-fmt. + +To install manually, run `cargo install rnix-lsp`. If you are using nix, rnix-lsp is in nixpkgs. + +This server accepts configuration via the `settings` key. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rnix.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rnix-lsp" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + vim's starting directory + ``` + - `settings` : + ```lua + {} + ``` + + +## robotframework_ls + +https://github.com/robocorp/robotframework-lsp + +Language Server Protocol implementation for Robot Framework. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.robotframework_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "robotframework_ls" } + ``` + - `filetypes` : + ```lua + { "robot" } + ``` + - `root_dir` : + ```lua + util.root_pattern('robotidy.toml', 'pyproject.toml', 'conda.yaml', 'robot.yaml')(fname) + or util.find_git_ancestor(fname) + ``` + + +## roc_ls + +https://github.com/roc-lang/roc/tree/main/crates/language_server#roc_language_server + +The built-in language server for the Roc programming language. +[Installation](https://github.com/roc-lang/roc/tree/main/crates/language_server#installing) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.roc_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "roc_language_server" } + ``` + - `filetypes` : + ```lua + { "roc" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rome + +https://rome.tools + +Language server for the Rome Frontend Toolchain. + +(Unmaintained, use [Biome](https://biomejs.dev/blog/annoucing-biome) instead.) + +```sh +npm install [-g] rome +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rome.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rome", "lsp-proxy" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "json", "typescript", "typescript.tsx", "typescriptreact" } + ``` + - `root_dir` : + ```lua + root_pattern('package.json', 'node_modules', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rubocop + +https://github.com/rubocop/rubocop + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rubocop.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rubocop", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## ruby_lsp + +https://shopify.github.io/ruby-lsp/ + +This gem is an implementation of the language server protocol specification for +Ruby, used to improve editor features. + +Install the gem. There's no need to require it, since the server is used as a +standalone executable. + +```sh +group :development do + gem "ruby-lsp", require: false +end +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruby_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruby-lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `init_options` : + ```lua + { + formatter = "auto" + } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ruff + +https://github.com/astral-sh/ruff + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`. + +```sh +pip install ruff +``` + +**Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.** + +This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice. + +Server settings can be provided via: + +```lua +require('lspconfig').ruff.setup({ + init_options = { + settings = { + -- Server settings should go here + } + } +}) +``` + +Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruff.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruff", "server" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ruff_lsp + +https://github.com/astral-sh/ruff-lsp + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code transformation tool, written in Rust. It can be installed via pip. + +```sh +pip install ruff-lsp +``` + +Extra CLI arguments for `ruff` can be provided via + +```lua +require'lspconfig'.ruff_lsp.setup{ + init_options = { + settings = { + -- Any extra CLI arguments for `ruff` go here. + args = {}, + } + } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ruff_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ruff-lsp" } + ``` + - `filetypes` : + ```lua + { "python" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rune_languageserver + +https://crates.io/crates/rune-languageserver + +A language server for the [Rune](https://rune-rs.github.io/) Language, +an embeddable dynamic programming language for Rust + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rune_languageserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "rune-languageserver" } + ``` + - `filetypes` : + ```lua + { "rune" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## rust_analyzer + +https://github.com/rust-lang/rust-analyzer + +rust-analyzer (aka rls 2.0), a language server for Rust + + +See [docs](https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc) for extra settings. The settings can be used like this: +```lua +require'lspconfig'.rust_analyzer.setup{ + settings = { + ['rust-analyzer'] = { + diagnostics = { + enable = false; + } + } + } +} +``` + +Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per +https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.rust_analyzer.setup{} +``` +**Commands:** +- CargoReload: Reload current cargo workspace + +**Default values:** + - `before_init` : + ```lua + see source file + ``` + - `capabilities` : + ```lua + { + experimental = { + serverStatusNotification = true + } + } + ``` + - `cmd` : + ```lua + { "rust-analyzer" } + ``` + - `filetypes` : + ```lua + { "rust" } + ``` + - `root_dir` : + ```lua + root_pattern("Cargo.toml", "rust-project.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## salt_ls + +Language server for Salt configuration files. +https://github.com/dcermak/salt-lsp + +The language server can be installed with `pip`: +```sh +pip install salt-lsp +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.salt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "salt_lsp_server" } + ``` + - `filetypes` : + ```lua + { "sls" } + ``` + - `root_dir` : + ```lua + root_pattern('.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## scheme_langserver + +https://github.com/ufo5260987423/scheme-langserver +`scheme-langserver`, a language server protocol implementation for scheme. +And for nvim user, please add .sls to scheme file extension list. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.scheme_langserver.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "scheme-langserver", "~/.scheme-langserver.log", "enable", "disable" } + ``` + - `filetypes` : + ```lua + { "scheme" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## scry + +https://github.com/crystal-lang-tools/scry + +Crystal language server. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.scry.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "scry" } + ``` + - `filetypes` : + ```lua + { "crystal" } + ``` + - `root_dir` : + ```lua + root_pattern('shard.yml', '.git') + ``` + - `single_file_support` : + ```lua + true + ``` + + +## serve_d + + https://github.com/Pure-D/serve-d + + `Microsoft language server protocol implementation for D using workspace-d.` + Download a binary from https://github.com/Pure-D/serve-d/releases and put it in your $PATH. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.serve_d.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "serve-d" } + ``` + - `filetypes` : + ```lua + { "d" } + ``` + - `root_dir` : + ```lua + util.root_pattern("dub.json", "dub.sdl", ".git") + ``` + + +## shopify_theme_ls + +https://shopify.dev/docs/api/shopify-cli + +[Language Server](https://shopify.dev/docs/themes/tools/cli/language-server) and Theme Check (linter) for Shopify themes. + +`shopify` can be installed via npm `npm install -g @shopify/cli`. + +Note: This LSP already includes Theme Check so you don't need to use the `theme_check` server configuration as well. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.shopify_theme_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "shopify", "theme", "language-server" } + ``` + - `filetypes` : + ```lua + { "liquid" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## sixtyfps + +https://github.com/sixtyfpsui/sixtyfps +`SixtyFPS`'s language server + +You can build and install `sixtyfps-lsp` binary with `cargo`: +```sh +cargo install sixtyfps-lsp +``` + +Vim does not have built-in syntax for the `sixtyfps` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.60 set filetype=sixtyfps ]] +``` + +or by installing a filetype plugin such as https://github.com/RustemB/sixtyfps-vim + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sixtyfps.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sixtyfps-lsp" } + ``` + - `filetypes` : + ```lua + { "sixtyfps" } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## slangd + +https://github.com/shader-slang/slang + +The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or +by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md). + +The server can be configured by passing a "settings" object to `slangd.setup{}`: + +```lua +require('lspconfig').slangd.setup{ + settings = { + slang = { + predefinedMacros = {"MY_VALUE_MACRO=1"}, + inlayHints = { + deducedTypes = true, + parameterNames = true, + } + } + } +} +``` +Available options are documented [here](https://github.com/shader-slang/slang-vscode-extension/tree/main?tab=readme-ov-file#configurations) +or in more detail [here](https://github.com/shader-slang/slang-vscode-extension/blob/main/package.json#L70). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slangd.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slangd" } + ``` + - `filetypes` : + ```lua + { "hlsl", "shaderslang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## slint_lsp + +https://github.com/slint-ui/slint +`Slint`'s language server + +You can build and install `slint-lsp` binary with `cargo`: +```sh +cargo install slint-lsp +``` + +Vim does not have built-in syntax for the `slint` filetype at this time. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.slint set filetype=slint ]] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.slint_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "slint-lsp" } + ``` + - `filetypes` : + ```lua + { "slint" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## smarty_ls + +https://github.com/landeaux/vscode-smarty-langserver-extracted + +Language server for Smarty. + +`smarty-language-server` can be installed via `npm`: + +```sh +npm i -g vscode-smarty-langserver-extracted +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.smarty_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "smarty-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "smarty" } + ``` + - `init_options` : + ```lua + {} + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + css = { + validate = true + }, + smarty = { + pluginDirs = {} + } + } + ``` + + +## smithy_ls + +https://github.com/awslabs/smithy-language-server + +`Smithy Language Server`, A Language Server Protocol implementation for the Smithy IDL + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.smithy_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "smithy-language-server", "0" } + ``` + - `filetypes` : + ```lua + { "smithy" } + ``` + - `root_dir` : + ```lua + root_pattern("smithy-build.json", "build.gradle", "build.gradle.kts", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## snakeskin_ls + +https://www.npmjs.com/package/@snakeskin/cli + +`snakeskin cli` can be installed via `npm`: +```sh +npm install -g @snakeskin/cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.snakeskin_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "snakeskin-cli", "lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ss" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## snyk_ls + +https://github.com/snyk/snyk-ls + +LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.snyk_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "snyk-ls" } + ``` + - `filetypes` : + ```lua + { "go", "gomod", "javascript", "typescript", "json", "python", "requirements", "helm", "yaml", "terraform", "terraform-vars" } + ``` + - `init_options` : + ```lua + Configuration from https://github.com/snyk/snyk-ls#configuration-1 + ``` + - `root_dir` : + ```lua + root_pattern(".git", ".snyk") + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## solang + +A language server for Solidity + +See the [documentation](https://solang.readthedocs.io/en/latest/installing.html) for installation instructions. + +The language server only provides the following capabilities: +* Syntax highlighting +* Diagnostics +* Hover + +There is currently no support for completion, goto definition, references, or other functionality. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solang.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solang", "language-server", "--target", "evm" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## solargraph + +https://solargraph.org/ + +solargraph, a language server for Ruby + +You can install solargraph via gem install. + +```sh +gem install --user-install solargraph +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solargraph.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solargraph", "stdio" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `init_options` : + ```lua + { + formatting = true + } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + - `settings` : + ```lua + { + solargraph = { + diagnostics = true + } + } + ``` + + +## solc + +https://docs.soliditylang.org/en/latest/installing-solidity.html + +solc is the native language server for the Solidity language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solc.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solc", "--lsp" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern('hardhat.config.*', '.git') + ``` + + +## solidity + +https://github.com/qiuxiang/solidity-ls + +npm i solidity-ls -g + +Make sure that solc is installed and it's the same version of the file. solc-select is recommended. + +Solidity language server is a LSP with autocomplete, go to definition and diagnostics. + +If you use brownie, use this root_dir: +root_dir = util.root_pattern('brownie-config.yaml', '.git') + +on includePath, you can add an extra path to search for external libs, on remapping you can remap lib <> path, like: + +```lua +{ solidity = { includePath = '/Users/your_user/.brownie/packages/', remapping = { ["@OpenZeppelin/"] = 'OpenZeppelin/openzeppelin-contracts@4.6.0/' } } } +``` + +**For brownie users** +Change the root_dir to: + +```lua +root_pattern("brownie-config.yaml", ".git") +``` + +The best way of using it is to have a package.json in your project folder with the packages that you will use. +After installing with package.json, just create a `remappings.txt` with: + +``` +@OpenZeppelin/=node_modules/OpenZeppelin/openzeppelin-contracts@4.6.0/ +``` + +You can omit the node_modules as well. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "solidity-ls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") + ``` + - `settings` : + ```lua + { + solidity = { + includePath = "", + remapping = {} + } + } + ``` + + +## solidity_ls + +https://github.com/juanfranblanco/vscode-solidity + +`vscode-solidity-server` can be installed via `npm`: + +```sh +npm install -g vscode-solidity-server +``` + +`vscode-solidity-server` is a language server for the Solidity language ported from the VSCode "solidity" extension. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vscode-solidity-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("hardhat.config.js", "hardhat.config.ts", "foundry.toml", "remappings.txt", "truffle.js", "truffle-config.js", "ape-config.yaml", ".git", "package.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## solidity_ls_nomicfoundation + +https://github.com/NomicFoundation/hardhat-vscode/blob/development/server/README.md + +`nomicfoundation-solidity-language-server` can be installed via `npm`: + +```sh +npm install -g @nomicfoundation/solidity-language-server +``` + +A language server for the Solidity programming language, built by the Nomic Foundation for the Ethereum community. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.solidity_ls_nomicfoundation.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nomicfoundation-solidity-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "solidity" } + ``` + - `root_dir` : + ```lua + root_pattern("hardhat.config.js", "hardhat.config.ts", "foundry.toml", "remappings.txt", "truffle.js", "truffle-config.js", "ape-config.yaml", ".git", "package.json") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## somesass_ls + + +https://github.com/wkillerud/some-sass/tree/main/packages/language-server + +`some-sass-language-server` can be installed via `npm`: + +```sh +npm i -g some-sass-language-server +``` + +The language server provides: + +- Full support for @use and @forward, including aliases, prefixes and hiding. +- Workspace-wide code navigation and refactoring, such as Rename Symbol. +- Rich documentation through SassDoc. +- Language features for %placeholder-selectors, both when using them and writing them. +- Suggestions and hover info for built-in Sass modules, when used with @use. + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.somesass_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "some-sass-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "scss", "sass" } + ``` + - `name` : + ```lua + "somesass_ls" + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") or bufdir + ``` + - `settings` : + ```lua + { + somesass = { + suggestAllFromOpenDocument = true + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## sorbet + +https://sorbet.org + +Sorbet is a fast, powerful type checker designed for Ruby. + +You can install Sorbet via gem install. You might also be interested in how to set +Sorbet up for new projects: https://sorbet.org/docs/adopting. + +```sh +gem install sorbet +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sorbet.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "srb", "tc", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## sourcekit + +https://github.com/apple/sourcekit-lsp + +Language server for Swift and C/C++/Objective-C. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sourcekit.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sourcekit-lsp" } + ``` + - `filetypes` : + ```lua + { "swift", "c", "cpp", "objective-c", "objective-cpp" } + ``` + - `root_dir` : + ```lua + root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git") + ``` + + +## sourcery + +https://github.com/sourcery-ai/sourcery + +Refactor Python instantly using the power of AI. + +It requires the init_options param to be populated as shown below and will respond with the list of ServerCapabilities that it supports: + +```lua +require'lspconfig'.sourcery.setup { + init_options = { + --- The Sourcery token for authenticating the user. + --- This is retrieved from the Sourcery website and must be + --- provided by each user. The extension must provide a + --- configuration option for the user to provide this value. + token = , + + --- The extension's name and version as defined by the extension. + extension_version = 'vim.lsp', + + --- The editor's name and version as defined by the editor. + editor_version = 'vim', + }, +} +``` + +Alternatively, you can login to sourcery by running `sourcery login` with sourcery-cli. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sourcery.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sourcery", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "python", "typescript", "typescriptreact" } + ``` + - `init_options` : + ```lua + { + editor_version = "vim", + extension_version = "vim.lsp" + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## spectral + +https://github.com/luizcorreia/spectral-language-server + `A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.` + +`spectral-language-server` can be installed via `npm`: +```sh +npm i -g spectral-language-server +``` +See [vscode-spectral](https://github.com/stoplightio/vscode-spectral#extension-settings) for configuration options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.spectral.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "spectral-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml", "json", "yml" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + enable = true, + run = "onType", + validateLanguages = { "yaml", "json", "yml" } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## spyglassmc_language_server + +https://github.com/SpyglassMC/Spyglass/tree/main/packages/language-server + +Language server for Minecraft datapacks. + +`spyglassmc-language-server` can be installed via `npm`: + +```sh +npm i -g @spyglassmc/language-server +``` + +You may also need to configure the filetype: + +`autocmd BufNewFile,BufRead *.mcfunction set filetype=mcfunction` + +This is automatically done by [CrystalAlpha358/vim-mcfunction](https://github.com/CrystalAlpha358/vim-mcfunction), which also provide syntax highlight. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.spyglassmc_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "spyglassmc-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "mcfunction" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## sqlls + +https://github.com/joe-re/sql-language-server + +This LSP can be installed via `npm`. Find further instructions on manual installation of the sql-language-server at [joe-re/sql-language-server](https://github.com/joe-re/sql-language-server). +
    + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sqlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sql-language-server", "up", "--method", "stdio" } + ``` + - `filetypes` : + ```lua + { "sql", "mysql" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## sqls + +https://github.com/sqls-server/sqls + +```lua +require'lspconfig'.sqls.setup{ + cmd = {"path/to/command", "-config", "path/to/config.yml"}; + ... +} +``` +Sqls can be installed via `go get github.com/sqls-server/sqls`. Instructions for compiling Sqls from the source can be found at [sqls-server/sqls](https://github.com/sqls-server/sqls). + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.sqls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "sqls" } + ``` + - `filetypes` : + ```lua + { "sql", "mysql" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## standardrb + +https://github.com/testdouble/standard + +Ruby Style Guide, with linter & automatic code fixer. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.standardrb.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "standardrb", "--lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## starlark_rust + +https://github.com/facebookexperimental/starlark-rust/ +The LSP part of `starlark-rust` is not currently documented, + but the implementation works well for linting. +This gives valuable warnings for potential issues in the code, +but does not support refactorings. + +It can be installed with cargo: https://crates.io/crates/starlark + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.starlark_rust.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "starlark", "--lsp" } + ``` + - `filetypes` : + ```lua + { "star", "bzl", "BUILD.bazel" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## starpls + +https://github.com/withered-magic/starpls + +`starpls` is an LSP implementation for Starlark. Installation instructions can be found in the project's README. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.starpls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "starpls" } + ``` + - `filetypes` : + ```lua + { "bzl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## statix + +https://github.com/nerdypepper/statix + +lints and suggestions for the nix programming language + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.statix.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "statix" } + ``` + - `filetypes` : + ```lua + { "nix" } + ``` + - `root_dir` : + ```lua + root_pattern("flake.nix", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## steep + +https://github.com/soutaro/steep + +`steep` is a static type checker for Ruby. + +You need `Steepfile` to make it work. Generate it with `steep init`. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.steep.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "steep", "langserver" } + ``` + - `filetypes` : + ```lua + { "ruby", "eruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Steepfile", ".git") + ``` + + +## stimulus_ls + +https://www.npmjs.com/package/stimulus-language-server + +`stimulus-lsp` can be installed via `npm`: + +```sh +npm install -g stimulus-language-server +``` + +or via `yarn`: + +```sh +yarn global add stimulus-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.stimulus_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stimulus-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "ruby", "eruby", "blade", "php" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## stylelint_lsp + +https://github.com/bmatcuk/stylelint-lsp + +`stylelint-lsp` can be installed via `npm`: + +```sh +npm i -g stylelint-lsp +``` + +Can be configured by passing a `settings.stylelintplus` object to `stylelint_lsp.setup`: + +```lua +require'lspconfig'.stylelint_lsp.setup{ + settings = { + stylelintplus = { + -- see available options in stylelint-lsp documentation + } + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.stylelint_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stylelint-lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "css", "less", "scss", "sugarss", "vue", "wxss", "javascript", "javascriptreact", "typescript", "typescriptreact" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## superhtml + +https://github.com/kristoff-it/superhtml + +HTML Language Server & Templating Language Library + +This LSP is designed to tightly adhere to the HTML spec as well as enforcing +some additional rules that ensure HTML clarity. + +If you want to disable HTML support for another HTML LSP, add the following +to your configuration: + +```lua +require'lspconfig'.superhtml.setup { + filetypes = { 'superhtml' } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.superhtml.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "superhtml", "lsp" } + ``` + - `filetypes` : + ```lua + { "superhtml", "html" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## svelte + +https://github.com/sveltejs/language-tools/tree/master/packages/language-server + +Note: assuming that [ts_ls](#ts_ls) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage). + +`svelte-language-server` can be installed via `npm`: +```sh +npm install -g svelte-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svelte.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "svelteserver", "--stdio" } + ``` + - `filetypes` : + ```lua + { "svelte" } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", ".git") + ``` + + +## svlangserver + +https://github.com/imc-trading/svlangserver + +Language server for SystemVerilog. + +`svlangserver` can be installed via `npm`: + +```sh +$ npm install -g @imc-trading/svlangserver +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svlangserver.setup{} +``` +**Commands:** +- SvlangserverBuildIndex: Instructs language server to rerun indexing +- SvlangserverReportHierarchy: Generates hierarchy for the given module + +**Default values:** + - `cmd` : + ```lua + { "svlangserver" } + ``` + - `filetypes` : + ```lua + { "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + root_pattern(".svlangserver", ".git") + ``` + - `settings` : + ```lua + { + systemverilog = { + includeIndexing = { "*.{v,vh,sv,svh}", "**/*.{v,vh,sv,svh}" } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## svls + +https://github.com/dalance/svls + +Language server for verilog and SystemVerilog + +`svls` can be installed via `cargo`: + ```sh + cargo install svls + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.svls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "svls" } + ``` + - `filetypes` : + ```lua + { "verilog", "systemverilog" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## swift_mesonls + +https://github.com/JCWasmx86/Swift-MesonLSP + +Meson language server written in Swift + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.swift_mesonls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "Swift-MesonLSP", "--lsp" } + ``` + - `filetypes` : + ```lua + { "meson" } + ``` + - `root_dir` : + ```lua + util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git") + ``` + + +## syntax_tree + +https://ruby-syntax-tree.github.io/syntax_tree/ + +A fast Ruby parser and formatter. + +Syntax Tree is a suite of tools built on top of the internal CRuby parser. It +provides the ability to generate a syntax tree from source, as well as the +tools necessary to inspect and manipulate that syntax tree. It can be used to +build formatters, linters, language servers, and more. + +```sh +gem install syntax_tree +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.syntax_tree.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "stree", "lsp" } + ``` + - `filetypes` : + ```lua + { "ruby" } + ``` + - `root_dir` : + ```lua + root_pattern(".streerc", "Gemfile", ".git") + ``` + + +## tabby_ml + +https://tabby.tabbyml.com/blog/running-tabby-as-a-language-server + +Language server for Tabby, an opensource, self-hosted AI coding assistant. + +`tabby-agent` can be installed via `npm`: + +```sh +npm install --global tabby-agent +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tabby_ml.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tabby-agent", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + {} + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tailwindcss + +https://github.com/tailwindlabs/tailwindcss-intellisense + +Tailwind CSS Language Server can be installed via npm: +```sh +npm install -g @tailwindcss/language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tailwindcss.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tailwindcss-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.cjs', 'postcss.config.mjs', 'postcss.config.ts', 'package.json', 'node_modules', '.git') + ``` + - `settings` : + ```lua + { + tailwindCSS = { + classAttributes = { "class", "className", "class:list", "classList", "ngClass" }, + includeLanguages = { + eelixir = "html-eex", + eruby = "erb", + htmlangular = "html", + templ = "html" + }, + lint = { + cssConflict = "warning", + invalidApply = "error", + invalidConfigPath = "error", + invalidScreen = "error", + invalidTailwindDirective = "error", + invalidVariant = "error", + recommendedVariantOrder = "warning" + }, + validate = true + } + } + ``` + + +## taplo + +https://taplo.tamasfe.dev/cli/usage/language-server.html + +Language server for Taplo, a TOML toolkit. + +`taplo-cli` can be installed via `cargo`: +```sh +cargo install --features lsp --locked taplo-cli +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.taplo.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "taplo", "lsp", "stdio" } + ``` + - `filetypes` : + ```lua + { "toml" } + ``` + - `root_dir` : + ```lua + root_pattern("*.toml", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tblgen_lsp_server + +https://mlir.llvm.org/docs/Tools/MLIRLSP/#tablegen-lsp-language-server--tblgen-lsp-server + +The Language Server for the LLVM TableGen language + +`tblgen-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tblgen_lsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tblgen-lsp-server" } + ``` + - `filetypes` : + ```lua + { "tablegen" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## teal_ls + +https://github.com/teal-language/teal-language-server + +Install with: +``` +luarocks install teal-language-server +``` + +Optional Command Args: +* "--log-mode=by_date" - Enable logging in $HOME/.cache/teal-language-server. Log name will be date + pid of process +* "--log-mode=by_proj_path" - Enable logging in $HOME/.cache/teal-language-server. Log name will be project path + pid of process +* "--verbose=true" - Increases log level. Does nothing unless log-mode is set + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.teal_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "teal-language-server" } + ``` + - `filetypes` : + ```lua + { "teal" } + ``` + - `root_dir` : + ```lua + root_pattern("tlconfig.lua") + ``` + + +## templ + +https://templ.guide + +The official language server for the templ HTML templating language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.templ.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "templ", "lsp" } + ``` + - `filetypes` : + ```lua + { "templ" } + ``` + - `root_dir` : + ```lua + root_pattern('go.work', 'go.mod', '.git') + ``` + + +## terraform_lsp + +https://github.com/juliosueiras/terraform-lsp + +Terraform language server +Download a released binary from +https://github.com/juliosueiras/terraform-lsp/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.terraform_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "terraform-lsp" } + ``` + - `filetypes` : + ```lua + { "terraform", "hcl" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git") + ``` + + +## terraformls + +https://github.com/hashicorp/terraform-ls + +Terraform language server +Download a released binary from https://github.com/hashicorp/terraform-ls/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) + +Note, that the `settings` configuration option uses the `workspace/didChangeConfiguration` event, +[which is not supported by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/features.md). +Instead you should use `init_options` which passes the settings as part of the LSP initialize call +[as is required by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md#how-to-pass-settings). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.terraformls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "terraform-ls", "serve" } + ``` + - `filetypes` : + ```lua + { "terraform", "terraform-vars" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git") + ``` + + +## texlab + +https://github.com/latex-lsp/texlab + +A completion engine built from scratch for (La)TeX. + +See https://github.com/latex-lsp/texlab/wiki/Configuration for configuration options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.texlab.setup{} +``` +**Commands:** +- TexlabBuild: Build the current buffer +- TexlabCancelBuild: Cancel the current build +- TexlabChangeEnvironment: Change the environment at current position +- TexlabCleanArtifacts: Clean the artifacts +- TexlabCleanAuxiliary: Clean the auxiliary files +- TexlabDependencyGraph: Show the dependency graph +- TexlabFindEnvironments: Find the environments at current position +- TexlabForward: Forward search from current position + +**Default values:** + - `cmd` : + ```lua + { "texlab" } + ``` + - `filetypes` : + ```lua + { "tex", "plaintex", "bib" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + texlab = { + auxDirectory = ".", + bibtexFormatter = "texlab", + build = { + args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, + executable = "latexmk", + forwardSearchAfter = false, + onSave = false + }, + chktex = { + onEdit = false, + onOpenAndSave = false + }, + diagnosticsDelay = 300, + formatterLineLength = 80, + forwardSearch = { + args = {} + }, + latexFormatter = "latexindent", + latexindent = { + modifyLineBreaks = false + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## textlsp + +https://github.com/hangyav/textLSP + +`textLSP` is an LSP server for text spell and grammar checking with various AI tools. +It supports multiple text file formats, such as LaTeX, Org or txt. + +For the available text analyzer tools and their configuration, see the [GitHub](https://github.com/hangyav/textLSP) page. +By default, all analyzers are disabled in textLSP, since most of them need special settings. +For quick testing, LanguageTool is enabled in the default `nvim-lspconfig` configuration. + +To install run: `pip install textLSP` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.textlsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "textlsp" } + ``` + - `filetypes` : + ```lua + { "text", "tex", "org" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + { + textLSP = { + analysers = { + languagetool = { + check_text = { + on_change = false, + on_open = true, + on_save = true + }, + enabled = true + } + }, + documents = { + org = { + org_todo_keywords = { "TODO", "IN_PROGRESS", "DONE" } + } + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tflint + +https://github.com/terraform-linters/tflint + +A pluggable Terraform linter that can act as lsp server. +Installation instructions can be found in https://github.com/terraform-linters/tflint#installation. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tflint.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tflint", "--langserver" } + ``` + - `filetypes` : + ```lua + { "terraform" } + ``` + - `root_dir` : + ```lua + root_pattern(".terraform", ".git", ".tflint.hcl") + ``` + + +## theme_check + +https://github.com/Shopify/shopify-cli + +`theme-check-language-server` is bundled with `shopify-cli` or it can also be installed via + +https://github.com/Shopify/theme-check#installation + +**NOTE:** +If installed via Homebrew, `cmd` must be set to 'theme-check-liquid-server' + +```lua +require lspconfig.theme_check.setup { + cmd = { 'theme-check-liquid-server' } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.theme_check.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "theme-check-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "liquid" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## thriftls + +https://github.com/joyme123/thrift-ls + +you can install thriftls by mason or download binary here: https://github.com/joyme123/thrift-ls/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.thriftls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "thriftls" } + ``` + - `filetypes` : + ```lua + { "thrift" } + ``` + - `root_dir` : + ```lua + root_pattern(".thrift") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tilt_ls + +https://github.com/tilt-dev/tilt + +Tilt language server. + +You might need to add filetype detection manually: + +```vim +autocmd BufRead Tiltfile setf=tiltfile +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tilt_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tilt", "lsp", "start" } + ``` + - `filetypes` : + ```lua + { "tiltfile" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tinymist + +https://github.com/Myriad-Dreamin/tinymist +An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tinymist.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tinymist" } + ``` + - `filetypes` : + ```lua + { "typst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + false + ``` + + +## ts_ls + +https://github.com/typescript-language-server/typescript-language-server + +`ts_ls`, aka `typescript-language-server`, is a Language Server Protocol implementation for TypeScript wrapping `tsserver`. Note that `ts_ls` is not `tsserver`. + +`typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript typescript-language-server +``` + +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. + +Here's an example that disables type checking in JavaScript files. + +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` + +### Vue support + +As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin +adds Vue support to this language server. + +*IMPORTANT*: It is crucial to ensure that `@vue/typescript-plugin` and `volar `are of identical versions. + +```lua +require'lspconfig'.ts_ls.setup{ + init_options = { + plugins = { + { + name = "@vue/typescript-plugin", + location = "/usr/local/lib/node_modules/@vue/typescript-plugin", + languages = {"javascript", "typescript", "vue"}, + }, + }, + }, + filetypes = { + "javascript", + "typescript", + "vue", + }, +} + +-- You must make sure volar is setup +-- e.g. require'lspconfig'.volar.setup{} +-- See volar's section for more information +``` + +`location` MUST be defined. If the plugin is installed in `node_modules`, +`location` can have any value. + +`languages` must include `vue` even if it is listed in `filetypes`. + +`filetypes` is extended here to include Vue SFC. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ts_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typescript-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `init_options` : + ```lua + { + hostInfo = "neovim" + } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "jsconfig.json", "package.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## tsp_server + +https://github.com/microsoft/typespec + +The language server for TypeSpec, a language for defining cloud service APIs and shapes. + +`tsp-server` can be installed together with the typespec compiler via `npm`: +```sh +npm install -g @typespec/compiler +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tsp_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "tsp-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "typespec" } + ``` + - `root_dir` : + ```lua + util.root_pattern("tspconfig.yaml", ".git") + ``` + + +## ttags + +https://github.com/npezza93/ttags + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ttags.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ttags", "lsp" } + ``` + - `filetypes` : + ```lua + { "ruby", "rust", "javascript", "haskell" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + + +## turtle_ls + +https://github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server +`turtle-language-server`, An editor-agnostic server providing language intelligence (diagnostics, hover tooltips, etc.) for the W3C standard Turtle RDF syntax via the Language Server Protocol. +installable via npm install -g turtle-language-server or yarn global add turtle-language-server. +requires node. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.turtle_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "node", + [3] = "--stdio" + } + ``` + - `filetypes` : + ```lua + { "turtle", "ttl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## tvm_ffi_navigator + +https://github.com/tqchen/ffi-navigator + +The Language Server for FFI calls in TVM to be able jump between python and C++ + +FFI navigator can be installed with `pip install ffi-navigator`, buf for more details, please see +https://github.com/tqchen/ffi-navigator?tab=readme-ov-file#installation + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.tvm_ffi_navigator.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "python", "-m", "ffi_navigator.langserver" } + ``` + - `filetypes` : + ```lua + { "python", "cpp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## twiggy_language_server + +https://github.com/moetelo/twiggy + +`twiggy-language-server` can be installed via `npm`: +```sh +npm install -g twiggy-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.twiggy_language_server.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "twiggy-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "twig" } + ``` + - `root_dir` : + ```lua + root_pattern("composer.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## typeprof + +https://github.com/ruby/typeprof + +`typeprof` is the built-in analysis and LSP tool for Ruby 3.1+. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typeprof.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typeprof", "--lsp", "--stdio" } + ``` + - `filetypes` : + ```lua + { "ruby", "eruby" } + ``` + - `root_dir` : + ```lua + root_pattern("Gemfile", ".git") + ``` + + +## typos_lsp + +https://github.com/crate-ci/typos +https://github.com/tekumara/typos-lsp + +A Language Server Protocol implementation for Typos, a low false-positive +source code spell checker, written in Rust. Download it from the releases page +on GitHub: https://github.com/tekumara/typos-lsp/releases + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typos_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typos-lsp" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + - `single_file_support` : + ```lua + true + ``` + + +## typst_lsp + +https://github.com/nvarner/typst-lsp + +Language server for Typst. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.typst_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "typst-lsp" } + ``` + - `filetypes` : + ```lua + { "typst" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## uiua + +https://github.com/uiua-lang/uiua/ + +The builtin language server of the Uiua interpreter. + +The Uiua interpreter can be installed with `cargo install uiua` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.uiua.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "uiua", "lsp" } + ``` + - `filetypes` : + ```lua + { "uiua" } + ``` + - `root_dir` : + ```lua + root_pattern( + 'main.ua', + 'fmt.ua', + '.git' + ) + + ``` + + +## unison + +https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown + + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.unison.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "nc", "localhost", "5757" } + ``` + - `filetypes` : + ```lua + { "unison" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `settings` : + ```lua + {} + ``` + + +## unocss + +https://github.com/xna00/unocss-language-server + +UnoCSS Language Server can be installed via npm: +```sh +npm i unocss-language-server -g +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.unocss.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "unocss-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "html", "javascriptreact", "rescript", "typescriptreact", "vue", "svelte" } + ``` + - `root_dir` : + ```lua + root_pattern('unocss.config.js', 'unocss.config.ts', 'uno.config.js', 'uno.config.ts') + ``` + + +## uvls + +https://codeberg.org/caradhras/uvls +Language server for UVL, written using tree sitter and rust. +You can install the server easily using cargo: +```sh +git clone https://codeberg.org/caradhras/uvls +cd uvls +cargo install --path . +``` +Note: To activate properly nvim needs to know the uvl filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.uvl setfiletype uvl\]\]) +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.uvls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "uvls" } + ``` + - `filetypes` : + ```lua + { "uvl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## v_analyzer + +https://github.com/vlang/v-analyzer + +V language server. + +`v-analyzer` can be installed by following the instructions [here](https://github.com/vlang/v-analyzer#installation). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.v_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "v-analyzer" } + ``` + - `filetypes` : + ```lua + { "v", "vsh", "vv" } + ``` + - `root_dir` : + ```lua + root_pattern("v.mod", ".git") + ``` + + +## vacuum + +Vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. + +You can install vacuum using mason or follow the instructions here: https://github.com/daveshanley/vacuum + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['openapi.*%.ya?ml'] = 'yaml.openapi', + ['openapi.*%.json'] = 'json.openapi', + }, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vacuum.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vacuum", "language-server" } + ``` + - `filetypes` : + ```lua + { "yaml.openapi", "json.openapi" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vala_ls + +https://github.com/Prince781/vala-language-server + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vala_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vala-language-server" } + ``` + - `filetypes` : + ```lua + { "vala", "genie" } + ``` + - `root_dir` : + ```lua + root_pattern("meson.build", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vale_ls + +https://github.com/errata-ai/vale-ls + +An implementation of the Language Server Protocol (LSP) for the Vale command-line tool. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vale_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vale-ls" } + ``` + - `filetypes` : + ```lua + { "markdown", "text", "tex" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vdmj + +https://github.com/nickbattle/vdmj + +The VDMJ language server can be installed by cloning the VDMJ repository and +running `mvn clean install`. + +Various options are provided to configure the language server (see below). In +particular: +- `annotation_paths` is a list of folders and/or jar file paths for annotations +that should be used with the language server; +- any value of `debugger_port` less than zero will disable the debugger; note +that if a non-zero value is used, only one instance of the server can be active +at a time. + +More settings for VDMJ can be changed in a file called `vdmj.properties` under +`root_dir/.vscode`. For a description of the available settings, see +[Section 7 of the VDMJ User Guide](https://raw.githubusercontent.com/nickbattle/vdmj/master/vdmj/documentation/UserGuide.pdf). + +Note: proof obligations and combinatorial testing are not currently supported +by neovim. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vdmj.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + Generated from the options given + ``` + - `filetypes` : + ```lua + { "vdmsl", "vdmpp", "vdmrt" } + ``` + - `options` : + ```lua + { + annotation_paths = {}, + debugger_port = -1, + high_precision = false, + java = "$JAVA_HOME/bin/java", + java_opts = { "-Xmx3000m", "-Xss1m" }, + logfile = "path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log')", + mavenrepo = "$HOME/.m2/repository/dk/au/ece/vdmj", + version = "The latest version installed in `mavenrepo`" + } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor(fname) or find_vscode_ancestor(fname) + ``` + + +## verible + +https://github.com/chipsalliance/verible + +A linter and formatter for verilog and SystemVerilog files. + +Release binaries can be downloaded from [here](https://github.com/chipsalliance/verible/releases) +and placed in a directory on PATH. + +See https://github.com/chipsalliance/verible/tree/master/verilog/tools/ls/README.md for options. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.verible.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "verible-verilog-ls" } + ``` + - `filetypes` : + ```lua + { "systemverilog", "verilog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## veridian + +https://github.com/vivekmalneedi/veridian + +A SystemVerilog LanguageServer. + +Download the latest release for your OS from the releases page + +# install with slang feature, if C++17 compiler is available +cargo install --git https://github.com/vivekmalneedi/veridian.git --all-features +# install if C++17 compiler is not available +cargo install --git https://github.com/vivekmalneedi/veridian.git + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.veridian.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "veridian" } + ``` + - `filetypes` : + ```lua + { "systemverilog", "verilog" } + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## veryl_ls + +https://github.com/veryl-lang/veryl + +Language server for Veryl + +`veryl-ls` can be installed via `cargo`: + ```sh + cargo install veryl-ls + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.veryl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "veryl-ls" } + ``` + - `filetypes` : + ```lua + { "veryl" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## vhdl_ls + +Install vhdl_ls from https://github.com/VHDL-LS/rust_hdl and add it to path + +Configuration + +The language server needs to know your library mapping to perform full analysis of the code. For this it uses a configuration file in the TOML format named vhdl_ls.toml. + +vhdl_ls will load configuration files in the following order of priority (first to last): + + A file named .vhdl_ls.toml in the user home folder. + A file name from the VHDL_LS_CONFIG environment variable. + A file named vhdl_ls.toml in the workspace root. + +Settings in a later files overwrites those from previously loaded files. + +Example vhdl_ls.toml +``` +# File names are either absolute or relative to the parent folder of the vhdl_ls.toml file +[libraries] +lib2.files = [ + 'pkg2.vhd', +] +lib1.files = [ + 'pkg1.vhd', + 'tb_ent.vhd' +] +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vhdl_ls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vhdl_ls" } + ``` + - `filetypes` : + ```lua + { "vhd", "vhdl" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vimls + +https://github.com/iamcco/vim-language-server + +You can install vim-language-server via npm: +```sh +npm install -g vim-language-server +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vimls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vim-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "vim" } + ``` + - `init_options` : + ```lua + { + diagnostic = { + enable = true + }, + indexes = { + count = 3, + gap = 100, + projectRootPatterns = { "runtime", "nvim", ".git", "autoload", "plugin" }, + runtimepath = true + }, + isNeovim = true, + iskeyword = "@,48-57,_,192-255,-#", + runtimepath = "", + suggest = { + fromRuntimepath = true, + fromVimruntime = true + }, + vimruntime = "" + } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## visualforce_ls + +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Visualforce. + +For manual installation, download the .vsix archive file from the +[forcedotcom/salesforcedx-vscode](https://github.com/forcedotcom/salesforcedx-vscode) +GitHub releases. Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.visualforce_ls.setup { + cmd = { + 'node', + '/path/to/unpacked/archive/extension/node_modules/@salesforce/salesforcedx-visualforce-language-server/out/src/visualforceServer.js', + '--stdio' + } +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.visualforce_ls.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "visualforce" } + ``` + - `init_options` : + ```lua + { + embeddedLanguages = { + css = true, + javascript = true + } + } + ``` + - `root_dir` : + ```lua + root_pattern('sfdx-project.json') + ``` + + +## vls + +https://github.com/vlang/vls + +V language server. + +`v-language-server` can be installed by following the instructions [here](https://github.com/vlang/vls#installation). + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "v", "ls" } + ``` + - `filetypes` : + ```lua + { "v", "vlang" } + ``` + - `root_dir` : + ```lua + root_pattern("v.mod", ".git") + ``` + + +## volar + +https://github.com/johnsoncodehk/volar/tree/20d713b/packages/vue-language-server + +Volar language server for Vue + +Volar can be installed via npm: + +```sh +npm install -g @vue/language-server +``` + +Volar by default supports Vue 3 projects. Vue 2 projects need +[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage). + +**TypeScript support** +As of release 2.0.0, Volar no longer wraps around ts_ls. For typescript +support, `ts_ls` needs to be configured with the `@vue/typescript-plugin` +plugin. + +**Take Over Mode** + +Volar (prior to 2.0.0), can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471). + +To enable Take Over Mode, override the default filetypes in `setup{}` as follows: + +```lua +require'lspconfig'.volar.setup{ + filetypes = {'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json'} +} +``` + +**Overriding the default TypeScript Server used by Volar** + +The default config looks for TS in the local `node_modules`. This can lead to issues +e.g. when working on a [monorepo](https://monorepo.tools/). The alternatives are: + +- use a global TypeScript Server installation + +```lua +require'lspconfig'.volar.setup{ + init_options = { + typescript = { + tsdk = '/path/to/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- tsdk = '/usr/local/lib/node_modules/typescript/lib' + } + } +} +``` + +- use a local server and fall back to a global TypeScript Server installation + +```lua +local util = require 'lspconfig.util' +local function get_typescript_server_path(root_dir) + + local global_ts = '/home/[yourusernamehere]/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- local global_ts = '/usr/local/lib/node_modules/typescript/lib' + local found_ts = '' + local function check_dir(path) + found_ts = util.path.join(path, 'node_modules', 'typescript', 'lib') + if util.path.exists(found_ts) then + return path + end + end + if util.search_ancestors(root_dir, check_dir) then + return found_ts + else + return global_ts + end +end + +require'lspconfig'.volar.setup{ + on_new_config = function(new_config, new_root_dir) + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end, +} +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.volar.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vue-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "vue" } + ``` + - `init_options` : + ```lua + { + typescript = { + tsdk = "" + } + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + see source file + ``` + + +## vtsls + +https://github.com/yioneko/vtsls + +`vtsls` can be installed with npm: +```sh +npm install -g @vtsls/language-server +``` + +To configure a TypeScript project, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) +or [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to +the root of your project. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vtsls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vtsls", "--stdio" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `root_dir` : + ```lua + root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + +## vuels + +https://github.com/vuejs/vetur/tree/master/server + +Vue language server(vls) +`vue-language-server` can be installed via `npm`: +```sh +npm install -g vls +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.vuels.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "vls" } + ``` + - `filetypes` : + ```lua + { "vue" } + ``` + - `init_options` : + ```lua + { + config = { + css = {}, + emmet = {}, + html = { + suggest = {} + }, + javascript = { + format = {} + }, + stylusSupremacy = {}, + typescript = { + format = {} + }, + vetur = { + completion = { + autoImport = false, + tagCasing = "kebab", + useScaffoldSnippets = false + }, + format = { + defaultFormatter = { + js = "none", + ts = "none" + }, + defaultFormatterOptions = {}, + scriptInitialIndent = false, + styleInitialIndent = false + }, + useWorkspaceDependencies = false, + validation = { + script = true, + style = true, + template = true + } + } + } + } + ``` + - `root_dir` : + ```lua + root_pattern("package.json", "vue.config.js") + ``` + + +## wgsl_analyzer + +https://github.com/wgsl-analyzer/wgsl-analyzer + +`wgsl_analyzer` can be installed via `cargo`: +```sh +cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl_analyzer +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.wgsl_analyzer.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "wgsl_analyzer" } + ``` + - `filetypes` : + ```lua + { "wgsl" } + ``` + - `root_dir` : + ```lua + root_pattern(".git") + ``` + - `settings` : + ```lua + {} + ``` + + +## yamlls + +https://github.com/redhat-developer/yaml-language-server + +`yaml-language-server` can be installed via `yarn`: +```sh +yarn global add yaml-language-server +``` + +To use a schema for validation, there are two options: + +1. Add a modeline to the file. A modeline is a comment of the form: + +``` +# yaml-language-server: $schema= +``` + +where the relative filepath is the path relative to the open yaml file, and the absolute filepath +is the filepath relative to the filesystem root ('/' on unix systems) + +2. Associated a schema url, relative , or absolute (to root of project, not to filesystem root) path to +the a glob pattern relative to the detected project root. Check `:LspInfo` to determine the resolved project +root. + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*", + ["../path/relative/to/file.yml"] = "/.github/workflows/*", + ["/path/from/root/of/project"] = "/.github/workflows/*", + }, + }, + } +} +``` + +Currently, kubernetes is special-cased in yammls, see the following upstream issues: +* [#211](https://github.com/redhat-developer/yaml-language-server/issues/211). +* [#307](https://github.com/redhat-developer/yaml-language-server/issues/307). + +To override a schema to use a specific k8s schema version (for example, to use 1.18): + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml", + ... -- other schemas + }, + }, + } +} +``` + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yamlls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yaml-language-server", "--stdio" } + ``` + - `filetypes` : + ```lua + { "yaml", "yaml.docker-compose", "yaml.gitlab" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `settings` : + ```lua + { + redhat = { + telemetry = { + enabled = false + } + } + } + ``` + - `single_file_support` : + ```lua + true + ``` + + +## yang_lsp + +https://github.com/TypeFox/yang-lsp + +A Language Server for the YANG data modeling language. + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yang_lsp.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yang-language-server" } + ``` + - `filetypes` : + ```lua + { "yang" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + + +## yls + +https://pypi.org/project/yls-yara/ + +An YLS plugin adding YARA linting capabilities. + +This plugin runs yara.compile on every save, parses the errors, and returns list of diagnostic messages. + +Language Server: https://github.com/avast/yls + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.yls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "yls", "-vv" } + ``` + - `filetypes` : + ```lua + { "yar", "yara" } + ``` + - `root_dir` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ziggy + +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for the Ziggy data serialization format + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ziggy.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ziggy", "lsp" } + ``` + - `filetypes` : + ```lua + { "ziggy" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## ziggy_schema + +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for schema files of the Ziggy data serialization format + + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.ziggy_schema.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "ziggy", "lsp", "--schema" } + ``` + - `filetypes` : + ```lua + { "ziggy_schema" } + ``` + - `root_dir` : + ```lua + util.find_git_ancestor + ``` + - `single_file_support` : + ```lua + true + ``` + + +## zk + +https://github.com/mickael-menu/zk + +A plain text note-taking assistant + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.zk.setup{} +``` +**Commands:** +- ZkIndex: ZkIndex +- ZkList: ZkList +- ZkNew: ZkNew + +**Default values:** + - `cmd` : + ```lua + { "zk", "lsp" } + ``` + - `filetypes` : + ```lua + { "markdown" } + ``` + - `root_dir` : + ```lua + root_pattern(".zk") + ``` + + +## zls + +https://github.com/zigtools/zls + +Zig LSP implementation + Zig Language Server + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.zls.setup{} +``` + + +**Default values:** + - `cmd` : + ```lua + { "zls" } + ``` + - `filetypes` : + ```lua + { "zig", "zir" } + ``` + - `root_dir` : + ```lua + util.root_pattern("zls.json", "build.zig", ".git") + ``` + - `single_file_support` : + ```lua + true + ``` + + + +vim:ft=markdown diff --git a/pack/ant/start/nvim-lspconfig/flake.lock b/pack/ant/start/nvim-lspconfig/flake.lock new file mode 100644 index 0000000..5df3c81 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1699906975, + "narHash": "sha256-tvLhyy1iQj3vdW8tYt2uPNoTWt6FB87tG2HaaErk6tk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5c6e85ee472d37c904dd43f8f76b680602b9128f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/pack/ant/start/nvim-lspconfig/flake.nix b/pack/ant/start/nvim-lspconfig/flake.nix new file mode 100644 index 0000000..62dcb86 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/flake.nix @@ -0,0 +1,21 @@ +{ + description = "Quickstart configurations for the Nvim LSP client"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + rec { + devShell = pkgs.mkShell { + buildInputs = [ + pkgs.stylua + pkgs.luaPackages.luacheck + pkgs.luajitPackages.vusted + pkgs.selene + ]; + }; + } + ); +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig.lua new file mode 100644 index 0000000..b9012f8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig.lua @@ -0,0 +1,67 @@ +local configs = require 'lspconfig.configs' + +local M = { + util = require 'lspconfig.util', +} + +---@class Alias +---@field to string The new name of the server +---@field version string The version that the alias will be removed in +---@param name string +---@return Alias +local function server_alias(name) + local aliases = { + ['fennel-ls'] = { + to = 'fennel_ls', + version = '0.2.0', + }, + ruby_ls = { + to = 'ruby_lsp', + version = '0.2.0', + }, + ['starlark-rust'] = { + to = 'starlark_rust', + version = '0.2.0', + }, + sumneko_lua = { + to = 'lua_ls', + version = '0.2.0', + }, + tsserver = { + to = 'ts_ls', + version = '0.2.0', + }, + } + + return aliases[name] +end + +local mt = {} +function mt:__index(k) + if configs[k] == nil then + local alias = server_alias(k) + if alias then + vim.deprecate(k, alias.to, alias.version, 'lspconfig', false) + k = alias.to + end + + local success, config = pcall(require, 'lspconfig.server_configurations.' .. k) + if success then + configs[k] = config + else + vim.notify( + string.format( + '[lspconfig] Cannot access configuration for %s. Ensure this server is listed in ' + .. '`server_configurations.md` or added as a custom server.', + k + ), + vim.log.levels.WARN + ) + -- Return a dummy function for compatibility with user configs + return { setup = function() end } + end + end + return configs[k] +end + +return setmetatable(M, mt) diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/async.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/async.lua new file mode 100644 index 0000000..eb82b30 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/async.lua @@ -0,0 +1,70 @@ +local M = {} + +function M.run(func) + coroutine.resume(coroutine.create(function() + local status, err = pcall(func) + if not status then + vim.notify(('[lspconfig] unhandled error: %s'):format(tostring(err)), vim.log.levels.WARN) + end + end)) +end + +--- @param cmd string|string[] +--- @return string[]? +function M.run_command(cmd) + local co = assert(coroutine.running()) + + local stdout = {} + local stderr = {} + local exit_code = nil + + local jobid = vim.fn.jobstart(cmd, { + on_stdout = function(_, data, _) + data = table.concat(data, '\n') + if #data > 0 then + stdout[#stdout + 1] = data + end + end, + on_stderr = function(_, data, _) + stderr[#stderr + 1] = table.concat(data, '\n') + end, + on_exit = function(_, code, _) + exit_code = code + coroutine.resume(co) + end, + stdout_buffered = true, + stderr_buffered = true, + }) + + if jobid <= 0 then + vim.notify(('[lspconfig] unable to run cmd: %s'):format(cmd), vim.log.levels.WARN) + return nil + end + + coroutine.yield() + + if exit_code ~= 0 then + vim.notify( + ('[lspconfig] cmd failed with code %d: %s\n%s'):format(exit_code, cmd, table.concat(stderr, '')), + vim.log.levels.WARN + ) + return nil + end + + if next(stdout) == nil then + return nil + end + return stdout and stdout or nil +end + +function M.reenter() + if vim.in_fast_event() then + local co = assert(coroutine.running()) + vim.schedule(function() + coroutine.resume(co) + end) + coroutine.yield() + end +end + +return M diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/configs.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/configs.lua new file mode 100644 index 0000000..62f22c2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/configs.lua @@ -0,0 +1,296 @@ +local util = require 'lspconfig.util' +local async = require 'lspconfig.async' +local api, validate, lsp, uv, fn = vim.api, vim.validate, vim.lsp, vim.loop, vim.fn +local tbl_deep_extend = vim.tbl_deep_extend + +local configs = {} + +--- @class lspconfig.Config : vim.lsp.ClientConfig +--- @field enabled? boolean +--- @field single_file_support? boolean +--- @field filetypes? string[] +--- @field filetype? string +--- @field on_new_config? function +--- @field autostart? boolean +--- @field package _on_attach? fun(client: vim.lsp.Client, bufnr: integer) +--- @field root_dir? string|fun(filename: string, bufnr: number) + +--- @param cmd any +local function sanitize_cmd(cmd) + if cmd and type(cmd) == 'table' and not vim.tbl_isempty(cmd) then + local original = cmd[1] + cmd[1] = vim.fn.exepath(cmd[1]) + if #cmd[1] == 0 then + cmd[1] = original + end + end +end + +function configs.__newindex(t, config_name, config_def) + validate { + name = { config_name, 's' }, + default_config = { config_def.default_config, 't' }, + on_new_config = { config_def.on_new_config, 'f', true }, + on_attach = { config_def.on_attach, 'f', true }, + commands = { config_def.commands, 't', true }, + } + + if config_def.default_config.deprecate then + vim.deprecate( + config_name, + config_def.default_config.deprecate.to, + config_def.default_config.deprecate.version, + 'lspconfig', + false + ) + end + + if config_def.commands then + for k, v in pairs(config_def.commands) do + validate { + ['command.name'] = { k, 's' }, + ['command.fn'] = { v[1], 'f' }, + } + end + else + config_def.commands = {} + end + + local M = {} + + local default_config = tbl_deep_extend('keep', config_def.default_config, util.default_config) + + -- Force this part. + default_config.name = config_name + + --- @param user_config lspconfig.Config + function M.setup(user_config) + local lsp_group = api.nvim_create_augroup('lspconfig', { clear = false }) + + validate { + cmd = { + user_config.cmd, + { 'f', 't' }, + true, + }, + root_dir = { user_config.root_dir, 'f', true }, + filetypes = { user_config.filetype, 't', true }, + on_new_config = { user_config.on_new_config, 'f', true }, + on_attach = { user_config.on_attach, 'f', true }, + commands = { user_config.commands, 't', true }, + } + if user_config.commands then + for k, v in pairs(user_config.commands) do + validate { + ['command.name'] = { k, 's' }, + ['command.fn'] = { v[1], 'f' }, + } + end + end + + local config = tbl_deep_extend('keep', user_config, default_config) + + sanitize_cmd(config.cmd) + + if util.on_setup then + pcall(util.on_setup, config, user_config) + end + + if config.autostart == true then + local event_conf = config.filetypes and { event = 'FileType', pattern = config.filetypes } + or { event = 'BufReadPost' } + api.nvim_create_autocmd(event_conf.event, { + pattern = event_conf.pattern or '*', + callback = function(opt) + M.manager:try_add(opt.buf) + end, + group = lsp_group, + desc = string.format( + 'Checks whether server %s should start a new instance or attach to an existing one.', + config.name + ), + }) + end + + local get_root_dir = config.root_dir + + function M.launch(bufnr) + bufnr = bufnr or api.nvim_get_current_buf() + if not api.nvim_buf_is_valid(bufnr) then + return + end + local bufname = api.nvim_buf_get_name(bufnr) + if (#bufname == 0 and not config.single_file_support) or (#bufname ~= 0 and not util.bufname_valid(bufname)) then + return + end + + local pwd = uv.cwd() + + async.run(function() + local root_dir + if get_root_dir then + root_dir = get_root_dir(util.path.sanitize(bufname), bufnr) + async.reenter() + if not api.nvim_buf_is_valid(bufnr) then + return + end + end + + if root_dir then + api.nvim_create_autocmd('BufReadPost', { + pattern = fn.fnameescape(root_dir) .. '/*', + callback = function(arg) + if #M.manager:clients() == 0 then + return true + end + M.manager:try_add_wrapper(arg.buf, root_dir) + end, + group = lsp_group, + desc = string.format( + 'Checks whether server %s should attach to a newly opened buffer inside workspace %q.', + config.name, + root_dir + ), + }) + + for _, buf in ipairs(api.nvim_list_bufs()) do + local buf_name = api.nvim_buf_get_name(buf) + if util.bufname_valid(buf_name) then + local buf_dir = util.path.sanitize(buf_name) + if buf_dir:sub(1, root_dir:len()) == root_dir then + M.manager:try_add_wrapper(buf, root_dir) + end + end + end + elseif config.single_file_support then + -- This allows on_new_config to use the parent directory of the file + -- Effectively this is the root from lspconfig's perspective, as we use + -- this to attach additional files in the same parent folder to the same server. + -- We just no longer send rootDirectory or workspaceFolders during initialization. + if not api.nvim_buf_is_valid(bufnr) or (#bufname ~= 0 and not util.bufname_valid(bufname)) then + return + end + local pseudo_root = #bufname == 0 and pwd or util.path.dirname(util.path.sanitize(bufname)) + M.manager:add(pseudo_root, true, bufnr) + end + end) + end + + -- Used by :LspInfo + M.get_root_dir = get_root_dir + M.filetypes = config.filetypes + M.handlers = config.handlers + M.cmd = config.cmd + M.autostart = config.autostart + + -- In the case of a reload, close existing things. + local reload = false + if M.manager then + for _, client in ipairs(M.manager:clients()) do + client.stop(true) + end + reload = true + M.manager = nil + end + + local make_config = function(root_dir) + local new_config = tbl_deep_extend('keep', vim.empty_dict(), config) --[[@as lspconfig.Config]] + new_config.capabilities = tbl_deep_extend('keep', new_config.capabilities, { + workspace = { + configuration = true, + }, + }) + + if config_def.on_new_config then + pcall(config_def.on_new_config, new_config, root_dir) + end + if config.on_new_config then + pcall(config.on_new_config, new_config, root_dir) + end + + new_config.on_init = util.add_hook_after(new_config.on_init, function(client, result) + -- Handle offset encoding by default + if result.offsetEncoding then + client.offset_encoding = result.offsetEncoding + end + + -- Send `settings` to server via workspace/didChangeConfiguration + function client.workspace_did_change_configuration(settings) + if not settings then + return + end + if vim.tbl_isempty(settings) then + settings = { [vim.type_idx] = vim.types.dictionary } + end + return client.notify('workspace/didChangeConfiguration', { + settings = settings, + }) + end + end) + + -- Save the old _on_attach so that we can reference it via the BufEnter. + new_config._on_attach = new_config.on_attach + new_config.on_attach = function(client, bufnr) + if bufnr == api.nvim_get_current_buf() then + M._setup_buffer(client.id, bufnr) + else + if api.nvim_buf_is_valid(bufnr) then + api.nvim_create_autocmd('BufEnter', { + callback = function() + M._setup_buffer(client.id, bufnr) + end, + group = lsp_group, + buffer = bufnr, + once = true, + desc = 'Reattaches the server with the updated configurations if changed.', + }) + end + end + end + + new_config.root_dir = root_dir + new_config.workspace_folders = { + { + uri = vim.uri_from_fname(root_dir), + name = string.format('%s', root_dir), + }, + } + return new_config + end + + local manager = require('lspconfig.manager').new(config, make_config) + + M.manager = manager + M.make_config = make_config + if reload and config.autostart ~= false then + for _, bufnr in ipairs(api.nvim_list_bufs()) do + manager:try_add_wrapper(bufnr) + end + end + end + + function M._setup_buffer(client_id, bufnr) + local client = lsp.get_client_by_id(client_id) + if not client then + return + end + local config = client.config --[[@as lspconfig.Config]] + if config._on_attach then + config._on_attach(client, bufnr) + end + if client.config.commands and not vim.tbl_isempty(client.config.commands) then + M.commands = vim.tbl_deep_extend('force', M.commands, client.config.commands) + end + if not M.commands_created and not vim.tbl_isempty(M.commands) then + util.create_module_commands(config_name, M.commands) + end + end + + M.commands = config_def.commands + M.name = config_name + M.document_config = config_def + + rawset(t, config_name, M) +end + +return setmetatable({}, configs) diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/manager.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/manager.lua new file mode 100644 index 0000000..9b2c7d0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/manager.lua @@ -0,0 +1,302 @@ +local api = vim.api +local lsp = vim.lsp +local uv = vim.loop + +local async = require 'lspconfig.async' +local util = require 'lspconfig.util' + +---@param client vim.lsp.Client +---@param root_dir string +---@return boolean +local function check_in_workspace(client, root_dir) + if not client.workspace_folders then + return false + end + + for _, dir in ipairs(client.workspace_folders) do + if (root_dir .. '/'):sub(1, #dir.name + 1) == dir.name .. '/' then + return true + end + end + + return false +end + +--- @class lspconfig.Manager +--- @field _clients table +--- @field config lspconfig.Config +--- @field make_config fun(root_dir: string): lspconfig.Config +local M = {} + +--- @param config lspconfig.Config +--- @param make_config fun(root_dir: string): lspconfig.Config +--- @return lspconfig.Manager +function M.new(config, make_config) + return setmetatable({ + _clients = {}, + config = config, + make_config = make_config, + }, { + __index = M, + }) +end + +--- @private +--- @param clients table +--- @param root_dir string +--- @param client_name string +--- @return vim.lsp.Client? +local function get_client(clients, root_dir, client_name) + if vim.tbl_isempty(clients) then + return + end + + if clients[root_dir] then + for _, id in pairs(clients[root_dir]) do + local client = lsp.get_client_by_id(id) + if client and client.name == client_name then + return client + end + end + end + + for _, ids in pairs(clients) do + for _, id in ipairs(ids) do + local client = lsp.get_client_by_id(id) + if client and client.name == client_name then + return client + end + end + end +end + +--- @private +--- @param bufnr integer +--- @param root string +--- @param client_id integer +function M:_attach_and_cache(bufnr, root, client_id) + local clients = self._clients + lsp.buf_attach_client(bufnr, client_id) + if not clients[root] then + clients[root] = {} + end + if not vim.tbl_contains(clients[root], client_id) then + clients[root][#clients[root] + 1] = client_id + end +end + +--- @private +--- @param bufnr integer +--- @param root_dir string +--- @param client vim.lsp.Client +function M:_register_workspace_folders(bufnr, root_dir, client) + local params = { + event = { + added = { { uri = vim.uri_from_fname(root_dir), name = root_dir } }, + removed = {}, + }, + } + client.rpc.notify('workspace/didChangeWorkspaceFolders', params) + if not client.workspace_folders then + client.workspace_folders = {} + end + client.workspace_folders[#client.workspace_folders + 1] = params.event.added[1] + self:_attach_and_cache(bufnr, root_dir, client.id) +end + +--- @private +--- @param bufnr integer +--- @param new_config lspconfig.Config +--- @param root_dir string +--- @param single_file boolean +function M:_start_new_client(bufnr, new_config, root_dir, single_file) + -- do nothing if the client is not enabled + if new_config.enabled == false then + return + end + if not new_config.cmd then + vim.notify( + string.format( + '[lspconfig] cmd not defined for %q. Manually set cmd in the setup {} call according to server_configurations.md, see :help lspconfig-index.', + new_config.name + ), + vim.log.levels.ERROR + ) + return + end + + local clients = self._clients + + new_config.on_exit = util.add_hook_before(new_config.on_exit, function() + for index, id in pairs(clients[root_dir]) do + local exist = assert(lsp.get_client_by_id(id)) + if exist.name == new_config.name then + table.remove(clients[root_dir], index) + end + end + end) + + -- Launch the server in the root directory used internally by lspconfig, if otherwise unset + -- also check that the path exist + if not new_config.cmd_cwd and uv.fs_realpath(root_dir) then + new_config.cmd_cwd = root_dir + end + + -- Sending rootDirectory and workspaceFolders as null is not explicitly + -- codified in the spec. Certain servers crash if initialized with a NULL + -- root directory. + if single_file then + new_config.root_dir = nil + new_config.workspace_folders = nil + end + + -- TODO: Replace lsp.start_client with lsp.start + local client_id, err = lsp.start_client(new_config) + if not client_id then + if err then + vim.notify(err, vim.log.levels.WARN) + end + return + end + self:_attach_and_cache(bufnr, root_dir, client_id) +end + +--- @private +--- @param bufnr integer +--- @param new_config lspconfig.Config +--- @param root_dir string +--- @param client vim.lsp.Client +--- @param single_file boolean +function M:_attach_or_spawn(bufnr, new_config, root_dir, client, single_file) + if check_in_workspace(client, root_dir) then + return self:_attach_and_cache(bufnr, root_dir, client.id) + end + + local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported') + if supported then + return self:_register_workspace_folders(bufnr, root_dir, client) + end + self:_start_new_client(bufnr, new_config, root_dir, single_file) +end + +--- @private +--- @param bufnr integer +--- @param new_config lspconfig.Config +--- @param root_dir string +--- @param client vim.lsp.Client +--- @param single_file boolean +function M:_attach_after_client_initialized(bufnr, new_config, root_dir, client, single_file) + local timer = assert(uv.new_timer()) + timer:start( + 0, + 10, + vim.schedule_wrap(function() + if client.initialized and client.server_capabilities and not timer:is_closing() then + self:_attach_or_spawn(bufnr, new_config, root_dir, client, single_file) + timer:stop() + timer:close() + end + end) + ) +end + +---@param root_dir string +---@param single_file boolean +---@param bufnr integer +function M:add(root_dir, single_file, bufnr) + root_dir = util.path.sanitize(root_dir) + local new_config = self.make_config(root_dir) + local client = get_client(self._clients, root_dir, new_config.name) + + if not client then + return self:_start_new_client(bufnr, new_config, root_dir, single_file) + end + + if self._clients[root_dir] or single_file then + lsp.buf_attach_client(bufnr, client.id) + return + end + + -- make sure neovim had exchanged capabilities from language server + -- it's useful to check server support workspaceFolders or not + if client.initialized and client.server_capabilities then + self:_attach_or_spawn(bufnr, new_config, root_dir, client, single_file) + else + self:_attach_after_client_initialized(bufnr, new_config, root_dir, client, single_file) + end +end + +--- @return vim.lsp.Client[] +function M:clients() + local res = {} + for _, client_ids in pairs(self._clients) do + for _, id in ipairs(client_ids) do + res[#res + 1] = lsp.get_client_by_id(id) + end + end + return res +end + +--- Try to attach the buffer `bufnr` to a client using this config, creating +--- a new client if one doesn't already exist for `bufnr`. +--- @param bufnr integer +--- @param project_root? string +function M:try_add(bufnr, project_root) + bufnr = bufnr or api.nvim_get_current_buf() + + if vim.bo[bufnr].buftype == 'nofile' then + return + end + + local bufname = api.nvim_buf_get_name(bufnr) + if #bufname == 0 and not self.config.single_file_support then + return + end + + if #bufname ~= 0 and not util.bufname_valid(bufname) then + return + end + + if project_root then + self:add(project_root, false, bufnr) + return + end + + local buf_path = util.path.sanitize(bufname) + + local get_root_dir = self.config.root_dir + + local pwd = assert(uv.cwd()) + + async.run(function() + local root_dir + if get_root_dir then + root_dir = get_root_dir(buf_path, bufnr) + async.reenter() + if not api.nvim_buf_is_valid(bufnr) then + return + end + end + + if root_dir then + self:add(root_dir, false, bufnr) + elseif self.config.single_file_support then + local pseudo_root = #bufname == 0 and pwd or util.path.dirname(buf_path) + self:add(pseudo_root, true, bufnr) + end + end) +end + +--- Check that the buffer `bufnr` has a valid filetype according to +--- `config.filetypes`, then do `manager.try_add(bufnr)`. +--- @param bufnr integer +--- @param project_root? string +function M:try_add_wrapper(bufnr, project_root) + local config = self.config + -- `config.filetypes = nil` means all filetypes are valid. + if not config.filetypes or vim.tbl_contains(config.filetypes, vim.bo[bufnr].filetype) then + self:try_add(bufnr, project_root) + end +end + +return M diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/agda_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/agda_ls.lua new file mode 100644 index 0000000..07d6e93 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/agda_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'als' }, + filetypes = { 'agda' }, + root_dir = util.root_pattern('.git', '*.agda-lib'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/agda/agda-language-server + +Language Server for Agda. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/aiken.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/aiken.lua new file mode 100644 index 0000000..8025fe1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/aiken.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'aiken', 'lsp' }, + filetypes = { 'aiken' }, + root_dir = function(fname) + return util.root_pattern('aiken.toml', '.git')(fname) + end, + }, + docs = { + description = [[ +https://github.com/aiken-lang/aiken + +A language server for Aiken Programming Language. +[Installation](https://aiken-lang.org/installation-instructions) + +It can be i +]], + default_config = { + cmd = { 'aiken', 'lsp' }, + root_dir = [[root_pattern("aiken.toml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/als.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/als.lua new file mode 100644 index 0000000..30e3227 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/als.lua @@ -0,0 +1,41 @@ +local util = require 'lspconfig.util' +local bin_name = 'ada_language_server' + +if vim.fn.has 'win32' == 1 then + bin_name = 'ada_language_server.exe' +end + +return { + default_config = { + cmd = { bin_name }, + filetypes = { 'ada' }, + root_dir = util.root_pattern('Makefile', '.git', '*.gpr', '*.adc'), + deprecate = { + to = 'github.com/TamaMcGlinn/nvim-lspconfig-ada', + version = '0.2.0', + }, + }, + docs = { + description = [[ +https://github.com/AdaCore/ada_language_server + +Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install). + +Can be configured by passing a "settings" object to `als.setup{}`: + +```lua +require('lspconfig').als.setup{ + settings = { + ada = { + projectFile = "project.gpr"; + scenarioVariables = { ... }; + } + } +} +``` +]], + default_config = { + root_dir = [[util.root_pattern("Makefile", ".git", "*.gpr", "*.adc")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/anakin_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/anakin_language_server.lua new file mode 100644 index 0000000..f0c281c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/anakin_language_server.lua @@ -0,0 +1,78 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'anakinls' }, + filetypes = { 'python' }, + root_dir = function(fname) + local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + } + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + settings = { + anakinls = { + pyflakes_errors = { + -- Full list: https://github.com/PyCQA/pyflakes/blob/master/pyflakes/messages.py + + 'ImportStarNotPermitted', + + 'UndefinedExport', + 'UndefinedLocal', + 'UndefinedName', + + 'DuplicateArgument', + 'MultiValueRepeatedKeyLiteral', + 'MultiValueRepeatedKeyVariable', + + 'FutureFeatureNotDefined', + 'LateFutureImport', + + 'ReturnOutsideFunction', + 'YieldOutsideFunction', + 'ContinueOutsideLoop', + 'BreakOutsideLoop', + + 'TwoStarredExpressions', + 'TooManyExpressionsInStarredAssignment', + + 'ForwardAnnotationSyntaxError', + 'RaiseNotImplemented', + + 'StringDotFormatExtraPositionalArguments', + 'StringDotFormatExtraNamedArguments', + 'StringDotFormatMissingArgument', + 'StringDotFormatMixingAutomatic', + 'StringDotFormatInvalidFormat', + + 'PercentFormatInvalidFormat', + 'PercentFormatMixedPositionalAndNamed', + 'PercentFormatUnsupportedFormat', + 'PercentFormatPositionalCountMismatch', + 'PercentFormatExtraNamedArguments', + 'PercentFormatMissingArgument', + 'PercentFormatExpectedMapping', + 'PercentFormatExpectedSequence', + 'PercentFormatStarRequiresSequence', + }, + }, + }, + }, + docs = { + description = [[ +https://pypi.org/project/anakin-language-server/ + +`anakin-language-server` is yet another Jedi Python language server. + +Available options: + +* Initialization: https://github.com/muffinmad/anakin-language-server#initialization-option +* Configuration: https://github.com/muffinmad/anakin-language-server#configuration-options + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/angularls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/angularls.lua new file mode 100644 index 0000000..45daf29 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/angularls.lua @@ -0,0 +1,67 @@ +local util = require 'lspconfig.util' + +-- Angular requires a node_modules directory to probe for @angular/language-service and typescript +-- in order to use your projects configured versions. +-- This defaults to the vim cwd, but will get overwritten by the resolved root of the file. +local function get_probe_dir(root_dir) + local project_root = util.find_node_modules_ancestor(root_dir) + + return project_root and (project_root .. '/node_modules') or '' +end + +local default_probe_dir = get_probe_dir(vim.fn.getcwd()) + +return { + default_config = { + cmd = { + 'ngserver', + '--stdio', + '--tsProbeLocations', + default_probe_dir, + '--ngProbeLocations', + default_probe_dir, + }, + filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx', 'htmlangular' }, + -- Check for angular.json since that is the root of the project. + -- Don't check for tsconfig.json or package.json since there are multiple of these + -- in an angular monorepo setup. + root_dir = util.root_pattern 'angular.json', + }, + on_new_config = function(new_config, new_root_dir) + local new_probe_dir = get_probe_dir(new_root_dir) + + -- We need to check our probe directories because they may have changed. + new_config.cmd = { + 'ngserver', + '--stdio', + '--tsProbeLocations', + new_probe_dir, + '--ngProbeLocations', + new_probe_dir, + } + end, + docs = { + description = [[ +https://github.com/angular/vscode-ng-language-service + +`angular-language-server` can be installed via npm `npm install -g @angular/language-server`. + +Note, that if you override the default `cmd`, you must also update `on_new_config` to set `new_config.cmd` during startup. + +```lua +local project_library_path = "/path/to/project/lib" +local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} + +require'lspconfig'.angularls.setup{ + cmd = cmd, + on_new_config = function(new_config,new_root_dir) + new_config.cmd = cmd + end, +} +``` + ]], + default_config = { + root_dir = [[root_pattern("angular.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ansiblels.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ansiblels.lua new file mode 100644 index 0000000..acf78f2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ansiblels.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ansible-language-server', '--stdio' }, + settings = { + ansible = { + python = { + interpreterPath = 'python', + }, + ansible = { + path = 'ansible', + }, + executionEnvironment = { + enabled = false, + }, + validation = { + enabled = true, + lint = { + enabled = true, + path = 'ansible-lint', + }, + }, + }, + }, + filetypes = { 'yaml.ansible' }, + root_dir = util.root_pattern('ansible.cfg', '.ansible-lint'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ansible/vscode-ansible + +Language server for the ansible configuration management tool. + +`ansible-language-server` can be installed via `npm`: + +```sh +npm install -g @ansible/ansible-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/antlersls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/antlersls.lua new file mode 100644 index 0000000..ea4cf87 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/antlersls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'antlersls', '--stdio' }, + filetypes = { 'html', 'antlers' }, + root_dir = util.root_pattern 'composer.json', + }, + docs = { + description = [[ +https://www.npmjs.com/package/antlers-language-server + +`antlersls` can be installed via `npm`: +```sh +npm install -g antlers-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/apex_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/apex_ls.lua new file mode 100644 index 0000000..baea475 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/apex_ls.lua @@ -0,0 +1,46 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'apexcode' }, + root_dir = util.root_pattern 'sfdx-project.json', + on_new_config = function(config) + if not config.cmd and config.apex_jar_path then + config.cmd = { + vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java', + '-cp', + config.apex_jar_path, + '-Ddebug.internal.errors=true', + '-Ddebug.semantic.errors=' .. tostring(config.apex_enable_semantic_errors or false), + '-Ddebug.completion.statistics=' .. tostring(config.apex_enable_completion_statistics or false), + '-Dlwc.typegeneration.disabled=true', + } + if config.apex_jvm_max_heap then + table.insert(config.cmd, '-Xmx' .. config.apex_jvm_max_heap) + end + table.insert(config.cmd, 'apex.jorje.lsp.ApexLanguageServerLauncher') + end + end, + }, + docs = { + description = [[ +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Apex. + +For manual installation, download the JAR file from the [VSCode +extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex). + +```lua +require'lspconfig'.apex_ls.setup { + apex_jar_path = '/path/to/apex-jorje-lsp.jar', + apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors + apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage +} +``` +]], + default_config = { + root_dir = [[root_pattern('sfdx-project.json')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/arduino_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/arduino_language_server.lua new file mode 100644 index 0000000..c3ddc51 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/arduino_language_server.lua @@ -0,0 +1,90 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'arduino' }, + root_dir = util.root_pattern '*.ino', + cmd = { + 'arduino-language-server', + }, + capabilities = { + textDocument = { + semanticTokens = vim.NIL, + }, + workspace = { + semanticTokens = vim.NIL, + }, + }, + }, + docs = { + description = [[ +https://github.com/arduino/arduino-language-server + +Language server for Arduino + +The `arduino-language-server` can be installed by running: + +``` +go install github.com/arduino/arduino-language-server@latest +``` + +The `arduino-cli` tool must also be installed. Follow [these +installation instructions](https://arduino.github.io/arduino-cli/latest/installation/) for +your platform. + +After installing `arduino-cli`, follow [these +instructions](https://arduino.github.io/arduino-cli/latest/getting-started/#create-a-configuration-file) +for generating a configuration file if you haven't done so already, and make +sure you [install any relevant platforms +libraries](https://arduino.github.io/arduino-cli/latest/getting-started/#install-the-core-for-your-board). + +The language server also requires `clangd` to be installed. Follow [these +installation instructions](https://clangd.llvm.org/installation) for your +platform. + +If you don't have a sketch yet create one. + +```sh +$ arduino-cli sketch new test +$ cd test +``` + +You will need a `sketch.yaml` file in order for the language server to understand your project. It will also save you passing options to `arduino-cli` each time you compile or upload a file. You can generate the file by using the following commands. + + +First gather some information about your board. Make sure your board is connected and run the following: + +```sh +$ arduino-cli board list +Port Protocol Type Board Name FQBN Core +/dev/ttyACM0 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr +``` + +Then generate the file: + +```sh +arduino-cli board attach -p /dev/ttyACM0 -b arduino:avr:uno test.ino +``` + +The resulting file should look like this: + +```yaml +default_fqbn: arduino:avr:uno +default_port: /dev/ttyACM0 +``` + +Your folder structure should look like this: + +``` +. +├── test.ino +└── sketch.yaml +``` + +For further instructions about configuration options, run `arduino-language-server --help`. + +Note that an upstream bug makes keywords in some cases become undefined by the language server. +Ref: https://github.com/arduino/arduino-ide/issues/159 +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/asm_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/asm_lsp.lua new file mode 100644 index 0000000..102bcba --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/asm_lsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'asm-lsp' }, + filetypes = { 'asm', 'vmasm' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/bergercookie/asm-lsp + +Language Server for GAS/GO Assembly + +`asm-lsp` can be installed via cargo: +cargo install asm-lsp +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ast_grep.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ast_grep.lua new file mode 100644 index 0000000..35b0189 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ast_grep.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ast-grep', 'lsp' }, + filetypes = { -- https://ast-grep.github.io/reference/languages.html + 'c', + 'cpp', + 'rust', + 'go', + 'java', + 'python', + 'javascript', + 'typescript', + 'html', + 'css', + 'kotlin', + 'dart', + 'lua', + }, + root_dir = util.root_pattern('sgconfig.yaml', 'sgconfig.yml'), + }, + docs = { + description = [[ +https://ast-grep.github.io/ + +ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. +ast-grep LSP only works in projects that have `sgconfig.y[a]ml` in their root directories. +```sh +npm install [-g] @ast-grep/cli +``` +]], + default_config = { + root_dir = [[root_pattern('sgconfig.yaml', 'sgconfig.yml')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/astro.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/astro.lua new file mode 100644 index 0000000..c28dcb6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/astro.lua @@ -0,0 +1,35 @@ +local util = require 'lspconfig.util' + +local function get_typescript_server_path(root_dir) + local project_root = util.find_node_modules_ancestor(root_dir) + return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' +end + +return { + default_config = { + cmd = { 'astro-ls', '--stdio' }, + filetypes = { 'astro' }, + root_dir = util.root_pattern('package.json', 'tsconfig.json', 'jsconfig.json', '.git'), + init_options = { + typescript = {}, + }, + on_new_config = function(new_config, new_root_dir) + if vim.tbl_get(new_config.init_options, 'typescript') and not new_config.init_options.typescript.tsdk then + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end + end, + }, + docs = { + description = [[ +https://github.com/withastro/language-tools/tree/main/packages/language-server + +`astro-ls` can be installed via `npm`: +```sh +npm install -g @astrojs/language-server +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/autotools_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/autotools_ls.lua new file mode 100644 index 0000000..f5bc2f7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/autotools_ls.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +local root_files = { 'configure.ac', 'Makefile', 'Makefile.am', '*.mk' } + +return { + default_config = { + cmd = { 'autotools-language-server' }, + filetypes = { 'config', 'automake', 'make' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/Freed-Wu/autotools-language-server + +`autotools-language-server` can be installed via `pip`: +```sh +pip install autotools-language-server +``` + +Language server for autoconf, automake and make using tree sitter in python. +]], + default_config = { + root_dir = { 'configure.ac', 'Makefile', 'Makefile.am', '*.mk' }, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/awk_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/awk_ls.lua new file mode 100644 index 0000000..ff1087d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/awk_ls.lua @@ -0,0 +1,22 @@ +if vim.version().major == 0 and vim.version().minor < 7 then + vim.notify('The AWK language server requires nvim >= 0.7', vim.log.levels.ERROR) + return +end + +return { + default_config = { + cmd = { 'awk-language-server' }, + filetypes = { 'awk' }, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/Beaglefoot/awk-language-server/ + +`awk-language-server` can be installed via `npm`: +```sh +npm install -g awk-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/azure_pipelines_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/azure_pipelines_ls.lua new file mode 100644 index 0000000..3e2fe94 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/azure_pipelines_ls.lua @@ -0,0 +1,44 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'azure-pipelines-language-server', '--stdio' }, + filetypes = { 'yaml' }, + root_dir = util.root_pattern 'azure-pipelines.yml', + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/microsoft/azure-pipelines-language-server + +An Azure Pipelines language server + +`azure-pipelines-ls` can be installed via `npm`: + +```sh +npm install -g azure-pipelines-language-server +``` + +By default `azure-pipelines-ls` will only work in files named `azure-pipelines.yml`, this can be changed by providing additional settings like so: +```lua +require("lspconfig").azure_pipelines_ls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + schemas = { + ["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = { + "/azure-pipeline*.y*l", + "/*.azure*", + "Azure-Pipelines/**/*.y*l", + "Pipelines/*.y*l", + }, + }, + }, + }, +} +``` +The Azure Pipelines LSP is a fork of `yaml-language-server` and as such the same settings can be passed to it as `yaml-language-server`. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bacon_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bacon_ls.lua new file mode 100644 index 0000000..8acf12f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bacon_ls.lua @@ -0,0 +1,39 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bacon-ls' }, + filetypes = { 'rust' }, + root_dir = util.root_pattern('.bacon-locations', 'Cargo.toml'), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/crisidev/bacon-ls + +A Language Server Protocol wrapper for [bacon](https://dystroy.org/bacon/). +It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust +workspaces using the Bacon export locations file. + +It requires `bacon` and `bacon-ls` to be installed on the system using +[mason.nvim](https://github.com/williamboman/mason.nvim) or manually:util + +```sh +$ cargo install --locked bacon bacon-ls +``` + +Settings can be changed using the `settings` dictionary:util + +```lua +settings = { + -- Bacon export filename, default .bacon-locations + locationsFile = ".bacon-locations", + -- Maximum time in seconds the LSP server waits for Bacon to update the + -- export file before loading the new diagnostics + waitTimeSeconds = 10 +} +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ballerina.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ballerina.lua new file mode 100644 index 0000000..fb6ec88 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ballerina.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bal', 'start-language-server' }, + filetypes = { 'ballerina' }, + root_dir = util.root_pattern 'Ballerina.toml', + }, + docs = { + description = [[ +Ballerina language server + +The Ballerina language's CLI tool comes with its own language server implementation. +The `bal` command line tool must be installed and available in your system's PATH. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/basedpyright.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/basedpyright.lua new file mode 100644 index 0000000..fa45d14 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/basedpyright.lua @@ -0,0 +1,80 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', + '.git', +} + +local function organize_imports() + local params = { + command = 'basedpyright.organizeimports', + arguments = { vim.uri_from_bufnr(0) }, + } + + local clients = util.get_lsp_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'basedpyright', + } + for _, client in ipairs(clients) do + client.request('workspace/executeCommand', params, nil, 0) + end +end + +local function set_python_path(path) + local clients = util.get_lsp_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'basedpyright', + } + for _, client in ipairs(clients) do + if client.settings then + client.settings.python = vim.tbl_deep_extend('force', client.settings.python or {}, { pythonPath = path }) + else + client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } }) + end + client.notify('workspace/didChangeConfiguration', { settings = nil }) + end +end + +return { + default_config = { + cmd = { 'basedpyright-langserver', '--stdio' }, + filetypes = { 'python' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) + end, + single_file_support = true, + settings = { + basedpyright = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = 'openFilesOnly', + }, + }, + }, + }, + commands = { + PyrightOrganizeImports = { + organize_imports, + description = 'Organize Imports', + }, + PyrightSetPythonPath = { + set_python_path, + description = 'Reconfigure basedpyright with the provided python path', + nargs = 1, + complete = 'file', + }, + }, + docs = { + description = [[ +https://detachhead.github.io/basedpyright + +`basedpyright`, a static type checker and language server for python +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bashls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bashls.lua new file mode 100644 index 0000000..953da74 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bashls.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bash-language-server', 'start' }, + settings = { + bashIde = { + -- Glob pattern for finding and parsing shell script files in the workspace. + -- Used by the background analysis features across files. + + -- Prevent recursive scanning which will cause issues when opening a file + -- directly in the home directory (e.g. ~/foo.sh). + -- + -- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)". + globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)', + }, + }, + filetypes = { 'sh' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/bash-lsp/bash-language-server + +`bash-language-server` can be installed via `npm`: +```sh +npm i -g bash-language-server +``` + +Language server for bash, written using tree sitter in typescript. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bazelrc_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bazelrc_lsp.lua new file mode 100644 index 0000000..d89462a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bazelrc_lsp.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'bazelrc-lsp' }, + filetypes = { 'bazelrc' }, + root_dir = util.root_pattern('WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel'), + }, + docs = { + description = [[ +https://github.com/salesforce-misc/bazelrc-lsp + +`bazelrc-lsp` is a LSP for `.bazelrc` configuration files. + +The `.bazelrc` file type is not detected automatically, you can register it manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['.*.bazelrc'] = 'bazelrc', + }, +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/beancount.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/beancount.lua new file mode 100644 index 0000000..c1f3465 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/beancount.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'beancount-language-server', '--stdio' }, + filetypes = { 'beancount', 'bean' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + init_options = {}, + }, + docs = { + description = [[ +https://github.com/polarmutex/beancount-language-server#installation + +See https://github.com/polarmutex/beancount-language-server#configuration for configuration options +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bicep.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bicep.lua new file mode 100644 index 0000000..1ec7032 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bicep.lua @@ -0,0 +1,47 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'bicep' }, + root_dir = util.find_git_ancestor, + init_options = {}, + }, + docs = { + description = [=[ +https://github.com/azure/bicep +Bicep language server + +Bicep language server can be installed by downloading and extracting a release of bicep-langserver.zip from [Bicep GitHub releases](https://github.com/Azure/bicep/releases). + +Bicep language server requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +Neovim does not have built-in support for the bicep filetype which is required for lspconfig to automatically launch the language server. + +Filetype detection can be added via an autocmd: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.bicep set filetype=bicep ]] +``` + +**By default, bicep language server does not have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +local bicep_lsp_bin = "/path/to/bicep-langserver/Bicep.LangServer.dll" +require'lspconfig'.bicep.setup{ + cmd = { "dotnet", bicep_lsp_bin }; + ... +} +``` + +To download the latest release and place in /usr/local/bin/bicep-langserver: +```bash +(cd $(mktemp -d) \ + && curl -fLO https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip \ + && rm -rf /usr/local/bin/bicep-langserver \ + && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip) +``` +]=], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/biome.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/biome.lua new file mode 100644 index 0000000..8cb47f9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/biome.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'biome', 'lsp-proxy' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'json', + 'jsonc', + 'typescript', + 'typescript.tsx', + 'typescriptreact', + 'astro', + 'svelte', + 'vue', + 'css', + }, + root_dir = util.root_pattern('biome.json', 'biome.jsonc'), + single_file_support = false, + }, + docs = { + description = [[ +https://biomejs.dev + +Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome). + +```sh +npm install [-g] @biomejs/biome +``` +]], + default_config = { + root_dir = [[root_pattern('biome.json', 'biome.jsonc')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_language_server.lua new file mode 100644 index 0000000..726fa85 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_language_server.lua @@ -0,0 +1,14 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bitbake-language-server' }, + filetypes = { 'bitbake' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +🛠️ bitbake language server +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_ls.lua new file mode 100644 index 0000000..b540360 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bitbake_ls.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'language-server-bitbake', '--stdio' }, + filetypes = { 'bitbake' }, + root_dir = util.find_git_ancestor, + single_file_support = false, + }, + docs = { + description = [[ +https://github.com/yoctoproject/vscode-bitbake/tree/staging/server +https://www.npmjs.com/package/language-server-bitbake + +Official Bitbake Language Server for the Yocto Project. + +Can be installed from npm or github. + +``` +npm install -g language-server-bitbake +``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/blueprint_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/blueprint_ls.lua new file mode 100644 index 0000000..6e9e645 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/blueprint_ls.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'blueprint-compiler', 'lsp' }, + cmd_env = { + -- Prevent recursive scanning which will cause issues when opening a file + -- directly in the home directory (e.g. ~/foo.sh). + -- + -- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)". + GLOB_PATTERN = vim.env.GLOB_PATTERN or '*@(.blp)', + }, + filetypes = { 'blueprint' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://gitlab.gnome.org/jwestman/blueprint-compiler + +`blueprint-compiler` can be installed via your system package manager. + +Language server for the blueprint markup language, written in python and part +of the blueprint-compiler. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bqnlsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bqnlsp.lua new file mode 100644 index 0000000..5d18e99 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bqnlsp.lua @@ -0,0 +1,45 @@ +local util = require 'lspconfig.util' + +-- set os dependent library path +local function library_path(path, cmd_env) + path = path or '/usr/local/lib' + cmd_env = cmd_env or {} + if vim.fn.has 'macunix' and not cmd_env.DYLD_LIBRARY_PATH then + cmd_env.DYLD_LIBRARY_PATH = path + elseif vim.fn.has 'linux' and not cmd_env.LD_LIBRARY_PATH then + cmd_env.LD_LIBRARY_PATH = path + end + return cmd_env +end + +return { + default_config = { + cmd = { 'bqnlsp' }, + filetypes = { 'bqn' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + libcbqnPath = nil, + on_new_config = function(new_config, _) + if new_config.libcbqnPath then + new_config.cmd_env = library_path(new_config.libcbqnPath, new_config.cmd_env) + end + end, + }, + docs = { + description = [[ +https://git.sr.ht/~detegr/bqnlsp + + +`bqnlsp`, a language server for BQN. + +The binary depends on the shared library of [CBQN](https://github.com/dzaima/CBQN) `libcbqn.so`. +If CBQN is installed system-wide (using `sudo make install` in its source directory) and `bqnlsp` errors that it can't find the shared library, update the linker cache by executing `sudo ldconfig`. +If CBQN has been installed in a non-standard directory or can't be installed globally pass `libcbqnPath = '/path/to/CBQN'` to the setup function. +This will set the environment variables `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (macOS) to the provided path. + + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bright_script.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bright_script.lua new file mode 100644 index 0000000..6d4ba82 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bright_script.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'bsc', '--lsp', '--stdio' }, + filetypes = { 'brs' }, + single_file_support = true, + root_dir = util.root_pattern('makefile', 'Makefile', '.git'), + }, + docs = { + description = [[ +https://github.com/RokuCommunity/brighterscript + +`brightscript` can be installed via `npm`: +```sh +npm install -g brighterscript +``` +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bsl_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bsl_ls.lua new file mode 100644 index 0000000..fef15f9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bsl_ls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'bsl', 'os' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ + https://github.com/1c-syntax/bsl-language-server + + Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages. + + ]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buck2.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buck2.lua new file mode 100644 index 0000000..134a562 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buck2.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'buck2', 'lsp' }, + filetypes = { 'bzl' }, + root_dir = function(fname) + return util.root_pattern '.buckconfig'(fname) + end, + }, + docs = { + description = [=[ +https://github.com/facebook/buck2 + +Build system, successor to Buck + +To better detect Buck2 project files, the following can be added: + +``` +vim.cmd [[ autocmd BufRead,BufNewFile *.bxl,BUCK,TARGETS set filetype=bzl ]] +``` +]=], + default_config = { + root_dir = [[root_pattern(".buckconfig")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buddy_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buddy_ls.lua new file mode 100644 index 0000000..7343dd3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/buddy_ls.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'buddy-lsp-server' }, + filetypes = { 'mlir' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/buddy-compiler/buddy-mlir#buddy-lsp-server +The Language Server for the buddy-mlir, a drop-in replacement for mlir-lsp-server, +supporting new dialects defined in buddy-mlir. +`buddy-lsp-server` can be installed at the buddy-mlir repository (buddy-compiler/buddy-mlir) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bufls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bufls.lua new file mode 100644 index 0000000..ba12ddb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bufls.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bufls', 'serve' }, + filetypes = { 'proto' }, + root_dir = function(fname) + return util.root_pattern('buf.work.yaml', '.git')(fname) + end, + }, + docs = { + description = [[ +https://github.com/bufbuild/buf-language-server + +`buf-language-server` can be installed via `go install`: +```sh +go install github.com/bufbuild/buf-language-server/cmd/bufls@latest +``` + +bufls is a Protobuf language server compatible with Buf modules and workspaces +]], + default_config = { + root_dir = [[root_pattern("buf.work.yaml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bzl.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bzl.lua new file mode 100644 index 0000000..a2200f6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/bzl.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'bzl', 'lsp', 'serve' }, + filetypes = { 'bzl' }, + -- https://docs.bazel.build/versions/5.4.1/build-ref.html#workspace + root_dir = util.root_pattern('WORKSPACE', 'WORKSPACE.bazel'), + }, + docs = { + description = [[ +https://bzl.io/ + +https://docs.stack.build/docs/cli/installation + +https://docs.stack.build/docs/vscode/starlark-language-server +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cadence.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cadence.lua new file mode 100644 index 0000000..640fe5a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cadence.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'flow', 'cadence', 'language-server' }, + filetypes = { 'cdc' }, + init_options = { + numberOfAccounts = '1', + }, + root_dir = function(fname, _) + return util.root_pattern 'flow.json'(fname) or vim.env.HOME + end, + on_new_config = function(new_config, new_root_dir) + new_config.init_options.configPath = util.path.join(new_root_dir, 'flow.json') + end, + }, + docs = { + description = [[ +[Cadence Language Server](https://github.com/onflow/cadence-tools/tree/master/languageserver) +using the [flow-cli](https://developers.flow.com/tools/flow-cli). + +The `flow` command from flow-cli must be available. For install instructions see +[the docs](https://developers.flow.com/tools/flow-cli/install#install-the-flow-cli) or the +[Github page](https://github.com/onflow/flow-cli). + +By default the configuration is taken from the closest `flow.json` or the `flow.json` in the users home directory. +]], + default_config = { + root_dir = [[util.root_pattern('flow.json') or vim.env.HOME]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cairo_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cairo_ls.lua new file mode 100644 index 0000000..e79b34a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cairo_ls.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' + +local bin_name = 'cairo-language-server' +local cmd = { bin_name, '/C', '--node-ipc' } + +return { + default_config = { + init_options = { hostInfo = 'neovim' }, + cmd = cmd, + filetypes = { 'cairo' }, + root_dir = util.root_pattern('Scarb.toml', 'cairo_project.toml', '.git'), + }, + docs = { + description = [[ +[Cairo Language Server](https://github.com/starkware-libs/cairo/tree/main/crates/cairo-lang-language-server) + +First, install cairo following [this tutorial](https://medium.com/@elias.tazartes/ahead-of-the-curve-install-cairo-1-0-alpha-and-prepare-for-regenesis-85f4e3940e20) + +Then enable cairo language server in your lua configuration. +```lua +require'lspconfig'.cairo_ls.setup{} +``` + +*cairo-language-server is still under active development, some features might not work yet !* +]], + default_config = { + root_dir = [[root_pattern("Scarb.toml", "cairo_project.toml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ccls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ccls.lua new file mode 100644 index 0000000..72977df --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ccls.lua @@ -0,0 +1,50 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'compile_commands.json', + '.ccls', +} + +return { + default_config = { + cmd = { 'ccls' }, + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + offset_encoding = 'utf-32', + -- ccls does not support sending a null root directory + single_file_support = false, + }, + docs = { + description = [[ +https://github.com/MaskRay/ccls/wiki + +ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified +as compile_commands.json or, for simpler projects, a .ccls. +For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). + +Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example: + +```lua +local lspconfig = require'lspconfig' +lspconfig.ccls.setup { + init_options = { + compilationDatabaseDirectory = "build"; + index = { + threads = 0; + }; + clang = { + excludeArgs = { "-frounding-math"} ; + }; + } +} + +``` + +]], + default_config = { + root_dir = [[root_pattern('compile_commands.json', '.ccls', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cds_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cds_lsp.lua new file mode 100644 index 0000000..a04876f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cds_lsp.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'package.json', + 'db', + 'srv', +} + +return { + default_config = { + cmd = { 'cds-lsp', '--stdio' }, + filetypes = { 'cds' }, + -- init_options = { provideFormatter = true }, -- needed to enable formatting capabilities + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + settings = { + cds = { validate = true }, + }, + }, + docs = { + description = [[ + +https://cap.cloud.sap/docs/ + +`cds-lsp` can be installed via `npm`: + +```sh +npm i -g @sap/cds-lsp +``` + +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/circom-lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/circom-lsp.lua new file mode 100644 index 0000000..dda5408 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/circom-lsp.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'circom-lsp' }, + filetypes = { 'circom' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +[Circom Language Server](https://github.com/rubydusa/circom-lsp) + +`circom-lsp`, the language server for the Circom language. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clangd.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clangd.lua new file mode 100644 index 0000000..d6cb029 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clangd.lua @@ -0,0 +1,119 @@ +local util = require 'lspconfig.util' + +-- https://clangd.llvm.org/extensions.html#switch-between-sourceheader +local function switch_source_header(bufnr) + bufnr = util.validate_bufnr(bufnr) + local clangd_client = util.get_active_client_by_name(bufnr, 'clangd') + local params = { uri = vim.uri_from_bufnr(bufnr) } + if clangd_client then + clangd_client.request('textDocument/switchSourceHeader', params, function(err, result) + if err then + error(tostring(err)) + end + if not result then + print 'Corresponding file cannot be determined' + return + end + vim.api.nvim_command('edit ' .. vim.uri_to_fname(result)) + end, bufnr) + else + print 'method textDocument/switchSourceHeader is not supported by any servers active on the current buffer' + end +end + +local function symbol_info() + local bufnr = vim.api.nvim_get_current_buf() + local clangd_client = util.get_active_client_by_name(bufnr, 'clangd') + if not clangd_client or not clangd_client.supports_method 'textDocument/symbolInfo' then + return vim.notify('Clangd client not found', vim.log.levels.ERROR) + end + local params = vim.lsp.util.make_position_params() + clangd_client.request('textDocument/symbolInfo', params, function(err, res) + if err or #res == 0 then + -- Clangd always returns an error, there is not reason to parse it + return + end + local container = string.format('container: %s', res[1].containerName) ---@type string + local name = string.format('name: %s', res[1].name) ---@type string + vim.lsp.util.open_floating_preview({ name, container }, '', { + height = 2, + width = math.max(string.len(name), string.len(container)), + focusable = false, + focus = false, + border = require('lspconfig.ui.windows').default_options.border or 'single', + title = 'Symbol Info', + }) + end, bufnr) +end + +local root_files = { + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', -- AutoTools +} + +local default_capabilities = { + textDocument = { + completion = { + editsNearCursor = true, + }, + }, + offsetEncoding = { 'utf-8', 'utf-16' }, +} + +return { + default_config = { + cmd = { 'clangd' }, + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + capabilities = default_capabilities, + }, + commands = { + ClangdSwitchSourceHeader = { + function() + switch_source_header(0) + end, + description = 'Switch between source/header', + }, + ClangdShowSymbolInfo = { + function() + symbol_info() + end, + description = 'Show symbol info', + }, + }, + docs = { + description = [[ +https://clangd.llvm.org/installation.html + +- **NOTE:** Clang >= 11 is recommended! See [#23](https://github.com/neovim/nvim-lsp/issues/23). +- If `compile_commands.json` lives in a build directory, you should + symlink it to the root of your source tree. + ``` + ln -s /path/to/myproject/build/compile_commands.json /path/to/myproject/ + ``` +- clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) + specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson +]], + default_config = { + root_dir = [[ + root_pattern( + '.clangd', + '.clang-tidy', + '.clang-format', + 'compile_commands.json', + 'compile_flags.txt', + 'configure.ac', + '.git' + ) + ]], + capabilities = [[default capabilities, with offsetEncoding utf-8]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clarity_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clarity_lsp.lua new file mode 100644 index 0000000..72a6197 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clarity_lsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'clarity-lsp' }, + filetypes = { 'clar', 'clarity' }, + root_dir = util.root_pattern '.git', + }, + docs = { + description = [[ +`clarity-lsp` is a language server for the Clarity language. Clarity is a decidable smart contract language that optimizes for predictability and security. Smart contracts allow developers to encode essential business logic on a blockchain. + +To learn how to configure the clarity language server, see the [clarity-lsp documentation](https://github.com/hirosystems/clarity-lsp). +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clojure_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clojure_lsp.lua new file mode 100644 index 0000000..45b1dd6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/clojure_lsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'clojure-lsp' }, + filetypes = { 'clojure', 'edn' }, + root_dir = util.root_pattern('project.clj', 'deps.edn', 'build.boot', 'shadow-cljs.edn', '.git', 'bb.edn'), + }, + docs = { + description = [[ +https://github.com/clojure-lsp/clojure-lsp + +Clojure Language Server +]], + default_config = { + root_dir = [[root_pattern("project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", ".git", "bb.edn")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cmake.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cmake.lua new file mode 100644 index 0000000..7f27fea --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cmake.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +local root_files = { 'CMakePresets.json', 'CTestConfig.cmake', '.git', 'build', 'cmake' } +return { + default_config = { + cmd = { 'cmake-language-server' }, + filetypes = { 'cmake' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) + end, + single_file_support = true, + init_options = { + buildDirectory = 'build', + }, + }, + docs = { + description = [[ +https://github.com/regen100/cmake-language-server + +CMake LSP Implementation +]], + default_config = { + root_dir = [[root_pattern('CMakePresets.json', 'CTestConfig.cmake', '.git', 'build', 'cmake')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cobol_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cobol_ls.lua new file mode 100644 index 0000000..867271b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cobol_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cobol-language-support' }, + filetypes = { 'cobol' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +Cobol language support + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/codeqlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/codeqlls.lua new file mode 100644 index 0000000..695041e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/codeqlls.lua @@ -0,0 +1,48 @@ +local util = require 'lspconfig.util' + +local workspace_folders = {} + +return { + default_config = { + cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q' }, + filetypes = { 'ql' }, + root_dir = util.root_pattern 'qlpack.yml', + log_level = vim.lsp.protocol.MessageType.Warning, + before_init = function(initialize_params) + table.insert(workspace_folders, { name = 'workspace', uri = initialize_params['rootUri'] }) + initialize_params['workspaceFolders'] = workspace_folders + end, + settings = { + search_path = vim.empty_dict(), + }, + }, + docs = { + description = [[ +Reference: +https://codeql.github.com/docs/codeql-cli/ + +Binaries: +https://github.com/github/codeql-cli-binaries + ]], + default_config = { + settings = { + search_path = [[list containing all search paths, eg: '~/codeql-home/codeql-repo']], + }, + }, + }, + on_new_config = function(config) + if type(config.settings.search_path) == 'table' and not vim.tbl_isempty(config.settings.search_path) then + local search_path = '--search-path=' + for _, path in ipairs(config.settings.search_path) do + search_path = search_path .. vim.fn.expand(path) .. ':' + table.insert(workspace_folders, { + name = 'workspace', + uri = string.format('file://%s', path), + }) + end + config.cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q', search_path } + else + config.cmd = { 'codeql', 'execute', 'language-server', '--check-errors', 'ON_CHANGE', '-q' } + end + end, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coffeesense.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coffeesense.lua new file mode 100644 index 0000000..f5b75a8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coffeesense.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'coffeesense-language-server', '--stdio' }, + filetypes = { 'coffee' }, + root_dir = util.root_pattern 'package.json', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/phil294/coffeesense + +CoffeeSense Language Server +`coffeesense-language-server` can be installed via `npm`: +```sh +npm install -g coffeesense-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/contextive.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/contextive.lua new file mode 100644 index 0000000..b05309d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/contextive.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'Contextive.LanguageServer' }, + root_dir = util.root_pattern('.contextive', '.git'), + }, + docs = { + description = [[ +https://github.com/dev-cycles/contextive + +Language Server for Contextive. + +Contextive allows you to define terms in a central file and provides auto-completion suggestions and hover panels for these terms wherever they're used. + +To install the language server, you need to download the appropriate [GitHub release asset](https://github.com/dev-cycles/contextive/releases/) for your operating system and architecture. + +After the download unzip the Contextive.LanguageServer binary and copy the file into a folder that is included in your system's PATH. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coq_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coq_lsp.lua new file mode 100644 index 0000000..aa492d4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/coq_lsp.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'coq-lsp' }, + filetypes = { 'coq' }, + root_dir = function(fname) + return util.root_pattern '_CoqProject'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ejgallego/coq-lsp/ +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/crystalline.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/crystalline.lua new file mode 100644 index 0000000..ef4d6bc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/crystalline.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'crystalline' }, + filetypes = { 'crystal' }, + root_dir = util.root_pattern 'shard.yml' or util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/elbywan/crystalline + +Crystal language server. +]], + default_config = { + root_dir = [[root_pattern('shard.yml', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/csharp_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/csharp_ls.lua new file mode 100644 index 0000000..131862f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/csharp_ls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'csharp-ls' }, + root_dir = function(fname) + return util.root_pattern '*.sln'(fname) or util.root_pattern '*.csproj'(fname) + end, + filetypes = { 'cs' }, + init_options = { + AutomaticWorkspaceInit = true, + }, + }, + docs = { + description = [[ +https://github.com/razzmatazz/csharp-language-server + +Language Server for C#. + +csharp-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install csharp-ls is with `dotnet tool install --global csharp-ls`. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/css_variables.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/css_variables.lua new file mode 100644 index 0000000..dd9257d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/css_variables.lua @@ -0,0 +1,65 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'css-variables-language-server', '--stdio' }, + filetypes = { 'css', 'scss', 'less' }, + root_dir = util.root_pattern('package.json', '.git'), + -- Same as inlined defaults that don't seem to work without hardcoding them in the lua config + -- https://github.com/vunguyentuan/vscode-css-variables/blob/763a564df763f17aceb5f3d6070e0b444a2f47ff/packages/css-variables-language-server/src/CSSVariableManager.ts#L31-L50 + settings = { + cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, + }, + }, + }, + docs = { + description = [[ +https://github.com/vunguyentuan/vscode-css-variables/tree/master/packages/css-variables-language-server + +CSS variables autocompletion and go-to-definition + +`css-variables-language-server` can be installed via `npm`: + +```sh +npm i -g css-variables-language-server +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", ".git") or bufdir]], + settings = [[ +cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, +}, + ]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssls.lua new file mode 100644 index 0000000..ac8e6a1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssls.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vscode-css-language-server', '--stdio' }, + filetypes = { 'css', 'scss', 'less' }, + init_options = { provideFormatter = true }, -- needed to enable formatting capabilities + root_dir = util.root_pattern('package.json', '.git'), + single_file_support = true, + settings = { + css = { validate = true }, + scss = { validate = true }, + less = { validate = true }, + }, + }, + docs = { + description = [[ + +https://github.com/hrsh7th/vscode-langservers-extracted + +`css-languageserver` can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.cssls.setup { + capabilities = capabilities, +} +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", ".git") or bufdir]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssmodules_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssmodules_ls.lua new file mode 100644 index 0000000..d7f5e3d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cssmodules_ls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cssmodules-language-server' }, + filetypes = { 'javascript', 'javascriptreact', 'typescript', 'typescriptreact' }, + root_dir = util.find_package_json_ancestor, + }, + docs = { + description = [[ +https://github.com/antonk52/cssmodules-language-server + +Language server for autocompletion and go-to-definition functionality for CSS modules. + +You can install cssmodules-language-server via npm: +```sh +npm install -g cssmodules-language-server +``` + ]], + default_config = { + root_dir = [[root_pattern("package.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cucumber_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cucumber_language_server.lua new file mode 100644 index 0000000..1fb4b8a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cucumber_language_server.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cucumber-language-server', '--stdio' }, + filetypes = { 'cucumber' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://cucumber.io +https://github.com/cucumber/common +https://www.npmjs.com/package/@cucumber/language-server + +Language server for Cucumber. + +`cucumber-language-server` can be installed via `npm`: +```sh +npm install -g @cucumber/language-server +``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/custom_elements_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/custom_elements_ls.lua new file mode 100644 index 0000000..e71d7f8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/custom_elements_ls.lua @@ -0,0 +1,39 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + init_options = { hostInfo = 'neovim' }, + cmd = { 'custom-elements-languageserver', '--stdio' }, + root_dir = util.root_pattern('tsconfig.json', 'package.json', 'jsconfig.json', '.git'), + }, + docs = { + description = [[ +https://github.com/Matsuuu/custom-elements-language-server + +`custom-elements-languageserver` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript custom-elements-languageserver +``` +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. +Here's an example that disables type checking in JavaScript files. +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` +]], + default_config = { + root_dir = [[root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cypher_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cypher_ls.lua new file mode 100644 index 0000000..7c0cf2c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/cypher_ls.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cypher-language-server', '--stdio' }, + filetypes = { 'cypher' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server + +`cypher-language-server`, language server for Cypher query language. +Part of the umbrella project cypher-language-support: https://github.com/neo4j/cypher-language-support + +`cypher-language-server` can be installed via `npm`: +```sh +npm i -g @neo4j-cypher/language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dafny.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dafny.lua new file mode 100644 index 0000000..be5e72b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dafny.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dafny', 'server' }, + filetypes = { 'dfy', 'dafny' }, + root_dir = function(fname) + util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ + Support for the Dafny language server. + + The default `cmd` uses "dafny server", which works on Dafny 4.0.0+. For + older versions of Dafny, you can compile the language server from source at + [dafny-lang/language-server-csharp](https://github.com/dafny-lang/language-server-csharp) + and set `cmd = {"dotnet", ""}`. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dagger.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dagger.lua new file mode 100644 index 0000000..734249f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dagger.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'cuelsp' }, + filetypes = { 'cue' }, + root_dir = function(fname) + return util.root_pattern('cue.mod', '.git')(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/dagger/cuelsp + +Dagger's lsp server for cuelang. +]], + default_config = { + root_dir = [[root_pattern("cue.mod", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dartls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dartls.lua new file mode 100644 index 0000000..83eda99 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dartls.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dart', 'language-server', '--protocol=lsp' }, + filetypes = { 'dart' }, + root_dir = util.root_pattern 'pubspec.yaml', + init_options = { + onlyAnalyzeProjectsWithOpenFiles = true, + suggestFromUnimportedLibraries = true, + closingLabels = true, + outline = true, + flutterOutline = true, + }, + settings = { + dart = { + completeFunctionCalls = true, + showTodos = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec + +Language server for dart. +]], + default_config = { + root_dir = [[root_pattern("pubspec.yaml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dcmls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dcmls.lua new file mode 100644 index 0000000..9667471 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dcmls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dcm', 'start-server', '--client=neovim' }, + filetypes = { 'dart' }, + root_dir = util.root_pattern 'pubspec.yaml', + }, + docs = { + description = [[ +https://dcm.dev/ + +Language server for DCM analyzer. +]], + default_config = { + root_dir = [[root_pattern("pubspec.yaml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/debputy.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/debputy.lua new file mode 100644 index 0000000..eac358d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/debputy.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'debputy', 'lsp', 'server' }, + filetypes = { 'debcontrol', 'debcopyright', 'debchangelog', 'make', 'yaml' }, + root_dir = util.root_pattern 'debian', + }, + docs = { + description = [[ +https://salsa.debian.org/debian/debputy + +Language Server for Debian packages. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/delphi_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/delphi_ls.lua new file mode 100644 index 0000000..bd02d6f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/delphi_ls.lua @@ -0,0 +1,49 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'DelphiLSP.exe' }, + filetypes = { 'pascal' }, + root_dir = util.root_pattern '*.dpr', + single_file_support = false, + }, + docs = { + description = [[ +Language server for Delphi from Embarcadero. +https://marketplace.visualstudio.com/items?itemName=EmbarcaderoTechnologies.delphilsp + +Note, the '*.delphilsp.json' file is required, more details at: +https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_DelphiLSP_Code_Insight_with_Other_Editors + +Below, you'll find a sample configuration for the lazy manager. +When on_attach is triggered, it signals DelphiLSP to load settings from a configuration file. +Without this step, DelphiLSP initializes but remains non-functional: + +```lua +"neovim/nvim-lspconfig", +lazy = false, +config = function() + local capabilities = require("cmp_nvim_lsp").default_capabilities() + local lspconfig = require("lspconfig") + + lspconfig.delphi_ls.setup({ + capabilities = capabilities, + + on_attach = function(client) + local lsp_config = vim.fs.find(function(name) + return name:match(".*%.delphilsp.json$") + end, { type = "file", path = client.config.root_dir, upward = false })[1] + + if lsp_config then + client.config.settings = { settingsFile = lsp_config } + client.notify("workspace/didChangeConfiguration", { settings = client.config.settings }) + else + vim.notify_once("delphi_ls: '*.delphilsp.json' config file not found") + end + end, + }) +end, +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/denols.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/denols.lua new file mode 100644 index 0000000..81bc1e6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/denols.lua @@ -0,0 +1,127 @@ +local util = require 'lspconfig.util' +local lsp = vim.lsp + +local function buf_cache(bufnr, client) + local params = { + command = 'deno.cache', + arguments = { {}, vim.uri_from_bufnr(bufnr) }, + } + client.request('workspace/executeCommand', params, function(err, _result, ctx) + if err then + local uri = ctx.params.arguments[2] + vim.api.nvim_err_writeln('cache command failed for ' .. vim.uri_to_fname(uri)) + end + end, bufnr) +end + +local function virtual_text_document_handler(uri, res, client) + if not res then + return nil + end + + local lines = vim.split(res.result, '\n') + local bufnr = vim.uri_to_bufnr(uri) + + local current_buf = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false) + if #current_buf ~= 0 then + return nil + end + + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines) + vim.api.nvim_set_option_value('readonly', true, { buf = bufnr }) + vim.api.nvim_set_option_value('modified', false, { buf = bufnr }) + vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr }) + lsp.buf_attach_client(bufnr, client.id) +end + +local function virtual_text_document(uri, client) + local params = { + textDocument = { + uri = uri, + }, + } + local result = client.request_sync('deno/virtualTextDocument', params) + virtual_text_document_handler(uri, result, client) +end + +local function denols_handler(err, result, ctx, config) + if not result or vim.tbl_isempty(result) then + return nil + end + + local client = vim.lsp.get_client_by_id(ctx.client_id) + for _, res in pairs(result) do + local uri = res.uri or res.targetUri + if uri:match '^deno:' then + virtual_text_document(uri, client) + res['uri'] = uri + res['targetUri'] = uri + end + end + + lsp.handlers[ctx.method](err, result, ctx, config) +end + +return { + default_config = { + cmd = { 'deno', 'lsp' }, + cmd_env = { NO_COLOR = true }, + filetypes = { + 'javascript', + 'javascriptreact', + 'javascript.jsx', + 'typescript', + 'typescriptreact', + 'typescript.tsx', + }, + root_dir = util.root_pattern('deno.json', 'deno.jsonc', '.git'), + settings = { + deno = { + enable = true, + suggest = { + imports = { + hosts = { + ['https://deno.land'] = true, + }, + }, + }, + }, + }, + handlers = { + ['textDocument/definition'] = denols_handler, + ['textDocument/typeDefinition'] = denols_handler, + ['textDocument/references'] = denols_handler, + }, + }, + commands = { + DenolsCache = { + function() + local clients = util.get_lsp_clients { bufnr = 0, name = 'denols' } + if #clients > 0 then + buf_cache(0, clients[#clients]) + end + end, + description = 'Cache a module and all of its dependencies.', + }, + }, + docs = { + description = [[ +https://github.com/denoland/deno + +Deno's built-in language server + +To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages + in your init.lua. Example: + +```lua +vim.g.markdown_fenced_languages = { + "ts=typescript" +} +``` + +]], + default_config = { + root_dir = [[root_pattern("deno.json", "deno.jsonc", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dhall_lsp_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dhall_lsp_server.lua new file mode 100644 index 0000000..af910f3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dhall_lsp_server.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dhall-lsp-server' }, + filetypes = { 'dhall' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server + +language server for dhall + +`dhall-lsp-server` can be installed via cabal: +```sh +cabal install dhall-lsp-server +``` +prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases). +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/diagnosticls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/diagnosticls.lua new file mode 100644 index 0000000..6fdba0f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/diagnosticls.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'diagnostic-languageserver', '--stdio' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + filetypes = {}, + }, + docs = { + description = [[ +https://github.com/iamcco/diagnostic-languageserver + +Diagnostic language server integrate with linters. +]], + default_config = { + filetypes = 'Empty by default, override to add filetypes', + root_dir = "Vim's starting directory", + init_options = 'Configuration from https://github.com/iamcco/diagnostic-languageserver#config--document', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/digestif.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/digestif.lua new file mode 100644 index 0000000..f89ba63 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/digestif.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'digestif' }, + filetypes = { 'tex', 'plaintex', 'context' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/astoff/digestif + +Digestif is a code analyzer, and a language server, for LaTeX, ConTeXt et caterva. It provides + +context-sensitive completion, documentation, code navigation, and related functionality to any + +text editor that speaks the LSP protocol. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/djlsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/djlsp.lua new file mode 100644 index 0000000..181cb03 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/djlsp.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'djlsp' }, + filetypes = { 'html', 'htmldjango' }, + root_dir = util.find_git_ancestor, + settings = {}, + }, + docs = { + description = [[ + https://github.com/fourdigits/django-template-lsp + + `djlsp`, a language server for Django templates. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/docker_compose_language_service.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/docker_compose_language_service.lua new file mode 100644 index 0000000..9a92297 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/docker_compose_language_service.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'docker-compose-langserver', '--stdio' }, + filetypes = { 'yaml.docker-compose' }, + root_dir = util.root_pattern('docker-compose.yaml', 'docker-compose.yml', 'compose.yaml', 'compose.yml'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/microsoft/compose-language-service +This project contains a language service for Docker Compose. + +`compose-language-service` can be installed via `npm`: + +```sh +npm install @microsoft/compose-language-service +``` + +Note: If the docker-compose-langserver doesn't startup when entering a `docker-compose.yaml` file, make sure that the filetype is `yaml.docker-compose`. You can set with: `:set filetype=yaml.docker-compose`. +]], + default_config = { + root_dir = [[root_pattern("docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dockerls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dockerls.lua new file mode 100644 index 0000000..dde050b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dockerls.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'docker-langserver', '--stdio' }, + filetypes = { 'dockerfile' }, + root_dir = util.root_pattern 'Dockerfile', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/rcjsuen/dockerfile-language-server-nodejs + +`docker-langserver` can be installed via `npm`: +```sh +npm install -g dockerfile-language-server-nodejs +``` + +Additional configuration can be applied in the following way: +```lua +require("lspconfig").dockerls.setup { + settings = { + docker = { + languageserver = { + formatter = { + ignoreMultilineInstructions = true, + }, + }, + } + } +} +``` + ]], + default_config = { + root_dir = [[root_pattern("Dockerfile")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dolmenls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dolmenls.lua new file mode 100644 index 0000000..1f0657e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dolmenls.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dolmenls' }, + filetypes = { 'smt2', 'tptp', 'p', 'cnf', 'icnf', 'zf' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/Gbury/dolmen/blob/master/doc/lsp.md + +`dolmenls` can be installed via `opam` +```sh +opam install dolmen_lsp +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dotls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dotls.lua new file mode 100644 index 0000000..479f430 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dotls.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dot-language-server', '--stdio' }, + filetypes = { 'dot' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/nikeee/dot-language-server + +`dot-language-server` can be installed via `npm`: +```sh +npm install -g dot-language-server +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dprint.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dprint.lua new file mode 100644 index 0000000..7ef0fad --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/dprint.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dprint', 'lsp' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + 'json', + 'jsonc', + 'markdown', + 'python', + 'toml', + 'rust', + 'roslyn', + }, + root_dir = util.root_pattern('dprint.json', '.dprint.json', 'dprint.jsonc', '.dprint.jsonc'), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/dprint/dprint + +Pluggable and configurable code formatting platform written in Rust. + ]], + default_config = { + root_dir = util.root_pattern('dprint.json', '.dprint.json', 'dprint.jsonc', '.dprint.jsonc'), + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/drools_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/drools_lsp.lua new file mode 100644 index 0000000..d5dd3cc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/drools_lsp.lua @@ -0,0 +1,81 @@ +local util = require 'lspconfig.util' + +local function get_java_bin(config) + local java_bin = vim.tbl_get(config, 'drools', 'java', 'bin') + if not java_bin then + java_bin = vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java' + if vim.fn.has 'win32' == 1 then + java_bin = java_bin .. '.exe' + end + end + return java_bin +end + +local function get_java_opts(config) + local java_opts = vim.tbl_get(config, 'drools', 'java', 'opts') + return java_opts and java_opts or {} +end + +local function get_jar(config) + local jar = vim.tbl_get(config, 'drools', 'jar') + return jar and jar or 'drools-lsp-server-jar-with-dependencies.jar' +end + +local function get_cmd(config) + local cmd = vim.tbl_get(config, 'cmd') + if not cmd then + cmd = { get_java_bin(config) } + for _, o in ipairs(get_java_opts(config)) do + table.insert(cmd, o) + end + ---@diagnostic disable-next-line:missing-parameter + vim.list_extend(cmd, { '-jar', get_jar(config) }) + end + return cmd +end + +return { + default_config = { + filetypes = { 'drools' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + on_new_config = function(new_config) + new_config.cmd = get_cmd(new_config) + end, + }, + docs = { + description = [=[ +https://github.com/kiegroup/drools-lsp + +Language server for the [Drools Rule Language (DRL)](https://docs.drools.org/latest/drools-docs/docs-website/drools/language-reference/#con-drl_drl-rules). + +The `drools-lsp` server is a self-contained java jar file (`drools-lsp-server-jar-with-dependencies.jar`), and can be downloaded from [https://github.com/kiegroup/drools-lsp/releases/](https://github.com/kiegroup/drools-lsp/releases/). + +Configuration information: +```lua +-- Option 1) Specify the entire command: +require('lspconfig').drools_lsp.setup { + cmd = { '/path/to/java', '-jar', '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 2) Specify just the jar path (the JAVA_HOME environment variable will be respected if present): +require('lspconfig').drools_lsp.setup { + drools = { jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar' }, +} + +-- Option 3) Specify the java bin and/or java opts in addition to the jar path: +require('lspconfig').drools_lsp.setup { + drools = { + java = { bin = '/path/to/java', opts = { '-Xmx100m' } }, + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, +} +``` + +Neovim does not yet have automatic detection for the `drools` filetype, but it can be added with: +```lua +vim.cmd [[ autocmd BufNewFile,BufRead *.drl set filetype=drools ]] +``` +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ds_pinyin_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ds_pinyin_lsp.lua new file mode 100644 index 0000000..bc1d7ac --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ds_pinyin_lsp.lua @@ -0,0 +1,80 @@ +local util = require 'lspconfig.util' + +local bin_name = 'ds-pinyin-lsp' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.exe' +end + +local function ds_pinyin_lsp_off(bufnr) + bufnr = util.validate_bufnr(bufnr) + local ds_pinyin_lsp_client = util.get_active_client_by_name(bufnr, 'ds_pinyin_lsp') + if ds_pinyin_lsp_client then + ds_pinyin_lsp_client.notify('$/turn/completion', { + ['completion_on'] = false, + }) + else + vim.notify 'notification $/turn/completion is not supported by any servers active on the current buffer' + end +end + +local function ds_pinyin_lsp_on(bufnr) + bufnr = util.validate_bufnr(bufnr) + local ds_pinyin_lsp_client = util.get_active_client_by_name(bufnr, 'ds_pinyin_lsp') + if ds_pinyin_lsp_client then + ds_pinyin_lsp_client.notify('$/turn/completion', { + ['completion_on'] = true, + }) + else + vim.notify 'notification $/turn/completion is not supported by any servers active on the current buffer' + end +end + +return { + default_config = { + cmd = { bin_name }, + filetypes = { 'markdown', 'org' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + init_options = { + completion_on = true, + show_symbols = true, + show_symbols_only_follow_by_hanzi = false, + show_symbols_by_n_times = 0, + match_as_same_as_input = true, + match_long_input = true, + max_suggest = 15, + }, + }, + commands = { + DsPinyinCompletionOff = { + function() + ds_pinyin_lsp_off(0) + end, + description = 'Turn off the ds-pinyin-lsp completion', + }, + DsPinyinCompletionOn = { + function() + ds_pinyin_lsp_on(0) + end, + description = 'Turn on the ds-pinyin-lsp completion', + }, + }, + docs = { + description = [=[ +https://github.com/iamcco/ds-pinyin-lsp +Dead simple Pinyin language server for input Chinese without IME(input method). +To install, download the latest [release](https://github.com/iamcco/ds-pinyin-lsp/releases) and ensure `ds-pinyin-lsp` is on your path. +And make ensure the database file `dict.db3` is also downloaded. And put the path to `dict.dbs` in the following code. + +```lua + +require('lspconfig').ds_pinyin_lsp.setup { + init_options = { + db_path = "your_path_to_database" + } +} + +``` +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/earthlyls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/earthlyls.lua new file mode 100644 index 0000000..5b843eb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/earthlyls.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'earthlyls' }, + filetypes = { 'earthfile' }, + root_dir = util.root_pattern 'Earthfile', + }, + docs = { + description = [[ +https://github.com/glehmann/earthlyls + +A fast language server for earthly. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ecsact.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ecsact.lua new file mode 100644 index 0000000..e8eaa98 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ecsact.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ecsact_lsp_server', '--stdio' }, + filetypes = { 'ecsact' }, + root_dir = util.root_pattern '.git', + single_file_support = true, + }, + + docs = { + description = [[ +https://github.com/ecsact-dev/ecsact_lsp_server + +Language server for Ecsact. + +The default cmd assumes `ecsact_lsp_server` is in your PATH. Typically from the +Ecsact SDK: https://ecsact.dev/start +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/efm.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/efm.lua new file mode 100644 index 0000000..f5f74ed --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/efm.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'efm-langserver' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + + docs = { + description = [[ +https://github.com/mattn/efm-langserver + +General purpose Language Server that can use specified error message format generated from specified command. + +Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support +launching the language server on single files. If on an older version of EFM, disable single file support: + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = ..., -- Populate this according to the note below + single_file_support = false, -- This is the important line for supporting older version of EFM +} +``` + +Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must +specify `filetypes` in your call to `setup{}`**. Otherwise `lspconfig` will launch EFM on the `BufEnter` instead +of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set. + +```lua +require('lspconfig')['efm'].setup{ + settings = ..., -- You must populate this according to the EFM readme + filetypes = { 'python','cpp','lua' } +} +``` + +]], + default_config = { + root_dir = [[util.root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elixirls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elixirls.lua new file mode 100644 index 0000000..3172f6a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elixirls.lua @@ -0,0 +1,44 @@ +return { + default_config = { + filetypes = { 'elixir', 'eelixir', 'heex', 'surface' }, + root_dir = function(fname) + local matches = vim.fs.find({ 'mix.exs' }, { upward = true, limit = 2, path = fname }) + local child_or_root_path, maybe_umbrella_path = unpack(matches) + local root_dir = vim.fs.dirname(maybe_umbrella_path or child_or_root_path) + + return root_dir + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/elixir-lsp/elixir-ls + +`elixir-ls` can be installed by following the instructions [here](https://github.com/elixir-lsp/elixir-ls#building-and-running). + +```bash +curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip +unzip elixir-ls.zip -d /path/to/elixir-ls +# Unix +chmod +x /path/to/elixir-ls/language_server.sh +``` + +**By default, elixir-ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls. + +```lua +require'lspconfig'.elixirls.setup{ + -- Unix + cmd = { "/path/to/elixir-ls/language_server.sh" }; + -- Windows + cmd = { "/path/to/elixir-ls/language_server.bat" }; + ... +} +``` + +'root_dir' is chosen like this: if two or more directories containing `mix.exs` were found when searching directories upward, the second one (higher up) is chosen, with the assumption that it is the root of an umbrella app. Otherwise the directory containing the single mix.exs that was found is chosen. +]], + default_config = { + root_dir = '{{see description above}}', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elmls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elmls.lua new file mode 100644 index 0000000..e3e63bc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elmls.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' +local api = vim.api + +local elm_root_pattern = util.root_pattern 'elm.json' + +return { + default_config = { + cmd = { 'elm-language-server' }, + -- TODO(ashkan) if we comment this out, it will allow elmls to operate on elm.json. It seems like it could do that, but no other editor allows it right now. + filetypes = { 'elm' }, + root_dir = function(fname) + local filetype = api.nvim_buf_get_option(0, 'filetype') + if filetype == 'elm' or (filetype == 'json' and fname:match 'elm%.json$') then + return elm_root_pattern(fname) + end + end, + init_options = { + elmReviewDiagnostics = 'off', -- 'off' | 'warning' | 'error' + skipInstallPackageConfirmation = false, + disableElmLSDiagnostics = false, + onlyUpdateDiagnosticsOnSave = false, + }, + capabilities = { + offsetEncoding = { 'utf-8', 'utf-16' }, + }, + }, + docs = { + description = [[ +https://github.com/elm-tooling/elm-language-server#installation + +If you don't want to use Nvim to install it, then you can use: +```sh +npm install -g elm elm-test elm-format @elm-tooling/elm-language-server +``` +]], + default_config = { + root_dir = [[root_pattern("elm.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elp.lua new file mode 100644 index 0000000..00678a5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/elp.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'elp', 'server' }, + filetypes = { 'erlang' }, + root_dir = util.root_pattern('rebar.config', 'erlang.mk', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://whatsapp.github.io/erlang-language-platform + +ELP integrates Erlang into modern IDEs via the language server protocol and was +inspired by rust-analyzer. +]], + default_config = { + root_dir = [[root_pattern('rebar.config', 'erlang.mk', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ember.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ember.lua new file mode 100644 index 0000000..7702bd7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ember.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ember-language-server', '--stdio' }, + filetypes = { 'handlebars', 'typescript', 'javascript', 'typescript.glimmer', 'javascript.glimmer' }, + root_dir = util.root_pattern('ember-cli-build.js', '.git'), + }, + docs = { + description = [[ +https://github.com/ember-tooling/ember-language-server + +`ember-language-server` can be installed via `npm`: + +```sh +npm install -g @ember-tooling/ember-language-server +``` +]], + default_config = { + root_dir = [[root_pattern("ember-cli-build.js", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_language_server.lua new file mode 100644 index 0000000..fe0a024 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_language_server.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'emmet-language-server', '--stdio' }, + filetypes = { + 'css', + 'eruby', + 'html', + 'htmldjango', + 'javascriptreact', + 'less', + 'pug', + 'sass', + 'scss', + 'typescriptreact', + 'htmlangular', + }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/olrtg/emmet-language-server + +Package can be installed via `npm`: +```sh +npm install -g @olrtg/emmet-language-server +``` +]], + default_config = { + root_dir = 'git root', + single_file_support = true, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_ls.lua new file mode 100644 index 0000000..df2ef11 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/emmet_ls.lua @@ -0,0 +1,39 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'emmet-ls', '--stdio' }, + filetypes = { + 'astro', + 'css', + 'eruby', + 'html', + 'htmldjango', + 'javascriptreact', + 'less', + 'pug', + 'sass', + 'scss', + 'svelte', + 'typescriptreact', + 'vue', + 'htmlangular', + }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/aca/emmet-ls + +Package can be installed via `npm`: +```sh +npm install -g emmet-ls +``` +]], + default_config = { + root_dir = 'git root', + single_file_support = true, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erg_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erg_language_server.lua new file mode 100644 index 0000000..9b198a8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erg_language_server.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'erg', '--language-server' }, + filetypes = { 'erg' }, + root_dir = function(fname) + return util.root_pattern 'package.er'(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/erg-lang/erg#flags ELS + +ELS (erg-language-server) is a language server for the Erg programming language. + +erg-language-server can be installed via `cargo` and used as follows: + ```sh + cargo install erg --features els + erg --language-server + ``` + ]], + default_config = { + root_dir = [[root_pattern("package.er") or find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erlangls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erlangls.lua new file mode 100644 index 0000000..e2467f2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/erlangls.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'erlang_ls' }, + filetypes = { 'erlang' }, + root_dir = util.root_pattern('rebar.config', 'erlang.mk', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://erlang-ls.github.io + +Language Server for Erlang. + +Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls) +Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin` + +Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls). + +Installation requirements: + - [Erlang OTP 21+](https://github.com/erlang/otp) + - [rebar3 3.9.1+](https://github.com/erlang/rebar3) +]], + default_config = { + root_dir = [[root_pattern('rebar.config', 'erlang.mk', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/esbonio.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/esbonio.lua new file mode 100644 index 0000000..ff13473 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/esbonio.lua @@ -0,0 +1,55 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'python3', '-m', 'esbonio' }, + filetypes = { 'rst' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/swyddfa/esbonio + +Esbonio is a language server for [Sphinx](https://www.sphinx-doc.org/en/master/) documentation projects. +The language server can be installed via pip + +``` +pip install esbonio +``` + +Since Sphinx is highly extensible you will get best results if you install the language server in the same +Python environment as the one used to build your documentation. To ensure that the correct Python environment +is picked up, you can either launch `nvim` with the correct environment activated. + +``` +source env/bin/activate +nvim +``` + +Or you can modify the default `cmd` to include the full path to the Python interpreter. + +```lua +require'lspconfig'.esbonio.setup { + cmd = { '/path/to/virtualenv/bin/python', '-m', 'esbonio' } +} +``` + +Esbonio supports a number of config values passed as `init_options` on startup, for example. + +```lua +require'lspconfig'.esbonio.setup { + init_options = { + server = { + logLevel = "debug" + }, + sphinx = { + confDir = "/path/to/docs", + srcDir = "${confDir}/../docs-src" + } +} +``` + +A full list and explanation of the available options can be found [here](https://docs.esbon.io/en/esbonio-language-server-v0.16.4/lsp/getting-started.html?editor=neovim-lspconfig#configuration) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/eslint.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/eslint.lua new file mode 100644 index 0000000..c52f827 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/eslint.lua @@ -0,0 +1,202 @@ +local util = require 'lspconfig.util' +local lsp = vim.lsp + +local function fix_all(opts) + opts = opts or {} + + local eslint_lsp_client = util.get_active_client_by_name(opts.bufnr, 'eslint') + if eslint_lsp_client == nil then + return + end + + local request + if opts.sync then + request = function(bufnr, method, params) + eslint_lsp_client.request_sync(method, params, nil, bufnr) + end + else + request = function(bufnr, method, params) + eslint_lsp_client.request(method, params, nil, bufnr) + end + end + + local bufnr = util.validate_bufnr(opts.bufnr or 0) + request(0, 'workspace/executeCommand', { + command = 'eslint.applyAllFixes', + arguments = { + { + uri = vim.uri_from_bufnr(bufnr), + version = lsp.util.buf_versions[bufnr], + }, + }, + }) +end + +local root_file = { + '.eslintrc', + '.eslintrc.js', + '.eslintrc.cjs', + '.eslintrc.yaml', + '.eslintrc.yml', + '.eslintrc.json', + 'eslint.config.js', + 'eslint.config.mjs', + 'eslint.config.cjs', + 'eslint.config.ts', + 'eslint.config.mts', + 'eslint.config.cts', +} + +return { + default_config = { + cmd = { 'vscode-eslint-language-server', '--stdio' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'javascript.jsx', + 'typescript', + 'typescriptreact', + 'typescript.tsx', + 'vue', + 'svelte', + 'astro', + }, + -- https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats + root_dir = function(fname) + root_file = util.insert_package_json(root_file, 'eslintConfig', fname) + return util.root_pattern(unpack(root_file))(fname) + end, + -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation. + settings = { + validate = 'on', + packageManager = nil, + useESLintClass = false, + experimental = { + useFlatConfig = false, + }, + codeActionOnSave = { + enable = false, + mode = 'all', + }, + format = true, + quiet = false, + onIgnoredFiles = 'off', + rulesCustomizations = {}, + run = 'onType', + problems = { + shortenToSingleLine = false, + }, + -- nodePath configures the directory in which the eslint server should start its node_modules resolution. + -- This path is relative to the workspace folder (root dir) of the server instance. + nodePath = '', + -- use the workspace folder location or the file location (if no workspace folder is open) as the working directory + workingDirectory = { mode = 'location' }, + codeAction = { + disableRuleComment = { + enable = true, + location = 'separateLine', + }, + showDocumentation = { + enable = true, + }, + }, + }, + on_new_config = function(config, new_root_dir) + -- The "workspaceFolder" is a VSCode concept. It limits how far the + -- server will traverse the file system when locating the ESLint config + -- file (e.g., .eslintrc). + config.settings.workspaceFolder = { + uri = new_root_dir, + name = vim.fn.fnamemodify(new_root_dir, ':t'), + } + + -- Support flat config + if + vim.fn.filereadable(new_root_dir .. '/eslint.config.js') == 1 + or vim.fn.filereadable(new_root_dir .. '/eslint.config.mjs') == 1 + or vim.fn.filereadable(new_root_dir .. '/eslint.config.cjs') == 1 + or vim.fn.filereadable(new_root_dir .. '/eslint.config.ts') == 1 + or vim.fn.filereadable(new_root_dir .. '/eslint.config.mts') == 1 + or vim.fn.filereadable(new_root_dir .. '/eslint.config.cts') == 1 + then + config.settings.experimental.useFlatConfig = true + end + + -- Support Yarn2 (PnP) projects + local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs') + local pnp_js = util.path.join(new_root_dir, '.pnp.js') + if util.path.exists(pnp_cjs) or util.path.exists(pnp_js) then + config.cmd = vim.list_extend({ 'yarn', 'exec' }, config.cmd) + end + end, + handlers = { + ['eslint/openDoc'] = function(_, result) + if not result then + return + end + local sysname = vim.loop.os_uname().sysname + if sysname:match 'Windows' then + os.execute(string.format('start %q', result.url)) + elseif sysname:match 'Linux' then + os.execute(string.format('xdg-open %q', result.url)) + else + os.execute(string.format('open %q', result.url)) + end + return {} + end, + ['eslint/confirmESLintExecution'] = function(_, result) + if not result then + return + end + return 4 -- approved + end, + ['eslint/probeFailed'] = function() + vim.notify('[lspconfig] ESLint probe failed.', vim.log.levels.WARN) + return {} + end, + ['eslint/noLibrary'] = function() + vim.notify('[lspconfig] Unable to find ESLint library.', vim.log.levels.WARN) + return {} + end, + }, + }, + commands = { + EslintFixAll = { + function() + fix_all { sync = true, bufnr = 0 } + end, + description = 'Fix all eslint problems for this buffer', + }, + }, + docs = { + description = [[ +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-eslint-language-server` is a linting engine for JavaScript / Typescript. +It can be installed via `npm`: + +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-eslint-language-server` provides an `EslintFixAll` command that can be used to format a document on save: +```lua +lspconfig.eslint.setup({ + --- ... + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + command = "EslintFixAll", + }) + end, +}) +``` + +See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options. + +Messages handled in lspconfig: `eslint/openDoc`, `eslint/confirmESLintExecution`, `eslint/probeFailed`, `eslint/noLibrary` + +Additional messages you can handle: `eslint/noConfig` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/facility_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/facility_language_server.lua new file mode 100644 index 0000000..c37069d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/facility_language_server.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'facility-language-server' }, + filetypes = { 'fsd' }, + single_file_support = true, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/FacilityApi/FacilityLanguageServer + +Facility language server protocol (LSP) support. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_language_server.lua new file mode 100644 index 0000000..919b544 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_language_server.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'fennel-language-server' }, + filetypes = { 'fennel' }, + single_file_support = true, + root_dir = util.find_git_ancestor, + settings = {}, + }, + docs = { + description = [[ +https://github.com/rydesun/fennel-language-server + +Fennel language server protocol (LSP) support. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_ls.lua new file mode 100644 index 0000000..aa4f643 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fennel_ls.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'fennel-ls' }, + filetypes = { 'fennel' }, + root_dir = function(dir) + return util.find_git_ancestor(dir) + end, + settings = {}, + capabilities = { + offsetEncoding = { 'utf-8', 'utf-16' }, + }, + }, + docs = { + description = [[ +https://sr.ht/~xerool/fennel-ls/ + +A language server for fennel. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fish_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fish_lsp.lua new file mode 100644 index 0000000..e027de9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fish_lsp.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'fish-lsp', 'start' }, + cmd_env = { fish_lsp_show_client_popups = false }, + filetypes = { 'fish' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ndonfris/fish-lsp + +A Language Server Protocol (LSP) tailored for the fish shell. +This project aims to enhance the coding experience for fish, +by introducing a suite of intelligent features like auto-completion, +scope aware symbol analysis, per-token hover generation, and many others. + +[homepage](https://www.fish-lsp.dev/) +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flow.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flow.lua new file mode 100644 index 0000000..3ac59aa --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flow.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'npx', '--no-install', 'flow', 'lsp' }, + filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx' }, + root_dir = util.root_pattern '.flowconfig', + }, + docs = { + description = [[ +https://flow.org/ +https://github.com/facebook/flow + +See below for how to setup Flow itself. +https://flow.org/en/docs/install/ + +See below for lsp command options. + +```sh +npx flow lsp --help +``` + ]], + default_config = { + root_dir = [[root_pattern(".flowconfig")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flux_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flux_lsp.lua new file mode 100644 index 0000000..3be9a1b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/flux_lsp.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'flux-lsp' }, + filetypes = { 'flux' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/influxdata/flux-lsp +`flux-lsp` can be installed via `cargo`: +```sh +cargo install --git https://github.com/influxdata/flux-lsp +``` +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/foam_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/foam_ls.lua new file mode 100644 index 0000000..1a991b6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/foam_ls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'foam-ls', '--stdio' }, + filetypes = { 'foam', 'OpenFOAM' }, + root_dir = function(fname) + return util.search_ancestors(fname, function(path) + if util.path.exists(util.path.join(path, 'system', 'controlDict')) then + return path + end + end) + end, + }, + docs = { + description = [[ +https://github.com/FoamScience/foam-language-server + +`foam-language-server` can be installed via `npm` +```sh +npm install -g foam-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fortls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fortls.lua new file mode 100644 index 0000000..2493866 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fortls.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'fortls', + '--notify_init', + '--hover_signature', + '--hover_language=fortran', + '--use_signature_help', + }, + filetypes = { 'fortran' }, + root_dir = function(fname) + return util.root_pattern '.fortls'(fname) or util.find_git_ancestor(fname) + end, + settings = {}, + }, + docs = { + description = [[ +https://fortls.fortran-lang.org/index.html + +fortls is a Fortran Language Server, the server can be installed via pip + +```sh +pip install fortls +``` + +Settings to the server can be passed either through the `cmd` option or through +a local configuration file e.g. `.fortls`. For more information +see the `fortls` [documentation](https://fortls.fortran-lang.org/options.html). + ]], + default_config = { + root_dir = [[root_pattern(".fortls")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsautocomplete.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsautocomplete.lua new file mode 100644 index 0000000..de27e38 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsautocomplete.lua @@ -0,0 +1,53 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'fsautocomplete', '--adaptive-lsp-server-enabled' }, + root_dir = util.root_pattern('*.sln', '*.fsproj', '.git'), + filetypes = { 'fsharp' }, + init_options = { + AutomaticWorkspaceInit = true, + }, + -- this recommended settings values taken from https://github.com/ionide/FsAutoComplete?tab=readme-ov-file#settings + settings = { + FSharp = { + keywordsAutocomplete = true, + ExternalAutocomplete = false, + Linter = true, + UnionCaseStubGeneration = true, + UnionCaseStubGenerationBody = 'failwith "Not Implemented"', + RecordStubGeneration = true, + RecordStubGenerationBody = 'failwith "Not Implemented"', + InterfaceStubGeneration = true, + InterfaceStubGenerationObjectIdentifier = 'this', + InterfaceStubGenerationMethodBody = 'failwith "Not Implemented"', + UnusedOpensAnalyzer = true, + UnusedDeclarationsAnalyzer = true, + UseSdkScripts = true, + SimplifyNameAnalyzer = true, + ResolveNamespaces = true, + EnableReferenceCodeLens = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/fsharp/FsAutoComplete + +Language Server for F# provided by FsAutoComplete (FSAC). + +FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +The preferred way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`. + +Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete). + +You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files: + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` + +This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). + + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsharp_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsharp_language_server.lua new file mode 100644 index 0000000..1abc606 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fsharp_language_server.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'dotnet', 'FSharpLanguageServer.dll' }, + root_dir = util.root_pattern('*.sln', '*.fsproj', '.git'), + filetypes = { 'fsharp' }, + init_options = { + AutomaticWorkspaceInit = true, + }, + settings = {}, + }, + docs = { + description = [[ +F# Language Server +https://github.com/faldor20/fsharp-language-server + +An implementation of the language server protocol using the F# Compiler Service. + +Build the project from source and override the command path to location of DLL. + +If filetype determination is not already performed by an available plugin ([PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). +), then the following must be added to initialization configuration: + + +`autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fstar.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fstar.lua new file mode 100644 index 0000000..d866c54 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/fstar.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'fstar.exe', '--lsp' }, + filetypes = { 'fstar' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/FStarLang/FStar + +LSP support is included in FStar. Make sure `fstar.exe` is in your PATH. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/futhark_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/futhark_lsp.lua new file mode 100644 index 0000000..2521cc1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/futhark_lsp.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'futhark', 'lsp' }, + filetypes = { 'futhark', 'fut' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/diku-dk/futhark + +Futhark Language Server + +This language server comes with the futhark compiler and is run with the command +``` +futhark lsp +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdscript.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdscript.lua new file mode 100644 index 0000000..5ae1799 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdscript.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +local port = os.getenv 'GDScript_Port' or '6005' +local cmd = { 'nc', 'localhost', port } + +if vim.fn.has 'nvim-0.8' == 1 then + cmd = vim.lsp.rpc.connect('127.0.0.1', port) +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'gd', 'gdscript', 'gdscript3' }, + root_dir = util.root_pattern('project.godot', '.git'), + }, + docs = { + description = [[ +https://github.com/godotengine/godot + +Language server for GDScript, used by Godot Engine. +]], + default_config = { + root_dir = [[util.root_pattern("project.godot", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdshader_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdshader_lsp.lua new file mode 100644 index 0000000..a01efa8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gdshader_lsp.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'gdshader-lsp', '--stdio' }, + filetypes = { 'gdshader', 'gdshaderinc' }, + root_dir = util.root_pattern 'project.godot', + }, + docs = { + description = [[ +https://github.com/godofavacyn/gdshader-lsp + +A language server for the Godot Shading language. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghcide.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghcide.lua new file mode 100644 index 0000000..7f9307b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghcide.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ghcide', '--lsp' }, + filetypes = { 'haskell', 'lhaskell' }, + root_dir = util.root_pattern('stack.yaml', 'hie-bios', 'BUILD.bazel', 'cabal.config', 'package.yaml'), + }, + + docs = { + description = [[ +https://github.com/digital-asset/ghcide + +A library for building Haskell IDE tooling. +"ghcide" isn't for end users now. Use "haskell-language-server" instead of "ghcide". +]], + default_config = { + root_dir = [[root_pattern("stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghdl_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghdl_ls.lua new file mode 100644 index 0000000..0f9e118 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ghdl_ls.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ghdl-ls' }, + filetypes = { 'vhdl' }, + root_dir = function(fname) + return util.root_pattern 'hdl-prj.json'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ghdl/ghdl-language-server + +A language server for VHDL, using ghdl as its backend. + +`ghdl-ls` is part of pyghdl, for installation instructions see +[the upstream README](https://github.com/ghdl/ghdl/tree/master/pyGHDL/lsp). +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ginko_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ginko_ls.lua new file mode 100644 index 0000000..61f9de6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ginko_ls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ginko_ls' }, + filetypes = { 'dts' }, + root_dir = util.find_git_ancestor, + settings = {}, + }, + docs = { + description = [[ +`ginko_ls` is meant to be a feature-complete language server for device-trees. +Language servers can be used in many editors, such as Visual Studio Code, Emacs +or Vim + +Install `ginko_ls` from https://github.com/Schottkyc137/ginko and add it to path + +`ginko_ls` doesn't require any configuration. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gitlab_ci_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gitlab_ci_ls.lua new file mode 100644 index 0000000..f9d8402 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gitlab_ci_ls.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +local cache_dir = util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/') +return { + default_config = { + cmd = { 'gitlab-ci-ls' }, + filetypes = { 'yaml.gitlab' }, + root_dir = util.root_pattern('.gitlab*', '.git'), + init_options = { + cache_path = cache_dir, + log_path = util.path.join(cache_dir, 'log/gitlab-ci-ls.log'), + }, + }, + docs = { + description = [[ +https://github.com/alesbrelih/gitlab-ci-ls + +Language Server for Gitlab CI + +`gitlab-ci-ls` can be installed via cargo: +cargo install gitlab-ci-ls +]], + default_config = { + cmd = { 'gitlab-ci-ls' }, + filetypes = { 'yaml.gitlab' }, + root_dir = [[util.root_pattern('.gitlab*', '.git')]], + init_options = { + cache_path = [[util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/')]], + log_path = [[util.path.join(util.path.join(vim.loop.os_homedir(), '.cache/gitlab-ci-ls/'), 'log/gitlab-ci-ls.log')]], + }, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glasgow.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glasgow.lua new file mode 100644 index 0000000..c36c50d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glasgow.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'glasgow' }, + filetypes = { 'wgsl' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/nolanderc/glasgow + +Provides language features for WGSL (WebGPU Shading Language): +- Completions: + - Local functions/variables/types. + - Fields and swizzles. + - Builtin types and functions (`dot`, `reflect`, `textureSample`, `vec3`, `mat4x2`, etc.) +- Hover Documentation: + - Function signatures. + - Variable types. + - Includes builtin types and functions. Text is taken from the WGSL specification. +- Goto Definition +- Find all References +- Rename +- Formatter + +`glasgow` can be installed via `cargo`: +```sh +cargo install glasgow +``` +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gleam.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gleam.lua new file mode 100644 index 0000000..ec5504c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gleam.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'gleam', 'lsp' }, + filetypes = { 'gleam' }, + root_dir = function(fname) + return util.root_pattern('gleam.toml', '.git')(fname) + end, + }, + docs = { + description = [[ +https://github.com/gleam-lang/gleam + +A language server for Gleam Programming Language. +[Installation](https://gleam.run/getting-started/installing/) + +It can be i +]], + default_config = { + cmd = { 'gleam', 'lsp' }, + root_dir = [[root_pattern("gleam.toml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glint.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glint.lua new file mode 100644 index 0000000..1d991cf --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glint.lua @@ -0,0 +1,59 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'glint-language-server' }, + on_new_config = function(config, new_root_dir) + local project_root = util.find_node_modules_ancestor(new_root_dir) + -- Glint should not be installed globally. + local node_bin_path = util.path.join(project_root, 'node_modules', '.bin') + local path = node_bin_path .. util.path.path_separator .. vim.env.PATH + if config.cmd_env then + config.cmd_env.PATH = path + else + config.cmd_env = { PATH = path } + end + end, + filetypes = { + 'html.handlebars', + 'handlebars', + 'typescript', + 'typescript.glimmer', + 'javascript', + 'javascript.glimmer', + }, + root_dir = util.root_pattern( + '.glintrc.yml', + '.glintrc', + '.glintrc.json', + '.glintrc.js', + 'glint.config.js', + 'package.json' + ), + }, + docs = { + description = [[ + https://github.com/typed-ember/glint + + https://typed-ember.gitbook.io/glint/ + + `glint-language-server` is installed when adding `@glint/core` to your project's devDependencies: + + ```sh + npm install @glint/core --save-dev + ``` + + or + + ```sh + yarn add -D @glint/core + ``` + + or + + ```sh + pnpm add -D @glint/core + ``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glsl_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glsl_analyzer.lua new file mode 100644 index 0000000..74ffbba --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glsl_analyzer.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'glsl_analyzer' }, + filetypes = { 'glsl', 'vert', 'tesc', 'tese', 'frag', 'geom', 'comp' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + capabilities = {}, + }, + docs = { + description = [[ +https://github.com/nolanderc/glsl_analyzer + +Language server for GLSL + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glslls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glslls.lua new file mode 100644 index 0000000..7d1c363 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/glslls.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'glslls', '--stdin' }, + filetypes = { 'glsl', 'vert', 'tesc', 'tese', 'frag', 'geom', 'comp' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + capabilities = { + textDocument = { + completion = { + editsNearCursor = true, + }, + }, + offsetEncoding = { 'utf-8', 'utf-16' }, + }, + }, + docs = { + description = [[ +https://github.com/svenstaro/glsl-language-server + +Language server implementation for GLSL + +`glslls` can be compiled and installed manually, or, if your distribution has access to the AUR, +via the `glsl-language-server` AUR package + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/golangci_lint_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/golangci_lint_ls.lua new file mode 100644 index 0000000..b1b51c4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/golangci_lint_ls.lua @@ -0,0 +1,42 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'golangci-lint-langserver' }, + filetypes = { 'go', 'gomod' }, + init_options = { + command = { 'golangci-lint', 'run', '--out-format', 'json' }, + }, + root_dir = function(fname) + return util.root_pattern( + '.golangci.yml', + '.golangci.yaml', + '.golangci.toml', + '.golangci.json', + 'go.work', + 'go.mod', + '.git' + )(fname) + end, + }, + docs = { + description = [[ +Combination of both lint server and client + +https://github.com/nametake/golangci-lint-langserver +https://github.com/golangci/golangci-lint + + +Installation of binaries needed is done via + +``` +go install github.com/nametake/golangci-lint-langserver@latest +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +``` + +]], + default_config = { + root_dir = [[root_pattern('.golangci.yml', '.golangci.yaml', '.golangci.toml', '.golangci.json', 'go.work', 'go.mod', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gopls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gopls.lua new file mode 100644 index 0000000..aceb38d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gopls.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' +local async = require 'lspconfig.async' +local mod_cache = nil + +return { + default_config = { + cmd = { 'gopls' }, + filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, + root_dir = function(fname) + -- see: https://github.com/neovim/nvim-lspconfig/issues/804 + if not mod_cache then + local result = async.run_command { 'go', 'env', 'GOMODCACHE' } + if result and result[1] then + mod_cache = vim.trim(result[1]) + end + end + if fname:sub(1, #mod_cache) == mod_cache then + local clients = util.get_lsp_clients { name = 'gopls' } + if #clients > 0 then + return clients[#clients].config.root_dir + end + end + return util.root_pattern('go.work', 'go.mod', '.git')(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/golang/tools/tree/master/gopls + +Google's lsp server for golang. +]], + default_config = { + root_dir = [[root_pattern("go.work", "go.mod", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gradle_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gradle_ls.lua new file mode 100644 index 0000000..6af1ee6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/gradle_ls.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +local bin_name = 'gradle-language-server' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.bat' +end + +local root_files = { + 'settings.gradle', -- Gradle (multi-project) + 'build.gradle', -- Gradle +} + +return { + default_config = { + filetypes = { 'groovy' }, + root_dir = util.root_pattern(unpack(root_files)), + cmd = { bin_name }, + -- gradle-language-server expects init_options.settings to be defined + init_options = { + settings = { + gradleWrapperEnabled = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/microsoft/vscode-gradle + +Microsoft's lsp server for gradle files + +If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory +]], + default_config = { + root_dir = [[root_pattern("settings.gradle", "build.gradle")]], + cmd = { 'gradle-language-server' }, + init_options = { + settings = { + gradleWrapperEnabled = true, + }, + }, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/grammarly.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/grammarly.lua new file mode 100644 index 0000000..6b37a14 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/grammarly.lua @@ -0,0 +1,34 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'grammarly-languageserver', '--stdio' }, + filetypes = { 'markdown' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + handlers = { + ['$/updateDocumentState'] = function() + return '' + end, + }, + init_options = { + clientId = 'client_BaDkMgx4X19X9UxxYRCXZo', + }, + }, + docs = { + description = [[ +https://github.com/znck/grammarly + +`grammarly-languageserver` can be installed via `npm`: + +```sh +npm i -g grammarly-languageserver +``` + +WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/graphql.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/graphql.lua new file mode 100644 index 0000000..fa1e871 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/graphql.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'graphql-lsp', 'server', '-m', 'stream' }, + filetypes = { 'graphql', 'typescriptreact', 'javascriptreact' }, + root_dir = util.root_pattern('.graphqlrc*', '.graphql.config.*', 'graphql.config.*'), + }, + + docs = { + description = [[ +https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli + +`graphql-lsp` can be installed via `npm`: + +```sh +npm install -g graphql-language-service-cli +``` + +Note that you must also have [the graphql package](https://github.com/graphql/graphql-js) installed within your project and create a [GraphQL config file](https://the-guild.dev/graphql/config/docs). +]], + default_config = { + root_dir = [[util.root_pattern('.git', '.graphqlrc*', '.graphql.config.*', 'graphql.config.*')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/groovyls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/groovyls.lua new file mode 100644 index 0000000..b4182f4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/groovyls.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'java', + '-jar', + 'groovy-language-server-all.jar', + }, + filetypes = { 'groovy' }, + root_dir = function(fname) + return util.root_pattern 'Jenkinsfile'(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/prominic/groovy-language-server.git + +Requirements: + - Linux/macOS (for now) + - Java 11+ + +`groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build). + +If you have installed groovy language server, you can set the `cmd` custom path as follow: + +```lua +require'lspconfig'.groovyls.setup{ + -- Unix + cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" }, + ... +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/guile_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/guile_ls.lua new file mode 100644 index 0000000..41b44ed --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/guile_ls.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' +return { + default_config = { + cmd = { 'guile-lsp-server' }, + filetypes = { + 'scheme.guile', + }, + root_dir = function(fname) + return util.root_pattern 'guix.scm'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://codeberg.org/rgherdt/scheme-lsp-server + +The recommended way is to install guile-lsp-server is using Guix. Unfortunately it is still not available at the official Guix channels, but you can use the provided channel guix.scm in the repo: +```sh +guix package -f guix.scm +``` + +Checkout the repo for more info. + +Note: This LSP will start on `scheme.guile` filetype. You can set this file type using `:help modeline` or adding https://gitlab.com/HiPhish/guile.vim to your plugins to automatically set it. + ]], + default_config = { + root_dir = [[root_pattern("guix.scm", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/harper_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/harper_ls.lua new file mode 100644 index 0000000..c9cd0cc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/harper_ls.lua @@ -0,0 +1,51 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'harper-ls', '--stdio' }, + filetypes = { + 'markdown', + 'rust', + 'typescript', + 'typescriptreact', + 'javascript', + 'python', + 'go', + 'c', + 'cpp', + 'ruby', + 'swift', + 'csharp', + 'toml', + 'lua', + 'gitcommit', + 'java', + 'html', + }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/chilipepperhott/harper + +The language server for Harper, the slim, clean language checker for developers. + +See [docs](https://github.com/chilipepperhott/harper/tree/master/harper-ls#configuration) for more information on settings. + +In short, however, they should look something like this: +```lua +lspconfig.harper_ls.setup { + settings = { + ["harper-ls"] = { + userDictPath = "~/dict.txt" + } + }, +} +``` + ]], + default_config = { + root_dir = [[bufdir]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/haxe_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/haxe_language_server.lua new file mode 100644 index 0000000..4412238 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/haxe_language_server.lua @@ -0,0 +1,74 @@ +local util = require 'lspconfig.util' + +local function find_hxml(path) + return vim.fs.find(function(name) + return name:match '.hxml$' + end, { path = path, type = 'file' }) +end + +return { + default_config = { + cmd = { 'haxe-language-server' }, + filetypes = { 'haxe' }, + root_dir = util.root_pattern('*.hxml', '.git'), + settings = { + haxe = { + executable = 'haxe', + }, + }, + init_options = {}, + on_new_config = function(new_config, new_root_dir) + if new_config.init_options.displayArguments then + return + end + + local hxml = find_hxml(new_root_dir)[1] + if hxml then + vim.notify('Using HXML: ' .. hxml) + new_config.init_options.displayArguments = { hxml } + end + end, + }, + docs = { + description = [[ +https://github.com/vshaxe/haxe-language-server + +The Haxe language server can be built by running the following commands from +the project's root directory: + + npm install + npx lix run vshaxe-build -t language-server + +This will create `bin/server.js`. Note that the server requires Haxe 3.4.0 or +higher. + +After building the language server, set the `cmd` setting in your setup +function: + +```lua +lspconfig.haxe_language_server.setup({ + cmd = {"node", "path/to/bin/server.js"}, +}) +``` + +By default, the language server is configured with the HXML compiler arguments +contained in the first `.hxml` file found in your project's root directory. +If you want to specify which one to use, set the `init_options.displayArguments` +setting: + +```lua +lspconfig.haxe_language_server.setup({ + -- ... + init_options = { + displayArguments = { "build.hxml" }, + }, +}) +``` + +]], + default_config = { + root_dir = [[root_pattern("*.hxml", ".git")]], + init_options = 'default value is set by on_new_config', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hdl_checker.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hdl_checker.lua new file mode 100644 index 0000000..5cf2941 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hdl_checker.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hdl_checker', '--lsp' }, + filetypes = { 'vhdl', 'verilog', 'systemverilog' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/suoto/hdl_checker +Language server for hdl-checker. +Install using: `pip install hdl-checker --upgrade` +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/helm_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/helm_ls.lua new file mode 100644 index 0000000..4908e23 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/helm_ls.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +local default_capabilities = { + workspace = { + didChangeWatchedFiles = { + dynamicRegistration = true, + }, + }, +} + +return { + default_config = { + cmd = { 'helm_ls', 'serve' }, + filetypes = { 'helm' }, + root_dir = util.root_pattern 'Chart.yaml', + single_file_support = true, + capabilities = default_capabilities, + }, + docs = { + description = [[ +https://github.com/mrjosh/helm-ls + +Helm Language server. (This LSP is in early development) + +`helm Language server` can be installed by following the instructions [here](https://github.com/mrjosh/helm-ls). + +The default `cmd` assumes that the `helm_ls` binary can be found in `$PATH`. + +If need Helm file highlight use [vim-helm](https://github.com/towolf/vim-helm) plugin. +]], + default_config = { + root_dir = [[root_pattern("Chart.yaml")]], + capabilities = [[default capabilities, with dynamicRegistration for didChangeWatchedFiles true]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hhvm.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hhvm.lua new file mode 100644 index 0000000..0e8ac5c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hhvm.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hh_client', 'lsp' }, + filetypes = { 'php', 'hack' }, + root_dir = util.root_pattern '.hhconfig', + }, + docs = { + description = [[ +Language server for programs written in Hack +https://hhvm.com/ +https://github.com/facebook/hhvm +See below for how to setup HHVM & typechecker: +https://docs.hhvm.com/hhvm/getting-started/getting-started + ]], + default_config = { + root_dir = [[root_pattern(".hhconfig")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hie.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hie.lua new file mode 100644 index 0000000..96148ad --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hie.lua @@ -0,0 +1,34 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hie-wrapper', '--lsp' }, + filetypes = { 'haskell' }, + root_dir = util.root_pattern('stack.yaml', 'package.yaml', '.git'), + }, + + docs = { + description = [[ +https://github.com/haskell/haskell-ide-engine + +the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration): +```lua +init_options = { + languageServerHaskell = { + hlintOn = bool; + maxNumberOfProblems = number; + diagnosticsDebounceDuration = number; + liquidOn = bool (default false); + completionSnippetsOn = bool (default true); + formatOnImportOn = bool (default true); + formattingProvider = string (default "brittany", alternate "floskell"); + } +} +``` + ]], + + default_config = { + root_dir = [[root_pattern("stack.yaml", "package.yaml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hlasm.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hlasm.lua new file mode 100644 index 0000000..285b627 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hlasm.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hlasm_language_server' }, + filetypes = { 'hlasm' }, + root_dir = util.root_pattern '.hlasmplugin', + single_file_support = true, + }, + docs = { + description = [[ + `hlasm_language_server` is a language server for the High Level Assembler language used on IBM SystemZ mainframes. + + To learn how to configure the HLASM language server, see the [HLASM Language Support documentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm). + ]], + default_config = { + root_dir = [[root_pattern(".hlasmplugin")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hls.lua new file mode 100644 index 0000000..4390440 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hls.lua @@ -0,0 +1,52 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'haskell-language-server-wrapper', '--lsp' }, + filetypes = { 'haskell', 'lhaskell' }, + root_dir = util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project', '*.cabal', 'package.yaml'), + single_file_support = true, + settings = { + haskell = { + formattingProvider = 'ormolu', + cabalFormattingProvider = 'cabalfmt', + }, + }, + lspinfo = function(cfg) + local extra = {} + local function on_stdout(_, data, _) + local version = data[1] + table.insert(extra, 'version: ' .. version) + end + + local opts = { + cwd = cfg.cwd, + stdout_buffered = true, + on_stdout = on_stdout, + } + local chanid = vim.fn.jobstart({ cfg.cmd[1], '--version' }, opts) + vim.fn.jobwait { chanid } + return extra + end, + }, + + docs = { + description = [[ +https://github.com/haskell/haskell-language-server + +Haskell Language Server + +If you are using HLS 1.9.0.0, enable the language server to launch on Cabal files as well: + +```lua +require('lspconfig')['hls'].setup{ + filetypes = { 'haskell', 'lhaskell', 'cabal' }, +} +``` + ]], + + default_config = { + root_dir = [[root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hoon_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hoon_ls.lua new file mode 100644 index 0000000..1a9240b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hoon_ls.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hoon-language-server' }, + filetypes = { 'hoon' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/urbit/hoon-language-server + +A language server for Hoon. + +The language server can be installed via `npm install -g @hoon-language-server` + +Start a fake ~zod with `urbit -F zod`. +Start the language server at the Urbit Dojo prompt with: `|start %language-server` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/html.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/html.lua new file mode 100644 index 0000000..2370734 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/html.lua @@ -0,0 +1,41 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vscode-html-language-server', '--stdio' }, + filetypes = { 'html', 'templ' }, + root_dir = util.root_pattern('package.json', '.git'), + single_file_support = true, + settings = {}, + init_options = { + provideFormatter = true, + embeddedLanguages = { css = true, javascript = true }, + configurationSection = { 'html', 'css', 'javascript' }, + }, + }, + docs = { + description = [[ +https://github.com/hrsh7th/vscode-langservers-extracted + +`vscode-html-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled. +To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +The code-formatting feature of the lsp can be controlled with the `provideFormatter` option. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.html.setup { + capabilities = capabilities, +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/htmx.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/htmx.lua new file mode 100644 index 0000000..fe7e1de --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/htmx.lua @@ -0,0 +1,71 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'htmx-lsp' }, + filetypes = { -- filetypes copied and adjusted from tailwindcss-intellisense + -- html + 'aspnetcorerazor', + 'astro', + 'astro-markdown', + 'blade', + 'clojure', + 'django-html', + 'htmldjango', + 'edge', + 'eelixir', -- vim ft + 'elixir', + 'ejs', + 'erb', + 'eruby', -- vim ft + 'gohtml', + 'gohtmltmpl', + 'haml', + 'handlebars', + 'hbs', + 'html', + 'htmlangular', + 'html-eex', + 'heex', + 'jade', + 'leaf', + 'liquid', + 'markdown', + 'mdx', + 'mustache', + 'njk', + 'nunjucks', + 'php', + 'razor', + 'slim', + 'twig', + -- js + 'javascript', + 'javascriptreact', + 'reason', + 'rescript', + 'typescript', + 'typescriptreact', + -- mixed + 'vue', + 'svelte', + 'templ', + }, + single_file_support = true, + root_dir = function(fname) + return util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/ThePrimeagen/htmx-lsp + +`htmx-lsp` can be installed via `cargo`: +```sh +cargo install htmx-lsp +``` + +Lsp is still very much work in progress and experimental. Use at your own risk. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hydra_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hydra_lsp.lua new file mode 100644 index 0000000..e162ebe --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hydra_lsp.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hydra-lsp' }, + filetypes = { 'yaml' }, + root_dir = util.root_pattern '.git', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/Retsediv/hydra-lsp + +LSP for Hydra Python package config files. +]], + default_config = { + root_dir = [[util.root_pattern '.git']], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hyprls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hyprls.lua new file mode 100644 index 0000000..b1327f2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/hyprls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'hyprls', '--stdio' }, + filetypes = { 'hyprlang' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/hyprland-community/hyprls + +`hyprls` can be installed via `go`: +```sh +go install github.com/ewen-lbh/hyprls/cmd/hyprls@latest +``` + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/idris2_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/idris2_lsp.lua new file mode 100644 index 0000000..acb906e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/idris2_lsp.lua @@ -0,0 +1,41 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'idris2-lsp' }, + filetypes = { 'idris2' }, + root_dir = util.root_pattern '*.ipkg', + }, + docs = { + description = [[ +https://github.com/idris-community/idris2-lsp + +The Idris 2 language server. + +Plugins for the Idris 2 filetype include +[Idris2-Vim](https://github.com/edwinb/idris2-vim) (fewer features, stable) and +[Nvim-Idris2](https://github.com/ShinKage/nvim-idris2) (cutting-edge, +experimental). + +Idris2-Lsp requires a build of Idris 2 that includes the "Idris 2 API" package. +Package managers with known support for this build include the +[AUR](https://aur.archlinux.org/packages/idris2/) and +[Homebrew](https://formulae.brew.sh/formula/idris2#default). + +If your package manager does not support the Idris 2 API, you will need to build +Idris 2 from source. Refer to the +[the Idris 2 installation instructions](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md) +for details. Steps 5 and 8 are listed as "optional" in that guide, but they are +necessary in order to make the Idris 2 API available. + +You need to install a version of Idris2-Lsp that is compatible with your +version of Idris 2. There should be a branch corresponding to every released +Idris 2 version after v0.4.0. Use the latest commit on that branch. For example, +if you have Idris v0.5.1, you should use the v0.5.1 branch of Idris2-Lsp. + +If your Idris 2 version is newer than the newest Idris2-Lsp branch, use the +latest commit on the `master` branch, and set a reminder to check the Idris2-Lsp +repo for the release of a compatible versioned branch. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/intelephense.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/intelephense.lua new file mode 100644 index 0000000..2b9ad0f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/intelephense.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'intelephense', '--stdio' }, + filetypes = { 'php' }, + root_dir = function(pattern) + local cwd = vim.loop.cwd() + local root = util.root_pattern('composer.json', '.git')(pattern) + + -- prefer cwd if root is a descendant + return util.path.is_descendant(cwd, root) and cwd or root + end, + }, + docs = { + description = [[ +https://intelephense.com/ + +`intelephense` can be installed via `npm`: +```sh +npm install -g intelephense +``` +]], + default_config = { + root_dir = [[root_pattern("composer.json", ".git")]], + init_options = [[{ + storagePath = Optional absolute path to storage dir. Defaults to os.tmpdir(). + globalStoragePath = Optional absolute path to a global storage dir. Defaults to os.homedir(). + licenceKey = Optional licence key or absolute path to a text file containing the licence key. + clearCache = Optional flag to clear server state. State can also be cleared by deleting {storagePath}/intelephense + -- See https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#initialisation-options + }]], + settings = [[{ + intelephense = { + files = { + maxSize = 1000000; + }; + }; + -- See https://github.com/bmewburn/intelephense-docs + }]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/janet_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/janet_lsp.lua new file mode 100644 index 0000000..bc9c5bd --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/janet_lsp.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'janet-lsp', + '--stdio', + }, + filetypes = { 'janet' }, + root_dir = util.root_pattern 'project.janet' or util.find_git_ancestor(), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/CFiggers/janet-lsp + +A Language Server Protocol implementation for Janet. +]], + root_dir = [[root_pattern("project.janet", ".git")]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/java_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/java_language_server.lua new file mode 100644 index 0000000..3ddf4b1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/java_language_server.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'java' }, + root_dir = util.root_pattern('build.gradle', 'pom.xml', '.git'), + settings = {}, + }, + docs = { + description = [[ +https://github.com/georgewfraser/java-language-server + +Java language server + +Point `cmd` to `lang_server_linux.sh` or the equivalent script for macOS/Windows provided by java-language-server +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jdtls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jdtls.lua new file mode 100644 index 0000000..62bf2a5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jdtls.lua @@ -0,0 +1,173 @@ +local util = require 'lspconfig.util' +local handlers = require 'vim.lsp.handlers' + +local env = { + HOME = vim.loop.os_homedir(), + XDG_CACHE_HOME = os.getenv 'XDG_CACHE_HOME', + JDTLS_JVM_ARGS = os.getenv 'JDTLS_JVM_ARGS', +} + +local function get_cache_dir() + return env.XDG_CACHE_HOME and env.XDG_CACHE_HOME or util.path.join(env.HOME, '.cache') +end + +local function get_jdtls_cache_dir() + return util.path.join(get_cache_dir(), 'jdtls') +end + +local function get_jdtls_config_dir() + return util.path.join(get_jdtls_cache_dir(), 'config') +end + +local function get_jdtls_workspace_dir() + return util.path.join(get_jdtls_cache_dir(), 'workspace') +end + +local function get_jdtls_jvm_args() + local args = {} + for a in string.gmatch((env.JDTLS_JVM_ARGS or ''), '%S+') do + local arg = string.format('--jvm-arg=%s', a) + table.insert(args, arg) + end + return unpack(args) +end + +-- TextDocument version is reported as 0, override with nil so that +-- the client doesn't think the document is newer and refuses to update +-- See: https://github.com/eclipse/eclipse.jdt.ls/issues/1695 +local function fix_zero_version(workspace_edit) + if workspace_edit and workspace_edit.documentChanges then + for _, change in pairs(workspace_edit.documentChanges) do + local text_document = change.textDocument + if text_document and text_document.version and text_document.version == 0 then + text_document.version = nil + end + end + end + return workspace_edit +end + +local function on_textdocument_codeaction(err, actions, ctx) + for _, action in ipairs(actions) do + -- TODO: (steelsojka) Handle more than one edit? + if action.command == 'java.apply.workspaceEdit' then -- 'action' is Command in java format + action.edit = fix_zero_version(action.edit or action.arguments[1]) + elseif type(action.command) == 'table' and action.command.command == 'java.apply.workspaceEdit' then -- 'action' is CodeAction in java format + action.edit = fix_zero_version(action.edit or action.command.arguments[1]) + end + end + + handlers[ctx.method](err, actions, ctx) +end + +local function on_textdocument_rename(err, workspace_edit, ctx) + handlers[ctx.method](err, fix_zero_version(workspace_edit), ctx) +end + +local function on_workspace_applyedit(err, workspace_edit, ctx) + handlers[ctx.method](err, fix_zero_version(workspace_edit), ctx) +end + +-- Non-standard notification that can be used to display progress +local function on_language_status(_, result) + local command = vim.api.nvim_command + command 'echohl ModeMsg' + command(string.format('echo "%s"', result.message)) + command 'echohl None' +end + +local root_files = { + -- Multi-module projects + { '.git', 'build.gradle', 'build.gradle.kts' }, + -- Single-module projects + { + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'settings.gradle', -- Gradle + 'settings.gradle.kts', -- Gradle + }, +} + +return { + default_config = { + cmd = { + 'jdtls', + '-configuration', + get_jdtls_config_dir(), + '-data', + get_jdtls_workspace_dir(), + get_jdtls_jvm_args(), + }, + filetypes = { 'java' }, + root_dir = function(fname) + for _, patterns in ipairs(root_files) do + local root = util.root_pattern(unpack(patterns))(fname) + if root then + return root + end + end + end, + single_file_support = true, + init_options = { + workspace = get_jdtls_workspace_dir(), + jvm_args = {}, + os_config = nil, + }, + handlers = { + -- Due to an invalid protocol implementation in the jdtls we have to conform these to be spec compliant. + -- https://github.com/eclipse/eclipse.jdt.ls/issues/376 + ['textDocument/codeAction'] = on_textdocument_codeaction, + ['textDocument/rename'] = on_textdocument_rename, + ['workspace/applyEdit'] = on_workspace_applyedit, + ['language/status'] = vim.schedule_wrap(on_language_status), + }, + }, + docs = { + description = [[ +https://projects.eclipse.org/projects/eclipse.jdt.ls + +Language server for Java. + +IMPORTANT: If you want all the features jdtls has to offer, [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) +is highly recommended. If all you need is diagnostics, completion, imports, gotos and formatting and some code actions +you can keep reading here. + +For manual installation you can download precompiled binaries from the +[official downloads site](http://download.eclipse.org/jdtls/snapshots/?d) +and ensure that the `PATH` variable contains the `bin` directory of the extracted archive. + +```lua + -- init.lua + require'lspconfig'.jdtls.setup{} +``` + +You can also pass extra custom jvm arguments with the JDTLS_JVM_ARGS environment variable as a space separated list of arguments, +that will be converted to multiple --jvm-arg= args when passed to the jdtls script. This will allow for example tweaking +the jvm arguments or integration with external tools like lombok: + +```sh +export JDTLS_JVM_ARGS="-javaagent:$HOME/.local/share/java/lombok.jar" +``` + +For automatic installation you can use the following unofficial installers/launchers under your own risk: + - [jdtls-launcher](https://github.com/eruizc-dev/jdtls-launcher) (Includes lombok support by default) + ```lua + -- init.lua + require'lspconfig'.jdtls.setup{ cmd = { 'jdtls' } } + ``` + ]], + default_config = { + root_dir = [[{ + -- Single-module projects + { + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'settings.gradle', -- Gradle + 'settings.gradle.kts', -- Gradle + }, + -- Multi-module projects + { 'build.gradle', 'build.gradle.kts' }, + } or vim.fn.getcwd()]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jedi_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jedi_language_server.lua new file mode 100644 index 0000000..c95c960 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jedi_language_server.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + '.git', +} + +return { + default_config = { + cmd = { 'jedi-language-server' }, + filetypes = { 'python' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/pappasam/jedi-language-server + +`jedi-language-server`, a language server for Python, built on top of jedi + ]], + default_config = { + root_dir = "vim's starting directory", + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jinja_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jinja_lsp.lua new file mode 100644 index 0000000..e372ee9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jinja_lsp.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + name = 'jinja_lsp', + cmd = { 'jinja-lsp' }, + filetypes = { 'jinja' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +jinja-lsp enhances minijinja development experience by providing Helix/Nvim users with advanced features such as autocomplete, syntax highlighting, hover, goto definition, code actions and linting. + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + extension = { + jinja = 'jinja', + jinja2 = 'jinja', + j2 = 'jinja', + }, +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jqls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jqls.lua new file mode 100644 index 0000000..740138e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jqls.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' +return { + default_config = { + cmd = { 'jq-lsp' }, + filetypes = { 'jq' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/wader/jq-lsp +Language server for jq, written using Go. +You can install the server easily using go install: +```sh +# install directly +go install github.com/wader/jq-lsp@master +# copy binary to $PATH +cp $(go env GOPATH)/bin/jq-lsp /usr/local/bin +``` +Note: To activate properly nvim needs to know the jq filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.jq setfiletype jq\]\]) +``` +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonls.lua new file mode 100644 index 0000000..b078049 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonls.lua @@ -0,0 +1,41 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vscode-json-language-server', '--stdio' }, + filetypes = { 'json', 'jsonc' }, + init_options = { + provideFormatter = true, + }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + -- this language server config is in VSCode built-in package.json + description = [[ +https://github.com/hrsh7th/vscode-langservers-extracted + +vscode-json-language-server, a language server for JSON and JSON schema + +`vscode-json-language-server` can be installed via `npm`: +```sh +npm i -g vscode-langservers-extracted +``` + +`vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need to enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.jsonls.setup { + capabilities = capabilities, +} +``` +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonnet_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonnet_ls.lua new file mode 100644 index 0000000..e2e7bff --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/jsonnet_ls.lua @@ -0,0 +1,44 @@ +local util = require 'lspconfig.util' + +-- common jsonnet library paths +local function jsonnet_path(root_dir) + local paths = { + util.path.join(root_dir, 'lib'), + util.path.join(root_dir, 'vendor'), + } + return table.concat(paths, ':') +end + +return { + default_config = { + cmd = { 'jsonnet-language-server' }, + filetypes = { 'jsonnet', 'libsonnet' }, + single_file_support = true, + root_dir = function(fname) + return util.root_pattern 'jsonnetfile.json'(fname) or util.find_git_ancestor(fname) + end, + on_new_config = function(new_config, root_dir) + if not new_config.cmd_env then + new_config.cmd_env = {} + end + if not new_config.cmd_env.JSONNET_PATH then + new_config.cmd_env.JSONNET_PATH = jsonnet_path(root_dir) + end + end, + }, + docs = { + description = [[ +https://github.com/grafana/jsonnet-language-server + +A Language Server Protocol (LSP) server for Jsonnet. + +The language server can be installed with `go`: +```sh +go install github.com/grafana/jsonnet-language-server@latest +``` +]], + default_config = { + root_dir = [[root_pattern("jsonnetfile.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/julials.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/julials.lua new file mode 100644 index 0000000..44360c7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/julials.lua @@ -0,0 +1,75 @@ +local util = require 'lspconfig.util' + +local cmd = { + 'julia', + '--startup-file=no', + '--history-file=no', + '-e', + [[ + # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig + # with the regular load path as a fallback + ls_install_path = joinpath( + get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")), + "environments", "nvim-lspconfig" + ) + pushfirst!(LOAD_PATH, ls_install_path) + using LanguageServer + popfirst!(LOAD_PATH) + depot_path = get(ENV, "JULIA_DEPOT_PATH", "") + project_path = let + dirname(something( + ## 1. Finds an explicitly set project (JULIA_PROJECT) + Base.load_path_expand(( + p = get(ENV, "JULIA_PROJECT", nothing); + p === nothing ? nothing : isempty(p) ? nothing : p + )), + ## 2. Look for a Project.toml file in the current working directory, + ## or parent directories, with $HOME as an upper boundary + Base.current_project(), + ## 3. First entry in the load path + get(Base.load_path(), 1, nothing), + ## 4. Fallback to default global environment, + ## this is more or less unreachable + Base.load_path_expand("@v#.#"), + )) + end + @info "Running language server" VERSION pwd() project_path depot_path + server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path) + server.runlinter = true + run(server) + ]], +} + +return { + default_config = { + cmd = cmd, + filetypes = { 'julia' }, + root_dir = function(fname) + return util.root_pattern 'Project.toml'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/julia-vscode/julia-vscode + +LanguageServer.jl can be installed with `julia` and `Pkg`: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")' +``` +where `~/.julia/environments/nvim-lspconfig` is the location where +the default configuration expects LanguageServer.jl to be installed. + +To update an existing install, use the following command: +```sh +julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()' +``` + +Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a +Julia project, you must make sure that the project is instantiated: +```sh +julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()' +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kcl.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kcl.lua new file mode 100644 index 0000000..0e241ab --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kcl.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'kcl-language-server' }, + filetypes = { 'kcl' }, + root_dir = util.root_pattern '.git', + }, + docs = { + description = [[ +https://github.com/kcl-lang/kcl.nvim + +Language server for the KCL configuration and policy language. + +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/koka.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/koka.lua new file mode 100644 index 0000000..c754b2f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/koka.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'koka', '--language-server', '--lsstdio' }, + filetypes = { 'koka' }, + single_file_support = true, + root_dir = util.find_git_ancestor, + }, + + docs = { + description = [[ + https://koka-lang.github.io/koka/doc/index.html +Koka is a functional programming language with effect types and handlers. + ]], + default_config = { + root_dir = [[git directory]], + capabilities = [[default capabilities]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kotlin_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kotlin_language_server.lua new file mode 100644 index 0000000..a151403 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/kotlin_language_server.lua @@ -0,0 +1,57 @@ +local util = require 'lspconfig.util' + +local bin_name = 'kotlin-language-server' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.bat' +end + +--- The presence of one of these files indicates a project root directory +-- +-- These are configuration files for the various build systems supported by +-- Kotlin. I am not sure whether the language server supports Ant projects, +-- but I'm keeping it here as well since Ant does support Kotlin. +local root_files = { + 'settings.gradle', -- Gradle (multi-project) + 'settings.gradle.kts', -- Gradle (multi-project) + 'build.xml', -- Ant + 'pom.xml', -- Maven + 'build.gradle', -- Gradle + 'build.gradle.kts', -- Gradle +} + +return { + default_config = { + filetypes = { 'kotlin' }, + root_dir = util.root_pattern(unpack(root_files)), + cmd = { bin_name }, + init_options = { + storagePath = util.root_pattern(unpack(root_files))(vim.fn.expand '%:p:h'), + }, + }, + docs = { + description = [[ + A kotlin language server which was developed for internal usage and + released afterwards. Maintaining is not done by the original author, + but by fwcd. + + It is built via gradle and developed on github. + Source and additional description: + https://github.com/fwcd/kotlin-language-server + + This server requires vim to be aware of the kotlin-filetype. + You could refer for this capability to: + https://github.com/udalov/kotlin-vim (recommended) + Note that there is no LICENSE specified yet. + + For faster startup, you can setup caching by specifying a storagePath + in the init_options. The default is your home directory. + ]], + default_config = { + root_dir = [[See source]], + cmd = { 'kotlin-language-server' }, + init_options = { + storagePath = [[Enables caching and use project root to store cache data. See source]], + }, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lean3ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lean3ls.lua new file mode 100644 index 0000000..ebcec10 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lean3ls.lua @@ -0,0 +1,46 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'lean-language-server', '--stdio', '--', '-M', '4096', '-T', '100000' }, + filetypes = { 'lean3' }, + offset_encoding = 'utf-32', + root_dir = function(fname) + fname = util.path.sanitize(fname) + -- check if inside elan stdlib + local stdlib_dir + do + local _, endpos = fname:find '/lean/library' + if endpos then + stdlib_dir = fname:sub(1, endpos) + end + end + + return util.root_pattern 'leanpkg.toml'(fname) + or util.root_pattern 'leanpkg.path'(fname) + or stdlib_dir + or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/leanprover/lean-client-js/tree/master/lean-language-server + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +Once Lean is installed, you can install the Lean 3 language server by running +```sh +npm install -g lean-language-server +``` + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `lean3ls` both with it and `lspconfig`. + ]], + default_config = { + root_dir = [[root_pattern("leanpkg.toml") or root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/leanls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/leanls.lua new file mode 100644 index 0000000..63349a1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/leanls.lua @@ -0,0 +1,52 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'lake', 'serve', '--' }, + filetypes = { 'lean' }, + root_dir = function(fname) + -- check if inside elan stdlib + fname = util.path.sanitize(fname) + local stdlib_dir + do + local _, endpos = fname:find '/src/lean' + if endpos then + stdlib_dir = fname:sub(1, endpos) + end + end + if not stdlib_dir then + local _, endpos = fname:find '/lib/lean' + if endpos then + stdlib_dir = fname:sub(1, endpos) + end + end + + return util.root_pattern('lakefile.toml', 'lakefile.lean', 'lean-toolchain')(fname) + or stdlib_dir + or util.find_git_ancestor(fname) + end, + on_new_config = function(config, root_dir) + -- add root dir as command-line argument for `ps aux` + table.insert(config.cmd, root_dir) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/leanprover/lean4 + +Lean installation instructions can be found +[here](https://leanprover-community.github.io/get_started.html#regular-install). + +The Lean language server is included in any Lean installation and +does not require any additional packages. + +Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), +that plugin fully handles the setup of the Lean language server, +and you shouldn't set up `leanls` both with it and `lspconfig`. + ]], + default_config = { + root_dir = [[root_pattern("lakefile.toml", "lakefile.lean", "lean-toolchain", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lelwel_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lelwel_ls.lua new file mode 100644 index 0000000..ac8c456 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lelwel_ls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'lelwel-ls' }, + filetypes = { 'llw' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/0x2a-42/lelwel + +Language server for lelwel grammars. + +You can install `lelwel-ls` via cargo: +```sh +cargo install --features="lsp" lelwel +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lemminx.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lemminx.lua new file mode 100644 index 0000000..eb1ccaa --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lemminx.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'lemminx' }, + filetypes = { 'xml', 'xsd', 'xsl', 'xslt', 'svg' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/eclipse/lemminx + +The easiest way to install the server is to get a binary from https://github.com/redhat-developer/vscode-xml/releases and place it on your PATH. + +NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked. + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lexical.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lexical.lua new file mode 100644 index 0000000..d8235d5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lexical.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'elixir', 'eelixir', 'heex', 'surface' }, + root_dir = function(fname) + return util.root_pattern 'mix.exs'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ + https://github.com/lexical-lsp/lexical + + Lexical is a next-generation language server for the Elixir programming language. + + Follow the [Detailed Installation Instructions](https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md) + + **By default, `lexical` doesn't have a `cmd` set.** + This is because nvim-lspconfig does not make assumptions about your path. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ltex.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ltex.lua new file mode 100644 index 0000000..6afc30a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ltex.lua @@ -0,0 +1,95 @@ +local util = require 'lspconfig.util' + +local language_id_mapping = { + bib = 'bibtex', + plaintex = 'tex', + rnoweb = 'rsweave', + rst = 'restructuredtext', + tex = 'latex', + pandoc = 'markdown', + text = 'plaintext', +} + +local bin_name = 'ltex-ls' +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.bat' +end + +local filetypes = { + 'bib', + 'gitcommit', + 'markdown', + 'org', + 'plaintex', + 'rst', + 'rnoweb', + 'tex', + 'pandoc', + 'quarto', + 'rmd', + 'context', + 'html', + 'xhtml', + 'mail', + 'text', +} + +local function get_language_id(_, filetype) + local language_id = language_id_mapping[filetype] + if language_id then + return language_id + else + return filetype + end +end +local enabled_ids = {} +do + local enabled_keys = {} + for _, ft in ipairs(filetypes) do + local id = get_language_id({}, ft) + if not enabled_keys[id] then + enabled_keys[id] = true + table.insert(enabled_ids, id) + end + end +end + +return { + default_config = { + cmd = { bin_name }, + filetypes = filetypes, + root_dir = util.find_git_ancestor, + single_file_support = true, + get_language_id = get_language_id, + settings = { + ltex = { + enabled = enabled_ids, + }, + }, + }, + docs = { + description = [=[ +https://github.com/valentjn/ltex-ls + +LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others + +To install, download the latest [release](https://github.com/valentjn/ltex-ls/releases) and ensure `ltex-ls` is on your path. + +This server accepts configuration via the `settings` key. + +```lua + settings = { + ltex = { + language = "en-GB", + }, + }, +``` + +To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes): + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]] +``` +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lua_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lua_ls.lua new file mode 100644 index 0000000..3bb9fd6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lua_ls.lua @@ -0,0 +1,88 @@ +local util = require 'lspconfig.util' + +local root_files = { + '.luarc.json', + '.luarc.jsonc', + '.luacheckrc', + '.stylua.toml', + 'stylua.toml', + 'selene.toml', + 'selene.yml', +} + +return { + default_config = { + cmd = { 'lua-language-server' }, + filetypes = { 'lua' }, + root_dir = function(fname) + local root = util.root_pattern(unpack(root_files))(fname) + if root and root ~= vim.env.HOME then + return root + end + root = util.root_pattern 'lua/'(fname) + if root then + return root + end + return util.find_git_ancestor(fname) + end, + single_file_support = true, + log_level = vim.lsp.protocol.MessageType.Warning, + }, + docs = { + description = [[ +https://github.com/luals/lua-language-server + +Lua language server. + +`lua-language-server` can be installed by following the instructions [here](https://luals.github.io/#neovim-install). + +The default `cmd` assumes that the `lua-language-server` binary can be found in `$PATH`. + +If you primarily use `lua-language-server` for Neovim, and want to provide completions, +analysis, and location handling for plugins on runtime path, you can use the following +settings. + +```lua +require'lspconfig'.lua_ls.setup { + on_init = function(client) + local path = client.workspace_folders[1].name + if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then + return + end + + client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { + runtime = { + -- Tell the language server which version of Lua you're using + -- (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT' + }, + -- Make the server aware of Neovim runtime files + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME + -- Depending on the usage, you might want to add additional paths here. + -- "${3rd}/luv/library" + -- "${3rd}/busted/library", + } + -- or pull in all of 'runtimepath'. NOTE: this is a lot slower + -- library = vim.api.nvim_get_runtime_file("", true) + } + }) + end, + settings = { + Lua = {} + } +} +``` + +See `lua-language-server`'s [documentation](https://luals.github.io/wiki/settings/) for an explanation of the above fields: +* [Lua.runtime.path](https://luals.github.io/wiki/settings/#runtimepath) +* [Lua.workspace.library](https://luals.github.io/wiki/settings/#workspacelibrary) + +]], + default_config = { + root_dir = [[root_pattern(".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/luau_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/luau_lsp.lua new file mode 100644 index 0000000..ac64544 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/luau_lsp.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'luau-lsp', 'lsp' }, + filetypes = { 'luau' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + [[ +https://github.com/JohnnyMorganz/luau-lsp + +Language server for the [Luau](https://luau-lang.org/) language. + +`luau-lsp` can be installed by downloading one of the release assets available at https://github.com/JohnnyMorganz/luau-lsp. + +You might also have to set up automatic filetype detection for Luau files, for example like so: + +```vim +autocmd BufRead,BufNewFile *.luau setf luau +``` +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lwc_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lwc_ls.lua new file mode 100644 index 0000000..ac8841a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/lwc_ls.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'lwc-language-server', '--stdio' }, + filetypes = { 'javascript', 'html' }, + root_dir = util.root_pattern 'sfdx-project.json', + init_options = { + embeddedLanguages = { + javascript = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/forcedotcom/lightning-language-server/ + +Language server for Lightning Web Components. + +For manual installation, utilize the official [NPM package](https://www.npmjs.com/package/@salesforce/lwc-language-server). +Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.lwc_ls.setup { + cmd = { + 'node', + '/path/to/node_modules/@salesforce/lwc-language-server/bin/lwc-language-server.js', + '--stdio' + } +} +``` +]], + default_config = { + root_dir = [[root_pattern('sfdx-project.json')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/m68k.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/m68k.lua new file mode 100644 index 0000000..053d442 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/m68k.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'm68k-lsp-server', '--stdio' }, + filetypes = { 'asm68k' }, + root_dir = util.root_pattern('Makefile', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/grahambates/m68k-lsp + +Language server for Motorola 68000 family assembly + +`m68k-lsp-server` can be installed via `npm`: + +```sh +npm install -g m68k-lsp-server +``` + +Ensure you are using the 68k asm syntax variant in Neovim. + +```lua +vim.g.asmsyntax = 'asm68k' +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/markdown_oxide.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/markdown_oxide.lua new file mode 100644 index 0000000..13882dc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/markdown_oxide.lua @@ -0,0 +1,42 @@ +return { + default_config = { + root_dir = function(fname, _) + return require('lspconfig').util.root_pattern('.git', '.obsidian', '.moxide.toml')(fname) + end, + filetypes = { 'markdown' }, + single_file_support = true, + cmd = { 'markdown-oxide' }, + }, + docs = { + description = [[ +https://github.com/Feel-ix-343/markdown-oxide + +Editor Agnostic PKM: you bring the text editor and we +bring the PKM. + +Inspired by and compatible with Obsidian. + +Check the readme to see how to properly setup. + ]], + }, + commands = { + Today = { + function() + vim.lsp.buf.execute_command { command = 'jump', arguments = { 'today' } } + end, + description = "Open today's daily note", + }, + Tomorrow = { + function() + vim.lsp.buf.execute_command { command = 'jump', arguments = { 'tomorrow' } } + end, + description = "Open tomorrow's daily note", + }, + Yesterday = { + function() + vim.lsp.buf.execute_command { command = 'jump', arguments = { 'yesterday' } } + end, + description = "Open yesterday's daily note", + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/marksman.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/marksman.lua new file mode 100644 index 0000000..2dd01a2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/marksman.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' + +local bin_name = 'marksman' +local cmd = { bin_name, 'server' } + +return { + default_config = { + cmd = cmd, + filetypes = { 'markdown', 'markdown.mdx' }, + root_dir = function(fname) + local root_files = { '.marksman.toml' } + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/artempyanykh/marksman + +Marksman is a Markdown LSP server providing completion, cross-references, diagnostics, and more. + +Marksman works on MacOS, Linux, and Windows and is distributed as a self-contained binary for each OS. + +Pre-built binaries can be downloaded from https://github.com/artempyanykh/marksman/releases +]], + default_config = { + root_dir = [[root_pattern(".git", ".marksman.toml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/matlab_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/matlab_ls.lua new file mode 100644 index 0000000..cadc60b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/matlab_ls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'matlab-language-server', '--stdio' }, + filetypes = { 'matlab' }, + root_dir = util.find_git_ancestor, + single_file_support = false, + settings = { + MATLAB = { + indexWorkspace = false, + installPath = '', + matlabConnectionTiming = 'onStart', + telemetry = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/mathworks/MATLAB-language-server + +MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mdx_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mdx_analyzer.lua new file mode 100644 index 0000000..1dfbcb5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mdx_analyzer.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +local function get_typescript_server_path(root_dir) + local project_root = util.find_node_modules_ancestor(root_dir) + return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' +end + +return { + default_config = { + cmd = { 'mdx-language-server', '--stdio' }, + filetypes = { 'markdown.mdx' }, + root_dir = util.root_pattern 'package.json', + single_file_support = true, + settings = {}, + init_options = { + typescript = {}, + }, + on_new_config = function(new_config, new_root_dir) + if vim.tbl_get(new_config.init_options, 'typescript') and not new_config.init_options.typescript.tsdk then + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end + end, + }, + commands = {}, + docs = { + description = [[ +https://github.com/mdx-js/mdx-analyzer + +`mdx-analyzer`, a language server for MDX +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mesonlsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mesonlsp.lua new file mode 100644 index 0000000..1e45ef8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mesonlsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mesonlsp', '--lsp' }, + filetypes = { 'meson' }, + root_dir = util.root_pattern('meson.build', 'meson_options.txt', 'meson.options', '.git'), + }, + docs = { + description = [[ +https://github.com/JCWasmx86/mesonlsp + +An unofficial, unendorsed language server for meson written in C++ +]], + default_config = { + root_dir = [[util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/metals.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/metals.lua new file mode 100644 index 0000000..1242f51 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/metals.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'metals' }, + filetypes = { 'scala' }, + root_dir = util.root_pattern('build.sbt', 'build.sc', 'build.gradle', 'pom.xml'), + message_level = vim.lsp.protocol.MessageType.Log, + init_options = { + statusBarProvider = 'show-message', + isHttpEnabled = true, + compilerOptions = { + snippetAutoIndent = false, + }, + }, + capabilities = { + workspace = { + configuration = false, + }, + }, + }, + docs = { + description = [[ +https://scalameta.org/metals/ + +Scala language server with rich IDE features. + +See full instructions in the Metals documentation: + +https://scalameta.org/metals/docs/editors/vim#using-an-alternative-lsp-client + +Note: that if you're using [nvim-metals](https://github.com/scalameta/nvim-metals), that plugin fully handles the setup and installation of Metals, and you shouldn't set up Metals both with it and `lspconfig`. + +To install Metals, make sure to have [coursier](https://get-coursier.io/docs/cli-installation) installed, and once you do you can install the latest Metals with `cs install metals`. +]], + default_config = { + root_dir = [[util.root_pattern("build.sbt", "build.sc", "build.gradle", "pom.xml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/millet.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/millet.lua new file mode 100644 index 0000000..e870054 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/millet.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'millet' }, + filetypes = { 'sml' }, + root_dir = util.root_pattern 'millet.toml', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/azdavis/millet + +Millet, a language server for Standard ML + +To use with nvim: + +1. Install a Rust toolchain: https://rustup.rs +2. Clone the repo +3. Run `cargo build --release --bin lang-srv` +4. Move `target/release/lang-srv` to somewhere on your $PATH as `millet` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mint.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mint.lua new file mode 100644 index 0000000..7fde1c4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mint.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mint', 'ls' }, + filetypes = { 'mint' }, + root_dir = function(fname) + return util.root_pattern 'mint.json'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://www.mint-lang.com + +Install Mint using the [instructions](https://www.mint-lang.com/install). +The language server is included since version 0.12.0. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_lsp_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_lsp_server.lua new file mode 100644 index 0000000..22a7126 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_lsp_server.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mlir-lsp-server' }, + filetypes = { 'mlir' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://mlir.llvm.org/docs/Tools/MLIRLSP/#mlir-lsp-language-server--mlir-lsp-server= + +The Language Server for the LLVM MLIR language + +`mlir-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_pdll_lsp_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_pdll_lsp_server.lua new file mode 100644 index 0000000..e24d634 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mlir_pdll_lsp_server.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mlir-pdll-lsp-server' }, + filetypes = { 'pdll' }, + root_dir = function(fname) + return util.root_pattern 'pdll_compile_commands.yml'(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://mlir.llvm.org/docs/Tools/MLIRLSP/#pdll-lsp-language-server--mlir-pdll-lsp-server + +The Language Server for the LLVM PDLL language + +`mlir-pdll-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mm0_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mm0_ls.lua new file mode 100644 index 0000000..513bbeb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mm0_ls.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mm0-rs', 'server' }, + root_dir = util.find_git_ancestor, + filetypes = { 'metamath-zero' }, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/digama0/mm0 + +Language Server for the metamath-zero theorem prover. + +Requires [mm0-rs](https://github.com/digama0/mm0/tree/master/mm0-rs) to be installed +and available on the `PATH`. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mojo.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mojo.lua new file mode 100644 index 0000000..9092ba6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mojo.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mojo-lsp-server' }, + filetypes = { 'mojo' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/modularml/mojo + +`mojo-lsp-server` can be installed [via Modular](https://developer.modular.com/download) + +Mojo is a new programming language that bridges the gap between research and production by combining Python syntax and ecosystem with systems programming and metaprogramming features. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/motoko_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/motoko_lsp.lua new file mode 100644 index 0000000..c0f6a35 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/motoko_lsp.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'motoko-lsp', '--stdio' }, + filetypes = { 'motoko' }, + root_dir = util.root_pattern('dfx.json', '.git'), + init_options = { + formatter = 'auto', + }, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/dfinity/vscode-motoko + +Language server for the Motoko programming language. + ]], + default_config = { + root_dir = [[root_pattern("dfx.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/move_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/move_analyzer.lua new file mode 100644 index 0000000..ab97745 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/move_analyzer.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'move-analyzer' }, + filetypes = { 'move' }, + root_dir = function(fname) + local move_package_dir = util.root_pattern 'Move.toml'(fname) + return move_package_dir + end, + }, + commands = {}, + docs = { + description = [[ +https://github.com/move-language/move/tree/main/language/move-analyzer + +Language server for Move + +The `move-analyzer` can be installed by running: + +``` +cargo install --git https://github.com/move-language/move move-analyzer +``` + +See [`move-analyzer`'s doc](https://github.com/move-language/move/blob/1b258a06e3c7d2bc9174578aac92cca3ac19de71/language/move-analyzer/editors/code/README.md#how-to-install) for details. + ]], + default_config = { + root_dir = [[root_pattern("Move.toml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/msbuild_project_tools_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/msbuild_project_tools_server.lua new file mode 100644 index 0000000..1f6a124 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/msbuild_project_tools_server.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' + +local host_dll_name = 'MSBuildProjectTools.LanguageServer.Host.dll' + +return { + default_config = { + filetypes = { 'xml.csproj', 'xml.fsproj', 'sln' }, + root_dir = util.find_git_ancestor, + init_options = {}, + cmd = { 'dotnet', host_dll_name }, + }, + docs = { + description = [[ +https://github.com/tintoy/msbuild-project-tools-server/ + +MSBuild Project Tools Server can be installed by following the README.MD on the above repository. + +Example config: +```lua +lspconfig.msbuild_project_tools_server.setup { + cmd = {'dotnet', '/path/to/server/MSBuildProjectTools.LanguageServer.Host.dll'} +} +``` + +]], + default_config = { + root_dir = [[root_pattern('.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mutt_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mutt_ls.lua new file mode 100644 index 0000000..2026bf9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/mutt_ls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'mutt-language-server' }, + filetypes = { 'muttrc', 'neomuttrc' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/neomutt/mutt-language-server + +A language server for (neo)mutt's muttrc. It can be installed via pip. + +```sh +pip install mutt-language-server +``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nelua_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nelua_lsp.lua new file mode 100644 index 0000000..ab5faab --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nelua_lsp.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'nelua' }, + root_dir = util.root_pattern('Makefile', '.git', '*.nelua'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/codehz/nelua-lsp + +nelua-lsp is an experimental nelua language server. + +You need [nelua.vim](https://github.com/stefanos82/nelua.vim/blob/main/ftdetect/nelua.vim) for nelua files to be recognized or add this to your config: + +in vimscript: +```vimscript +au BufNewFile,BufRead *.nelua setf nelua +``` + +in lua: +```lua +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { pattern = { "*.nelua" }, command = "setf nelua"}) +``` + +**By default, nelua-lsp doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +```lua +require'lspconfig'.nelua_lsp.setup { + cmd = { "nelua", "-L", "/path/to/nelua-lsp/", "--script", "/path/to/nelua-lsp/nelua-lsp.lua" }, +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/neocmake.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/neocmake.lua new file mode 100644 index 0000000..03b1c52 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/neocmake.lua @@ -0,0 +1,35 @@ +local util = require 'lspconfig.util' + +local root_files = { '.git', 'build', 'cmake' } +return { + default_config = { + cmd = { 'neocmakelsp', '--stdio' }, + filetypes = { 'cmake' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/Decodetalkers/neocmakelsp + +CMake LSP Implementation + +Neovim does not currently include built-in snippets. `neocmakelsp` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. + +```lua +--Enable (broadcasting) snippet capability for completion +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.snippetSupport = true + +require'lspconfig'.neocmake.setup { + capabilities = capabilities, +} +``` +]], + default_config = { + root_dir = [[root_pattern('.git', 'cmake')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nextls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nextls.lua new file mode 100644 index 0000000..acecaf7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nextls.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'elixir', 'eelixir', 'heex', 'surface' }, + root_dir = function(fname) + return util.root_pattern 'mix.exs'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/elixir-tools/next-ls + +**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.** +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nginx_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nginx_language_server.lua new file mode 100644 index 0000000..9dfc0b5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nginx_language_server.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nginx-language-server' }, + filetypes = { 'nginx' }, + root_dir = function(fname) + return util.root_pattern('nginx.conf', '.git')(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://pypi.org/project/nginx-language-server/ + +`nginx-language-server` can be installed via pip: + +```sh +pip install -U nginx-language-server +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nickel_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nickel_ls.lua new file mode 100644 index 0000000..391abfe --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nickel_ls.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nls' }, + filetypes = { 'ncl', 'nickel' }, + root_dir = util.find_git_ancestor, + }, + + docs = { + description = [[ +Nickel Language Server + +https://github.com/tweag/nickel + +`nls` can be installed with nix, or cargo, from the Nickel repository. +```sh +git clone https://github.com/tweag/nickel.git +``` + +Nix: +```sh +cd nickel +nix-env -f . -i +``` + +cargo: +```sh +cd nickel/lsp/nls +cargo install --path . +``` + +In order to have lspconfig detect Nickel filetypes (a prerequisite for autostarting a server), +install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel). + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nil_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nil_ls.lua new file mode 100644 index 0000000..49044c1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nil_ls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nil' }, + filetypes = { 'nix' }, + single_file_support = true, + root_dir = util.root_pattern('flake.nix', '.git'), + }, + docs = { + description = [[ +https://github.com/oxalica/nil + +A new language server for Nix Expression Language. + +If you are using Nix with Flakes support, run `nix profile install github:oxalica/nil` to install. +Check the repository README for more information. + +_See an example config at https://github.com/oxalica/nil/blob/main/dev/nvim-lsp.nix._ + ]], + default_config = { + root_dir = [[root_pattern("flake.nix", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nim_langserver.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nim_langserver.lua new file mode 100644 index 0000000..f3c4827 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nim_langserver.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nimlangserver' }, + filetypes = { 'nim' }, + root_dir = function(fname) + return util.root_pattern '*.nimble'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/nim-lang/langserver + + +`nim-langserver` can be installed via the `nimble` package manager: +```sh +nimble install nimlangserver +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nimls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nimls.lua new file mode 100644 index 0000000..3c1aeb2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nimls.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nimlsp' }, + filetypes = { 'nim' }, + root_dir = function(fname) + return util.root_pattern '*.nimble'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/PMunch/nimlsp + +`nimlsp` can be installed via the `nimble` package manager: + +```sh +nimble install nimlsp +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nixd.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nixd.lua new file mode 100644 index 0000000..b6289db --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nixd.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nixd' }, + filetypes = { 'nix' }, + single_file_support = true, + root_dir = function(fname) + return util.root_pattern 'flake.nix'(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/nix-community/nixd + +Nix language server, based on nix libraries. + +If you are using Nix with Flakes support, run `nix profile install github:nix-community/nixd` to install. +Check the repository README for more information. + ]], + default_config = { + root_dir = [[root_pattern("flake.nix",".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nomad_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nomad_lsp.lua new file mode 100644 index 0000000..5ffa98a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nomad_lsp.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' +local bin_name = 'nomad-lsp' + +if vim.fn.has 'win32' == 1 then + bin_name = bin_name .. '.exe' +end + +return { + default_config = { + cmd = { bin_name }, + filetypes = { 'hcl.nomad', 'nomad' }, + root_dir = util.root_pattern '*.nomad', + }, + docs = { + description = [[ +https://github.com/juliosueiras/nomad-lsp + +Written in Go, compilation is needed for `nomad_lsp` to be used. Please see the [original repository](https://github.com/juliosuieras/nomad-lsp). + +Add the executable to your system or vim PATH and it will be set to go. + +No configuration option is needed unless you choose not to add `nomad-lsp` executable to the PATH. You should know what you are doing if you choose so. + +```lua +require('lspconfig').nomad_lsp.setup{ } +``` + +However, a `hcl.nomad` or `nomad` filetype should be defined. + +Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option. +]], + default_config = { + root_dir = [[util.root_pattern("hcl.nomad", "nomad")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ntt.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ntt.lua new file mode 100644 index 0000000..0f68a89 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ntt.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' +local bin_name = 'ntt' + +return { + default_config = { + cmd = { bin_name, 'langserver' }, + filetypes = { 'ttcn' }, + root_dir = util.root_pattern '.git', + }, + docs = { + description = [[ +https://github.com/nokia/ntt +Installation instructions can be found [here](https://github.com/nokia/ntt#Install). +Can be configured by passing a "settings" object to `ntt.setup{}`: +```lua +require('lspconfig').ntt.setup{ + settings = { + ntt = { + } + } +} +``` +]], + default_config = { + root_dir = [[util.root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nushell.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nushell.lua new file mode 100644 index 0000000..13bd34e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nushell.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nu', '--lsp' }, + filetypes = { 'nu' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/nushell/nushell + +Nushell built-in language server. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nxls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nxls.lua new file mode 100644 index 0000000..e3d3874 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/nxls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nxls', '--stdio' }, + filetypes = { 'json', 'jsonc' }, + root_dir = util.root_pattern('nx.json', '.git'), + }, + docs = { + description = [[ +https://github.com/nrwl/nx-console/tree/master/apps/nxls + +nxls, a language server for Nx Workspaces + +`nxls` can be installed via `npm`: +```sh +npm i -g nxls +``` +]], + default_config = { + root_dir = [[util.root_pattern]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamlls.lua new file mode 100644 index 0000000..8526f3e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamlls.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ocaml-language-server', '--stdio' }, + filetypes = { 'ocaml', 'reason' }, + root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json'), + }, + docs = { + description = [[ +https://github.com/ocaml-lsp/ocaml-language-server + +`ocaml-language-server` can be installed via `npm` +```sh +npm install -g ocaml-language-server +``` + ]], + default_config = { + root_dir = [[root_pattern("*.opam", "esy.json", "package.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamllsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamllsp.lua new file mode 100644 index 0000000..4f33c9a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ocamllsp.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +local language_id_of = { + menhir = 'ocaml.menhir', + ocaml = 'ocaml', + ocamlinterface = 'ocaml.interface', + ocamllex = 'ocaml.ocamllex', + reason = 'reason', + dune = 'dune', +} + +local get_language_id = function(_, ftype) + return language_id_of[ftype] +end + +return { + default_config = { + cmd = { 'ocamllsp' }, + filetypes = { 'ocaml', 'menhir', 'ocamlinterface', 'ocamllex', 'reason', 'dune' }, + root_dir = util.root_pattern('*.opam', 'esy.json', 'package.json', '.git', 'dune-project', 'dune-workspace'), + get_language_id = get_language_id, + }, + docs = { + description = [[ +https://github.com/ocaml/ocaml-lsp + +`ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation). + +To install the lsp server in a particular opam switch: +```sh +opam install ocaml-lsp-server +``` + ]], + default_config = { + root_dir = [[root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ols.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ols.lua new file mode 100644 index 0000000..6b890f6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ols.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ols' }, + filetypes = { 'odin' }, + root_dir = util.root_pattern('ols.json', '.git', '*.odin'), + }, + docs = { + description = [[ + https://github.com/DanielGavin/ols + + `Odin Language Server`. + ]], + default_config = { + root_dir = [[util.root_pattern("ols.json", ".git", "*.odin")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/omnisharp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/omnisharp.lua new file mode 100644 index 0000000..71af00a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/omnisharp.lua @@ -0,0 +1,144 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + settings = { + FormattingOptions = { + -- Enables support for reading code style, naming convention and analyzer + -- settings from .editorconfig. + EnableEditorConfigSupport = true, + -- Specifies whether 'using' directives should be grouped and sorted during + -- document formatting. + OrganizeImports = nil, + }, + MsBuild = { + -- 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. + LoadProjectsOnDemand = nil, + }, + RoslynExtensionsOptions = { + -- Enables support for roslyn analyzers, code fixes and rulesets. + EnableAnalyzersSupport = nil, + -- 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. + EnableImportCompletion = nil, + -- Only run analyzers against open files when 'enableRoslynAnalyzers' is + -- true + AnalyzeOpenDocumentsOnly = nil, + }, + Sdk = { + -- Specifies whether to include preview versions of the .NET SDK when + -- determining which version to use for project loading. + IncludePrereleases = true, + }, + }, + + filetypes = { 'cs', 'vb' }, + root_dir = util.root_pattern('*.sln', '*.csproj', 'omnisharp.json', 'function.json'), + on_new_config = function(new_config, _) + -- Get the initially configured value of `cmd` + new_config.cmd = { unpack(new_config.cmd or {}) } + + -- Append hard-coded command arguments + table.insert(new_config.cmd, '-z') -- https://github.com/OmniSharp/omnisharp-vscode/pull/4300 + vim.list_extend(new_config.cmd, { '--hostPID', tostring(vim.fn.getpid()) }) + table.insert(new_config.cmd, 'DotNet:enablePackageRestore=false') + vim.list_extend(new_config.cmd, { '--encoding', 'utf-8' }) + table.insert(new_config.cmd, '--languageserver') + + -- Append configuration-dependent command arguments + local function flatten(tbl) + local ret = {} + for k, v in pairs(tbl) do + if type(v) == 'table' then + for _, pair in ipairs(flatten(v)) do + ret[#ret + 1] = k .. ':' .. pair + end + else + ret[#ret + 1] = k .. '=' .. vim.inspect(v) + end + end + return ret + end + if new_config.settings then + vim.list_extend(new_config.cmd, flatten(new_config.settings)) + end + + -- Disable the handling of multiple workspaces in a single instance + new_config.capabilities = vim.deepcopy(new_config.capabilities) + new_config.capabilities.workspace.workspaceFolders = false -- https://github.com/OmniSharp/omnisharp-roslyn/issues/909 + end, + init_options = {}, + }, + docs = { + description = [[ +https://github.com/omnisharp/omnisharp-roslyn +OmniSharp server based on Roslyn workspaces + +`omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases). +OmniSharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp). + +OmniSharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. + +**By default, omnisharp-roslyn doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. + +For `go_to_definition` to work fully, extended `textDocument/definition` handler is needed, for example see [omnisharp-extended-lsp.nvim](https://github.com/Hoffs/omnisharp-extended-lsp.nvim) + +```lua +require'lspconfig'.omnisharp.setup { + cmd = { "dotnet", "/path/to/omnisharp/OmniSharp.dll" }, + + settings = { + FormattingOptions = { + -- Enables support for reading code style, naming convention and analyzer + -- settings from .editorconfig. + EnableEditorConfigSupport = true, + -- Specifies whether 'using' directives should be grouped and sorted during + -- document formatting. + OrganizeImports = nil, + }, + MsBuild = { + -- 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. + LoadProjectsOnDemand = nil, + }, + RoslynExtensionsOptions = { + -- Enables support for roslyn analyzers, code fixes and rulesets. + EnableAnalyzersSupport = nil, + -- 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. + EnableImportCompletion = nil, + -- Only run analyzers against open files when 'enableRoslynAnalyzers' is + -- true + AnalyzeOpenDocumentsOnly = nil, + }, + Sdk = { + -- Specifies whether to include preview versions of the .NET SDK when + -- determining which version to use for project loading. + IncludePrereleases = true, + }, + }, +} +``` +]], + default_config = { + root_dir = [[root_pattern("*.sln", "*.csproj", "omnisharp.json", "function.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/opencl_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/opencl_ls.lua new file mode 100644 index 0000000..dc88d24 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/opencl_ls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'opencl-language-server' }, + filetypes = { 'opencl' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/Galarius/opencl-language-server + +Build instructions can be found [here](https://github.com/Galarius/opencl-language-server/blob/main/_dev/build.md). + +Prebuilt binaries are available for Linux, macOS and Windows [here](https://github.com/Galarius/opencl-language-server/releases). +]], + default_config = { + root_dir = [[util.root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openedge_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openedge_ls.lua new file mode 100644 index 0000000..682b683 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openedge_ls.lua @@ -0,0 +1,55 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'progress' }, + root_dir = util.root_pattern 'openedge-project.json', + on_new_config = function(config) + if not config.cmd and config.oe_jar_path then + config.cmd = { + 'java', + '--add-opens=java.base/java.lang=ALL-UNNAMED', + '--add-opens=java.base/java.math=ALL-UNNAMED', + '--add-opens=java.base/java.util=ALL-UNNAMED', + '--add-opens=java.base/java.util.concurrent=ALL-UNNAMED', + '--add-opens=java.base/java.net=ALL-UNNAMED', + '--add-opens=java.base/java.text=ALL-UNNAMED', + } + if config.debug then + config.cmd[#config.cmd + 1] = '-Dorg.slf4j.simpleLogger.defaultLogLevel=DEBUG' + end + config.cmd[#config.cmd + 1] = '-jar' + config.cmd[#config.cmd + 1] = config.oe_jar_path + if config.dlc then + config.cmd[#config.cmd + 1] = '--dlc' + config.cmd[#config.cmd + 1] = config.dlc + end + if config.trace then + config.cmd[#config.cmd + 1] = '--trace' + end + end + end, + }, + docs = { + description = [[ +[Language server](https://github.com/vscode-abl/vscode-abl) for Progress OpenEdge ABL. + +For manual installation, download abl-lsp.jar from the [VSCode +extension](https://github.com/vscode-abl/vscode-abl/releases/latest). + +Configuration + +```lua +require('lspconfig').['openedge_ls'].setup { + oe_jar_path = '/path/to/abl-lsp.jar', + dlc = '12.2:/path/to/dlc-12.2', -- Version number and OpenEdge root directory (colon separator) + debug = false, -- Set to true for debug logging + trace = false -- Set to true for trace logging (REALLY verbose) +} +``` +]], + default_config = { + root_dir = [[root_pattern('openedge-project.json')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_ls.lua new file mode 100644 index 0000000..e5ca9ca --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_ls.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'openscad-language-server' }, + filetypes = { 'openscad' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [=[ +https://github.com/dzhu/openscad-language-server + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-language-server` binary with `cargo`: +```sh +cargo install openscad-language-server +``` + +Vim does not have built-in syntax for the `openscad` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.scad set filetype=openscad ]] +``` + +or by installing a filetype plugin such as https://github.com/sirtaj/vim-openscad +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_lsp.lua new file mode 100644 index 0000000..f00a377 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/openscad_lsp.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'openscad-lsp', '--stdio' }, + filetypes = { 'openscad' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [=[ +https://github.com/Leathong/openscad-LSP + +A Language Server Protocol server for OpenSCAD + +You can build and install `openscad-lsp` binary with `cargo`: +```sh +cargo install openscad-lsp +``` +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pact_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pact_ls.lua new file mode 100644 index 0000000..1eb8976 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pact_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pact-lsp' }, + filetypes = { 'pact' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/kadena-io/pact-lsp + +The Pact language server + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pasls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pasls.lua new file mode 100644 index 0000000..19ef848 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pasls.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pasls' }, + filetypes = { 'pascal' }, + root_dir = util.root_pattern('*.lpi', '*.lpk', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/genericptr/pascal-language-server + +An LSP server implementation for Pascal variants that are supported by Free Pascal, including Object Pascal. It uses CodeTools from Lazarus as backend. + +First set `cmd` to the Pascal lsp binary. + +Customization options are passed to pasls as environment variables for example in your `.bashrc`: +```bash +export FPCDIR='/usr/lib/fpc/src' # FPC source directory (This is the only required option for the server to work). +export PP='/usr/lib/fpc/3.2.2/ppcx64' # Path to the Free Pascal compiler executable. +export LAZARUSDIR='/usr/lib/lazarus' # Path to the Lazarus sources. +export FPCTARGET='' # Target operating system for cross compiling. +export FPCTARGETCPU='x86_64' # Target CPU for cross compiling. +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pbls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pbls.lua new file mode 100644 index 0000000..d1fbe22 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pbls.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pbls' }, + filetypes = { 'proto' }, + root_dir = util.root_pattern('.pbls.toml', '.git'), + }, + docs = { + description = [[ +https://git.sr.ht/~rrc/pbls + +Prerequisites: Ensure protoc is on your $PATH. + +`pbls` can be installed via `cargo install`: +```sh +cargo install --git https://git.sr.ht/~rrc/pbls +``` + +pbls is a Language Server for protobuf +]], + default_config = { + root_dir = [[root_pattern(".pbls.toml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlls.lua new file mode 100644 index 0000000..fba57d0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlls.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'perl', + '-MPerl::LanguageServer', + '-e', + 'Perl::LanguageServer::run', + '--', + '--port 13603', + '--nostdio 0', + }, + settings = { + perl = { + perlCmd = 'perl', + perlInc = ' ', + fileFilter = { '.pm', '.pl' }, + ignoreDirs = '.git', + }, + }, + filetypes = { 'perl' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/richterger/Perl-LanguageServer/tree/master/clients/vscode/perl + +`Perl-LanguageServer`, a language server for Perl. + +To use the language server, ensure that you have Perl::LanguageServer installed and perl command is on your path. +]], + default_config = { + root_dir = "vim's starting directory", + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlnavigator.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlnavigator.lua new file mode 100644 index 0000000..d3c8f7f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlnavigator.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'perlnavigator' }, + filetypes = { 'perl' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/bscan/PerlNavigator + +A Perl language server. It can be installed via npm: + +```sh +npm i -g perlnavigator-server +``` + +At minimum, you will need `perl` in your path. If you want to use a non-standard `perl` you will need to set your configuration like so: +```lua +settings = { + perlnavigator = { + perlPath = '/some/odd/location/my-perl' + } +} +``` + +The `contributes.configuration.properties` section of `perlnavigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `perlnavigator` at your `perltidy` and `perlcritic` configurations. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlpls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlpls.lua new file mode 100644 index 0000000..3326028 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/perlpls.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pls' }, + settings = { + perl = { + perlcritic = { enabled = false }, + syntax = { enabled = true }, + }, + }, + filetypes = { 'perl' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/FractalBoy/perl-language-server +https://metacpan.org/pod/PLS + +`PLS`, another language server for Perl. + +To use the language server, ensure that you have PLS installed and that it is in your path +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pest_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pest_ls.lua new file mode 100644 index 0000000..4a56ea9 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pest_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pest-language-server' }, + filetypes = { 'pest' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/pest-parser/pest-ide-tools + +Language server for pest grammars. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phan.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phan.lua new file mode 100644 index 0000000..bb5242e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phan.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' + +local cmd = { + 'phan', + '-m', + 'json', + '--no-color', + '--no-progress-bar', + '-x', + '-u', + '-S', + '--language-server-on-stdin', + '--allow-polyfill-parser', +} + +return { + default_config = { + cmd = cmd, + filetypes = { 'php' }, + single_file_support = true, + root_dir = function(pattern) + local cwd = vim.loop.cwd() + local root = util.root_pattern('composer.json', '.git')(pattern) + + -- prefer cwd if root is a descendant + return util.path.is_descendant(cwd, root) and cwd or root + end, + }, + docs = { + description = [[ +https://github.com/phan/phan + +Installation: https://github.com/phan/phan#getting-started +]], + default_config = { + cmd = cmd, + root_dir = [[root_pattern("composer.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phpactor.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phpactor.lua new file mode 100644 index 0000000..b3c4009 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/phpactor.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'phpactor', 'language-server' }, + filetypes = { 'php' }, + root_dir = function(pattern) + local cwd = vim.loop.cwd() + local root = util.root_pattern('composer.json', '.git', '.phpactor.json', '.phpactor.yml')(pattern) + + -- prefer cwd if root is a descendant + return util.path.is_descendant(cwd, root) and cwd or root + end, + }, + docs = { + description = [[ +https://github.com/phpactor/phpactor + +Installation: https://phpactor.readthedocs.io/en/master/usage/standalone.html#global-installation +]], + default_config = { + cmd = { 'phpactor', 'language-server' }, + root_dir = [[root_pattern("composer.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pico8_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pico8_ls.lua new file mode 100644 index 0000000..0da26b7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pico8_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pico8-ls', '--stdio' }, + filetypes = { 'p8' }, + root_dir = util.root_pattern '*.p8', + settings = {}, + }, + docs = { + description = [[ +https://github.com/japhib/pico8-ls + +Full language support for the PICO-8 dialect of Lua. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pkgbuild_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pkgbuild_language_server.lua new file mode 100644 index 0000000..d3c9f31 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pkgbuild_language_server.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pkgbuild-language-server' }, + filetypes = { 'PKGBUILD' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/Freed-Wu/pkgbuild-language-server + +Language server for ArchLinux/Windows Msys2's PKGBUILD. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/please.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/please.lua new file mode 100644 index 0000000..085d1e7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/please.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'plz', 'tool', 'lps' }, + filetypes = { 'bzl' }, + root_dir = util.root_pattern '.plzconfig', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/thought-machine/please + +High-performance extensible build system for reproducible multi-language builds. + +The `plz` binary will automatically install the LSP for you on first run +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/postgres_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/postgres_lsp.lua new file mode 100644 index 0000000..a45824a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/postgres_lsp.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'postgres_lsp' }, + filetypes = { 'sql' }, + root_dir = util.root_pattern 'root-file.txt', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/supabase/postgres_lsp + +A Language Server for Postgres + ]], + default_config = { + root_dir = [[util.root_pattern 'root-file.txt']], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/powershell_es.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/powershell_es.lua new file mode 100644 index 0000000..d4cb744 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/powershell_es.lua @@ -0,0 +1,72 @@ +local util = require 'lspconfig.util' + +local temp_path = vim.fn.stdpath 'cache' + +local function make_cmd(new_config) + if new_config.bundle_path ~= nil then + local command_fmt = + [[& '%s/PowerShellEditorServices/Start-EditorServices.ps1' -BundledModulesPath '%s' -LogPath '%s/powershell_es.log' -SessionDetailsPath '%s/powershell_es.session.json' -FeatureFlags @() -AdditionalModules @() -HostName nvim -HostProfileId 0 -HostVersion 1.0.0 -Stdio -LogLevel Normal]] + local command = command_fmt:format(new_config.bundle_path, new_config.bundle_path, temp_path, temp_path) + return { new_config.shell, '-NoLogo', '-NoProfile', '-Command', command } + end +end + +return { + default_config = { + shell = 'pwsh', + on_new_config = function(new_config, _) + -- Don't overwrite cmd if already set + if not new_config.cmd then + new_config.cmd = make_cmd(new_config) + end + end, + + filetypes = { 'ps1' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/PowerShell/PowerShellEditorServices + +Language server for PowerShell. + +To install, download and extract PowerShellEditorServices.zip +from the [releases](https://github.com/PowerShell/PowerShellEditorServices/releases). +To configure the language server, set the property `bundle_path` to the root +of the extracted PowerShellEditorServices.zip. + +The default configuration doesn't set `cmd` unless `bundle_path` is specified. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', +} +``` + +By default the languageserver is started in `pwsh` (PowerShell Core). This can be changed by specifying `shell`. + +```lua +require'lspconfig'.powershell_es.setup{ + bundle_path = 'c:/w/PowerShellEditorServices', + shell = 'powershell.exe', +} +``` + +Note that the execution policy needs to be set to `Unrestricted` for the languageserver run under PowerShell + +If necessary, specific `cmd` can be defined instead of `bundle_path`. +See [PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices#stdio) +to learn more. + +```lua +require'lspconfig'.powershell_es.setup{ + cmd = {'pwsh', '-NoLogo', '-NoProfile', '-Command', "c:/PSES/Start-EditorServices.ps1 ..."} +} +``` +]], + default_config = { + root_dir = 'git root or current directory', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prismals.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prismals.lua new file mode 100644 index 0000000..16d252e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prismals.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'prisma-language-server', '--stdio' }, + filetypes = { 'prisma' }, + settings = { + prisma = { + prismaFmtBinPath = '', + }, + }, + root_dir = util.root_pattern('.git', 'package.json'), + }, + docs = { + description = [[ +Language Server for the Prisma JavaScript and TypeScript ORM + +`@prisma/language-server` can be installed via npm +```sh +npm install -g @prisma/language-server +``` +]], + default_config = { + root_dir = [[root_pattern(".git", "package.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prolog_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prolog_ls.lua new file mode 100644 index 0000000..91b4ba3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prolog_ls.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'swipl', + '-g', + 'use_module(library(lsp_server)).', + '-g', + 'lsp_server:main', + '-t', + 'halt', + '--', + 'stdio', + }, + filetypes = { 'prolog' }, + root_dir = util.root_pattern 'pack.pl', + single_file_support = true, + }, + docs = { + description = [[ + https://github.com/jamesnvc/lsp_server + + Language Server Protocol server for SWI-Prolog + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prosemd_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prosemd_lsp.lua new file mode 100644 index 0000000..048e4b4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/prosemd_lsp.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'prosemd-lsp', '--stdio' }, + filetypes = { 'markdown' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/kitten/prosemd-lsp + +An experimental LSP for Markdown. + +Please see the manual installation instructions: https://github.com/kitten/prosemd-lsp#manual-installation +]], + default_config = { + root_dir = util.find_git_ancestor, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/protols.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/protols.lua new file mode 100644 index 0000000..2df30b0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/protols.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'protols' }, + filetypes = { 'proto' }, + single_file_support = true, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/coder3101/protols + +`protols` can be installed via `cargo`: +```sh +cargo install protols +``` + +A Language Server for proto3 files. It uses tree-sitter and runs in single file mode. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/psalm.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/psalm.lua new file mode 100644 index 0000000..f0f25f2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/psalm.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'psalm', '--language-server' }, + filetypes = { 'php' }, + root_dir = util.root_pattern('psalm.xml', 'psalm.xml.dist'), + }, + docs = { + description = [[ +https://github.com/vimeo/psalm + +Can be installed with composer. +```sh +composer global require vimeo/psalm +``` +]], + default_config = { + cmd = { 'psalm', '--language-server' }, + root_dir = [[root_pattern("psalm.xml", "psalm.xml.dist")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pug.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pug.lua new file mode 100644 index 0000000..28f7db6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pug.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pug-lsp' }, + filetypes = { 'pug' }, + root_dir = util.find_package_json_ancestor, + }, + docs = { + description = [[ +https://github.com/opa-oz/pug-lsp + +An implementation of the Language Protocol Server for [Pug.js](http://pugjs.org) + +PugLSP can be installed via `go get github.com/opa-oz/pug-lsp`, or manually downloaded from [releases page](https://github.com/opa-oz/pug-lsp/releases) + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/puppet.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/puppet.lua new file mode 100644 index 0000000..18a1532 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/puppet.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'manifests', + '.puppet-lint.rc', + 'hiera.yaml', + '.git', +} + +return { + default_config = { + cmd = { 'puppet-languageserver', '--stdio' }, + filetypes = { 'puppet' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + }, + docs = { + description = [[ +LSP server for Puppet. + +Installation: + +- Clone the editor-services repository: + https://github.com/puppetlabs/puppet-editor-services + +- Navigate into that directory and run: `bundle install` + +- Install the 'puppet-lint' gem: `gem install puppet-lint` + +- Add that repository to $PATH. + +- Ensure you can run `puppet-languageserver` from outside the editor-services directory. +]], + default_config = { + root_dir = [[root_pattern("manifests", ".puppet-lint.rc", "hiera.yaml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/purescriptls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/purescriptls.lua new file mode 100644 index 0000000..baed504 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/purescriptls.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'purescript-language-server', '--stdio' }, + filetypes = { 'purescript' }, + root_dir = util.root_pattern( + 'bower.json', + 'flake.nix', + 'psc-package.json', + 'shell.nix', + 'spago.dhall', + 'spago.yaml' + ), + }, + docs = { + description = [[ +https://github.com/nwolverson/purescript-language-server + +The `purescript-language-server` can be added to your project and `$PATH` via + +* JavaScript package manager such as npm, pnpm, Yarn, et al. +* Nix under the `nodePackages` and `nodePackages_latest` package sets +]], + default_config = { + root_dir = [[root_pattern('bower.json', 'flake.nix', 'psc-package.json', 'shell.nix', 'spago.dhall', 'spago.yaml'),]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylsp.lua new file mode 100644 index 0000000..d76b2ea --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylsp.lua @@ -0,0 +1,48 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pylsp' }, + filetypes = { 'python' }, + root_dir = function(fname) + local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + } + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/python-lsp/python-lsp-server + +A Python 3.6+ implementation of the Language Server Protocol. + +See the [project's README](https://github.com/python-lsp/python-lsp-server) for installation instructions. + +Configuration options are documented [here](https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md). +In order to configure an option, it must be translated to a nested Lua table and included in the `settings` argument to the `setup{}` function. +For example, in order to set the `pylsp.plugins.pycodestyle.ignore` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + } + } + } + } +} +``` + +Note: This is a community fork of `pyls`. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylyzer.lua new file mode 100644 index 0000000..34a4914 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pylyzer.lua @@ -0,0 +1,34 @@ +local util = require('lspconfig').util + +return { + default_config = { + cmd = { 'pylyzer', '--server' }, + filetypes = { 'python' }, + root_dir = function(fname) + local root_files = { + 'setup.py', + 'tox.ini', + 'requirements.txt', + 'Pipfile', + 'pyproject.toml', + } + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + settings = { + python = { + diagnostics = true, + inlayHints = true, + smartCompletion = true, + checkOnType = false, + }, + }, + }, + docs = { + description = [[ + https://github.com/mtshiba/pylyzer + + `pylyzer`, a fast static code analyzer & language server for Python. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyre.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyre.lua new file mode 100644 index 0000000..5c2f8fb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyre.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'pyre', 'persistent' }, + filetypes = { 'python' }, + root_dir = util.root_pattern '.pyre_configuration', + }, + docs = { + description = [[ +https://pyre-check.org/ + +`pyre` a static type checker for Python 3. + +`pyre` offers an extremely limited featureset. It currently only supports diagnostics, +which are triggered on save. + +Do not report issues for missing features in `pyre` to `lspconfig`. + +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyright.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyright.lua new file mode 100644 index 0000000..51681df --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/pyright.lua @@ -0,0 +1,80 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', + '.git', +} + +local function organize_imports() + local params = { + command = 'pyright.organizeimports', + arguments = { vim.uri_from_bufnr(0) }, + } + + local clients = util.get_lsp_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'pyright', + } + for _, client in ipairs(clients) do + client.request('workspace/executeCommand', params, nil, 0) + end +end + +local function set_python_path(path) + local clients = util.get_lsp_clients { + bufnr = vim.api.nvim_get_current_buf(), + name = 'pyright', + } + for _, client in ipairs(clients) do + if client.settings then + client.settings.python = vim.tbl_deep_extend('force', client.settings.python, { pythonPath = path }) + else + client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } }) + end + client.notify('workspace/didChangeConfiguration', { settings = nil }) + end +end + +return { + default_config = { + cmd = { 'pyright-langserver', '--stdio' }, + filetypes = { 'python' }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) + end, + single_file_support = true, + settings = { + python = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = 'openFilesOnly', + }, + }, + }, + }, + commands = { + PyrightOrganizeImports = { + organize_imports, + description = 'Organize Imports', + }, + PyrightSetPythonPath = { + set_python_path, + description = 'Reconfigure pyright with the provided python path', + nargs = 1, + complete = 'file', + }, + }, + docs = { + description = [[ +https://github.com/microsoft/pyright + +`pyright`, a static type checker and language server for python +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qml_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qml_lsp.lua new file mode 100644 index 0000000..0f334a3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qml_lsp.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'qml-lsp' }, + filetypes = { 'qmljs' }, + root_dir = util.root_pattern '*.qml', + }, + docs = { + description = [[ +https://invent.kde.org/sdk/qml-lsp + +LSP implementation for QML (autocompletion, live linting, etc. in editors) + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qmlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qmlls.lua new file mode 100644 index 0000000..b045159 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/qmlls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'qmlls' }, + filetypes = { 'qml', 'qmljs' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/qt/qtdeclarative + +LSP implementation for QML (autocompletion, live linting, etc. in editors), + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/quick_lint_js.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/quick_lint_js.lua new file mode 100644 index 0000000..762a816 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/quick_lint_js.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'quick-lint-js', '--lsp-server' }, + filetypes = { 'javascript', 'typescript' }, + root_dir = util.root_pattern('package.json', 'jsconfig.json', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://quick-lint-js.com/ + +quick-lint-js finds bugs in JavaScript programs. + +See installation [instructions](https://quick-lint-js.com/install/) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/r_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/r_language_server.lua new file mode 100644 index 0000000..bd31539 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/r_language_server.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'R', '--no-echo', '-e', 'languageserver::run()' }, + filetypes = { 'r', 'rmd' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) or vim.loop.os_homedir() + end, + log_level = vim.lsp.protocol.MessageType.Warning, + }, + docs = { + description = [[ +[languageserver](https://github.com/REditorSupport/languageserver) is an +implementation of the Microsoft's Language Server Protocol for the R +language. + +It is released on CRAN and can be easily installed by + +```r +install.packages("languageserver") +``` +]], + default_config = { + root_dir = [[root_pattern(".git") or os_homedir]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/racket_langserver.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/racket_langserver.lua new file mode 100644 index 0000000..25bd0ab --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/racket_langserver.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'racket', '--lib', 'racket-langserver' }, + filetypes = { 'racket', 'scheme' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +[https://github.com/jeapostrophe/racket-langserver](https://github.com/jeapostrophe/racket-langserver) + +The Racket language server. This project seeks to use +[DrRacket](https://github.com/racket/drracket)'s public API to provide +functionality that mimics DrRacket's code tools as closely as possible. + +Install via `raco`: `raco pkg install racket-langserver` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/raku_navigator.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/raku_navigator.lua new file mode 100644 index 0000000..26ff321 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/raku_navigator.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = {}, + filetypes = { 'raku' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/bscan/RakuNavigator +A Raku language server +**By default, raku_navigator doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. +You have to install the language server manually. +Clone the RakuNavigator repo, install based on the [instructions](https://github.com/bscan/raku_Navigator#installation-for-other-editors), +and point `cmd` to `server.js` inside the `server/out` directory: +```lua +cmd = {'node', '/server/out/server.js', '--stdio'} +``` +At minimum, you will need `raku` in your path. If you want to use a non-standard `raku` you will need to set your configuration like so: +```lua +settings = { + raku_navigator = { + rakuPath = '/some/odd/location/my-raku' + } +} +``` +The `contributes.configuration.properties` section of `raku_navigator`'s `package.json` has all available configuration settings. All +settings have a reasonable default, but, at minimum, you may want to point `raku_navigator` at your `raku_tidy` and `raku_critic` configurations. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/reason_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/reason_ls.lua new file mode 100644 index 0000000..75028c7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/reason_ls.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'reason-language-server' }, + filetypes = { 'reason' }, + root_dir = util.root_pattern('bsconfig.json', '.git'), + }, + docs = { + description = [[ +Reason language server + +You can install reason language server from [reason-language-server](https://github.com/jaredly/reason-language-server) repository. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regal.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regal.lua new file mode 100644 index 0000000..24ec092 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regal.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'regal', 'language-server' }, + filetypes = { 'rego' }, + root_dir = function(fname) + return util.root_pattern '*.rego'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/StyraInc/regal + +A linter for Rego, with support for running as an LSP server. + +`regal` can be installed by running: +```sh +go install github.com/StyraInc/regal@latest +``` + ]], + default_config = { + root_dir = [[root_pattern("*.rego", ".git")]], + single_file_support = true, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regols.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regols.lua new file mode 100644 index 0000000..f872a52 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/regols.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'regols' }, + filetypes = { 'rego' }, + root_dir = function(fname) + return util.root_pattern '*.rego'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/kitagry/regols + +OPA Rego language server. + +`regols` can be installed by running: +```sh +go install github.com/kitagry/regols@latest +``` + ]], + default_config = { + root_dir = [[root_pattern("*.rego", ".git")]], + single_file_support = true, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/relay_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/relay_lsp.lua new file mode 100644 index 0000000..acaa617 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/relay_lsp.lua @@ -0,0 +1,110 @@ +local util = require 'lspconfig.util' +local log = require 'vim.lsp.log' + +return { + default_config = { + -- (default: false) Whether or not we should automatically start the + -- Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + -- (default: nil) Path to a relay config relative to the `root_dir`. + -- Without this, the compiler will search for your config. This is + -- helpful if your relay project is in a nested directory. + path_to_config = nil, + + cmd = { 'relay-compiler', 'lsp' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'javascript.jsx', + 'typescript', + 'typescriptreact', + 'typescript.tsx', + }, + root_dir = util.root_pattern('relay.config.*', 'package.json'), + on_new_config = function(config, root_dir) + local project_root = util.find_node_modules_ancestor(root_dir) + local node_bin_path = util.path.join(project_root, 'node_modules', '.bin') + local compiler_cmd = { util.path.join(node_bin_path, 'relay-compiler'), '--watch' } + local path = node_bin_path .. util.path.path_separator .. vim.env.PATH + if config.cmd_env then + config.cmd_env.PATH = path + else + config.cmd_env = { PATH = path } + end + + if config.path_to_config then + config.path_to_config = util.path.sanitize(config.path_to_config) + local path_to_config = util.path.join(root_dir, config.path_to_config) + if util.path.exists(path_to_config) then + vim.list_extend(config.cmd, { config.path_to_config }) + vim.list_extend(compiler_cmd, { config.path_to_config }) + else + log.error "[Relay LSP] Can't find Relay config file. Fallback to the default location..." + end + end + if config.auto_start_compiler then + vim.fn.jobstart(compiler_cmd, { + on_exit = function() + log.info '[Relay LSP] Relay Compiler exited' + end, + cwd = project_root, + }) + end + end, + handlers = { + ['window/showStatus'] = function(_, result) + if not result then + return {} + end + local log_message = string.format('[Relay LSP] %q', result.message) + if result.type == 1 then + log.error(log_message) + end + if result.type == 2 then + log.warn(log_message) + end + if result.type == 3 then + log.info(log_message) + end + return {} + end, + }, + }, + docs = { + description = [[ + https://github.com/facebook/relay + `Relay` is a JavaScript framework for building data-driven React applications + + Setup: + + - Make sure you have a Relay config file somewhere in your project. + - We support standard config file formats (`.yml`, `.js`, `.json`), and the the `relay` field in your `package.json` + - Make sure you have the `relay-compiler` installed in your project. The bare minimum is v13. + - Make sure you are able to run the `relay-compiler` command from the command line. If `yarn relay-compiler` works, it's very likely that the LSP will work. + - Remove / disable any conflicting GraphQL LSPs you have installed. + + Relay LSP is a part of the Relay Compiler binary and available when adding `relay-compiler` to your project's devDependencies. + + ```lua + require'lspconfig'.relay_lsp.setup { + -- (default: false) Whether or not we should automatically start + -- the Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + + -- (default: null) Path to a relay config relative to the + -- `root_dir`. Without this, the compiler will search for your + -- config. This is helpful if your relay project is in a nested + -- directory. + path_to_config = nil, + } + ``` + ]], + default_config = { + root_dir = [[root_pattern("relay.config.*", "package.json")]], + auto_start_compiler = false, + path_to_config = nil, + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/remark_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/remark_ls.lua new file mode 100644 index 0000000..54eabe7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/remark_ls.lua @@ -0,0 +1,52 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'remark-language-server', '--stdio' }, + filetypes = { 'markdown' }, + root_dir = util.root_pattern( + '.remarkrc', + '.remarkrc.json', + '.remarkrc.js', + '.remarkrc.cjs', + '.remarkrc.mjs', + '.remarkrc.yml', + '.remarkrc.yaml', + '.remarkignore' + ), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/remarkjs/remark-language-server + +`remark-language-server` can be installed via `npm`: +```sh +npm install -g remark-language-server +``` + +`remark-language-server` uses the same +[configuration files](https://github.com/remarkjs/remark/tree/main/packages/remark-cli#example-config-files-json-yaml-js) +as `remark-cli`. + +This uses a plugin based system. Each plugin needs to be installed locally using `npm` or `yarn`. + +For example, given the following `.remarkrc.json`: + +```json +{ + "presets": [ + "remark-preset-lint-recommended" + ] +} +``` + +`remark-preset-lint-recommended` needs to be installed in the local project: + +```sh +npm install remark-preset-lint-recommended +``` + +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rescriptls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rescriptls.lua new file mode 100644 index 0000000..f7869b3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rescriptls.lua @@ -0,0 +1,52 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rescript-language-server', '--stdio' }, + filetypes = { 'rescript' }, + root_dir = util.root_pattern('bsconfig.json', 'rescript.json', '.git'), + settings = {}, + init_options = { + extensionConfiguration = { + -- buggy, prompts much too often, superseded by incrementalTypechecking, below + askToStartBuild = false, + + allowBuiltInFormatter = true, -- lower latency + incrementalTypechecking = { -- removes the need for external build process + enabled = true, + acrossFiles = true, + }, + cache = { projectConfig = { enabled = true } }, -- speed up latency dramatically + codeLens = true, + inlayHints = { enable = true }, + }, + }, + }, + docs = { + description = [[ +https://github.com/rescript-lang/rescript-vscode/tree/master/server + +ReScript Language Server can be installed via npm: +```sh +npm install -g @rescript/language-server +``` + +See [package.json](https://github.com/rescript-lang/rescript-vscode/blob/master/package.json#L139) +for init_options supported. + +For example, in order to disable the `inlayHints` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + rescript = { + settings = { + inlayHints = { enable = false }, + }, + }, + } +} +``` +]], + root_dir = [[root_pattern('bsconfig.json', 'rescript.json', '.git')]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rls.lua new file mode 100644 index 0000000..363b81d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rls.lua @@ -0,0 +1,42 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rls' }, + filetypes = { 'rust' }, + root_dir = util.root_pattern 'Cargo.toml', + }, + docs = { + description = [[ +https://github.com/rust-lang/rls + +rls, a language server for Rust + +See https://github.com/rust-lang/rls#setup to setup rls itself. +See https://github.com/rust-lang/rls#configuration for rls-specific settings. +All settings listed on the rls configuration section of the readme +must be set under settings.rust as follows: + +```lua +nvim_lsp.rls.setup { + settings = { + rust = { + unstable_features = true, + build_on_save = false, + all_features = true, + }, + }, +} +``` + +If you want to use rls for a particular build, eg nightly, set cmd as follows: + +```lua +cmd = {"rustup", "run", "nightly", "rls"} +``` + ]], + default_config = { + root_dir = [[root_pattern("Cargo.toml")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rnix.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rnix.lua new file mode 100644 index 0000000..aa7f00e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rnix.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rnix-lsp' }, + filetypes = { 'nix' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) or vim.loop.os_homedir() + end, + settings = {}, + init_options = {}, + }, + docs = { + description = [[ +https://github.com/nix-community/rnix-lsp + +A language server for Nix providing basic completion and formatting via nixpkgs-fmt. + +To install manually, run `cargo install rnix-lsp`. If you are using nix, rnix-lsp is in nixpkgs. + +This server accepts configuration via the `settings` key. + + ]], + default_config = { + root_dir = "vim's starting directory", + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/robotframework_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/robotframework_ls.lua new file mode 100644 index 0000000..d1c25f5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/robotframework_ls.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'robotframework_ls' }, + filetypes = { 'robot' }, + root_dir = function(fname) + return util.root_pattern('robotidy.toml', 'pyproject.toml', 'conda.yaml', 'robot.yaml')(fname) + or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/robocorp/robotframework-lsp + +Language Server Protocol implementation for Robot Framework. +]], + default_config = { + root_dir = "util.root_pattern('robotidy.toml', 'pyproject.toml', 'conda.yaml', 'robot.yaml')(fname)" + .. '\n or util.find_git_ancestor(fname)', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/roc_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/roc_ls.lua new file mode 100644 index 0000000..6737736 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/roc_ls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'roc_language_server' }, + filetypes = { 'roc' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/roc-lang/roc/tree/main/crates/language_server#roc_language_server + +The built-in language server for the Roc programming language. +[Installation](https://github.com/roc-lang/roc/tree/main/crates/language_server#installing) +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rome.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rome.lua new file mode 100644 index 0000000..ed23a18 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rome.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rome', 'lsp-proxy' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'json', + 'typescript', + 'typescript.tsx', + 'typescriptreact', + }, + root_dir = function(fname) + return util.find_package_json_ancestor(fname) + or util.find_node_modules_ancestor(fname) + or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://rome.tools + +Language server for the Rome Frontend Toolchain. + +(Unmaintained, use [Biome](https://biomejs.dev/blog/annoucing-biome) instead.) + +```sh +npm install [-g] rome +``` +]], + default_config = { + root_dir = [[root_pattern('package.json', 'node_modules', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rubocop.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rubocop.lua new file mode 100644 index 0000000..0d2cd29 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rubocop.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rubocop', '--lsp' }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://github.com/rubocop/rubocop + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruby_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruby_lsp.lua new file mode 100644 index 0000000..dad56e6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruby_lsp.lua @@ -0,0 +1,33 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ruby-lsp' }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + init_options = { + formatter = 'auto', + }, + single_file_support = true, + }, + docs = { + description = [[ +https://shopify.github.io/ruby-lsp/ + +This gem is an implementation of the language server protocol specification for +Ruby, used to improve editor features. + +Install the gem. There's no need to require it, since the server is used as a +standalone executable. + +```sh +group :development do + gem "ruby-lsp", require: false +end +``` + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff.lua new file mode 100644 index 0000000..1e63c14 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff.lua @@ -0,0 +1,48 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'ruff.toml', + '.ruff.toml', +} + +return { + default_config = { + cmd = { 'ruff', 'server' }, + filetypes = { 'python' }, + root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/astral-sh/ruff + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`. + +```sh +pip install ruff +``` + +**Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.** + +This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice. + +Server settings can be provided via: + +```lua +require('lspconfig').ruff.setup({ + init_options = { + settings = { + -- Server settings should go here + } + } +}) +``` + +Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details. + + ]], + root_dir = [[root_pattern("pyproject.toml", "ruff.toml", ".ruff.toml", ".git")]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff_lsp.lua new file mode 100644 index 0000000..1a10285 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ruff_lsp.lua @@ -0,0 +1,42 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'ruff.toml', +} + +return { + default_config = { + cmd = { 'ruff-lsp' }, + filetypes = { 'python' }, + root_dir = util.root_pattern(unpack(root_files)) or util.find_git_ancestor(), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/astral-sh/ruff-lsp + +A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code transformation tool, written in Rust. It can be installed via pip. + +```sh +pip install ruff-lsp +``` + +Extra CLI arguments for `ruff` can be provided via + +```lua +require'lspconfig'.ruff_lsp.setup{ + init_options = { + settings = { + -- Any extra CLI arguments for `ruff` go here. + args = {}, + } + } +} +``` + + ]], + root_dir = [[root_pattern("pyproject.toml", "ruff.toml", ".git")]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rune_languageserver.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rune_languageserver.lua new file mode 100644 index 0000000..7f51047 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rune_languageserver.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'rune-languageserver' }, + filetypes = { 'rune' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://crates.io/crates/rune-languageserver + +A language server for the [Rune](https://rune-rs.github.io/) Language, +an embeddable dynamic programming language for Rust + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rust_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rust_analyzer.lua new file mode 100644 index 0000000..13a3620 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/rust_analyzer.lua @@ -0,0 +1,122 @@ +local util = require 'lspconfig.util' +local async = require 'lspconfig.async' + +local function reload_workspace(bufnr) + bufnr = util.validate_bufnr(bufnr) + local clients = util.get_lsp_clients { bufnr = bufnr, name = 'rust_analyzer' } + for _, client in ipairs(clients) do + vim.notify 'Reloading Cargo Workspace' + client.request('rust-analyzer/reloadWorkspace', nil, function(err) + if err then + error(tostring(err)) + end + vim.notify 'Cargo workspace reloaded' + end, 0) + end +end + +local function is_library(fname) + local user_home = util.path.sanitize(vim.env.HOME) + local cargo_home = os.getenv 'CARGO_HOME' or util.path.join(user_home, '.cargo') + local registry = util.path.join(cargo_home, 'registry', 'src') + local git_registry = util.path.join(cargo_home, 'git', 'checkouts') + + local rustup_home = os.getenv 'RUSTUP_HOME' or util.path.join(user_home, '.rustup') + local toolchains = util.path.join(rustup_home, 'toolchains') + + for _, item in ipairs { toolchains, registry, git_registry } do + if util.path.is_descendant(item, fname) then + local clients = util.get_lsp_clients { name = 'rust_analyzer' } + return #clients > 0 and clients[#clients].config.root_dir or nil + end + end +end + +return { + default_config = { + cmd = { 'rust-analyzer' }, + filetypes = { 'rust' }, + single_file_support = true, + root_dir = function(fname) + local reuse_active = is_library(fname) + if reuse_active then + return reuse_active + end + + local cargo_crate_dir = util.root_pattern 'Cargo.toml'(fname) + local cargo_workspace_root + + if cargo_crate_dir ~= nil then + local cmd = { + 'cargo', + 'metadata', + '--no-deps', + '--format-version', + '1', + '--manifest-path', + util.path.join(cargo_crate_dir, 'Cargo.toml'), + } + + local result = async.run_command(cmd) + + if result and result[1] then + result = vim.json.decode(table.concat(result, '')) + if result['workspace_root'] then + cargo_workspace_root = util.path.sanitize(result['workspace_root']) + end + end + end + + return cargo_workspace_root + or cargo_crate_dir + or util.root_pattern 'rust-project.json'(fname) + or util.find_git_ancestor(fname) + end, + capabilities = { + experimental = { + serverStatusNotification = true, + }, + }, + before_init = function(init_params, config) + -- See https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26 + if config.settings and config.settings['rust-analyzer'] then + init_params.initializationOptions = config.settings['rust-analyzer'] + end + end, + }, + commands = { + CargoReload = { + function() + reload_workspace(0) + end, + description = 'Reload current cargo workspace', + }, + }, + docs = { + description = [[ +https://github.com/rust-lang/rust-analyzer + +rust-analyzer (aka rls 2.0), a language server for Rust + + +See [docs](https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc) for extra settings. The settings can be used like this: +```lua +require'lspconfig'.rust_analyzer.setup{ + settings = { + ['rust-analyzer'] = { + diagnostics = { + enable = false; + } + } + } +} +``` + +Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per +https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26. + ]], + default_config = { + root_dir = [[root_pattern("Cargo.toml", "rust-project.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/salt_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/salt_ls.lua new file mode 100644 index 0000000..65d1d32 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/salt_ls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'salt_lsp_server' }, + filetypes = { 'sls' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +Language server for Salt configuration files. +https://github.com/dcermak/salt-lsp + +The language server can be installed with `pip`: +```sh +pip install salt-lsp +``` + ]], + default_config = { + root_dir = [[root_pattern('.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scheme_langserver.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scheme_langserver.lua new file mode 100644 index 0000000..ceaa932 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scheme_langserver.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' +local cmd = { 'scheme-langserver', '~/.scheme-langserver.log', 'enable', 'disable' } +local root_files = { + 'Akku.manifest', + '.git', +} + +return { + default_config = { + cmd = cmd, + filetypes = { 'scheme' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/ufo5260987423/scheme-langserver +`scheme-langserver`, a language server protocol implementation for scheme. +And for nvim user, please add .sls to scheme file extension list. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scry.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scry.lua new file mode 100644 index 0000000..8350a43 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/scry.lua @@ -0,0 +1,22 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'scry' }, + filetypes = { 'crystal' }, + root_dir = function(fname) + return util.root_pattern 'shard.yml'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/crystal-lang-tools/scry + +Crystal language server. +]], + default_config = { + root_dir = [[root_pattern('shard.yml', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/serve_d.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/serve_d.lua new file mode 100644 index 0000000..09d1b10 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/serve_d.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'serve-d' }, + filetypes = { 'd' }, + root_dir = util.root_pattern('dub.json', 'dub.sdl', '.git'), + }, + docs = { + description = [[ + https://github.com/Pure-D/serve-d + + `Microsoft language server protocol implementation for D using workspace-d.` + Download a binary from https://github.com/Pure-D/serve-d/releases and put it in your $PATH. + ]], + default_config = { + root_dir = [[util.root_pattern("dub.json", "dub.sdl", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/shopify_theme_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/shopify_theme_ls.lua new file mode 100644 index 0000000..22e66fd --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/shopify_theme_ls.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +local root_files = { + '.shopifyignore', + '.theme-check.yml', + '.theme-check.yaml', + 'shopify.theme.toml', +} + +return { + default_config = { + cmd = { + 'shopify', + 'theme', + 'language-server', + }, + filetypes = { 'liquid' }, + root_dir = util.root_pattern(unpack(root_files)), + settings = {}, + }, + docs = { + description = [[ +https://shopify.dev/docs/api/shopify-cli + +[Language Server](https://shopify.dev/docs/themes/tools/cli/language-server) and Theme Check (linter) for Shopify themes. + +`shopify` can be installed via npm `npm install -g @shopify/cli`. + +Note: This LSP already includes Theme Check so you don't need to use the `theme_check` server configuration as well. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sixtyfps.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sixtyfps.lua new file mode 100644 index 0000000..da90fe3 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sixtyfps.lua @@ -0,0 +1,28 @@ +return { + default_config = { + cmd = { 'sixtyfps-lsp' }, + filetypes = { 'sixtyfps' }, + single_file_support = true, + }, + docs = { + description = [=[ +https://github.com/sixtyfpsui/sixtyfps +`SixtyFPS`'s language server + +You can build and install `sixtyfps-lsp` binary with `cargo`: +```sh +cargo install sixtyfps-lsp +``` + +Vim does not have built-in syntax for the `sixtyfps` filetype currently. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.60 set filetype=sixtyfps ]] +``` + +or by installing a filetype plugin such as https://github.com/RustemB/sixtyfps-vim +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slangd.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slangd.lua new file mode 100644 index 0000000..642b4dd --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slangd.lua @@ -0,0 +1,44 @@ +local util = require 'lspconfig.util' +local bin_name = 'slangd' + +if vim.fn.has 'win32' == 1 then + bin_name = 'slangd.exe' +end + +return { + default_config = { + cmd = { bin_name }, + filetypes = { 'hlsl', 'shaderslang' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/shader-slang/slang + +The `slangd` binary can be downloaded as part of [slang releases](https://github.com/shader-slang/slang/releases) or +by [building `slang` from source](https://github.com/shader-slang/slang/blob/master/docs/building.md). + +The server can be configured by passing a "settings" object to `slangd.setup{}`: + +```lua +require('lspconfig').slangd.setup{ + settings = { + slang = { + predefinedMacros = {"MY_VALUE_MACRO=1"}, + inlayHints = { + deducedTypes = true, + parameterNames = true, + } + } + } +} +``` +Available options are documented [here](https://github.com/shader-slang/slang-vscode-extension/tree/main?tab=readme-ov-file#configurations) +or in more detail [here](https://github.com/shader-slang/slang-vscode-extension/blob/main/package.json#L70). +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slint_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slint_lsp.lua new file mode 100644 index 0000000..bdd3659 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/slint_lsp.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'slint-lsp' }, + filetypes = { 'slint' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [=[ +https://github.com/slint-ui/slint +`Slint`'s language server + +You can build and install `slint-lsp` binary with `cargo`: +```sh +cargo install slint-lsp +``` + +Vim does not have built-in syntax for the `slint` filetype at this time. + +This can be added via an autocmd: + +```lua +vim.cmd [[ autocmd BufRead,BufNewFile *.slint set filetype=slint ]] +``` +]=], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smarty_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smarty_ls.lua new file mode 100644 index 0000000..fd6c212 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smarty_ls.lua @@ -0,0 +1,39 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'smarty-language-server', '--stdio' }, + filetypes = { 'smarty' }, + root_dir = function(pattern) + local cwd = vim.loop.cwd() + local root = util.root_pattern('composer.json', '.git')(pattern) + + -- prefer cwd if root is a descendant + return util.path.is_descendant(cwd, root) and cwd or root + end, + settings = { + smarty = { + pluginDirs = {}, + }, + css = { + validate = true, + }, + }, + init_options = { + storageDir = nil, + }, + }, + docs = { + description = [[ +https://github.com/landeaux/vscode-smarty-langserver-extracted + +Language server for Smarty. + +`smarty-language-server` can be installed via `npm`: + +```sh +npm i -g vscode-smarty-langserver-extracted +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smithy_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smithy_ls.lua new file mode 100644 index 0000000..ef6f010 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/smithy_ls.lua @@ -0,0 +1,30 @@ +local util = require 'lspconfig.util' + +-- pass 0 as the first argument to use STDIN/STDOUT for communication +local cmd = { 'smithy-language-server', '0' } + +local root_files = { + 'smithy-build.json', + 'build.gradle', + 'build.gradle.kts', + '.git', +} + +return { + default_config = { + cmd = cmd, + filetypes = { 'smithy' }, + single_file_support = true, + root_dir = util.root_pattern(unpack(root_files)), + }, + docs = { + description = [[ +https://github.com/awslabs/smithy-language-server + +`Smithy Language Server`, A Language Server Protocol implementation for the Smithy IDL +]], + default_config = { + root_dir = [[root_pattern("smithy-build.json", "build.gradle", "build.gradle.kts", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snakeskin_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snakeskin_ls.lua new file mode 100644 index 0000000..5fd9638 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snakeskin_ls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'snakeskin-cli', 'lsp', '--stdio' }, + filetypes = { 'ss' }, + root_dir = util.root_pattern 'package.json', + }, + docs = { + description = [[ +https://www.npmjs.com/package/@snakeskin/cli + +`snakeskin cli` can be installed via `npm`: +```sh +npm install -g @snakeskin/cli +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snyk_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snyk_ls.lua new file mode 100644 index 0000000..50faa0d --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/snyk_ls.lua @@ -0,0 +1,37 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'snyk-ls' }, + root_dir = util.root_pattern('.git', '.snyk'), + filetypes = { + 'go', + 'gomod', + 'javascript', + 'typescript', + 'json', + 'python', + 'requirements', + 'helm', + 'yaml', + 'terraform', + 'terraform-vars', + }, + single_file_support = true, + settings = {}, + init_options = { + activateSnykCode = 'true', + }, + }, + docs = { + description = [[ +https://github.com/snyk/snyk-ls + +LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code. +]], + default_config = { + root_dir = [[root_pattern(".git", ".snyk")]], + init_options = 'Configuration from https://github.com/snyk/snyk-ls#configuration-1', + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solang.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solang.lua new file mode 100644 index 0000000..cef5321 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solang.lua @@ -0,0 +1,27 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'solang', 'language-server', '--target', 'evm' }, + filetypes = { 'solidity' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +A language server for Solidity + +See the [documentation](https://solang.readthedocs.io/en/latest/installing.html) for installation instructions. + +The language server only provides the following capabilities: +* Syntax highlighting +* Diagnostics +* Hover + +There is currently no support for completion, goto definition, references, or other functionality. + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solargraph.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solargraph.lua new file mode 100644 index 0000000..c33c34b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solargraph.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'solargraph', 'stdio' }, + settings = { + solargraph = { + diagnostics = true, + }, + }, + init_options = { formatting = true }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://solargraph.org/ + +solargraph, a language server for Ruby + +You can install solargraph via gem install. + +```sh +gem install --user-install solargraph +``` + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solc.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solc.lua new file mode 100644 index 0000000..9ae3948 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solc.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'solc', '--lsp' }, + filetypes = { 'solidity' }, + root_dir = util.root_pattern('hardhat.config.*', '.git'), + }, + docs = { + description = [[ +https://docs.soliditylang.org/en/latest/installing-solidity.html + +solc is the native language server for the Solidity language. +]], + default_config = { + root_dir = [[root_pattern('hardhat.config.*', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity.lua new file mode 100644 index 0000000..4e254bd --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity.lua @@ -0,0 +1,49 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'solidity-ls', '--stdio' }, + filetypes = { 'solidity' }, + root_dir = util.root_pattern('.git', 'package.json'), + settings = { solidity = { includePath = '', remapping = {} } }, + }, + docs = { + description = [[ +https://github.com/qiuxiang/solidity-ls + +npm i solidity-ls -g + +Make sure that solc is installed and it's the same version of the file. solc-select is recommended. + +Solidity language server is a LSP with autocomplete, go to definition and diagnostics. + +If you use brownie, use this root_dir: +root_dir = util.root_pattern('brownie-config.yaml', '.git') + +on includePath, you can add an extra path to search for external libs, on remapping you can remap lib <> path, like: + +```lua +{ solidity = { includePath = '/Users/your_user/.brownie/packages/', remapping = { ["@OpenZeppelin/"] = 'OpenZeppelin/openzeppelin-contracts@4.6.0/' } } } +``` + +**For brownie users** +Change the root_dir to: + +```lua +root_pattern("brownie-config.yaml", ".git") +``` + +The best way of using it is to have a package.json in your project folder with the packages that you will use. +After installing with package.json, just create a `remappings.txt` with: + +``` +@OpenZeppelin/=node_modules/OpenZeppelin/openzeppelin-contracts@4.6.0/ +``` + +You can omit the node_modules as well. +]], + default_config = { + root_dir = [[root_pattern("package.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls.lua new file mode 100644 index 0000000..1183a9c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'hardhat.config.js', + 'hardhat.config.ts', + 'foundry.toml', + 'remappings.txt', + 'truffle.js', + 'truffle-config.js', + 'ape-config.yaml', +} + +return { + default_config = { + cmd = { 'vscode-solidity-server', '--stdio' }, + filetypes = { 'solidity' }, + root_dir = util.root_pattern(unpack(root_files)) or util.root_pattern('.git', 'package.json'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/juanfranblanco/vscode-solidity + +`vscode-solidity-server` can be installed via `npm`: + +```sh +npm install -g vscode-solidity-server +``` + +`vscode-solidity-server` is a language server for the Solidity language ported from the VSCode "solidity" extension. +]], + default_config = { + root_dir = [[root_pattern("]] .. table.concat(root_files, '", "') .. [[", ".git", "package.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua new file mode 100644 index 0000000..cab836c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/solidity_ls_nomicfoundation.lua @@ -0,0 +1,36 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'hardhat.config.js', + 'hardhat.config.ts', + 'foundry.toml', + 'remappings.txt', + 'truffle.js', + 'truffle-config.js', + 'ape-config.yaml', +} + +return { + default_config = { + cmd = { 'nomicfoundation-solidity-language-server', '--stdio' }, + filetypes = { 'solidity' }, + root_dir = util.root_pattern(unpack(root_files)) or util.root_pattern('.git', 'package.json'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/NomicFoundation/hardhat-vscode/blob/development/server/README.md + +`nomicfoundation-solidity-language-server` can be installed via `npm`: + +```sh +npm install -g @nomicfoundation/solidity-language-server +``` + +A language server for the Solidity programming language, built by the Nomic Foundation for the Ethereum community. +]], + default_config = { + root_dir = [[root_pattern("]] .. table.concat(root_files, '", "') .. [[", ".git", "package.json")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/somesass_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/somesass_ls.lua new file mode 100644 index 0000000..710d562 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/somesass_ls.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + name = 'somesass_ls', + cmd = { 'some-sass-language-server', '--stdio' }, + filetypes = { 'scss', 'sass' }, + root_dir = util.root_pattern('.git', '.package.json'), + single_file_support = true, + settings = { + somesass = { + suggestAllFromOpenDocument = true, + }, + }, + }, + docs = { + description = [[ + +https://github.com/wkillerud/some-sass/tree/main/packages/language-server + +`some-sass-language-server` can be installed via `npm`: + +```sh +npm i -g some-sass-language-server +``` + +The language server provides: + +- Full support for @use and @forward, including aliases, prefixes and hiding. +- Workspace-wide code navigation and refactoring, such as Rename Symbol. +- Rich documentation through SassDoc. +- Language features for %placeholder-selectors, both when using them and writing them. +- Suggestions and hover info for built-in Sass modules, when used with @use. + +]], + default_config = { + root_dir = [[root_pattern("package.json", ".git") or bufdir]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sorbet.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sorbet.lua new file mode 100644 index 0000000..86d3443 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sorbet.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'srb', 'tc', '--lsp' }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://sorbet.org + +Sorbet is a fast, powerful type checker designed for Ruby. + +You can install Sorbet via gem install. You might also be interested in how to set +Sorbet up for new projects: https://sorbet.org/docs/adopting. + +```sh +gem install sorbet +``` + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcekit.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcekit.lua new file mode 100644 index 0000000..a906f08 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcekit.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'sourcekit-lsp' }, + filetypes = { 'swift', 'c', 'cpp', 'objective-c', 'objective-cpp' }, + root_dir = function(filename, _) + return util.root_pattern 'buildServer.json'(filename) + or util.root_pattern('*.xcodeproj', '*.xcworkspace')(filename) + -- better to keep it at the end, because some modularized apps contain multiple Package.swift files + or util.root_pattern('compile_commands.json', 'Package.swift')(filename) + or util.find_git_ancestor(filename) + end, + }, + docs = { + description = [[ +https://github.com/apple/sourcekit-lsp + +Language server for Swift and C/C++/Objective-C. + ]], + default_config = { + root_dir = [[root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcery.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcery.lua new file mode 100644 index 0000000..44340f1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sourcery.lua @@ -0,0 +1,83 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'pyproject.toml', + 'setup.py', + 'setup.cfg', + 'requirements.txt', + 'Pipfile', + 'pyrightconfig.json', +} + +local token_in_auth_file = function() + local is_windows = vim.fn.has 'win32' == 1 + local path_sep = is_windows and '\\' or '/' + + local config_home = is_windows and vim.fn.getenv 'APPDATA' or vim.fn.expand '~/.config' + local auth_file_path = config_home .. path_sep .. 'sourcery' .. path_sep .. 'auth.yaml' + + if vim.fn.filereadable(auth_file_path) == 1 then + local content = vim.fn.readfile(auth_file_path) + for _, line in ipairs(content) do + if line:match 'sourcery_token: (.+)' then + return true + end + end + end + + return false +end + +return { + default_config = { + cmd = { 'sourcery', 'lsp' }, + filetypes = { 'javascript', 'javascriptreact', 'python', 'typescript', 'typescriptreact' }, + init_options = { + editor_version = 'vim', + extension_version = 'vim.lsp', + token = nil, + }, + root_dir = function(fname) + return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + on_new_config = function(new_config, _) + if not new_config.init_options.token and not token_in_auth_file() then + local notify = vim.notify_once or vim.notify + notify( + '[lspconfig] The authentication token must be provided in config.init_options or configured via "sourcery login"', + vim.log.levels.ERROR + ) + end + end, + docs = { + description = [[ +https://github.com/sourcery-ai/sourcery + +Refactor Python instantly using the power of AI. + +It requires the init_options param to be populated as shown below and will respond with the list of ServerCapabilities that it supports: + +```lua +require'lspconfig'.sourcery.setup { + init_options = { + --- The Sourcery token for authenticating the user. + --- This is retrieved from the Sourcery website and must be + --- provided by each user. The extension must provide a + --- configuration option for the user to provide this value. + token = , + + --- The extension's name and version as defined by the extension. + extension_version = 'vim.lsp', + + --- The editor's name and version as defined by the editor. + editor_version = 'vim', + }, +} +``` + +Alternatively, you can login to sourcery by running `sourcery login` with sourcery-cli. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spectral.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spectral.lua new file mode 100644 index 0000000..e21b6cb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spectral.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +local bin_name = 'spectral-language-server' + +return { + default_config = { + cmd = { bin_name, '--stdio' }, + filetypes = { 'yaml', 'json', 'yml' }, + root_dir = util.root_pattern('.spectral.yaml', '.spectral.yml', '.spectral.json', '.spectral.js'), + single_file_support = true, + settings = { + enable = true, + run = 'onType', + validateLanguages = { 'yaml', 'json', 'yml' }, + }, + }, + docs = { + description = [[ +https://github.com/luizcorreia/spectral-language-server + `A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.` + +`spectral-language-server` can be installed via `npm`: +```sh +npm i -g spectral-language-server +``` +See [vscode-spectral](https://github.com/stoplightio/vscode-spectral#extension-settings) for configuration options. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spyglassmc_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spyglassmc_language_server.lua new file mode 100644 index 0000000..54d3fad --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/spyglassmc_language_server.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'spyglassmc-language-server', '--stdio' }, + filetypes = { 'mcfunction' }, + root_dir = util.root_pattern 'pack.mcmeta', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/SpyglassMC/Spyglass/tree/main/packages/language-server + +Language server for Minecraft datapacks. + +`spyglassmc-language-server` can be installed via `npm`: + +```sh +npm i -g @spyglassmc/language-server +``` + +You may also need to configure the filetype: + +`autocmd BufNewFile,BufRead *.mcfunction set filetype=mcfunction` + +This is automatically done by [CrystalAlpha358/vim-mcfunction](https://github.com/CrystalAlpha358/vim-mcfunction), which also provide syntax highlight. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqlls.lua new file mode 100644 index 0000000..434a7ce --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqlls.lua @@ -0,0 +1,18 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'sql-language-server', 'up', '--method', 'stdio' }, + filetypes = { 'sql', 'mysql' }, + root_dir = util.root_pattern '.sqllsrc.json', + settings = {}, + }, + docs = { + description = [[ +https://github.com/joe-re/sql-language-server + +This LSP can be installed via `npm`. Find further instructions on manual installation of the sql-language-server at [joe-re/sql-language-server](https://github.com/joe-re/sql-language-server). +
    + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqls.lua new file mode 100644 index 0000000..66ac76c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/sqls.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'sqls' }, + filetypes = { 'sql', 'mysql' }, + root_dir = util.root_pattern 'config.yml', + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/sqls-server/sqls + +```lua +require'lspconfig'.sqls.setup{ + cmd = {"path/to/command", "-config", "path/to/config.yml"}; + ... +} +``` +Sqls can be installed via `go get github.com/sqls-server/sqls`. Instructions for compiling Sqls from the source can be found at [sqls-server/sqls](https://github.com/sqls-server/sqls). + + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/standardrb.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/standardrb.lua new file mode 100644 index 0000000..70608bf --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/standardrb.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'standardrb', '--lsp' }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://github.com/testdouble/standard + +Ruby Style Guide, with linter & automatic code fixer. + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starlark_rust.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starlark_rust.lua new file mode 100644 index 0000000..36b828f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starlark_rust.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'starlark', '--lsp' }, + filetypes = { 'star', 'bzl', 'BUILD.bazel' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/facebookexperimental/starlark-rust/ +The LSP part of `starlark-rust` is not currently documented, + but the implementation works well for linting. +This gives valuable warnings for potential issues in the code, +but does not support refactorings. + +It can be installed with cargo: https://crates.io/crates/starlark +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starpls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starpls.lua new file mode 100644 index 0000000..2699e7e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/starpls.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'starpls' }, + filetypes = { 'bzl' }, + root_dir = util.root_pattern('WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel'), + }, + docs = { + description = [[ +https://github.com/withered-magic/starpls + +`starpls` is an LSP implementation for Starlark. Installation instructions can be found in the project's README. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/statix.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/statix.lua new file mode 100644 index 0000000..050c0b5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/statix.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'statix' }, + filetypes = { 'nix' }, + single_file_support = true, + root_dir = util.root_pattern('flake.nix', '.git'), + }, + docs = { + description = [[ +https://github.com/nerdypepper/statix + +lints and suggestions for the nix programming language + ]], + default_config = { + root_dir = [[root_pattern("flake.nix", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/steep.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/steep.lua new file mode 100644 index 0000000..367c780 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/steep.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'steep', 'langserver' }, + filetypes = { 'ruby', 'eruby' }, + root_dir = util.root_pattern('Steepfile', '.git'), + }, + docs = { + description = [[ +https://github.com/soutaro/steep + +`steep` is a static type checker for Ruby. + +You need `Steepfile` to make it work. Generate it with `steep init`. +]], + default_config = { + root_dir = [[root_pattern("Steepfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stimulus_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stimulus_ls.lua new file mode 100644 index 0000000..7d11b4c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stimulus_ls.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'stimulus-language-server', '--stdio' }, + filetypes = { 'html', 'ruby', 'eruby', 'blade', 'php' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://www.npmjs.com/package/stimulus-language-server + +`stimulus-lsp` can be installed via `npm`: + +```sh +npm install -g stimulus-language-server +``` + +or via `yarn`: + +```sh +yarn global add stimulus-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stylelint_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stylelint_lsp.lua new file mode 100644 index 0000000..fedc1a7 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/stylelint_lsp.lua @@ -0,0 +1,57 @@ +local util = require 'lspconfig.util' + +local root_file = { + '.stylelintrc', + '.stylelintrc.cjs', + '.stylelintrc.js', + '.stylelintrc.json', + '.stylelintrc.yaml', + '.stylelintrc.yml', + 'stylelint.config.cjs', + 'stylelint.config.js', +} + +root_file = util.insert_package_json(root_file, 'stylelint') + +return { + default_config = { + cmd = { 'stylelint-lsp', '--stdio' }, + filetypes = { + 'css', + 'less', + 'scss', + 'sugarss', + 'vue', + 'wxss', + 'javascript', + 'javascriptreact', + 'typescript', + 'typescriptreact', + }, + root_dir = util.root_pattern(unpack(root_file)), + settings = {}, + }, + docs = { + description = [[ +https://github.com/bmatcuk/stylelint-lsp + +`stylelint-lsp` can be installed via `npm`: + +```sh +npm i -g stylelint-lsp +``` + +Can be configured by passing a `settings.stylelintplus` object to `stylelint_lsp.setup`: + +```lua +require'lspconfig'.stylelint_lsp.setup{ + settings = { + stylelintplus = { + -- see available options in stylelint-lsp documentation + } + } +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/superhtml.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/superhtml.lua new file mode 100644 index 0000000..a22cf33 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/superhtml.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'superhtml', 'lsp' }, + filetypes = { 'superhtml', 'html' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/kristoff-it/superhtml + +HTML Language Server & Templating Language Library + +This LSP is designed to tightly adhere to the HTML spec as well as enforcing +some additional rules that ensure HTML clarity. + +If you want to disable HTML support for another HTML LSP, add the following +to your configuration: + +```lua +require'lspconfig'.superhtml.setup { + filetypes = { 'superhtml' } +} +``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svelte.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svelte.lua new file mode 100644 index 0000000..edaa740 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svelte.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'svelteserver', '--stdio' }, + filetypes = { 'svelte' }, + root_dir = util.root_pattern('package.json', '.git'), + }, + docs = { + description = [[ +https://github.com/sveltejs/language-tools/tree/master/packages/language-server + +Note: assuming that [ts_ls](#ts_ls) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage). + +`svelte-language-server` can be installed via `npm`: +```sh +npm install -g svelte-language-server +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svlangserver.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svlangserver.lua new file mode 100644 index 0000000..bc3591a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svlangserver.lua @@ -0,0 +1,58 @@ +local util = require 'lspconfig.util' + +local function build_index() + local params = { + command = 'systemverilog.build_index', + } + vim.lsp.buf.execute_command(params) +end + +local function report_hierarchy() + local params = { + command = 'systemverilog.report_hierarchy', + arguments = { vim.fn.expand '' }, + } + vim.lsp.buf.execute_command(params) +end + +return { + default_config = { + cmd = { 'svlangserver' }, + filetypes = { 'verilog', 'systemverilog' }, + root_dir = function(fname) + return util.root_pattern '.svlangserver'(fname) or util.find_git_ancestor(fname) + end, + single_file_support = true, + settings = { + systemverilog = { + includeIndexing = { '*.{v,vh,sv,svh}', '**/*.{v,vh,sv,svh}' }, + }, + }, + }, + commands = { + SvlangserverBuildIndex = { + build_index, + description = 'Instructs language server to rerun indexing', + }, + SvlangserverReportHierarchy = { + report_hierarchy, + description = 'Generates hierarchy for the given module', + }, + }, + docs = { + description = [[ +https://github.com/imc-trading/svlangserver + +Language server for SystemVerilog. + +`svlangserver` can be installed via `npm`: + +```sh +$ npm install -g @imc-trading/svlangserver +``` +]], + default_config = { + root_dir = [[root_pattern(".svlangserver", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svls.lua new file mode 100644 index 0000000..ff4d810 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/svls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'svls' }, + filetypes = { 'verilog', 'systemverilog' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/dalance/svls + +Language server for verilog and SystemVerilog + +`svls` can be installed via `cargo`: + ```sh + cargo install svls + ``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/swift_mesonls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/swift_mesonls.lua new file mode 100644 index 0000000..4692e66 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/swift_mesonls.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'Swift-MesonLSP', '--lsp' }, + filetypes = { 'meson' }, + root_dir = util.root_pattern('meson.build', 'meson_options.txt', 'meson.options', '.git'), + }, + docs = { + description = [[ +https://github.com/JCWasmx86/Swift-MesonLSP + +Meson language server written in Swift +]], + default_config = { + root_dir = [[util.root_pattern("meson.build", "meson_options.txt", "meson.options", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/syntax_tree.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/syntax_tree.lua new file mode 100644 index 0000000..9b47ee5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/syntax_tree.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'stree', 'lsp' }, + filetypes = { 'ruby' }, + root_dir = util.root_pattern('.streerc', 'Gemfile', '.git'), + }, + docs = { + description = [[ +https://ruby-syntax-tree.github.io/syntax_tree/ + +A fast Ruby parser and formatter. + +Syntax Tree is a suite of tools built on top of the internal CRuby parser. It +provides the ability to generate a syntax tree from source, as well as the +tools necessary to inspect and manipulate that syntax tree. It can be used to +build formatters, linters, language servers, and more. + +```sh +gem install syntax_tree +``` + ]], + default_config = { + root_dir = [[root_pattern(".streerc", "Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tabby_ml.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tabby_ml.lua new file mode 100644 index 0000000..f56a829 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tabby_ml.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tabby-agent', '--lsp', '--stdio' }, + filetypes = {}, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://tabby.tabbyml.com/blog/running-tabby-as-a-language-server + +Language server for Tabby, an opensource, self-hosted AI coding assistant. + +`tabby-agent` can be installed via `npm`: + +```sh +npm install --global tabby-agent +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tailwindcss.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tailwindcss.lua new file mode 100644 index 0000000..af9b77b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tailwindcss.lua @@ -0,0 +1,130 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tailwindcss-language-server', '--stdio' }, + -- filetypes copied and adjusted from tailwindcss-intellisense + filetypes = { + -- html + 'aspnetcorerazor', + 'astro', + 'astro-markdown', + 'blade', + 'clojure', + 'django-html', + 'htmldjango', + 'edge', + 'eelixir', -- vim ft + 'elixir', + 'ejs', + 'erb', + 'eruby', -- vim ft + 'gohtml', + 'gohtmltmpl', + 'haml', + 'handlebars', + 'hbs', + 'html', + 'htmlangular', + 'html-eex', + 'heex', + 'jade', + 'leaf', + 'liquid', + 'markdown', + 'mdx', + 'mustache', + 'njk', + 'nunjucks', + 'php', + 'razor', + 'slim', + 'twig', + -- css + 'css', + 'less', + 'postcss', + 'sass', + 'scss', + 'stylus', + 'sugarss', + -- js + 'javascript', + 'javascriptreact', + 'reason', + 'rescript', + 'typescript', + 'typescriptreact', + -- mixed + 'vue', + 'svelte', + 'templ', + }, + settings = { + tailwindCSS = { + validate = true, + lint = { + cssConflict = 'warning', + invalidApply = 'error', + invalidScreen = 'error', + invalidVariant = 'error', + invalidConfigPath = 'error', + invalidTailwindDirective = 'error', + recommendedVariantOrder = 'warning', + }, + classAttributes = { + 'class', + 'className', + 'class:list', + 'classList', + 'ngClass', + }, + includeLanguages = { + eelixir = 'html-eex', + eruby = 'erb', + templ = 'html', + htmlangular = 'html', + }, + }, + }, + on_new_config = function(new_config) + if not new_config.settings then + new_config.settings = {} + end + if not new_config.settings.editor then + new_config.settings.editor = {} + end + if not new_config.settings.editor.tabSize then + -- set tab size for hover + new_config.settings.editor.tabSize = vim.lsp.util.get_effective_tabstop() + end + end, + root_dir = function(fname) + return util.root_pattern( + 'tailwind.config.js', + 'tailwind.config.cjs', + 'tailwind.config.mjs', + 'tailwind.config.ts', + 'postcss.config.js', + 'postcss.config.cjs', + 'postcss.config.mjs', + 'postcss.config.ts' + )(fname) or util.find_package_json_ancestor(fname) or util.find_node_modules_ancestor(fname) or util.find_git_ancestor( + fname + ) + end, + }, + docs = { + description = [[ +https://github.com/tailwindlabs/tailwindcss-intellisense + +Tailwind CSS Language Server can be installed via npm: +```sh +npm install -g @tailwindcss/language-server +``` +]], + default_config = { + root_dir = [[root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.cjs', 'postcss.config.mjs', 'postcss.config.ts', 'package.json', 'node_modules', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/taplo.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/taplo.lua new file mode 100644 index 0000000..06d6125 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/taplo.lua @@ -0,0 +1,25 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'taplo', 'lsp', 'stdio' }, + filetypes = { 'toml' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://taplo.tamasfe.dev/cli/usage/language-server.html + +Language server for Taplo, a TOML toolkit. + +`taplo-cli` can be installed via `cargo`: +```sh +cargo install --features lsp --locked taplo-cli +``` + ]], + default_config = { + root_dir = [[root_pattern("*.toml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tblgen_lsp_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tblgen_lsp_server.lua new file mode 100644 index 0000000..73022d4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tblgen_lsp_server.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tblgen-lsp-server' }, + filetypes = { 'tablegen' }, + root_dir = function(fname) + return util.root_pattern 'tablegen_compile_commands.yml'(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://mlir.llvm.org/docs/Tools/MLIRLSP/#tablegen-lsp-language-server--tblgen-lsp-server + +The Language Server for the LLVM TableGen language + +`tblgen-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/teal_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/teal_ls.lua new file mode 100644 index 0000000..04ba938 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/teal_ls.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { + 'teal-language-server', + }, + filetypes = { + 'teal', + }, + root_dir = util.root_pattern 'tlconfig.lua', + }, + docs = { + description = [[ +https://github.com/teal-language/teal-language-server + +Install with: +``` +luarocks install teal-language-server +``` + +Optional Command Args: +* "--log-mode=by_date" - Enable logging in $HOME/.cache/teal-language-server. Log name will be date + pid of process +* "--log-mode=by_proj_path" - Enable logging in $HOME/.cache/teal-language-server. Log name will be project path + pid of process +* "--verbose=true" - Increases log level. Does nothing unless log-mode is set +]], + default_config = { + root_dir = [[root_pattern("tlconfig.lua")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/templ.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/templ.lua new file mode 100644 index 0000000..99a4ada --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/templ.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'templ', 'lsp' }, + filetypes = { 'templ' }, + root_dir = function(fname) + return util.root_pattern('go.work', 'go.mod', '.git')(fname) + end, + }, + docs = { + description = [[ +https://templ.guide + +The official language server for the templ HTML templating language. +]], + default_config = { + root_dir = [[root_pattern('go.work', 'go.mod', '.git')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraform_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraform_lsp.lua new file mode 100644 index 0000000..48a6fc5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraform_lsp.lua @@ -0,0 +1,43 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'terraform-lsp' }, + filetypes = { 'terraform', 'hcl' }, + root_dir = util.root_pattern('.terraform', '.git'), + }, + docs = { + description = [[ +https://github.com/juliosueiras/terraform-lsp + +Terraform language server +Download a released binary from +https://github.com/juliosueiras/terraform-lsp/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) +]], + default_config = { + root_dir = [[root_pattern(".terraform", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraformls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraformls.lua new file mode 100644 index 0000000..9326b9b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/terraformls.lua @@ -0,0 +1,47 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'terraform-ls', 'serve' }, + filetypes = { 'terraform', 'terraform-vars' }, + root_dir = util.root_pattern('.terraform', '.git'), + }, + docs = { + description = [[ +https://github.com/hashicorp/terraform-ls + +Terraform language server +Download a released binary from https://github.com/hashicorp/terraform-ls/releases. + +From https://github.com/hashicorp/terraform-ls#terraform-ls-vs-terraform-lsp: + +Both HashiCorp and the maintainer of terraform-lsp expressed interest in +collaborating on a language server and are working towards a _long-term_ +goal of a single stable and feature-complete implementation. + +For the time being both projects continue to exist, giving users the +choice: + +- `terraform-ls` providing + - overall stability (by relying only on public APIs) + - compatibility with any provider and any Terraform >=0.12.0 currently + less features + - due to project being younger and relying on public APIs which may + not offer the same functionality yet + +- `terraform-lsp` providing + - currently more features + - compatibility with a single particular Terraform (0.12.20 at time of writing) + - configs designed for other 0.12 versions may work, but interpretation may be inaccurate + - less stability (due to reliance on Terraform's own internal packages) + +Note, that the `settings` configuration option uses the `workspace/didChangeConfiguration` event, +[which is not supported by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/features.md). +Instead you should use `init_options` which passes the settings as part of the LSP initialize call +[as is required by terraform-ls](https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md#how-to-pass-settings). +]], + default_config = { + root_dir = [[root_pattern(".terraform", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/texlab.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/texlab.lua new file mode 100644 index 0000000..7f039f5 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/texlab.lua @@ -0,0 +1,249 @@ +local util = require 'lspconfig.util' + +local texlab_build_status = { + [0] = 'Success', + [1] = 'Error', + [2] = 'Failure', + [3] = 'Cancelled', +} + +local texlab_forward_status = { + [0] = 'Success', + [1] = 'Error', + [2] = 'Failure', + [3] = 'Unconfigured', +} + +local function buf_build() + local bufnr = vim.api.nvim_get_current_buf() + local texlab_client = util.get_active_client_by_name(bufnr, 'texlab') + if texlab_client then + texlab_client.request('textDocument/build', vim.lsp.util.make_position_params(), function(err, result) + if err then + error(tostring(err)) + end + vim.notify('Build ' .. texlab_build_status[result.status], vim.log.levels.INFO) + end, bufnr) + else + vim.notify( + 'method textDocument/build is not supported by any servers active on the current buffer', + vim.log.levels.WARN + ) + end +end + +local function buf_search() + local bufnr = vim.api.nvim_get_current_buf() + local texlab_client = util.get_active_client_by_name(bufnr, 'texlab') + if texlab_client then + texlab_client.request('textDocument/forwardSearch', vim.lsp.util.make_position_params(), function(err, result) + if err then + error(tostring(err)) + end + vim.notify('Search ' .. texlab_forward_status[result.status], vim.log.levels.INFO) + end, bufnr) + else + vim.notify( + 'method textDocument/forwardSearch is not supported by any servers active on the current buffer', + vim.log.levels.WARN + ) + end +end + +local function buf_cancel_build() + local bufnr = vim.api.nvim_get_current_buf() + if not util.get_active_client_by_name(bufnr, 'texlab') then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + vim.lsp.buf.execute_command { command = 'texlab.cancelBuild' } + vim.notify('Build cancelled', vim.log.levels.INFO) +end + +local function dependency_graph() + local bufnr = vim.api.nvim_get_current_buf() + local texlab_client = util.get_active_client_by_name(bufnr, 'texlab') + if not texlab_client then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + texlab_client.request('workspace/executeCommand', { command = 'texlab.showDependencyGraph' }, function(err, result) + if err then + return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR) + end + vim.notify('The dependency graph has been generated:\n' .. result, vim.log.levels.INFO) + end, 0) +end + +local function cleanArtifacts() + local bufnr = vim.api.nvim_get_current_buf() + if not util.get_active_client_by_name(bufnr, 'texlab') then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + vim.lsp.buf.execute_command { + command = 'texlab.cleanArtifacts', + arguments = { { uri = vim.uri_from_bufnr(bufnr) } }, + } + vim.notify('Artifacts cleaned successfully', vim.log.levels.INFO) +end + +local function cleanAuxiliary() + local bufnr = vim.api.nvim_get_current_buf() + if not util.get_active_client_by_name(bufnr, 'texlab') then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + vim.lsp.buf.execute_command { + command = 'texlab.cleanAuxiliary', + arguments = { { uri = vim.uri_from_bufnr(bufnr) } }, + } + vim.notify('Auxiliary files cleaned successfully', vim.log.levels.INFO) +end + +local function buf_find_envs() + local bufnr = vim.api.nvim_get_current_buf() + local texlab_client = util.get_active_client_by_name(bufnr, 'texlab') + if not texlab_client then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + texlab_client.request('workspace/executeCommand', { + command = 'texlab.findEnvironments', + arguments = { vim.lsp.util.make_position_params() }, + }, function(err, result) + if err then + return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR) + end + local env_names = {} + local max_length = 1 + for _, env in ipairs(result) do + table.insert(env_names, env.name.text) + max_length = math.max(max_length, string.len(env.name.text)) + end + for i, name in ipairs(env_names) do + env_names[i] = string.rep(' ', i - 1) .. name + end + vim.lsp.util.open_floating_preview(env_names, '', { + height = #env_names, + width = math.max((max_length + #env_names - 1), (string.len 'Environments')), + focusable = false, + focus = false, + border = require('lspconfig.ui.windows').default_options.border or 'single', + title = 'Environments', + }) + end, bufnr) +end + +local function buf_change_env() + local bufnr = vim.api.nvim_get_current_buf() + if not util.get_active_client_by_name(bufnr, 'texlab') then + return vim.notify('Texlab client not found', vim.log.levels.ERROR) + end + local new = vim.fn.input 'Enter the new environment name: ' + if not new or new == '' then + return vim.notify('No environment name provided', vim.log.levels.WARN) + end + local pos = vim.api.nvim_win_get_cursor(0) + vim.lsp.buf.execute_command { + command = 'texlab.changeEnvironment', + arguments = { + { + textDocument = { uri = vim.uri_from_bufnr(bufnr) }, + position = { line = pos[1] - 1, character = pos[2] }, + newName = tostring(new), + }, + }, + } +end + +return { + default_config = { + cmd = { 'texlab' }, + filetypes = { 'tex', 'plaintex', 'bib' }, + root_dir = util.root_pattern('.git', '.latexmkrc', '.texlabroot', 'texlabroot', 'Tectonic.toml'), + single_file_support = true, + settings = { + texlab = { + rootDirectory = nil, + build = { + executable = 'latexmk', + args = { '-pdf', '-interaction=nonstopmode', '-synctex=1', '%f' }, + onSave = false, + forwardSearchAfter = false, + }, + auxDirectory = '.', + forwardSearch = { + executable = nil, + args = {}, + }, + chktex = { + onOpenAndSave = false, + onEdit = false, + }, + diagnosticsDelay = 300, + latexFormatter = 'latexindent', + latexindent = { + ['local'] = nil, -- local is a reserved keyword + modifyLineBreaks = false, + }, + bibtexFormatter = 'texlab', + formatterLineLength = 80, + }, + }, + }, + commands = { + TexlabBuild = { + function() + buf_build() + end, + description = 'Build the current buffer', + }, + TexlabForward = { + function() + buf_search() + end, + description = 'Forward search from current position', + }, + TexlabCancelBuild = { + function() + buf_cancel_build() + end, + description = 'Cancel the current build', + }, + TexlabDependencyGraph = { + function() + dependency_graph() + end, + description = 'Show the dependency graph', + }, + TexlabCleanArtifacts = { + function() + cleanArtifacts() + end, + description = 'Clean the artifacts', + }, + TexlabCleanAuxiliary = { + function() + cleanAuxiliary() + end, + description = 'Clean the auxiliary files', + }, + TexlabFindEnvironments = { + function() + buf_find_envs() + end, + description = 'Find the environments at current position', + }, + TexlabChangeEnvironment = { + function() + buf_change_env() + end, + description = 'Change the environment at current position', + }, + }, + docs = { + description = [[ +https://github.com/latex-lsp/texlab + +A completion engine built from scratch for (La)TeX. + +See https://github.com/latex-lsp/texlab/wiki/Configuration for configuration options. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/textlsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/textlsp.lua new file mode 100644 index 0000000..e4f7a91 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/textlsp.lua @@ -0,0 +1,50 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'textlsp' }, + filetypes = { 'text', 'tex', 'org' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + settings = { + textLSP = { + analysers = { + -- by default all analysers are disabled in textLSP, since many of them + -- need custom settings. See github page. LanguageTool is enaled here + -- only for a quick test. + languagetool = { + enabled = true, + check_text = { + on_open = true, + on_save = true, + on_change = false, + }, + }, + }, + documents = { + org = { + org_todo_keywords = { + 'TODO', + 'IN_PROGRESS', + 'DONE', + }, + }, + }, + }, + }, + }, + docs = { + description = [[ +https://github.com/hangyav/textLSP + +`textLSP` is an LSP server for text spell and grammar checking with various AI tools. +It supports multiple text file formats, such as LaTeX, Org or txt. + +For the available text analyzer tools and their configuration, see the [GitHub](https://github.com/hangyav/textLSP) page. +By default, all analyzers are disabled in textLSP, since most of them need special settings. +For quick testing, LanguageTool is enabled in the default `nvim-lspconfig` configuration. + +To install run: `pip install textLSP` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tflint.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tflint.lua new file mode 100644 index 0000000..de2a1d8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tflint.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tflint', '--langserver' }, + filetypes = { 'terraform' }, + root_dir = util.root_pattern('.terraform', '.git', '.tflint.hcl'), + }, + docs = { + description = [[ +https://github.com/terraform-linters/tflint + +A pluggable Terraform linter that can act as lsp server. +Installation instructions can be found in https://github.com/terraform-linters/tflint#installation. +]], + default_config = { + root_dir = [[root_pattern(".terraform", ".git", ".tflint.hcl")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/theme_check.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/theme_check.lua new file mode 100644 index 0000000..94d6774 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/theme_check.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +local bin_name = 'theme-check-language-server' + +return { + default_config = { + cmd = { bin_name, '--stdio' }, + filetypes = { 'liquid' }, + root_dir = util.root_pattern '.theme-check.yml', + settings = {}, + }, + docs = { + description = [[ +https://github.com/Shopify/shopify-cli + +`theme-check-language-server` is bundled with `shopify-cli` or it can also be installed via + +https://github.com/Shopify/theme-check#installation + +**NOTE:** +If installed via Homebrew, `cmd` must be set to 'theme-check-liquid-server' + +```lua +require lspconfig.theme_check.setup { + cmd = { 'theme-check-liquid-server' } +} +``` + +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/thriftls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/thriftls.lua new file mode 100644 index 0000000..eaf807a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/thriftls.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'thriftls' }, + filetypes = { 'thrift' }, + root_dir = util.root_pattern '.thrift', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/joyme123/thrift-ls + +you can install thriftls by mason or download binary here: https://github.com/joyme123/thrift-ls/releases +]], + default_config = { + root_dir = [[root_pattern(".thrift")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tilt_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tilt_ls.lua new file mode 100644 index 0000000..c665651 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tilt_ls.lua @@ -0,0 +1,26 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tilt', 'lsp', 'start' }, + filetypes = { 'tiltfile' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/tilt-dev/tilt + +Tilt language server. + +You might need to add filetype detection manually: + +```vim +autocmd BufRead Tiltfile setf=tiltfile +``` +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tinymist.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tinymist.lua new file mode 100644 index 0000000..c255972 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tinymist.lua @@ -0,0 +1,16 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tinymist' }, + filetypes = { 'typst' }, + root_dir = util.find_git_ancestor, + single_file_support = false, + }, + docs = { + description = [[ +https://github.com/Myriad-Dreamin/tinymist +An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ts_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ts_ls.lua new file mode 100644 index 0000000..38a7c80 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ts_ls.lua @@ -0,0 +1,90 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + init_options = { hostInfo = 'neovim' }, + cmd = { 'typescript-language-server', '--stdio' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'javascript.jsx', + 'typescript', + 'typescriptreact', + 'typescript.tsx', + }, + root_dir = util.root_pattern('tsconfig.json', 'jsconfig.json', 'package.json', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/typescript-language-server/typescript-language-server + +`ts_ls`, aka `typescript-language-server`, is a Language Server Protocol implementation for TypeScript wrapping `tsserver`. Note that `ts_ls` is not `tsserver`. + +`typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`: +```sh +npm install -g typescript typescript-language-server +``` + +To configure typescript language server, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or +[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your +project. + +Here's an example that disables type checking in JavaScript files. + +```json +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "checkJs": false + }, + "exclude": [ + "node_modules" + ] +} +``` + +### Vue support + +As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin +adds Vue support to this language server. + +*IMPORTANT*: It is crucial to ensure that `@vue/typescript-plugin` and `volar `are of identical versions. + +```lua +require'lspconfig'.ts_ls.setup{ + init_options = { + plugins = { + { + name = "@vue/typescript-plugin", + location = "/usr/local/lib/node_modules/@vue/typescript-plugin", + languages = {"javascript", "typescript", "vue"}, + }, + }, + }, + filetypes = { + "javascript", + "typescript", + "vue", + }, +} + +-- You must make sure volar is setup +-- e.g. require'lspconfig'.volar.setup{} +-- See volar's section for more information +``` + +`location` MUST be defined. If the plugin is installed in `node_modules`, +`location` can have any value. + +`languages` must include `vue` even if it is listed in `filetypes`. + +`filetypes` is extended here to include Vue SFC. +]], + default_config = { + root_dir = [[root_pattern("tsconfig.json", "jsconfig.json", "package.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tsp_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tsp_server.lua new file mode 100644 index 0000000..3cb7e42 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tsp_server.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'tsp-server', '--stdio' }, + filetypes = { 'typespec' }, + root_dir = util.root_pattern('tspconfig.yaml', '.git'), + }, + docs = { + description = [[ +https://github.com/microsoft/typespec + +The language server for TypeSpec, a language for defining cloud service APIs and shapes. + +`tsp-server` can be installed together with the typespec compiler via `npm`: +```sh +npm install -g @typespec/compiler +``` +]], + default_config = { + root_dir = [[util.root_pattern("tspconfig.yaml", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ttags.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ttags.lua new file mode 100644 index 0000000..d57a796 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ttags.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ttags', 'lsp' }, + filetypes = { 'ruby', 'rust', 'javascript', 'haskell' }, + root_dir = util.root_pattern '.git', + }, + docs = { + description = [[ +https://github.com/npezza93/ttags + ]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/turtle_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/turtle_ls.lua new file mode 100644 index 0000000..21624a8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/turtle_ls.lua @@ -0,0 +1,45 @@ +local util = require 'lspconfig.util' + +local bin_name = 'turtle-language-server' +local bin_path = os.getenv 'NVM_BIN' +local full_path +if bin_path == nil then + local paths = {} + local sep = ':' + if vim.fn.has 'win32' == 1 then + sep = ';' + end + local path = os.getenv 'PATH' + if path ~= nil then + for str in string.gmatch(path, '([^' .. sep .. ']+)') do + paths[#paths + 1] = str + end + end + for _, p in ipairs(paths) do + local candidate = util.path.join(p, bin_name) + if util.path.is_file(candidate) then + full_path = candidate + break + end + end +else + full_path = util.path.join(bin_path, bin_name) +end + +return { + default_config = { + cmd = { 'node', full_path, '--stdio' }, + filetypes = { 'turtle', 'ttl' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server +`turtle-language-server`, An editor-agnostic server providing language intelligence (diagnostics, hover tooltips, etc.) for the W3C standard Turtle RDF syntax via the Language Server Protocol. +installable via npm install -g turtle-language-server or yarn global add turtle-language-server. +requires node. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tvm_ffi_navigator.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tvm_ffi_navigator.lua new file mode 100644 index 0000000..6abd3b8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/tvm_ffi_navigator.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'python', '-m', 'ffi_navigator.langserver' }, + filetypes = { 'python', 'cpp' }, + root_dir = util.root_pattern('pyproject.toml', '.git'), + }, + docs = { + description = [[ +https://github.com/tqchen/ffi-navigator + +The Language Server for FFI calls in TVM to be able jump between python and C++ + +FFI navigator can be installed with `pip install ffi-navigator`, buf for more details, please see +https://github.com/tqchen/ffi-navigator?tab=readme-ov-file#installation +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/twiggy_language_server.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/twiggy_language_server.lua new file mode 100644 index 0000000..3c949dd --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/twiggy_language_server.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'twiggy-language-server', '--stdio' }, + filetypes = { 'twig' }, + root_dir = util.root_pattern('composer.json', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/moetelo/twiggy + +`twiggy-language-server` can be installed via `npm`: +```sh +npm install -g twiggy-language-server +``` +]], + default_config = { + root_dir = [[root_pattern("composer.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typeprof.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typeprof.lua new file mode 100644 index 0000000..ab9dc8e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typeprof.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'typeprof', '--lsp', '--stdio' }, + filetypes = { 'ruby', 'eruby' }, + root_dir = util.root_pattern('Gemfile', '.git'), + }, + docs = { + description = [[ +https://github.com/ruby/typeprof + +`typeprof` is the built-in analysis and LSP tool for Ruby 3.1+. + ]], + default_config = { + root_dir = [[root_pattern("Gemfile", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typos_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typos_lsp.lua new file mode 100644 index 0000000..3fb58b2 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typos_lsp.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'typos-lsp' }, + root_dir = util.root_pattern('typos.toml', '_typos.toml', '.typos.toml'), + single_file_support = true, + settings = {}, + }, + docs = { + description = [[ +https://github.com/crate-ci/typos +https://github.com/tekumara/typos-lsp + +A Language Server Protocol implementation for Typos, a low false-positive +source code spell checker, written in Rust. Download it from the releases page +on GitHub: https://github.com/tekumara/typos-lsp/releases + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typst_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typst_lsp.lua new file mode 100644 index 0000000..4d8ec17 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/typst_lsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'typst-lsp' }, + filetypes = { 'typst' }, + single_file_support = true, + root_dir = function(fname) + return util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/nvarner/typst-lsp + +Language server for Typst. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uiua.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uiua.lua new file mode 100644 index 0000000..b102f8c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uiua.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'uiua', 'lsp' }, + filetypes = { 'uiua' }, + root_dir = function(fname) + return util.root_pattern('main.ua', '.fmt.ua')(fname) or util.find_git_ancestor(fname) + end, + }, + docs = { + description = [[ +https://github.com/uiua-lang/uiua/ + +The builtin language server of the Uiua interpreter. + +The Uiua interpreter can be installed with `cargo install uiua` +]], + default_config = { + cmd = { 'uiua', 'lsp' }, + filetypes = { 'uiua' }, + root_dir = [[ + root_pattern( + 'main.ua', + 'fmt.ua', + '.git' + ) + ]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unison.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unison.lua new file mode 100644 index 0000000..7cc655f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unison.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'nc', 'localhost', os.getenv 'UNISON_LSP_PORT' or '5757' }, + filetypes = { 'unison' }, + root_dir = util.root_pattern '*.u', + settings = {}, + }, + docs = { + description = [[ +https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown + + + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unocss.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unocss.lua new file mode 100644 index 0000000..4b15513 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/unocss.lua @@ -0,0 +1,31 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'unocss-language-server', '--stdio' }, + filetypes = { + 'html', + 'javascriptreact', + 'rescript', + 'typescriptreact', + 'vue', + 'svelte', + }, + root_dir = function(fname) + return util.root_pattern('unocss.config.js', 'unocss.config.ts', 'uno.config.js', 'uno.config.ts')(fname) + end, + }, + docs = { + description = [[ +https://github.com/xna00/unocss-language-server + +UnoCSS Language Server can be installed via npm: +```sh +npm i unocss-language-server -g +``` +]], + default_config = { + root_dir = [[root_pattern('unocss.config.js', 'unocss.config.ts', 'uno.config.js', 'uno.config.ts')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uvls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uvls.lua new file mode 100644 index 0000000..c8d75b1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/uvls.lua @@ -0,0 +1,29 @@ +local util = require 'lspconfig.util' +return { + default_config = { + cmd = { 'uvls' }, + filetypes = { 'uvl' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://codeberg.org/caradhras/uvls +Language server for UVL, written using tree sitter and rust. +You can install the server easily using cargo: +```sh +git clone https://codeberg.org/caradhras/uvls +cd uvls +cargo install --path . +``` +Note: To activate properly nvim needs to know the uvl filetype. +You can add it via: +```lua +vim.cmd(\[\[au BufRead,BufNewFile *.uvl setfiletype uvl\]\]) +``` +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/v_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/v_analyzer.lua new file mode 100644 index 0000000..d6b7e27 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/v_analyzer.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'v-analyzer' }, + filetypes = { 'v', 'vsh', 'vv' }, + root_dir = util.root_pattern('v.mod', '.git'), + }, + docs = { + description = [[ +https://github.com/vlang/v-analyzer + +V language server. + +`v-analyzer` can be installed by following the instructions [here](https://github.com/vlang/v-analyzer#installation). +]], + default_config = { + root_dir = [[root_pattern("v.mod", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vacuum.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vacuum.lua new file mode 100644 index 0000000..d0a6afc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vacuum.lua @@ -0,0 +1,28 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vacuum', 'language-server' }, + filetypes = { 'yaml.openapi', 'json.openapi' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +Vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. + +You can install vacuum using mason or follow the instructions here: https://github.com/daveshanley/vacuum + +The file types are not detected automatically, you can register them manually (see below) or override the filetypes: + +```lua +vim.filetype.add { + pattern = { + ['openapi.*%.ya?ml'] = 'yaml.openapi', + ['openapi.*%.json'] = 'json.openapi', + }, +} +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vala_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vala_ls.lua new file mode 100644 index 0000000..842c561 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vala_ls.lua @@ -0,0 +1,40 @@ +local util = require 'lspconfig.util' + +local meson_matcher = function(path) + local pattern = 'meson.build' + local f = vim.fn.glob(util.path.join(path, pattern)) + if f == '' then + return nil + end + for line in io.lines(f) do + -- skip meson comments + if not line:match '^%s*#.*' then + local str = line:gsub('%s+', '') + if str ~= '' then + if str:match '^project%(' then + return path + else + break + end + end + end + end +end + +return { + default_config = { + cmd = { 'vala-language-server' }, + filetypes = { 'vala', 'genie' }, + root_dir = function(fname) + local root = util.search_ancestors(fname, meson_matcher) + return root or util.find_git_ancestor(fname) + end, + single_file_support = true, + }, + docs = { + description = 'https://github.com/Prince781/vala-language-server', + default_config = { + root_dir = [[root_pattern("meson.build", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vale_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vale_ls.lua new file mode 100644 index 0000000..615b18b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vale_ls.lua @@ -0,0 +1,17 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vale-ls' }, + filetypes = { 'markdown', 'text', 'tex' }, + root_dir = util.root_pattern '.vale.ini', + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/errata-ai/vale-ls + +An implementation of the Language Server Protocol (LSP) for the Vale command-line tool. +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vdmj.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vdmj.lua new file mode 100644 index 0000000..865e263 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vdmj.lua @@ -0,0 +1,134 @@ +local util = require 'lspconfig.util' + +local function get_default_mavenrepo() + local repo = util.path.join(vim.env.HOME, '.m2', 'repository', 'dk', 'au', 'ece', 'vdmj') + if util.path.exists(repo) then + return repo + else + return util.path.join(vim.env.HOME, '.m2', 'repository', 'com', 'fujitsu') + end +end + +local function get_jar_path(config, package, version) + return util.path.join(config.options.mavenrepo, package, version, package .. '-' .. version .. '.jar') +end + +local function with_precision(version, is_high_precision) + return is_high_precision and version:gsub('([%d.]+)', '%1-P') or version +end + +local function get_latest_installed_version(repo) + local path = util.path.join(repo, 'lsp') + local sort = vim.fn.sort + + local subdirs = function(file) + local stat = vim.loop.fs_stat(util.path.join(path, file)) + return stat.type == 'directory' and 1 or 0 + end + + local candidates = vim.fn.readdir(path, subdirs) + local sorted = sort(sort(candidates, 'l'), 'N') + return sorted[#sorted] +end + +-- Special case, as vdmj store particular settings under root_dir/.vscode +local function find_vscode_ancestor(startpath) + return util.search_ancestors(startpath, function(path) + if util.path.is_dir(util.path.join(path, '.vscode')) then + return path + end + end) +end + +return { + default_config = { + cmd = { 'java' }, + filetypes = { 'vdmsl', 'vdmpp', 'vdmrt' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) or find_vscode_ancestor(fname) + end, + options = { + java = vim.env.JAVA_HOME and util.path.join(vim.env.JAVA_HOME, 'bin', 'java') or 'java', + java_opts = { '-Xmx3000m', '-Xss1m' }, + annotation_paths = {}, + mavenrepo = get_default_mavenrepo(), + logfile = util.path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log'), + debugger_port = -1, + high_precision = false, + }, + }, + docs = { + description = [[ +https://github.com/nickbattle/vdmj + +The VDMJ language server can be installed by cloning the VDMJ repository and +running `mvn clean install`. + +Various options are provided to configure the language server (see below). In +particular: +- `annotation_paths` is a list of folders and/or jar file paths for annotations +that should be used with the language server; +- any value of `debugger_port` less than zero will disable the debugger; note +that if a non-zero value is used, only one instance of the server can be active +at a time. + +More settings for VDMJ can be changed in a file called `vdmj.properties` under +`root_dir/.vscode`. For a description of the available settings, see +[Section 7 of the VDMJ User Guide](https://raw.githubusercontent.com/nickbattle/vdmj/master/vdmj/documentation/UserGuide.pdf). + +Note: proof obligations and combinatorial testing are not currently supported +by neovim. +]], + default_config = { + cmd = 'Generated from the options given', + root_dir = 'util.find_git_ancestor(fname) or find_vscode_ancestor(fname)', + options = { + java = '$JAVA_HOME/bin/java', + java_opts = { '-Xmx3000m', '-Xss1m' }, + annotation_paths = {}, + mavenrepo = '$HOME/.m2/repository/dk/au/ece/vdmj', + version = 'The latest version installed in `mavenrepo`', + logfile = "path.join(vim.fn.stdpath 'cache', 'vdm-lsp.log')", + debugger_port = -1, + high_precision = false, + }, + }, + }, + on_new_config = function(config, root_dir) + local version = with_precision( + config.options.version or get_latest_installed_version(config.options.mavenrepo), + config.options.high_precision + ) + + local classpath = table.concat({ + get_jar_path(config, 'vdmj', version), + get_jar_path(config, 'annotations', version), + get_jar_path(config, 'lsp', version), + util.path.join(root_dir, '.vscode'), + unpack(config.options.annotation_paths), + }, ':') + + local java_cmd = { + config.options.java, + config.options.java_opts, + '-Dlsp.log.filename=' .. config.options.logfile, + '-cp', + classpath, + } + + local dap = {} + + if config.options.debugger_port >= 0 then + -- TODO: LS will fail to start if port is already in use + dap = { '-dap', tostring(config.options.debugger_port) } + end + + local vdmj_cmd = { + 'lsp.LSPServerStdio', + '-' .. vim.bo.filetype, + dap, + } + + config.cmd = util.tbl_flatten { java_cmd, vdmj_cmd } + end, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/verible.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/verible.lua new file mode 100644 index 0000000..3c4823a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/verible.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'verible-verilog-ls' }, + filetypes = { 'systemverilog', 'verilog' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/chipsalliance/verible + +A linter and formatter for verilog and SystemVerilog files. + +Release binaries can be downloaded from [here](https://github.com/chipsalliance/verible/releases) +and placed in a directory on PATH. + +See https://github.com/chipsalliance/verible/tree/master/verilog/tools/ls/README.md for options. + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veridian.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veridian.lua new file mode 100644 index 0000000..231d0c0 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veridian.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'veridian' }, + filetypes = { 'systemverilog', 'verilog' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/vivekmalneedi/veridian + +A SystemVerilog LanguageServer. + +Download the latest release for your OS from the releases page + +# install with slang feature, if C++17 compiler is available +cargo install --git https://github.com/vivekmalneedi/veridian.git --all-features +# install if C++17 compiler is not available +cargo install --git https://github.com/vivekmalneedi/veridian.git + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veryl_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veryl_ls.lua new file mode 100644 index 0000000..588e36e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/veryl_ls.lua @@ -0,0 +1,24 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'veryl-ls' }, + filetypes = { 'veryl' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/veryl-lang/veryl + +Language server for Veryl + +`veryl-ls` can be installed via `cargo`: + ```sh + cargo install veryl-ls + ``` + ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vhdl_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vhdl_ls.lua new file mode 100644 index 0000000..46db3c8 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vhdl_ls.lua @@ -0,0 +1,45 @@ +local util = require 'lspconfig.util' + +local root_files = { + 'vhdl_ls.toml', + '.vhdl_ls.toml', +} + +return { + default_config = { + cmd = { 'vhdl_ls' }, + filetypes = { 'vhd', 'vhdl' }, + root_dir = util.root_pattern(unpack(root_files)), + single_file_support = true, + }, + docs = { + description = [[ +Install vhdl_ls from https://github.com/VHDL-LS/rust_hdl and add it to path + +Configuration + +The language server needs to know your library mapping to perform full analysis of the code. For this it uses a configuration file in the TOML format named vhdl_ls.toml. + +vhdl_ls will load configuration files in the following order of priority (first to last): + + A file named .vhdl_ls.toml in the user home folder. + A file name from the VHDL_LS_CONFIG environment variable. + A file named vhdl_ls.toml in the workspace root. + +Settings in a later files overwrites those from previously loaded files. + +Example vhdl_ls.toml +``` +# File names are either absolute or relative to the parent folder of the vhdl_ls.toml file +[libraries] +lib2.files = [ + 'pkg2.vhd', +] +lib1.files = [ + 'pkg1.vhd', + 'tb_ent.vhd' +] +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vimls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vimls.lua new file mode 100644 index 0000000..bcee4cc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vimls.lua @@ -0,0 +1,34 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vim-language-server', '--stdio' }, + filetypes = { 'vim' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + init_options = { + isNeovim = true, + iskeyword = '@,48-57,_,192-255,-#', + vimruntime = '', + runtimepath = '', + diagnostic = { enable = true }, + indexes = { + runtimepath = true, + gap = 100, + count = 3, + projectRootPatterns = { 'runtime', 'nvim', '.git', 'autoload', 'plugin' }, + }, + suggest = { fromVimruntime = true, fromRuntimepath = true }, + }, + }, + docs = { + description = [[ +https://github.com/iamcco/vim-language-server + +You can install vim-language-server via npm: +```sh +npm install -g vim-language-server +``` +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/visualforce_ls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/visualforce_ls.lua new file mode 100644 index 0000000..c48bcaa --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/visualforce_ls.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + filetypes = { 'visualforce' }, + root_dir = util.root_pattern 'sfdx-project.json', + init_options = { + embeddedLanguages = { + css = true, + javascript = true, + }, + }, + }, + docs = { + description = [[ +https://github.com/forcedotcom/salesforcedx-vscode + +Language server for Visualforce. + +For manual installation, download the .vsix archive file from the +[forcedotcom/salesforcedx-vscode](https://github.com/forcedotcom/salesforcedx-vscode) +GitHub releases. Then, configure `cmd` to run the Node script at the unpacked location: + +```lua +require'lspconfig'.visualforce_ls.setup { + cmd = { + 'node', + '/path/to/unpacked/archive/extension/node_modules/@salesforce/salesforcedx-visualforce-language-server/out/src/visualforceServer.js', + '--stdio' + } +} +``` +]], + default_config = { + root_dir = [[root_pattern('sfdx-project.json')]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vls.lua new file mode 100644 index 0000000..a6a5ac4 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'v', 'ls' }, + filetypes = { 'v', 'vlang' }, + root_dir = util.root_pattern('v.mod', '.git'), + }, + docs = { + description = [[ +https://github.com/vlang/vls + +V language server. + +`v-language-server` can be installed by following the instructions [here](https://github.com/vlang/vls#installation). +]], + default_config = { + root_dir = [[root_pattern("v.mod", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/volar.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/volar.lua new file mode 100644 index 0000000..888cd16 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/volar.lua @@ -0,0 +1,113 @@ +local util = require 'lspconfig.util' + +local function get_typescript_server_path(root_dir) + local project_root = util.find_node_modules_ancestor(root_dir) + return project_root and (util.path.join(project_root, 'node_modules', 'typescript', 'lib')) or '' +end + +-- https://github.com/johnsoncodehk/volar/blob/20d713b/packages/shared/src/types.ts +local volar_init_options = { + typescript = { + tsdk = '', + }, +} + +return { + default_config = { + cmd = { 'vue-language-server', '--stdio' }, + filetypes = { 'vue' }, + root_dir = util.root_pattern 'package.json', + init_options = volar_init_options, + on_new_config = function(new_config, new_root_dir) + if + new_config.init_options + and new_config.init_options.typescript + and new_config.init_options.typescript.tsdk == '' + then + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end + end, + }, + docs = { + description = [[ +https://github.com/johnsoncodehk/volar/tree/20d713b/packages/vue-language-server + +Volar language server for Vue + +Volar can be installed via npm: + +```sh +npm install -g @vue/language-server +``` + +Volar by default supports Vue 3 projects. Vue 2 projects need +[additional configuration](https://github.com/vuejs/language-tools/tree/master/packages/vscode-vue#usage). + +**TypeScript support** +As of release 2.0.0, Volar no longer wraps around ts_ls. For typescript +support, `ts_ls` needs to be configured with the `@vue/typescript-plugin` +plugin. + +**Take Over Mode** + +Volar (prior to 2.0.0), can serve as a language server for both Vue and TypeScript via [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471). + +To enable Take Over Mode, override the default filetypes in `setup{}` as follows: + +```lua +require'lspconfig'.volar.setup{ + filetypes = {'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json'} +} +``` + +**Overriding the default TypeScript Server used by Volar** + +The default config looks for TS in the local `node_modules`. This can lead to issues +e.g. when working on a [monorepo](https://monorepo.tools/). The alternatives are: + +- use a global TypeScript Server installation + +```lua +require'lspconfig'.volar.setup{ + init_options = { + typescript = { + tsdk = '/path/to/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- tsdk = '/usr/local/lib/node_modules/typescript/lib' + } + } +} +``` + +- use a local server and fall back to a global TypeScript Server installation + +```lua +local util = require 'lspconfig.util' +local function get_typescript_server_path(root_dir) + + local global_ts = '/home/[yourusernamehere]/.npm/lib/node_modules/typescript/lib' + -- Alternative location if installed as root: + -- local global_ts = '/usr/local/lib/node_modules/typescript/lib' + local found_ts = '' + local function check_dir(path) + found_ts = util.path.join(path, 'node_modules', 'typescript', 'lib') + if util.path.exists(found_ts) then + return path + end + end + if util.search_ancestors(root_dir, check_dir) then + return found_ts + else + return global_ts + end +end + +require'lspconfig'.volar.setup{ + on_new_config = function(new_config, new_root_dir) + new_config.init_options.typescript.tsdk = get_typescript_server_path(new_root_dir) + end, +} +``` + ]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vtsls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vtsls.lua new file mode 100644 index 0000000..050052f --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vtsls.lua @@ -0,0 +1,35 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vtsls', '--stdio' }, + filetypes = { + 'javascript', + 'javascriptreact', + 'javascript.jsx', + 'typescript', + 'typescriptreact', + 'typescript.tsx', + }, + root_dir = util.root_pattern('tsconfig.json', 'package.json', 'jsconfig.json', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/yioneko/vtsls + +`vtsls` can be installed with npm: +```sh +npm install -g @vtsls/language-server +``` + +To configure a TypeScript project, add a +[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) +or [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to +the root of your project. +]], + default_config = { + root_dir = [[root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vuels.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vuels.lua new file mode 100644 index 0000000..34d0f28 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/vuels.lua @@ -0,0 +1,61 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'vls' }, + filetypes = { 'vue' }, + root_dir = util.root_pattern('package.json', 'vue.config.js'), + init_options = { + config = { + vetur = { + useWorkspaceDependencies = false, + validation = { + template = true, + style = true, + script = true, + }, + completion = { + autoImport = false, + useScaffoldSnippets = false, + tagCasing = 'kebab', + }, + format = { + defaultFormatter = { + js = 'none', + ts = 'none', + }, + defaultFormatterOptions = {}, + scriptInitialIndent = false, + styleInitialIndent = false, + }, + }, + css = {}, + html = { + suggest = {}, + }, + javascript = { + format = {}, + }, + typescript = { + format = {}, + }, + emmet = {}, + stylusSupremacy = {}, + }, + }, + }, + docs = { + description = [[ +https://github.com/vuejs/vetur/tree/master/server + +Vue language server(vls) +`vue-language-server` can be installed via `npm`: +```sh +npm install -g vls +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", "vue.config.js")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/wgsl_analyzer.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/wgsl_analyzer.lua new file mode 100644 index 0000000..2325cc6 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/wgsl_analyzer.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'wgsl_analyzer' }, + filetypes = { 'wgsl' }, + root_dir = util.root_pattern '.git', + settings = {}, + }, + docs = { + description = [[ +https://github.com/wgsl-analyzer/wgsl-analyzer + +`wgsl_analyzer` can be installed via `cargo`: +```sh +cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl_analyzer +``` +]], + default_config = { + root_dir = [[root_pattern(".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yamlls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yamlls.lua new file mode 100644 index 0000000..3756e62 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yamlls.lua @@ -0,0 +1,80 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'yaml-language-server', '--stdio' }, + filetypes = { 'yaml', 'yaml.docker-compose', 'yaml.gitlab' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + settings = { + -- https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting + redhat = { telemetry = { enabled = false } }, + }, + }, + docs = { + description = [[ +https://github.com/redhat-developer/yaml-language-server + +`yaml-language-server` can be installed via `yarn`: +```sh +yarn global add yaml-language-server +``` + +To use a schema for validation, there are two options: + +1. Add a modeline to the file. A modeline is a comment of the form: + +``` +# yaml-language-server: $schema= +``` + +where the relative filepath is the path relative to the open yaml file, and the absolute filepath +is the filepath relative to the filesystem root ('/' on unix systems) + +2. Associated a schema url, relative , or absolute (to root of project, not to filesystem root) path to +the a glob pattern relative to the detected project root. Check `:LspInfo` to determine the resolved project +root. + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*", + ["../path/relative/to/file.yml"] = "/.github/workflows/*", + ["/path/from/root/of/project"] = "/.github/workflows/*", + }, + }, + } +} +``` + +Currently, kubernetes is special-cased in yammls, see the following upstream issues: +* [#211](https://github.com/redhat-developer/yaml-language-server/issues/211). +* [#307](https://github.com/redhat-developer/yaml-language-server/issues/307). + +To override a schema to use a specific k8s schema version (for example, to use 1.18): + +```lua +require('lspconfig').yamlls.setup { + ... -- other configuration for setup {} + settings = { + yaml = { + ... -- other settings. note this overrides the lspconfig defaults. + schemas = { + ["https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/v1.18.0-standalone-strict/all.json"] = "/*.k8s.yaml", + ... -- other schemas + }, + }, + } +} +``` + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yang_lsp.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yang_lsp.lua new file mode 100644 index 0000000..d4c9b8b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yang_lsp.lua @@ -0,0 +1,19 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'yang-language-server' }, + filetypes = { 'yang' }, + root_dir = util.find_git_ancestor, + }, + docs = { + description = [[ +https://github.com/TypeFox/yang-lsp + +A Language Server for the YANG data modeling language. +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yls.lua new file mode 100644 index 0000000..86cb337 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/yls.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'yls', '-vv' }, + filetypes = { 'yar', 'yara' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://pypi.org/project/yls-yara/ + +An YLS plugin adding YARA linting capabilities. + +This plugin runs yara.compile on every save, parses the errors, and returns list of diagnostic messages. + +Language Server: https://github.com/avast/yls +]], + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy.lua new file mode 100644 index 0000000..4ca58fb --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ziggy', 'lsp' }, + filetypes = { 'ziggy' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for the Ziggy data serialization format + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy_schema.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy_schema.lua new file mode 100644 index 0000000..2bd01cc --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/ziggy_schema.lua @@ -0,0 +1,21 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'ziggy', 'lsp', '--schema' }, + filetypes = { 'ziggy_schema' }, + root_dir = util.find_git_ancestor, + single_file_support = true, + }, + docs = { + description = [[ +https://ziggy-lang.io/documentation/ziggy-lsp/ + +Language server for schema files of the Ziggy data serialization format + +]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zk.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zk.lua new file mode 100644 index 0000000..57a1ea1 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zk.lua @@ -0,0 +1,79 @@ +local util = require 'lspconfig.util' + +local function find_zk_root(startpath) + for dir in vim.fs.parents(startpath) do + if vim.fn.isdirectory(vim.fs.joinpath(dir, '.zk')) == 1 then + return dir + end + end +end + +return { + default_config = { + cmd = { 'zk', 'lsp' }, + filetypes = { 'markdown' }, + root_dir = util.root_pattern '.zk', + }, + commands = { + ZkIndex = { + function() + vim.lsp.buf.execute_command { + command = 'zk.index', + arguments = { vim.api.nvim_buf_get_name(0) }, + } + end, + description = 'ZkIndex', + }, + ZkList = { + function() + local bufpath = vim.api.nvim_buf_get_name(0) + local root = find_zk_root(bufpath) + + vim.lsp.buf_request(0, 'workspace/executeCommand', { + command = 'zk.list', + arguments = { root, { select = { 'path' } } }, + }, function(_, result, _, _) + if not result then + return + end + local paths = vim.tbl_map(function(item) + return item.path + end, result) + vim.ui.select(paths, {}, function(choice) + vim.cmd('edit ' .. choice) + end) + end) + end, + + description = 'ZkList', + }, + ZkNew = { + function(...) + vim.lsp.buf_request(0, 'workspace/executeCommand', { + command = 'zk.new', + arguments = { + vim.api.nvim_buf_get_name(0), + ..., + }, + }, function(_, result, _, _) + if not (result and result.path) then + return + end + vim.cmd('edit ' .. result.path) + end) + end, + + description = 'ZkNew', + }, + }, + docs = { + description = [[ +https://github.com/mickael-menu/zk + +A plain text note-taking assistant +]], + default_config = { + root_dir = [[root_pattern(".zk")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zls.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zls.lua new file mode 100644 index 0000000..d92a797 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/server_configurations/zls.lua @@ -0,0 +1,20 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + cmd = { 'zls' }, + filetypes = { 'zig', 'zir' }, + root_dir = util.root_pattern('zls.json', 'build.zig', '.git'), + single_file_support = true, + }, + docs = { + description = [[ +https://github.com/zigtools/zls + +Zig LSP implementation + Zig Language Server + ]], + default_config = { + root_dir = [[util.root_pattern("zls.json", "build.zig", ".git")]], + }, + }, +} diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/lspinfo.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/lspinfo.lua new file mode 100644 index 0000000..886014a --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/lspinfo.lua @@ -0,0 +1,369 @@ +local api, fn = vim.api, vim.fn +local windows = require 'lspconfig.ui.windows' +local util = require 'lspconfig.util' + +local error_messages = { + cmd_not_found = 'Unable to find executable. Please check your path and ensure the server is installed', + no_filetype_defined = 'No filetypes defined, Please define filetypes in setup()', + root_dir_not_found = 'Not found.', + async_root_dir_function = 'Asynchronous root_dir functions are not supported in :LspInfo', +} + +local helptags = { + [error_messages.no_filetype_defined] = { 'lspconfig-setup' }, + [error_messages.root_dir_not_found] = { 'lspconfig-root-detection' }, +} + +local function trim_blankspace(cmd) + local trimmed_cmd = {} + for _, str in ipairs(cmd) do + trimmed_cmd[#trimmed_cmd + 1] = str:match '^%s*(.*)' + end + return trimmed_cmd +end + +local function indent_lines(lines, offset) + return vim.tbl_map(function(val) + return offset .. val + end, lines) +end + +local function remove_newlines(cmd) + cmd = trim_blankspace(cmd) + cmd = table.concat(cmd, ' ') + cmd = vim.split(cmd, '\n') + cmd = trim_blankspace(cmd) + cmd = table.concat(cmd, ' ') + return cmd +end + +local cmd_type = { + ['function'] = function(_) + return '', 'NA' + end, + ['table'] = function(config) + local cmd = remove_newlines(config.cmd) + if vim.fn.executable(config.cmd[1]) == 1 then + return cmd, 'true' + end + return cmd, error_messages.cmd_not_found + end, +} + +local function make_config_info(config, bufnr) + local config_info = {} + config_info.name = config.name + config_info.helptags = {} + + if config.cmd then + config_info.cmd, config_info.cmd_is_executable = cmd_type[type(config.cmd)](config) + else + config_info.cmd = 'cmd not defined' + config_info.cmd_is_executable = 'NA' + end + + local buffer_dir = api.nvim_buf_call(bufnr, function() + return vim.fn.expand '%:p:h' + end) + + if config.get_root_dir then + local root_dir + local co = coroutine.create(function() + local status, err = pcall(function() + root_dir = config.get_root_dir(buffer_dir) + end) + if not status then + vim.notify(('[lspconfig] unhandled error: %s'):format(tostring(err), vim.log.levels.WARN)) + end + end) + coroutine.resume(co) + if root_dir then + config_info.root_dir = root_dir + elseif coroutine.status(co) == 'suspended' then + config_info.root_dir = error_messages.async_root_dir_function + else + config_info.root_dir = error_messages.root_dir_not_found + end + else + config_info.root_dir = error_messages.root_dir_not_found + vim.list_extend(config_info.helptags, helptags[error_messages.root_dir_not_found]) + end + + config_info.autostart = (config.autostart and 'true') or 'false' + config_info.handlers = table.concat(vim.tbl_keys(config.handlers), ', ') + config_info.filetypes = table.concat(config.filetypes or {}, ', ') + + local lines = { + 'Config: ' .. config_info.name, + } + + local info_lines = { + 'filetypes: ' .. config_info.filetypes, + 'root directory: ' .. config_info.root_dir, + 'cmd: ' .. config_info.cmd, + 'cmd is executable: ' .. config_info.cmd_is_executable, + 'autostart: ' .. config_info.autostart, + 'custom handlers: ' .. config_info.handlers, + } + + if vim.tbl_count(config_info.helptags) > 0 then + local help = vim.tbl_map(function(helptag) + return string.format(':h %s', helptag) + end, config_info.helptags) + info_lines = vim.list_extend({ + 'Refer to ' .. table.concat(help, ', ') .. ' for help.', + }, info_lines) + end + + vim.list_extend(lines, indent_lines(info_lines, '\t')) + + return lines +end + +---@param client vim.lsp.Client +---@param fname string +local function make_client_info(client, fname) + local client_info = {} + + client_info.cmd = cmd_type[type(client.config.cmd)](client.config) + local workspace_folders = fn.has 'nvim-0.9' == 1 and client.workspace_folders or client.workspaceFolders + local uv = vim.loop + local is_windows = uv.os_uname().version:match 'Windows' + fname = uv.fs_realpath(fname) or fn.fnamemodify(fn.resolve(fname), ':p') + if is_windows then + fname:gsub('%/', '%\\') + end + + if workspace_folders then + for _, schema in ipairs(workspace_folders) do + local matched = true + local root_dir = uv.fs_realpath(schema.name) + if root_dir == nil or fname:sub(1, root_dir:len()) ~= root_dir then + matched = false + end + + if matched then + client_info.root_dir = schema.name + break + end + end + end + + if not client_info.root_dir then + client_info.root_dir = 'Running in single file mode.' + end + client_info.filetypes = table.concat(client.config.filetypes or {}, ', ') + client_info.autostart = (client.config.autostart and 'true') or 'false' + client_info.attached_buffers_list = table.concat(vim.lsp.get_buffers_by_client_id(client.id), ', ') + + local lines = { + '', + 'Client: ' + .. client.name + .. ' (id: ' + .. tostring(client.id) + .. ', bufnr: [' + .. client_info.attached_buffers_list + .. '])', + } + + local info_lines = { + 'filetypes: ' .. client_info.filetypes, + 'autostart: ' .. client_info.autostart, + 'root directory: ' .. client_info.root_dir, + 'cmd: ' .. client_info.cmd, + } + + if client.config.lspinfo then + local server_specific_info = client.config.lspinfo(client.config) + info_lines = vim.list_extend(info_lines, server_specific_info) + end + + vim.list_extend(lines, indent_lines(info_lines, '\t')) + + return lines +end + +return function() + -- These options need to be cached before switching to the floating + -- buffer. + local original_bufnr = api.nvim_get_current_buf() + local buf_clients = util.get_lsp_clients { bufnr = original_bufnr } + local clients = util.get_lsp_clients() + local buffer_filetype = vim.bo.filetype + local fname = api.nvim_buf_get_name(original_bufnr) + + windows.default_options.wrap = true + windows.default_options.breakindent = true + windows.default_options.breakindentopt = 'shift:25' + windows.default_options.showbreak = 'NONE' + + local win_info = windows.percentage_range_window(0.8, 0.7) + local bufnr, win_id = win_info.bufnr, win_info.win_id + vim.bo.bufhidden = 'wipe' + + local buf_lines = {} + + local buf_client_ids = {} + for _, client in ipairs(buf_clients) do + buf_client_ids[#buf_client_ids + 1] = client.id + end + + local other_active_clients = {} + for _, client in ipairs(clients) do + if not vim.tbl_contains(buf_client_ids, client.id) then + other_active_clients[#other_active_clients + 1] = client + end + end + + -- insert the tips at the top of window + buf_lines[#buf_lines + 1] = 'Press q or to close this window. Press to view server doc.' + + local header = { + '', + 'Language client log: ' .. (vim.lsp.get_log_path()), + 'Detected filetype: ' .. buffer_filetype, + } + vim.list_extend(buf_lines, header) + + local buffer_clients_header = { + '', + tostring(#vim.tbl_keys(buf_clients)) .. ' client(s) attached to this buffer: ', + } + + vim.list_extend(buf_lines, buffer_clients_header) + for _, client in ipairs(buf_clients) do + local client_info = make_client_info(client, fname) + vim.list_extend(buf_lines, client_info) + end + + local other_active_section_header = { + '', + tostring(#other_active_clients) .. ' active client(s) not attached to this buffer: ', + } + if not vim.tbl_isempty(other_active_clients) then + vim.list_extend(buf_lines, other_active_section_header) + end + for _, client in ipairs(other_active_clients) do + local client_info = make_client_info(client, fname) + vim.list_extend(buf_lines, client_info) + end + + local other_matching_configs_header = { + '', + 'Other clients that match the filetype: ' .. buffer_filetype, + '', + } + + local other_matching_configs = util.get_other_matching_providers(buffer_filetype) + + if not vim.tbl_isempty(other_matching_configs) then + vim.list_extend(buf_lines, other_matching_configs_header) + for _, config in ipairs(other_matching_configs) do + vim.list_extend(buf_lines, make_config_info(config, original_bufnr)) + end + end + + local matching_config_header = { + '', + 'Configured servers list: ' .. table.concat(util.available_servers(), ', '), + } + + vim.list_extend(buf_lines, matching_config_header) + + local fmt_buf_lines = indent_lines(buf_lines, ' ') + + api.nvim_buf_set_lines(bufnr, 0, -1, true, fmt_buf_lines) + vim.bo.modifiable = false + vim.bo.filetype = 'lspinfo' + + local augroup = api.nvim_create_augroup('lspinfo', { clear = false }) + + local function close() + api.nvim_clear_autocmds { group = augroup, buffer = bufnr } + if api.nvim_win_is_valid(win_id) then + api.nvim_win_close(win_id, true) + end + end + + vim.keymap.set('n', '', close, { buffer = bufnr, nowait = true }) + vim.keymap.set('n', 'q', close, { buffer = bufnr, nowait = true }) + api.nvim_create_autocmd({ 'BufDelete', 'BufHidden' }, { + once = true, + buffer = bufnr, + callback = close, + group = augroup, + }) + + vim.fn.matchadd( + 'Error', + error_messages.no_filetype_defined + .. '.\\|' + .. 'cmd not defined\\|' + .. error_messages.cmd_not_found + .. '\\|' + .. error_messages.root_dir_not_found + ) + + vim.cmd [[ + syn keyword String true + syn keyword Error false + syn match LspInfoFiletypeList /\', close_doc_win, { buffer = info.bufnr }) + end + + vim.keymap.set('n', '', show_doc, { buffer = true, nowait = true }) +end diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/windows.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/windows.lua new file mode 100644 index 0000000..dc02c9e --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/ui/windows.lua @@ -0,0 +1,129 @@ +-- The following is extracted and modified from plenary.vnim by +-- TJ Devries. It is not a stable API, and is expected to change +-- +local api = vim.api + +local function apply_defaults(original, defaults) + if original == nil then + original = {} + end + + original = vim.deepcopy(original) + + for k, v in pairs(defaults) do + if original[k] == nil then + original[k] = v + end + end + + return original +end + +local win_float = {} + +win_float.default_options = {} + +function win_float.default_opts(options) + options = apply_defaults(options, { percentage = 0.9 }) + + local width = math.floor(vim.o.columns * options.percentage) + local height = math.floor(vim.o.lines * options.percentage) + + local top = math.floor(((vim.o.lines - height) / 2)) + local left = math.floor((vim.o.columns - width) / 2) + + local opts = { + relative = 'editor', + row = top, + col = left, + width = width, + height = height, + style = 'minimal', + border = { + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + { ' ', 'NormalFloat' }, + }, + } + + opts.border = options.border and options.border + + return opts +end + +--- Create window that takes up certain percentags of the current screen. +--- +--- Works regardless of current buffers, tabs, splits, etc. +--@param col_range number | Table: +-- If number, then center the window taking up this percentage of the screen. +-- If table, first index should be start, second_index should be end +--@param row_range number | Table: +-- If number, then center the window taking up this percentage of the screen. +-- If table, first index should be start, second_index should be end +function win_float.percentage_range_window(col_range, row_range, options) + options = apply_defaults(options, win_float.default_options) + + local win_opts = win_float.default_opts(options) + win_opts.relative = 'editor' + + local height_percentage, row_start_percentage + if type(row_range) == 'number' then + assert(row_range <= 1) + assert(row_range > 0) + height_percentage = row_range + row_start_percentage = (1 - height_percentage) / 3 + elseif type(row_range) == 'table' then + height_percentage = row_range[2] - row_range[1] + row_start_percentage = row_range[1] + else + error(string.format("Invalid type for 'row_range': %p", row_range)) + end + + win_opts.height = math.ceil(vim.o.lines * height_percentage) + win_opts.row = math.ceil(vim.o.lines * row_start_percentage) + win_opts.border = options.border or 'none' + + local width_percentage, col_start_percentage + if type(col_range) == 'number' then + assert(col_range <= 1) + assert(col_range > 0) + width_percentage = col_range + col_start_percentage = (1 - width_percentage) / 2 + elseif type(col_range) == 'table' then + width_percentage = col_range[2] - col_range[1] + col_start_percentage = col_range[1] + else + error(string.format("Invalid type for 'col_range': %p", col_range)) + end + + win_opts.col = math.floor(vim.o.columns * col_start_percentage) + win_opts.width = math.floor(vim.o.columns * width_percentage) + + local bufnr = options.bufnr or api.nvim_create_buf(false, true) + local win_id = api.nvim_open_win(bufnr, true, win_opts) + api.nvim_win_set_option(win_id, 'winhl', 'FloatBorder:LspInfoBorder') + + for k, v in pairs(win_float.default_options) do + if k ~= 'border' then + vim.opt_local[k] = v + end + end + + api.nvim_win_set_buf(win_id, bufnr) + + api.nvim_win_set_option(win_id, 'cursorcolumn', false) + api.nvim_buf_set_option(bufnr, 'tabstop', 2) + api.nvim_buf_set_option(bufnr, 'shiftwidth', 2) + + return { + bufnr = bufnr, + win_id = win_id, + } +end + +return win_float diff --git a/pack/ant/start/nvim-lspconfig/lua/lspconfig/util.lua b/pack/ant/start/nvim-lspconfig/lua/lspconfig/util.lua new file mode 100644 index 0000000..2fb5e72 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/lua/lspconfig/util.lua @@ -0,0 +1,431 @@ +local vim = vim +local validate = vim.validate +local api = vim.api +local lsp = vim.lsp +local uv = vim.loop +local nvim_eleven = vim.fn.has 'nvim-0.11' == 1 + +local is_windows = uv.os_uname().version:match 'Windows' + +local M = {} + +M.default_config = { + log_level = lsp.protocol.MessageType.Warning, + message_level = lsp.protocol.MessageType.Warning, + settings = vim.empty_dict(), + init_options = vim.empty_dict(), + handlers = {}, + autostart = true, + capabilities = lsp.protocol.make_client_capabilities(), +} + +-- global on_setup hook +M.on_setup = nil + +function M.bufname_valid(bufname) + if bufname:match '^/' or bufname:match '^[a-zA-Z]:' or bufname:match '^zipfile://' or bufname:match '^tarfile:' then + return true + end + return false +end + +function M.validate_bufnr(bufnr) + validate { + bufnr = { bufnr, 'n' }, + } + return bufnr == 0 and api.nvim_get_current_buf() or bufnr +end + +function M.add_hook_before(func, new_fn) + if func then + return function(...) + -- TODO which result? + new_fn(...) + return func(...) + end + else + return new_fn + end +end + +function M.add_hook_after(func, new_fn) + if func then + return function(...) + -- TODO which result? + func(...) + return new_fn(...) + end + else + return new_fn + end +end + +-- Maps lspconfig-style command options to nvim_create_user_command (i.e. |command-attributes|) option names. +local opts_aliases = { + ['description'] = 'desc', +} + +---@param command_definition table +function M._parse_user_command_options(command_definition) + ---@type table + local opts = {} + for k, v in pairs(command_definition) do + if type(k) == 'string' then + local attribute = k.gsub(k, '^%-+', '') + opts[opts_aliases[attribute] or attribute] = v + elseif type(k) == 'number' and type(v) == 'string' and v:match '^%-' then + -- Splits strings like "-nargs=* -complete=customlist,v:lua.something" into { "-nargs=*", "-complete=customlist,v:lua.something" } + for _, command_attribute in ipairs(vim.split(v, '%s')) do + -- Splits attribute into a key-value pair, like "-nargs=*" to { "-nargs", "*" } + local attribute, value = unpack(vim.split(command_attribute, '=', { plain = true })) + attribute = attribute.gsub(attribute, '^%-+', '') + opts[opts_aliases[attribute] or attribute] = value or true + end + end + end + return opts +end + +function M.create_module_commands(module_name, commands) + for command_name, def in pairs(commands) do + if type(def) ~= 'function' then + local opts = M._parse_user_command_options(def) + api.nvim_create_user_command(command_name, function(info) + require('lspconfig')[module_name].commands[command_name][1](unpack(info.fargs)) + end, opts) + end + end +end + +-- Some path utilities +M.path = (function() + local function escape_wildcards(path) + return path:gsub('([%[%]%?%*])', '\\%1') + end + + --- @param path string + --- @return string + local function sanitize(path) + if is_windows then + path = path:sub(1, 1):upper() .. path:sub(2) + path = path:gsub('\\', '/') + end + return path + end + + --- @param filename string + --- @return string|false + local function exists(filename) + local stat = uv.fs_stat(filename) + return stat and stat.type or false + end + + --- @param filename string + --- @return boolean + local function is_dir(filename) + return exists(filename) == 'directory' + end + + --- @param filename string + --- @return boolean + local function is_file(filename) + return exists(filename) == 'file' + end + + --- @param path string + --- @return boolean + local function is_fs_root(path) + if is_windows then + return path:match '^%a:$' + else + return path == '/' + end + end + + --- @param filename string + --- @return boolean + local function is_absolute(filename) + if is_windows then + return filename:match '^%a:' or filename:match '^\\\\' + else + return filename:match '^/' + end + end + + --- @generic T: string? + --- @param path T + --- @return T + local function dirname(path) + local strip_dir_pat = '/([^/]+)$' + local strip_sep_pat = '/$' + if not path or #path == 0 then + return path + end + local result = path:gsub(strip_sep_pat, ''):gsub(strip_dir_pat, '') + if #result == 0 then + if is_windows then + return path:sub(1, 2):upper() + else + return '/' + end + end + return result + end + + local function path_join(...) + return table.concat(M.tbl_flatten { ... }, '/') + end + + -- Traverse the path calling cb along the way. + local function traverse_parents(path, cb) + path = uv.fs_realpath(path) + local dir = path + -- Just in case our algo is buggy, don't infinite loop. + for _ = 1, 100 do + dir = dirname(dir) + if not dir then + return + end + -- If we can't ascend further, then stop looking. + if cb(dir, path) then + return dir, path + end + if is_fs_root(dir) then + break + end + end + end + + -- Iterate the path until we find the rootdir. + local function iterate_parents(path) + local function it(_, v) + if v and not is_fs_root(v) then + v = dirname(v) + else + return + end + if v and uv.fs_realpath(v) then + return v, path + else + return + end + end + return it, path, path + end + + local function is_descendant(root, path) + if not path then + return false + end + + local function cb(dir, _) + return dir == root + end + + local dir, _ = traverse_parents(path, cb) + + return dir == root + end + + local path_separator = is_windows and ';' or ':' + + return { + escape_wildcards = escape_wildcards, + is_dir = is_dir, + is_file = is_file, + is_absolute = is_absolute, + exists = exists, + dirname = dirname, + join = path_join, + sanitize = sanitize, + traverse_parents = traverse_parents, + iterate_parents = iterate_parents, + is_descendant = is_descendant, + path_separator = path_separator, + } +end)() + +function M.search_ancestors(startpath, func) + validate { func = { func, 'f' } } + if func(startpath) then + return startpath + end + local guard = 100 + for path in M.path.iterate_parents(startpath) do + -- Prevent infinite recursion if our algorithm breaks + guard = guard - 1 + if guard == 0 then + return + end + + if func(path) then + return path + end + end +end + +function M.tbl_flatten(t) + return nvim_eleven and vim.iter(t):flatten(math.huge):totable() or vim.tbl_flatten(t) +end + +function M.get_lsp_clients(filter) + return nvim_eleven and lsp.get_clients(filter) or lsp.get_active_clients(filter) +end + +function M.root_pattern(...) + local patterns = M.tbl_flatten { ... } + return function(startpath) + startpath = M.strip_archive_subpath(startpath) + for _, pattern in ipairs(patterns) do + local match = M.search_ancestors(startpath, function(path) + for _, p in ipairs(vim.fn.glob(M.path.join(M.path.escape_wildcards(path), pattern), true, true)) do + if M.path.exists(p) then + return path + end + end + end) + + if match ~= nil then + return match + end + end + end +end + +function M.find_git_ancestor(startpath) + return M.search_ancestors(startpath, function(path) + -- Support git directories and git files (worktrees) + if M.path.is_dir(M.path.join(path, '.git')) or M.path.is_file(M.path.join(path, '.git')) then + return path + end + end) +end + +function M.find_mercurial_ancestor(startpath) + return M.search_ancestors(startpath, function(path) + -- Support Mercurial directories + if M.path.is_dir(M.path.join(path, '.hg')) then + return path + end + end) +end + +function M.find_node_modules_ancestor(startpath) + return M.search_ancestors(startpath, function(path) + if M.path.is_dir(M.path.join(path, 'node_modules')) then + return path + end + end) +end + +function M.find_package_json_ancestor(startpath) + return M.search_ancestors(startpath, function(path) + if M.path.is_file(M.path.join(path, 'package.json')) then + return path + end + end) +end + +function M.insert_package_json(config_files, field, fname) + local path = vim.fn.fnamemodify(fname, ':h') + local root_with_package = M.find_package_json_ancestor(path) + + if root_with_package then + -- only add package.json if it contains field parameter + local path_sep = is_windows and '\\' or '/' + for line in io.lines(root_with_package .. path_sep .. 'package.json') do + if line:find(field) then + config_files[#config_files + 1] = 'package.json' + break + end + end + end + return config_files +end + +function M.get_active_clients_list_by_ft(filetype) + local clients = M.get_lsp_clients() + local clients_list = {} + for _, client in pairs(clients) do + local filetypes = client.config.filetypes or {} + for _, ft in pairs(filetypes) do + if ft == filetype then + table.insert(clients_list, client.name) + end + end + end + return clients_list +end + +function M.get_other_matching_providers(filetype) + local configs = require 'lspconfig.configs' + local active_clients_list = M.get_active_clients_list_by_ft(filetype) + local other_matching_configs = {} + for _, config in pairs(configs) do + if not vim.tbl_contains(active_clients_list, config.name) then + local filetypes = config.filetypes or {} + for _, ft in pairs(filetypes) do + if ft == filetype then + table.insert(other_matching_configs, config) + end + end + end + end + return other_matching_configs +end + +function M.get_config_by_ft(filetype) + local configs = require 'lspconfig.configs' + local matching_configs = {} + for _, config in pairs(configs) do + local filetypes = config.filetypes or {} + for _, ft in pairs(filetypes) do + if ft == filetype then + table.insert(matching_configs, config) + end + end + end + return matching_configs +end + +function M.get_active_client_by_name(bufnr, servername) + --TODO(glepnir): remove this for loop when we want only support 0.10+ + for _, client in pairs(M.get_lsp_clients { bufnr = bufnr }) do + if client.name == servername then + return client + end + end +end + +function M.get_managed_clients() + local configs = require 'lspconfig.configs' + local clients = {} + for _, config in pairs(configs) do + if config.manager then + vim.list_extend(clients, config.manager:clients()) + end + end + return clients +end + +function M.available_servers() + local servers = {} + local configs = require 'lspconfig.configs' + for server, config in pairs(configs) do + if config.manager ~= nil then + table.insert(servers, server) + end + end + return servers +end + +-- For zipfile: or tarfile: virtual paths, returns the path to the archive. +-- Other paths are returned unaltered. +function M.strip_archive_subpath(path) + -- Matches regex from zip.vim / tar.vim + path = vim.fn.substitute(path, 'zipfile://\\(.\\{-}\\)::[^\\\\].*$', '\\1', '') + path = vim.fn.substitute(path, 'tarfile:\\(.\\{-}\\)::.*$', '\\1', '') + return path +end + +return M diff --git a/pack/ant/start/nvim-lspconfig/neovim.yml b/pack/ant/start/nvim-lspconfig/neovim.yml new file mode 100644 index 0000000..9de2931 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/neovim.yml @@ -0,0 +1,25 @@ +--- +base: lua51 + +globals: + vim: + any: true + assert: + args: + - type: bool + - type: string + required: false + after_each: + args: + - type: function + before_each: + args: + - type: function + describe: + args: + - type: string + - type: function + it: + args: + - type: string + - type: function diff --git a/pack/ant/start/nvim-lspconfig/nvim-lspconfig-scm-1.rockspec b/pack/ant/start/nvim-lspconfig/nvim-lspconfig-scm-1.rockspec new file mode 100644 index 0000000..817821c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/nvim-lspconfig-scm-1.rockspec @@ -0,0 +1,31 @@ +local _MODREV, _SPECREV = 'scm', '-1' + +rockspec_format = "3.0" +package = 'nvim-lspconfig' +version = _MODREV .. _SPECREV + +description = { + summary = "A collection of common configurations for Neovim's built-in language server client.", + detailed = [[ + This plugin allows for declaratively configuring, launching, and initializing language servers you have installed on your system. + Language server configurations are community-maintained. + ]], + homepage = 'https://github.com/neovim/nvim-lspconfig', + license = 'Apache/2.0', + labels = { 'neovim', 'lsp' } +} + +dependencies = { + 'lua == 5.1', +} + +source = { + url = 'git://github.com/neovim/nvim-lspconfig', +} + +build = { + type = 'builtin', + copy_directories = { + 'doc' + } +} diff --git a/pack/ant/start/nvim-lspconfig/plugin/lspconfig.lua b/pack/ant/start/nvim-lspconfig/plugin/lspconfig.lua new file mode 100644 index 0000000..254ca6c --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/plugin/lspconfig.lua @@ -0,0 +1,159 @@ +if vim.g.lspconfig ~= nil then + return +end +vim.g.lspconfig = 1 + +local api, lsp = vim.api, vim.lsp + +if vim.fn.has 'nvim-0.8' ~= 1 then + local version_info = vim.version() + local warning_str = string.format( + '[lspconfig] requires neovim 0.8 or later. Detected neovim version: 0.%s.%s', + version_info.minor, + version_info.patch + ) + vim.notify_once(warning_str) + return +end + +local completion_sort = function(items) + table.sort(items) + return items +end + +local lsp_complete_configured_servers = function(arg) + return completion_sort(vim.tbl_filter(function(s) + return s:sub(1, #arg) == arg + end, require('lspconfig.util').available_servers())) +end + +local lsp_get_active_client_ids = function(arg) + local clients = vim.tbl_map(function(client) + return ('%d (%s)'):format(client.id, client.name) + end, require('lspconfig.util').get_managed_clients()) + + return completion_sort(vim.tbl_filter(function(s) + return s:sub(1, #arg) == arg + end, clients)) +end + +local get_clients_from_cmd_args = function(arg) + local result = {} + for id in (arg or ''):gmatch '(%d+)' do + result[#result + 1] = lsp.get_client_by_id(tonumber(id)) + end + if #result == 0 then + return require('lspconfig.util').get_managed_clients() + end + return result +end + +for group, hi in pairs { + LspInfoBorder = { link = 'Label', default = true }, + LspInfoList = { link = 'Function', default = true }, + LspInfoTip = { link = 'Comment', default = true }, + LspInfoTitle = { link = 'Title', default = true }, + LspInfoFiletype = { link = 'Type', default = true }, +} do + api.nvim_set_hl(0, group, hi) +end + +-- Called from plugin/lspconfig.vim because it requires knowing that the last +-- script in scriptnames to be executed is lspconfig. +api.nvim_create_user_command('LspInfo', function() + require 'lspconfig.ui.lspinfo'() +end, { + desc = 'Displays attached, active, and configured language servers', +}) + +api.nvim_create_user_command('LspStart', function(info) + local server_name = string.len(info.args) > 0 and info.args or nil + if server_name then + local config = require('lspconfig.configs')[server_name] + if config then + config.launch() + return + end + end + + local matching_configs = require('lspconfig.util').get_config_by_ft(vim.bo.filetype) + for _, config in ipairs(matching_configs) do + config.launch() + end +end, { + desc = 'Manually launches a language server', + nargs = '?', + complete = lsp_complete_configured_servers, +}) + +api.nvim_create_user_command('LspRestart', function(info) + local detach_clients = {} + for _, client in ipairs(get_clients_from_cmd_args(info.args)) do + client.stop() + if vim.tbl_count(client.attached_buffers) > 0 then + detach_clients[client.name] = { client, lsp.get_buffers_by_client_id(client.id) } + end + end + local timer = vim.loop.new_timer() + timer:start( + 500, + 100, + vim.schedule_wrap(function() + for client_name, tuple in pairs(detach_clients) do + if require('lspconfig.configs')[client_name] then + local client, attached_buffers = unpack(tuple) + if client.is_stopped() then + for _, buf in pairs(attached_buffers) do + require('lspconfig.configs')[client_name].launch(buf) + end + detach_clients[client_name] = nil + end + end + end + + if next(detach_clients) == nil and not timer:is_closing() then + timer:close() + end + end) + ) +end, { + desc = 'Manually restart the given language client(s)', + nargs = '?', + complete = lsp_get_active_client_ids, +}) + +api.nvim_create_user_command('LspStop', function(info) + local current_buf = vim.api.nvim_get_current_buf() + local server_id, force + local arguments = vim.split(info.args, '%s') + for _, v in pairs(arguments) do + if v == '++force' then + force = true + elseif v:find '^[0-9]+$' then + server_id = v + end + end + + if not server_id then + local servers_on_buffer = require('lspconfig.util').get_lsp_clients { bufnr = current_buf } + for _, client in ipairs(servers_on_buffer) do + if client.attached_buffers[current_buf] then + client.stop(force) + end + end + else + for _, client in ipairs(get_clients_from_cmd_args(server_id)) do + client.stop(force) + end + end +end, { + desc = 'Manually stops the given language client(s)', + nargs = '?', + complete = lsp_get_active_client_ids, +}) + +api.nvim_create_user_command('LspLog', function() + vim.cmd(string.format('tabnew %s', lsp.get_log_path())) +end, { + desc = 'Opens the Nvim LSP client log.', +}) diff --git a/pack/ant/start/nvim-lspconfig/scripts/README_template.md b/pack/ant/start/nvim-lspconfig/scripts/README_template.md new file mode 100644 index 0000000..1339c50 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/scripts/README_template.md @@ -0,0 +1,12 @@ +# Configurations + + +LSP configs provided by nvim-lspconfig are listed below. This documentation is +autogenerated from the Lua files. You can view this file in Nvim by running +`:help lspconfig-all`. + +{{implemented_servers_list}} + +{{lsp_server_details}} + +vim:ft=markdown diff --git a/pack/ant/start/nvim-lspconfig/scripts/docgen.lua b/pack/ant/start/nvim-lspconfig/scripts/docgen.lua new file mode 100644 index 0000000..1417e34 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/scripts/docgen.lua @@ -0,0 +1,281 @@ +require 'lspconfig' +local configs = require 'lspconfig.configs' +local util = require 'lspconfig.util' +local inspect = vim.inspect +local uv = vim.loop +local fn = vim.fn + +local function template(s, params) + return (s:gsub('{{([^{}]+)}}', params)) +end + +local function map_list(t, func) + local res = {} + for i, v in ipairs(t) do + local x = func(v, i) + if x ~= nil then + table.insert(res, x) + end + end + return res +end + +local function indent(n, s) + local prefix + if type(n) == 'number' then + if n <= 0 then + return s + end + prefix = string.rep(' ', n) + else + assert(type(n) == 'string', 'n must be number or string') + prefix = n + end + local lines = vim.split(s, '\n', true) + for i, line in ipairs(lines) do + lines[i] = prefix .. line + end + return table.concat(lines, '\n') +end + +local function make_parts(fns) + return util.tbl_flatten(map_list(fns, function(v) + if type(v) == 'function' then + v = v() + end + return { v } + end)) +end + +local function make_section(indentlvl, sep, parts) + return indent(indentlvl, table.concat(make_parts(parts), sep)) +end + +local function readfile(path) + assert(util.path.is_file(path)) + return io.open(path):read '*a' +end + +local function sorted_map_table(t, func) + local keys = vim.tbl_keys(t) + table.sort(keys) + return map_list(keys, function(k) + return func(k, t[k]) + end) +end + +local lsp_section_template = [[ +## {{template_name}} + +{{preamble}} + +**Snippet to enable the language server:** +```lua +require'lspconfig'.{{template_name}}.setup{} +``` +{{commands}} + +**Default values:** +{{default_values}} + +]] + +local function require_all_configs() + -- Make sure username doesn't leak into the generated document + local old_home = vim.env.HOME + local old_cache_home = vim.env.XDG_CACHE_HOME + vim.env.HOME = '/home/user' + vim.env.XDG_CACHE_HOME = '/home/user/.cache' + + -- Configs are lazy-loaded, tickle them to populate the `configs` singleton. + for _, v in ipairs(vim.fn.glob('lua/lspconfig/server_configurations/*.lua', 1, 1)) do + local module_name = v:gsub('.*/', ''):gsub('%.lua$', '') + configs[module_name] = require('lspconfig.server_configurations.' .. module_name) + end + + -- Reset the environment variables + vim.env.HOME = old_home + vim.env.XDG_CACHE_HOME = old_cache_home +end + +local function make_lsp_sections() + return make_section( + 0, + '\n', + sorted_map_table(configs, function(template_name, template_object) + local template_def = template_object.document_config + local docs = template_def.docs + + local params = { + template_name = template_name, + preamble = '', + commands = '', + default_values = '', + } + + params.commands = make_section(0, '\n\n', { + function() + if not template_def.commands or #vim.tbl_keys(template_def.commands) == 0 then + return + end + return '**Commands:**\n' + .. make_section(0, '\n', { + sorted_map_table(template_def.commands, function(name, def) + if def.description then + return string.format('- %s: %s', name, def.description) + end + return string.format('- %s', name) + end), + }) + end, + }) + + params.default_values = make_section(2, '\n\n', { + function() + if not template_def.default_config then + return + end + return make_section(0, '\n', { + sorted_map_table(template_def.default_config, function(k, v) + local description = ((docs or {}).default_config or {})[k] + if description and type(description) ~= 'string' then + description = inspect(description) + elseif not description and type(v) == 'function' then + description = 'see source file' + end + return string.format('- `%s` : \n```lua\n%s\n```', k, description or inspect(v)) + end), + }) + end, + }) + + if docs then + local tempdir = os.getenv 'DOCGEN_TEMPDIR' or uv.fs_mkdtemp '/tmp/nvim-lsp.XXXXXX' + local preamble_parts = make_parts { + function() + if docs.description and #docs.description > 0 then + return docs.description + end + end, + function() + local package_json_name = util.path.join(tempdir, template_name .. '.package.json') + if docs.package_json then + if not util.path.is_file(package_json_name) then + os.execute(string.format('curl -v -L -o %q %q', package_json_name, docs.package_json)) + end + if not util.path.is_file(package_json_name) then + print(string.format('Failed to download package.json for %q at %q', template_name, docs.package_json)) + os.exit(1) + return + end + local data = vim.json.decode(readfile(package_json_name)) + -- The entire autogenerated section. + return make_section(0, '\n', { + -- The default settings section + function() + local default_settings = (data.contributes or {}).configuration + if not default_settings.properties then + return + end + -- The outer section. + return make_section(0, '\n', { + 'This server accepts configuration via the `settings` key.', + '
    Available settings:', + '', + -- The list of properties. + make_section( + 0, + '\n\n', + sorted_map_table(default_settings.properties, function(k, v) + local function tick(s) + return string.format('`%s`', s) + end + local function bold(s) + return string.format('**%s**', s) + end + + -- https://github.github.com/gfm/#backslash-escapes + local function escape_markdown_punctuations(str) + local pattern = + '\\(\\*\\|\\.\\|?\\|!\\|"\\|#\\|\\$\\|%\\|\'\\|(\\|)\\|,\\|-\\|\\/\\|:\\|;\\|<\\|=\\|>\\|@\\|\\[\\|\\\\\\|\\]\\|\\^\\|_\\|`\\|{\\|\\\\|\\|}\\)' + return fn.substitute(str, pattern, '\\\\\\0', 'g') + end + + -- local function pre(s) return string.format("
    %s
    ", s) end + -- local function code(s) return string.format("%s", s) end + if not (type(v) == 'table') then + return + end + return make_section(0, '\n', { + '- ' .. make_section(0, ': ', { + bold(tick(k)), + function() + if v.enum then + return tick('enum ' .. inspect(v.enum)) + end + if v.type then + return tick(table.concat(util.tbl_flatten { v.type }, '|')) + end + end, + }), + '', + make_section(2, '\n\n', { + { v.default and 'Default: ' .. tick(inspect(v.default, { newline = '', indent = '' })) }, + { v.items and 'Array items: ' .. tick(inspect(v.items, { newline = '', indent = '' })) }, + { escape_markdown_punctuations(v.description) }, + }), + }) + end) + ), + '', + '
    ', + }) + end, + }) + end + end, + } + if not os.getenv 'DOCGEN_TEMPDIR' then + os.execute('rm -rf ' .. tempdir) + end + -- Insert a newline after the preamble if it exists. + if #preamble_parts > 0 then + table.insert(preamble_parts, '') + end + params.preamble = table.concat(preamble_parts, '\n') + end + + return template(lsp_section_template, params) + end) + ) +end + +local function make_implemented_servers_list() + return make_section( + 0, + '\n', + sorted_map_table(configs, function(k) + return template('- [{{server}}](#{{server}})', { server = k }) + end) + ) +end + +local function generate_readme(template_file, params) + vim.validate { + lsp_server_details = { params.lsp_server_details, 's' }, + implemented_servers_list = { params.implemented_servers_list, 's' }, + } + local input_template = readfile(template_file) + local readme_data = template(input_template, params) + + local writer = io.open('doc/server_configurations.md', 'w') + writer:write(readme_data) + writer:close() + uv.fs_copyfile('doc/server_configurations.md', 'doc/server_configurations.txt') +end + +require_all_configs() +generate_readme('scripts/README_template.md', { + implemented_servers_list = make_implemented_servers_list(), + lsp_server_details = make_lsp_sections(), +}) diff --git a/pack/ant/start/nvim-lspconfig/scripts/docgen.sh b/pack/ant/start/nvim-lspconfig/scripts/docgen.sh new file mode 100755 index 0000000..2884654 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/scripts/docgen.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec nvim -u NONE -E -R --headless +'set rtp+=$PWD' +'luafile scripts/docgen.lua' +q diff --git a/pack/ant/start/nvim-lspconfig/selene.toml b/pack/ant/start/nvim-lspconfig/selene.toml new file mode 100644 index 0000000..0882953 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/selene.toml @@ -0,0 +1,7 @@ +std = "neovim" + +[rules] +global_usage = "allow" +multiple_statements = "allow" +incorrect_standard_library_use = "allow" +mixed_table = "allow" diff --git a/pack/ant/start/nvim-lspconfig/test/lspconfig_spec.lua b/pack/ant/start/nvim-lspconfig/test/lspconfig_spec.lua new file mode 100644 index 0000000..36eca3b --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/test/lspconfig_spec.lua @@ -0,0 +1,282 @@ +local root = vim.fn.getcwd() + +describe('lspconfig', function() + local eq = assert.are.equal + local same = assert.are.same + + before_each(function() + vim.api.nvim_command('cd ' .. root) + end) + + describe('util', function() + describe('path', function() + describe('escape_wildcards', function() + it('doesnt escape if not needed', function() + local lspconfig = require 'lspconfig' + + local res = lspconfig.util.path.escape_wildcards '/usr/local/test/fname.lua' + eq('/usr/local/test/fname.lua', res) + end) + it('escapes if needed', function() + local lspconfig = require 'lspconfig' + + local res = lspconfig.util.path.escape_wildcards '/usr/local/test/[sq brackets] fname?*.lua' + eq('/usr/local/test/\\[sq brackets\\] fname\\?\\*.lua', res) + end) + end) + describe('exists', function() + it('is present directory', function() + local lspconfig = require 'lspconfig' + + local cwd = vim.fn.getcwd() + eq(true, lspconfig.util.path.exists(cwd) ~= false) + end) + + it('is not present directory', function() + local lspconfig = require 'lspconfig' + local not_exist_dir = vim.fn.getcwd() .. '/not/exists' + eq(true, lspconfig.util.path.exists(not_exist_dir) == false) + end) + + it('is present file', function() + local lspconfig = require 'lspconfig' + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/' + local file = vim.fn.getcwd() .. '/root_marker.txt' + eq(true, lspconfig.util.path.exists(file) ~= false) + end) + + it('is not present file', function() + local lspconfig = require 'lspconfig' + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/' + local file = vim.fn.getcwd() .. '/not_exists.txt' + assert.is_false(lspconfig.util.path.exists(file)) + end) + end) + + describe('is_dir', function() + it('is directory', function() + local lspconfig = require 'lspconfig' + local cwd = vim.fn.getcwd() + assert.is_true(lspconfig.util.path.is_dir(cwd)) + end) + + it('is not present directory', function() + local lspconfig = require 'lspconfig' + local not_exist_dir = vim.fn.getcwd() .. '/not/exists' + eq(true, not lspconfig.util.path.is_dir(not_exist_dir)) + end) + + it('is file', function() + local lspconfig = require 'lspconfig' + + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/' + local file = vim.fn.getcwd() .. '/root_marker.txt' + + eq(true, not lspconfig.util.path.is_dir(file)) + end) + end) + + describe('is_file', function() + it('is file', function() + local lspconfig = require 'lspconfig' + + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/' + local file = vim.fn.getcwd() .. '/root_marker.txt' + + eq(true, lspconfig.util.path.is_file(file)) + end) + + it('is not present file', function() + local lspconfig = require 'lspconfig' + + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/' + local file = vim.fn.getcwd() .. '/not_exists.txt' + + eq(true, not lspconfig.util.path.is_file(file)) + end) + + it('is directory', function() + local lspconfig = require 'lspconfig' + + local cwd = vim.fn.getcwd() + eq(true, not lspconfig.util.path.is_file(cwd)) + end) + end) + + describe('is_absolute', function() + it('is absolute', function() + local lspconfig = require 'lspconfig' + eq(true, lspconfig.util.path.is_absolute '/foo/bar' ~= nil) + end) + + it('is not absolute', function() + local lspconfig = require 'lspconfig' + assert.is_nil(lspconfig.util.path.is_absolute 'foo/bar') + assert.is_nil(lspconfig.util.path.is_absolute '../foo/bar') + end) + end) + + describe('join', function() + it('', function() + local lspconfig = require 'lspconfig' + local res = lspconfig.util.path.join('foo', 'bar', 'baz') + eq('foo/bar/baz', res) + end) + end) + end) + + describe('root_pattern', function() + it('resolves to a_marker.txt', function() + local lspconfig = require 'lspconfig' + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/a' + local cwd = vim.fn.getcwd() + eq(true, cwd == lspconfig.util.root_pattern { 'a_marker.txt', 'root_marker.txt' }(cwd)) + end) + + it('resolves to root_marker.txt', function() + local lspconfig = require 'lspconfig' + + -- change the working directory to test directory + vim.api.nvim_command 'cd ./test/test_dir/a' + + local cwd = vim.fn.getcwd() + local resolved = lspconfig.util.root_pattern { 'root_marker.txt' }(cwd) + vim.api.nvim_command 'cd ..' + + eq(true, vim.fn.getcwd() == resolved) + end) + end) + + describe('strip_archive_subpath', function() + it('strips zipfile subpaths', function() + local lspconfig = require 'lspconfig' + local res = lspconfig.util.strip_archive_subpath 'zipfile:///one/two.zip::three/four' + eq('/one/two.zip', res) + end) + + it('strips tarfile subpaths', function() + local lspconfig = require 'lspconfig' + local res = lspconfig.util.strip_archive_subpath 'tarfile:/one/two.tgz::three/four' + eq('/one/two.tgz', res) + end) + + it('returns non-archive paths as-is', function() + local lspconfig = require 'lspconfig' + local res = lspconfig.util.strip_archive_subpath '/one/two.zip' + eq('/one/two.zip', res) + end) + end) + + describe('user commands', function() + it('should translate command definition to nvim_create_user_command options', function() + local util = require 'lspconfig.util' + local res = util._parse_user_command_options { + function() end, + '-nargs=* -complete=custom,v:lua.some_global', + } + + same({ + nargs = '*', + complete = 'custom,v:lua.some_global', + }, res) + + res = util._parse_user_command_options { + function() end, + ['-nargs'] = '*', + '-complete=custom,v:lua.another_global', + description = 'My awesome description.', + } + same({ + desc = 'My awesome description.', + nargs = '*', + complete = 'custom,v:lua.another_global', + }, res) + end) + end) + end) + + describe('config', function() + it('normalizes user, server, and base default configs', function() + local lspconfig = require 'lspconfig' + local configs = require 'lspconfig.configs' + + local actual = nil + lspconfig.util.on_setup = function(config) + actual = config + end + + lspconfig.util.default_config = { + foo = { + bar = { + val1 = 'base1', + val2 = 'base2', + }, + }, + } + + local server_config = { + default_config = { + foo = { + bar = { + val2 = 'server2', + val3 = 'server3', + }, + baz = 'baz', + }, + }, + } + + local user_config = { + foo = { + bar = { + val3 = 'user3', + val4 = 'user4', + }, + }, + } + + configs['test'] = server_config + configs['test'].setup(user_config) + same({ + foo = { + bar = { + val1 = 'base1', + val2 = 'server2', + val3 = 'user3', + val4 = 'user4', + }, + baz = 'baz', + }, + name = 'test', + }, actual) + configs['test'] = nil + end) + + it("excludes indexed server configs that haven't been set up", function() + local lspconfig = require 'lspconfig' + local _ = lspconfig.lua_ls + local _ = lspconfig.tsserver + lspconfig.rust_analyzer.setup {} + same({ 'rust_analyzer' }, require('lspconfig.util').available_servers()) + end) + + it('provides user_config to the on_setup hook', function() + local lspconfig = require 'lspconfig' + local util = require 'lspconfig.util' + local user_config + util.on_setup = function(_, conf) + user_config = conf + end + lspconfig.rust_analyzer.setup { custom_user_config = 'custom' } + same({ + custom_user_config = 'custom', + }, user_config) + end) + end) +end) diff --git a/pack/ant/start/nvim-lspconfig/test/minimal_init.lua b/pack/ant/start/nvim-lspconfig/test/minimal_init.lua new file mode 100644 index 0000000..8b27728 --- /dev/null +++ b/pack/ant/start/nvim-lspconfig/test/minimal_init.lua @@ -0,0 +1,69 @@ +local on_windows = vim.loop.os_uname().version:match 'Windows' + +local function join_paths(...) + local path_sep = on_windows and '\\' or '/' + local result = table.concat({ ... }, path_sep) + return result +end + +vim.cmd [[set runtimepath=$VIMRUNTIME]] + +local temp_dir = vim.loop.os_getenv 'TEMP' or '/tmp' + +vim.cmd('set packpath=' .. join_paths(temp_dir, 'nvim', 'site')) + +local package_root = join_paths(temp_dir, 'nvim', 'site', 'pack') +local lspconfig_path = join_paths(package_root, 'test', 'start', 'nvim-lspconfig') + +if vim.fn.isdirectory(lspconfig_path) ~= 1 then + vim.fn.system { 'git', 'clone', 'https://github.com/neovim/nvim-lspconfig', lspconfig_path } +end + +vim.lsp.set_log_level 'trace' +require('vim.lsp.log').set_format_func(vim.inspect) +local nvim_lsp = require 'lspconfig' +local on_attach = function(_, bufnr) + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') + + -- Mappings. + local opts = { buffer = bufnr, noremap = true, silent = true } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, opts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) + vim.keymap.set('n', 'e', vim.diagnostic.open_float, opts) + vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts) + vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts) + vim.keymap.set('n', 'q', vim.diagnostic.setloclist, opts) +end + +-- Add the server that troubles you here +local name = 'pyright' +local cmd = { 'pyright-langserver', '--stdio' } -- needed for elixirls, lua_ls, omnisharp +if not name then + print 'You have not defined a server name, please edit minimal_init.lua' +end +if not nvim_lsp[name].document_config.default_config.cmd and not cmd then + print [[You have not defined a server default cmd for a server + that requires it please edit minimal_init.lua]] +end + +nvim_lsp[name].setup { + cmd = cmd, + on_attach = on_attach, +} + +print [[You can find your log at $HOME/.cache/nvim/lsp.log. Please paste in a github issue under a details tag as described in the issue template.]] diff --git a/pack/ant/start/nvim-lspconfig/test/test_dir/a/a_marker.txt b/pack/ant/start/nvim-lspconfig/test/test_dir/a/a_marker.txt new file mode 100644 index 0000000..e69de29 diff --git a/pack/ant/start/nvim-lspconfig/test/test_dir/root_marker.txt b/pack/ant/start/nvim-lspconfig/test/test_dir/root_marker.txt new file mode 100644 index 0000000..e69de29 diff --git a/vimrc b/vimrc index d1c9b51..4d09e03 100644 --- a/vimrc +++ b/vimrc @@ -227,7 +227,6 @@ if has('gui_running') endif if has('autocmd') - autocmd BufRead,BufNewFile * set omnifunc=syntaxcomplete#Complete autocmd BufRead,BufNewFile *.go set noet sw=8 ts=8 autocmd BufRead,BufNewFile *.html set et sw=2 indk= autocmd BufRead,BufNewFile *.md set et ft=markdown sw=2