From bb24fca211c5d5e8d3cf88151e60d0b2b0555127 Mon Sep 17 00:00:00 2001 From: William Boman Date: Thu, 30 Sep 2021 16:34:15 +0200 Subject: add Lua API to override default settings (#111) --- lua/nvim-lsp-installer/settings.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lua/nvim-lsp-installer/settings.lua (limited to 'lua/nvim-lsp-installer/settings.lua') 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 -- cgit v1.2.3-70-g09d2