aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/settings.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-09-30 16:34:15 +0200
committerGitHub <noreply@github.com>2021-09-30 16:34:15 +0200
commitbb24fca211c5d5e8d3cf88151e60d0b2b0555127 (patch)
treee34e2bca86356bc9bdf2e72464bd87c37baa70e3 /lua/nvim-lsp-installer/settings.lua
parentshell: don't set pipefail option for sh (diff)
downloadmason-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 'lua/nvim-lsp-installer/settings.lua')
-rw-r--r--lua/nvim-lsp-installer/settings.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/settings.lua b/lua/nvim-lsp-installer/settings.lua
new file mode 100644
index 00000000..ec7f622b
--- /dev/null
+++ b/lua/nvim-lsp-installer/settings.lua
@@ -0,0 +1,36 @@
+local DEFAULT_SETTINGS = {
+ ui = {
+ icons = {
+ -- The list icon to use for installed servers.
+ server_installed = "◍",
+ -- The list icon to use for servers that are pending installation.
+ server_pending = "◍",
+ -- The list icon to use for servers that are not installed.
+ server_uninstalled = "◍",
+ },
+ },
+
+ -- Controls to which degree logs are written to the log file. For example, it's useful to set this to
+ -- vim.log.levels.TRACE when debugging issues with server installations.
+ log_level = vim.log.levels.WARN,
+
+ -- Whether to allow LSP servers to share the same installation directory.
+ -- For some servers, this effectively causes more than one server to be
+ -- installed (and uninstalled) when executing `:LspInstall` and
+ -- `:LspUninstall`.
+
+ -- For example, installing `cssls` will also install both `jsonls` and `html`
+ -- (and the other ways around), as these all share the same underlying
+ -- package.
+ allow_federated_servers = true,
+}
+
+local M = {}
+
+function M.set(opts)
+ M.current = vim.tbl_deep_extend("force", DEFAULT_SETTINGS, opts)
+end
+
+M.current = DEFAULT_SETTINGS
+
+return M