diff options
| author | William Boman <william@redwill.se> | 2021-09-30 16:34:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-30 16:34:15 +0200 |
| commit | bb24fca211c5d5e8d3cf88151e60d0b2b0555127 (patch) | |
| tree | e34e2bca86356bc9bdf2e72464bd87c37baa70e3 /plugin | |
| parent | shell: don't set pipefail option for sh (diff) | |
| download | mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar.gz mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar.bz2 mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar.lz mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar.xz mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.tar.zst mason-bb24fca211c5d5e8d3cf88151e60d0b2b0555127.zip | |
add Lua API to override default settings (#111)
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/nvim-lsp-installer.vim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/plugin/nvim-lsp-installer.vim b/plugin/nvim-lsp-installer.vim index 2e2bc315..f8458f44 100644 --- a/plugin/nvim-lsp-installer.vim +++ b/plugin/nvim-lsp-installer.vim @@ -1,6 +1,5 @@ if exists('g:loaded_nvim_lsp_installer') | finish | endif let g:loaded_nvim_lsp_installer = v:true -let g:lsp_installer_allow_federated_servers = get(g:, "lsp_installer_allow_federated_servers", v:true) let s:save_cpo = &cpo set cpo&vim @@ -52,3 +51,20 @@ autocmd User LspAttachBuffers lua require"nvim-lsp-installer".lsp_attach_proxy() let &cpo = s:save_cpo unlet s:save_cpo + + + +""" +""" Backward compat for deprecated g:lsp_installer* options. Remove by 2021-12-01-ish. +""" +if exists("g:lsp_installer_allow_federated_servers") + " legacy global variable option + call luaeval("require('nvim-lsp-installer').settings { allow_federated_servers = _A }", g:lsp_installer_allow_federated_servers) + lua vim.notify("[Deprecation notice] Providing settings via global variables (g:lsp_installer_allow_federated_servers) is deprecated. Please refer to https://github.com/williamboman/nvim-lsp-installer#configuration.", vim.log.levels.WARN) +endif + +if exists("g:lsp_installer_log_level") + " legacy global variable option + call luaeval("require('nvim-lsp-installer').settings { log_level = _A }", g:lsp_installer_log_level) + lua vim.notify("[Deprecation notice] Providing settings via global variables (g:lsp_installer_log_level) is deprecated. Please refer to https://github.com/williamboman/nvim-lsp-installer#configuration.", vim.log.levels.WARN) +endif |
