diff options
| author | William Boman <william@redwill.se> | 2022-07-16 16:46:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-16 16:46:23 +0200 |
| commit | f887633842d44307f260d6ea4b99c0ae24994cfb (patch) | |
| tree | a6b40aa4cd451b3000a6aea3d4a678857129c7a7 /doc | |
| parent | docs: updates (#83) (diff) | |
| download | mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar.gz mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar.bz2 mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar.lz mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar.xz mason-f887633842d44307f260d6ea4b99c0ae24994cfb.tar.zst mason-f887633842d44307f260d6ea4b99c0ae24994cfb.zip | |
feat(mason-lspconfig): add get_installed_servers() method & add more tests (#84)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/mason-lspconfig.txt | 17 | ||||
| -rw-r--r-- | doc/mason.txt | 60 |
2 files changed, 77 insertions, 0 deletions
diff --git a/doc/mason-lspconfig.txt b/doc/mason-lspconfig.txt index ddeda56c..b6c6b415 100644 --- a/doc/mason-lspconfig.txt +++ b/doc/mason-lspconfig.txt @@ -151,5 +151,22 @@ setup_handlers({handlers}) end }) + *mason-lspconfig.get_installed_servers()* +get_installed_servers() + Returns the installed LSP servers supported by lspconfig. + + Note that the strings returned are the lspconfig server names, not the + mason package names. For example, "sumneko_lua" is returned instead of + "lua-language-server". This is useful if you want to loop through the + table and use its values to directly interact with lspconfig (for example + setting up all installed servers). + + Returns: ~ + string[] + + See also: ~ + |mason-registry.get_installed_packages()| + |mason-registry.get_installed_package_names()| + vim:tw=78:ft=help:norl:expandtab:sw=4 diff --git a/doc/mason.txt b/doc/mason.txt index 4221e51d..6037f85c 100644 --- a/doc/mason.txt +++ b/doc/mason.txt @@ -258,5 +258,65 @@ Lua module: mason setup({config}) Sets up mason with the provided {config} (see |mason-settings|). +============================================================================== +Lua module: mason-registry + + *mason-registry.is_installed()* +is_installed({package_name}) + Checks whether the provided package name is installed. In many situations, + this is a more efficient option than the Package:is_installed() method due + to a smaller amount of modules required to load. + + Parameters: ~ + {package_name} - string + + Returns: ~ + boolean + + *mason-registry.get_package()* +get_package({package_name}) + Returns an instance of the Package class if the provided package name + exists. + + This function errors if a package cannot be found. + + Parameters: ~ + {package_name} - string + + Returns: ~ + Package + + *mason-registry.get_installed_packages()* +get_installed_packages() + Returns all installed package instances. This is a slower function that + loads more modules. + + Returns: ~ + Package[] + + *mason-registry.get_installed_package_names()* +get_installed_package_names() + Returns all installed package names. This is a fast function that doesn't + load any extra modules. + + Returns: ~ + string[] + + *mason-registry.get_all_packages()* +get_all_packages() + Returns all package instances. This is a slower function that loads more + modules. + + Returns: ~ + Package[] + + *mason-registry.get_all_package_names()* +get_all_package_names() + Returns all package names. This is a fast function that doesn't load any + extra modules. + + Returns: ~ + string[] + vim:tw=78:ft=help:norl:expandtab:sw=4 |
