diff options
| -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 |
