diff options
| author | William Boman <william@redwill.se> | 2021-06-12 00:29:20 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2021-06-12 00:29:20 +0200 |
| commit | 97c92eaa217608d2b338babf3de85e39f352d8ea (patch) | |
| tree | 99f837964f49608356ce44454dcc79e9c4498cdd | |
| parent | rust_analyzer: upgrade version to 2021-06-07 (diff) | |
| download | mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar.gz mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar.bz2 mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar.lz mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar.xz mason-97c92eaa217608d2b338babf3de85e39f352d8ea.tar.zst mason-97c92eaa217608d2b338babf3de85e39f352d8ea.zip | |
Server: add get_default_options() method
Closes #23.
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 4 | ||||
| -rw-r--r-- | lua/nvim-lsp-installer/server.lua | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index ed3dc023..ac16488b 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -119,6 +119,10 @@ class: Server See |lspconfig-custom-config| for more information on {opts}. + - get_default_options() + Returns a deep copy of the default options provided to + lspconfig in the setup({opts}) method. + - is_installed() Returns {true} is server is installed, else returns {false}. diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua index 67965e9b..79d66d23 100644 --- a/lua/nvim-lsp-installer/server.lua +++ b/lua/nvim-lsp-installer/server.lua @@ -132,6 +132,10 @@ function M.Server:setup(opts) ) end +function M.Server:get_default_options() + return vim.deepcopy(self._default_options) +end + function M.Server:is_installed() return fs.dir_exists(self._root_dir) end |
