summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-04-14 21:24:35 +0200
committerkylo252 <[email protected]>2022-04-14 21:24:35 +0200
commit6d2e18295f510c2f2167bd911b0d421a3b7f112e (patch)
tree453d5be502febdf596bf4b60b2d982b8b94db44a
parentf92a0d610c1ee899ec8acb091130f2a5eec22812 (diff)
parent09684eff642eb455bffda3100f29ef182f734a82 (diff)
Merge remote-tracking branch 'origin/rolling'
-rw-r--r--README.md2
-rw-r--r--lua/lvim/config/init.lua29
-rw-r--r--lua/lvim/core/cmp.lua5
-rw-r--r--lua/lvim/core/info.lua30
-rw-r--r--lua/lvim/core/log.lua6
-rw-r--r--lua/lvim/impatient.lua4
-rw-r--r--lua/lvim/lsp/config.lua89
-rw-r--r--lua/lvim/lsp/manager.lua6
-rw-r--r--lua/lvim/lsp/templates.lua12
-rw-r--r--lua/lvim/plugins.lua12
-rw-r--r--snapshots/default.json40
-rw-r--r--tests/specs/config_loader_spec.lua20
-rw-r--r--tests/specs/lsp_spec.lua57
-rw-r--r--tests/specs/plugins_load_spec.lua6
-rw-r--r--utils/ci/run_test.sh12
-rw-r--r--utils/installer/config.example.lua16
-rw-r--r--utils/installer/config_win.example.lua19
17 files changed, 216 insertions, 149 deletions
diff --git a/README.md b/README.md
index 7d6a4a45..41a011ac 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,7 @@ lvim.lsp.diagnostics.virtual_text = false
-- Select which servers should be configured manually. Requires `:LvimCacheReset` to take effect.
-- See the full default list `:lua print(vim.inspect(lvim.lsp.override))`
-vim.list_extend(lvim.lsp.override, { "pyright" })
+vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- set a formatter, this will override the language server formatting capabilities (if it exists)
local formatters = require "lvim.lsp.null-ls.formatters"
diff --git a/lua/lvim/config/init.lua b/lua/lvim/config/init.lua
index 6927d52a..505029a2 100644
--- a/lua/lvim/config/init.lua
+++ b/lua/lvim/config/init.lua
@@ -56,19 +56,19 @@ function M:init()
end
local function handle_deprecated_settings()
- local function deprecation_notice(setting, msg)
+ local function deprecation_notice(setting, new_setting)
local in_headless = #vim.api.nvim_list_uis() == 0
if in_headless then
return
end
- msg = msg
- or string.format(
- "Deprecation notice: [%s] setting is no longer supported. See https://github.com/LunarVim/LunarVim#breaking-changes",
- setting
- )
+ local msg = string.format(
+ "Deprecation notice: [%s] setting is no longer supported. %s",
+ setting,
+ new_setting or "See https://github.com/LunarVim/LunarVim#breaking-changes"
+ )
vim.schedule(function()
- Log:warn(msg)
+ vim.notify_once(msg, vim.log.levels.WARN)
end)
end
@@ -80,6 +80,16 @@ local function handle_deprecated_settings()
end
end
+ -- lvim.lsp.override
+ if lvim.lsp.override and not vim.tbl_isempty(lvim.lsp.override) then
+ deprecation_notice("lvim.lsp.override", "Use `lvim.lsp.automatic_configuration.skipped_servers` instead")
+ vim.tbl_map(function(c)
+ if not vim.tbl_contains(lvim.lsp.automatic_configuration.skipped_servers, c) then
+ table.insert(lvim.lsp.automatic_configuration.skipped_servers, c)
+ end
+ end, lvim.lsp.override)
+ end
+
-- lvim.lsp.popup_border
if vim.tbl_contains(vim.tbl_keys(lvim.lsp), "popup_border") then
deprecation_notice "lvim.lsp.popup_border"
@@ -87,10 +97,7 @@ local function handle_deprecated_settings()
-- dashboard.nvim
if lvim.builtin.dashboard.active then
- deprecation_notice(
- "dashboard",
- "Deprecation notice: `lvim.builtin.dashboard` has been replaced with `lvim.builtin.alpha`. See LunarVim#1906"
- )
+ deprecation_notice("lvim.builtin.dashboard", "Use `lvim.builtin.alpha` instead. See LunarVim#1906")
end
end
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua
index 621e2b6d..8fb18c5f 100644
--- a/lua/lvim/core/cmp.lua
+++ b/lua/lvim/core/cmp.lua
@@ -232,8 +232,9 @@ M.config = function()
require("luasnip").lsp_expand(args.body)
end,
},
- documentation = {
- border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
+ window = {
+ completion = cmp.config.window.bordered(),
+ documentation = cmp.config.window.bordered(),
},
sources = {
{ name = "nvim_lsp" },
diff --git a/lua/lvim/core/info.lua b/lua/lvim/core/info.lua
index 9c9652da..00a7e85a 100644
--- a/lua/lvim/core/info.lua
+++ b/lua/lvim/core/info.lua
@@ -100,21 +100,26 @@ local function make_client_info(client)
return client_info
end
-local function make_override_info(ft)
+local function make_auto_lsp_info(ft)
+ local skipped_filetypes = lvim.lsp.automatic_configuration.skipped_filetypes
+ local skipped_servers = lvim.lsp.automatic_configuration.skipped_servers
+ local info_lines = { "Automatic LSP info" }
+
+ if vim.tbl_contains(skipped_filetypes, ft) then
+ vim.list_extend(info_lines, { "* Status: disabled for " .. ft })
+ return info_lines
+ end
+
local available = lsp_utils.get_supported_servers_per_filetype(ft)
- local overridden = vim.tbl_filter(function(name)
+ local skipped = vim.tbl_filter(function(name)
return vim.tbl_contains(available, name)
- end, lvim.lsp.override)
+ end, skipped_servers)
- local info_lines = { "" }
- if #overridden == 0 then
- return info_lines
+ if #skipped == 0 then
+ return { "" }
end
- info_lines = {
- fmt("Overridden %s server(s)", ft),
- fmt("* list: %s", str_list(overridden)),
- }
+ vim.list_extend(info_lines, { fmt("* Skipped servers: %s", str_list(skipped)) })
return info_lines
end
@@ -150,7 +155,7 @@ function M.toggle_popup(ft)
table.insert(client_names, client.name)
end
- local override_info = make_override_info(ft)
+ local auto_lsp_info = make_auto_lsp_info(ft)
local formatters_info = make_formatters_info(ft)
@@ -169,7 +174,7 @@ function M.toggle_popup(ft)
{ "" },
lsp_info,
{ "" },
- override_info,
+ auto_lsp_info,
{ "" },
formatters_info,
{ "" },
@@ -192,6 +197,7 @@ function M.toggle_popup(ft)
vim.fn.matchadd("LvimInfoHeader", "Formatters info")
vim.fn.matchadd("LvimInfoHeader", "Linters info")
vim.fn.matchadd("LvimInfoHeader", "Code actions info")
+ vim.fn.matchadd("LvimInfoHeader", "Automatic LSP info")
vim.fn.matchadd("LvimInfoIdentifier", " " .. ft .. "$")
vim.fn.matchadd("string", "true")
vim.fn.matchadd("string", "active")
diff --git a/lua/lvim/core/log.lua b/lua/lvim/core/log.lua
index d0e74f18..15ccb11c 100644
--- a/lua/lvim/core/log.lua
+++ b/lua/lvim/core/log.lua
@@ -1,7 +1,5 @@
local Log = {}
-local logfile = string.format("%s/%s.log", get_cache_dir(), "lvim")
-
Log.levels = {
TRACE = 1,
DEBUG = 2,
@@ -39,7 +37,7 @@ function Log:init()
{ level = structlog.formatters.FormatColorizer.color_level() }
),
}),
- structlog.sinks.File(log_level, logfile, {
+ structlog.sinks.File(log_level, self:get_path(), {
processors = {
structlog.processors.Namer(),
structlog.processors.StackWriter({ "line", "file" }, { max_parents = 3, stack_level = 2 }),
@@ -155,7 +153,7 @@ end
---Retrieves the path of the logfile
---@return string path of the logfile
function Log:get_path()
- return logfile
+ return string.format("%s/%s.log", get_cache_dir(), "lvim")
end
---Add a log entry at TRACE level
diff --git a/lua/lvim/impatient.lua b/lua/lvim/impatient.lua
index 4fdc0026..230e5195 100644
--- a/lua/lvim/impatient.lua
+++ b/lua/lvim/impatient.lua
@@ -203,6 +203,10 @@ function M.update_reduced_rtp()
end
local function load_package_with_cache_reduced_rtp(name)
+ if vim.in_fast_event() then
+ -- Can't set/get options in the fast handler
+ return load_package_with_cache(name, "fast")
+ end
local orig_rtp = get_option "runtimepath"
local orig_ei = get_option "eventignore"
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua
index 986cb500..182f8fbf 100644
--- a/lua/lvim/lsp/config.lua
+++ b/lua/lvim/lsp/config.lua
@@ -1,3 +1,43 @@
+local skipped_servers = {
+ "angularls",
+ "ansiblels",
+ "ccls",
+ "csharp_ls",
+ "cssmodules_ls",
+ "denols",
+ "ember",
+ "emmet_ls",
+ "eslint",
+ "eslintls",
+ "golangci_lint_ls",
+ "graphql",
+ "jedi_language_server",
+ "ltex",
+ "ocamlls",
+ "phpactor",
+ "psalm",
+ "pylsp",
+ "quick_lint_js",
+ "rome",
+ "reason_ls",
+ "scry",
+ "solang",
+ "solidity_ls",
+ "sorbet",
+ "sourcekit",
+ "sourcery",
+ "spectral",
+ "sqlls",
+ "sqls",
+ "stylelint_lsp",
+ "tailwindcss",
+ "tflint",
+ "verible",
+ "vuels",
+}
+
+local skipped_filetypes = { "markdown", "rst", "plaintext" }
+
return {
templates_dir = join_paths(get_runtime_dir(), "site", "after", "ftplugin"),
diagnostics = {
@@ -41,6 +81,12 @@ return {
on_attach_callback = nil,
on_init_callback = nil,
automatic_servers_installation = true,
+ automatic_configuration = {
+ ---@usage list of servers that the automatic installer will skip
+ skipped_servers = skipped_servers,
+ ---@usage list of filetypes that the automatic installer will skip
+ skipped_filetypes = skipped_filetypes,
+ },
buffer_mappings = {
normal_mode = {
["K"] = { "<cmd>lua vim.lsp.buf.hover()<CR>", "Show hover" },
@@ -62,45 +108,6 @@ return {
setup = {},
config = {},
},
- override = {
- "angularls",
- "ansiblels",
- "ccls",
- "csharp_ls",
- "cssmodules_ls",
- "denols",
- "ember",
- "emmet_ls",
- "eslint",
- "eslintls",
- "golangci_lint_ls",
- "grammarly",
- "graphql",
- "jedi_language_server",
- "ltex",
- "ocamlls",
- "phpactor",
- "psalm",
- "pylsp",
- "quick_lint_js",
- "reason_ls",
- "remark_ls",
- "rome",
- "scry",
- "solang",
- "solidity_ls",
- "sorbet",
- "sourcekit",
- "sourcery",
- "spectral",
- "sqlls",
- "sqls",
- "stylelint_lsp",
- "tailwindcss",
- "tflint",
- "verible",
- "vuels",
- "zeta_note",
- "zk",
- },
+ ---@deprecated use automatic_configuration.skipped_servers instead
+ override = {},
}
diff --git a/lua/lvim/lsp/manager.lua b/lua/lvim/lsp/manager.lua
index 6c748020..09369d48 100644
--- a/lua/lvim/lsp/manager.lua
+++ b/lua/lvim/lsp/manager.lua
@@ -55,6 +55,7 @@ local function client_is_configured(server_name, ft)
local active_autocmds = vim.split(vim.fn.execute("autocmd FileType " .. ft), "\n")
for _, result in ipairs(active_autocmds) do
if result:match(server_name) then
+ Log:debug(string.format("[%q] is already configured", server_name))
return true
end
end
@@ -68,7 +69,6 @@ function M.setup(server_name, user_config)
vim.validate { name = { server_name, "string" } }
if lvim_lsp_utils.is_client_active(server_name) or client_is_configured(server_name) then
- Log:debug(string.format("[%q] is already configured. Ignoring repeated setup call.", server_name))
return
end
@@ -77,9 +77,7 @@ function M.setup(server_name, user_config)
local servers = require "nvim-lsp-installer.servers"
local server_available, requested_server = servers.get_server(server_name)
- local is_overridden = vim.tbl_contains(lvim.lsp.override, server_name)
-
- if not server_available or is_overridden then
+ if not server_available then
pcall(function()
require("lspconfig")[server_name].setup(config)
buf_try_add(server_name)
diff --git a/lua/lvim/lsp/templates.lua b/lua/lvim/lsp/templates.lua
index eb05615e..38e68fb6 100644
--- a/lua/lvim/lsp/templates.lua
+++ b/lua/lvim/lsp/templates.lua
@@ -15,16 +15,22 @@ function M.remove_template_files()
end
end
+local skipped_filetypes = lvim.lsp.automatic_configuration.skipped_filetypes
+local skipped_servers = lvim.lsp.automatic_configuration.skipped_servers
+
---Generates an ftplugin file based on the server_name in the selected directory
---@param server_name string name of a valid language server, e.g. pyright, gopls, tsserver, etc.
---@param dir string the full path to the desired directory
function M.generate_ftplugin(server_name, dir)
- if vim.tbl_contains(lvim.lsp.override, server_name) then
+ if vim.tbl_contains(skipped_servers, server_name) then
return
end
- -- we need to go through lspconfig to get the corresponding filetypes currently
- local filetypes = lvim_lsp_utils.get_supported_filetypes(server_name) or {}
+ -- get the supported filetypes and remove any ignored ones
+ local filetypes = vim.tbl_filter(function(ft)
+ return not vim.tbl_contains(skipped_filetypes, ft)
+ end, lvim_lsp_utils.get_supported_filetypes(server_name) or {})
+
if not filetypes then
return
end
diff --git a/lua/lvim/plugins.lua b/lua/lvim/plugins.lua
index 519a203a..f5b9914c 100644
--- a/lua/lvim/plugins.lua
+++ b/lua/lvim/plugins.lua
@@ -69,7 +69,15 @@ local core_plugins = {
{
"L3MON4D3/LuaSnip",
config = function()
- require("luasnip/loaders/from_vscode").lazy_load()
+ local utils = require "lvim.utils"
+ require("luasnip.loaders.from_lua").lazy_load()
+ require("luasnip.loaders.from_vscode").lazy_load {
+ paths = {
+ utils.join_paths(get_config_dir(), "snippets"),
+ utils.join_paths(get_runtime_dir(), "site", "pack", "packer", "start", "friendly-snippets"),
+ },
+ }
+ require("luasnip.loaders.from_snipmate").lazy_load()
end,
},
{
@@ -182,6 +190,7 @@ local core_plugins = {
config = function()
require("lvim.core.bufferline").setup()
end,
+ branch = "main",
event = "BufWinEnter",
disable = not lvim.builtin.bufferline.active,
},
@@ -217,6 +226,7 @@ local core_plugins = {
{
"akinsho/toggleterm.nvim",
event = "BufWinEnter",
+ branch = "main",
config = function()
require("lvim.core.terminal").setup()
end,
diff --git a/snapshots/default.json b/snapshots/default.json
index 10f82b6c..eb242de0 100644
--- a/snapshots/default.json
+++ b/snapshots/default.json
@@ -9,13 +9,13 @@
"commit": "1bfb32e"
},
"LuaSnip": {
- "commit": "eb5b77e"
+ "commit": "5d3b468"
},
"alpha-nvim": {
- "commit": "534a86b"
+ "commit": "6655228"
},
"bufferline.nvim": {
- "commit": "004cd57"
+ "commit": "bb3ac30"
},
"cmp-buffer": {
"commit": "d66c4c2"
@@ -33,46 +33,46 @@
"commit": "e302658"
},
"gitsigns.nvim": {
- "commit": "83ab3ca"
+ "commit": "f2e9e30"
},
"lua-dev.nvim": {
"commit": "a0ee777"
},
"lualine.nvim": {
- "commit": "c8e5a69"
+ "commit": "385580e"
},
"nlsp-settings.nvim": {
- "commit": "995b5e6"
+ "commit": "21a00be"
},
"null-ls.nvim": {
- "commit": "899785c"
+ "commit": "82be4bf"
},
"nvim-autopairs": {
- "commit": "06535b1"
+ "commit": "6fb0479"
},
"nvim-cmp": {
- "commit": "7dbe34e"
+ "commit": "dbc7229"
},
"nvim-dap": {
- "commit": "c20c78d"
+ "commit": "10b5781"
},
"nvim-lsp-installer": {
- "commit": "c7f1437"
+ "commit": "39f84cd"
},
"nvim-lspconfig": {
- "commit": "3d1baa8"
+ "commit": "fd7843a"
},
"nvim-notify": {
- "commit": "da10302"
+ "commit": "9655936"
},
"nvim-tree.lua": {
- "commit": "6368880"
+ "commit": "477536c"
},
"nvim-treesitter": {
- "commit": "2472e47"
+ "commit": "05ba924"
},
"nvim-ts-context-commentstring": {
- "commit": "7810f1f"
+ "commit": "8834375"
},
"nvim-web-devicons": {
"commit": "09e6231"
@@ -84,7 +84,7 @@
"commit": "4dedd3b"
},
"plenary.nvim": {
- "commit": "f9c65cd"
+ "commit": "13f9959"
},
"popup.nvim": {
"commit": "b7404d3"
@@ -93,7 +93,7 @@
"commit": "cef52b8"
},
"schemastore.nvim": {
- "commit": "d423f6c"
+ "commit": "71a0a25"
},
"structlog.nvim": {
"commit": "6f1403a"
@@ -102,10 +102,10 @@
"commit": "8ec164b"
},
"telescope.nvim": {
- "commit": "6e7ee38"
+ "commit": "b7ae91c"
},
"toggleterm.nvim": {
- "commit": "5733b24"
+ "commit": "1a608cc"
},
"which-key.nvim": {
"commit": "a3c19ec"
diff --git a/tests/specs/config_loader_spec.lua b/tests/specs/config_loader_spec.lua
index 1f2debc7..40eaa350 100644
--- a/tests/specs/config_loader_spec.lua
+++ b/tests/specs/config_loader_spec.lua
@@ -4,16 +4,28 @@ local config = require "lvim.config"
a.describe("config-loader", function()
local user_config_path = config:get_user_config_path()
+ before_each(function()
+ vim.cmd [[
+ let v:errmsg = ""
+ let v:errors = []
+ ]]
+ end)
+
+ after_each(function()
+ local errmsg = vim.fn.eval "v:errmsg"
+ local exception = vim.fn.eval "v:exception"
+ local errors = vim.fn.eval "v:errors"
+ assert.equal("", errmsg)
+ assert.equal("", exception)
+ assert.True(vim.tbl_isempty(errors))
+ end)
+
a.it("should be able to find user-config", function()
assert.equal(user_config_path, get_config_dir() .. "/config.lua")
end)
a.it("should be able to load user-config without errors", function()
config:load(user_config_path)
- local errmsg = vim.fn.eval "v:errmsg"
- local exception = vim.fn.eval "v:exception"
- assert.equal("", errmsg) -- v:errmsg was not updated.
- assert.equal("", exception)
end)
a.it("should be able to reload user-config without errors", function()
diff --git a/tests/specs/lsp_spec.lua b/tests/specs/lsp_spec.lua
index 2518b237..7d9a3386 100644
--- a/tests/specs/lsp_spec.lua
+++ b/tests/specs/lsp_spec.lua
@@ -1,12 +1,26 @@
local a = require "plenary.async_lib.tests"
local utils = require "lvim.utils"
local helpers = require "tests.lvim.helpers"
-local temp_dir = vim.loop.os_getenv "TEMP" or "/tmp"
-lvim.lsp.templates_dir = join_paths(temp_dir, "lvim", "tests", "artifacts")
+local spy = require "luassert.spy"
a.describe("lsp workflow", function()
- local Log = require "lvim.core.log"
- local logfile = Log:get_path()
+ before_each(function()
+ vim.cmd [[
+ let v:errmsg = ""
+ let v:errors = []
+ ]]
+ end)
+
+ after_each(function()
+ local errmsg = vim.fn.eval "v:errmsg"
+ local exception = vim.fn.eval "v:exception"
+ local errors = vim.fn.eval "v:errors"
+ assert.equal("", errmsg)
+ assert.equal("", exception)
+ assert.True(vim.tbl_isempty(errors))
+ end)
+
+ lvim.lsp.templates_dir = join_paths(get_cache_dir(), "artifacts")
a.it("should be able to delete ftplugin templates", function()
if utils.is_directory(lvim.lsp.templates_dir) then
@@ -19,35 +33,13 @@ a.describe("lsp workflow", function()
if utils.is_directory(lvim.lsp.templates_dir) then
assert.equal(vim.fn.delete(lvim.lsp.templates_dir, "rf"), 0)
end
- require("lvim.lsp").setup()
-
- -- we need to delay this check until the generation is completed
- vim.schedule(function()
- assert.True(utils.is_directory(lvim.lsp.templates_dir))
- end)
- end)
- a.it("should not attempt to re-generate ftplugin templates", function()
- lvim.log.level = "debug"
-
- local plugins = require "lvim.plugins"
- require("lvim.plugin-loader").load { plugins, lvim.plugins }
-
- if utils.is_file(logfile) then
- assert.equal(vim.fn.delete(logfile), 0)
- end
-
- assert.True(utils.is_directory(lvim.lsp.templates_dir))
require("lvim.lsp").setup()
- -- we need to delay this check until the log gets populated
- vim.schedule(function()
- assert.False(helpers.log_contains "templates")
- end)
+ assert.True(utils.is_directory(lvim.lsp.templates_dir))
end)
a.it("should not include blacklisted servers in the generated templates", function()
- assert.True(utils.is_directory(lvim.lsp.templates_dir))
require("lvim.lsp").setup()
for _, file in ipairs(vim.fn.glob(lvim.lsp.templates_dir .. "/*.lua", 1, 1)) do
@@ -59,7 +51,6 @@ a.describe("lsp workflow", function()
end)
a.it("should only include one server per generated template", function()
- assert.True(utils.is_directory(lvim.lsp.templates_dir))
require("lvim.lsp").setup()
for _, file in ipairs(vim.fn.glob(lvim.lsp.templates_dir .. "/*.lua", 1, 1)) do
@@ -78,4 +69,14 @@ a.describe("lsp workflow", function()
assert.equal(err_msg, "")
end
end)
+
+ a.it("should not attempt to re-generate ftplugin templates", function()
+ local s = spy.on(require "lvim.lsp.templates", "generate_templates")
+ local plugins = require "lvim.plugins"
+ require("lvim.plugin-loader").load { plugins, lvim.plugins }
+
+ require("lvim.lsp").setup()
+ assert.spy(s).was_not_called()
+ s:revert()
+ end)
end)
diff --git a/tests/specs/plugins_load_spec.lua b/tests/specs/plugins_load_spec.lua
index d32c521d..1f11279e 100644
--- a/tests/specs/plugins_load_spec.lua
+++ b/tests/specs/plugins_load_spec.lua
@@ -4,6 +4,12 @@ a.describe("plugin-loader", function()
local plugins = require "lvim.plugins"
local loader = require "lvim.plugin-loader"
+ pcall(function()
+ lvim.log.level = "debug"
+ package.loaded["packer.log"] = nil
+ package.loaded["lvim.core.log"] = nil
+ end)
+
a.it("should be able to load default packages without errors", function()
loader.load { plugins, lvim.plugins }
diff --git a/utils/ci/run_test.sh b/utils/ci/run_test.sh
index 5b7f81ac..b12ceb7e 100644
--- a/utils/ci/run_test.sh
+++ b/utils/ci/run_test.sh
@@ -6,10 +6,14 @@ export LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$HOME/.local/share/lunarvi
export LVIM_TEST_ENV=true
# we should start with an empty configuration
-TEST_BASE_DIR="$(mktemp -d)"
+LUNARVIM_CONFIG_DIR="$(mktemp -d)"
+LUNARVIM_CACHE_DIR="$(mktemp -d)"
-export LUNARVIM_CONFIG_DIR="$TEST_BASE_DIR"
-export LUNARVIM_CACHE_DIR="$TEST_BASE_DIR"
+export LUNARVIM_CONFIG_DIR LUNARVIM_CACHE_DIR
+
+echo "cache: $LUNARVIM_CACHE_DIR
+
+config: $LUNARVIM_CONFIG_DIR"
lvim() {
nvim -u "$LUNARVIM_RUNTIME_DIR/lvim/tests/minimal_init.lua" --cmd "set runtimepath+=$LUNARVIM_RUNTIME_DIR/lvim" "$@"
@@ -20,5 +24,3 @@ if [ -n "$1" ]; then
else
lvim --headless -c "PlenaryBustedDirectory tests/specs { minimal_init = './tests/minimal_init.lua' }"
fi
-
-rm -rf "$TEST_BASE_DIR"
diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua
index 409235a5..61c2f915 100644
--- a/utils/installer/config.example.lua
+++ b/utils/installer/config.example.lua
@@ -85,13 +85,17 @@ lvim.builtin.treesitter.highlight.enabled = true
-- ---@usage disable automatic installation of servers
-- lvim.lsp.automatic_servers_installation = false
--- ---@usage Select which servers should be configured manually. Requires `:LvimCacheReset` to take effect.
--- See the full default list `:lua print(vim.inspect(lvim.lsp.override))`
--- vim.list_extend(lvim.lsp.override, { "pyright" })
-
--- ---@usage setup a server -- see: https://www.lunarvim.org/languages/#overriding-the-default-configuration
+-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
+-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
+-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
--- require("lvim.lsp.manager").setup("pylsp", opts)
+-- require("lvim.lsp.manager").setup("pyright", opts)
+
+-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
+-- ---`:LvimInfo` lists which server(s) are skiipped for the current filetype
+-- vim.tbl_map(function(server)
+-- return server ~= "emmet_ls"
+-- end, lvim.lsp.automatic_configuration.skipped_servers)
-- -- you can set a custom on_attach function that will be used for all the language servers
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
diff --git a/utils/installer/config_win.example.lua b/utils/installer/config_win.example.lua
index ecfbd1e4..c6bf470e 100644
--- a/utils/installer/config_win.example.lua
+++ b/utils/installer/config_win.example.lua
@@ -70,7 +70,8 @@ lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- }
-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile
-lvim.builtin.dashboard.active = true
+lvim.builtin.alpha.active = true
+lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.notify.active = true
lvim.builtin.terminal.active = false
-- lvim.builtin.terminal.shell = "pwsh.exe -NoLogo"
@@ -99,13 +100,17 @@ lvim.builtin.treesitter.highlight.enabled = true
-- ---@usage disable automatic installation of servers
-- lvim.lsp.automatic_servers_installation = false
--- ---@usage Select which servers should be configured manually. Requires `:LvimCacheRest` to take effect.
--- See the full default list `:lua print(vim.inspect(lvim.lsp.override))`
--- vim.list_extend(lvim.lsp.override, { "pyright" })
-
--- ---@usage setup a server -- see: https://www.lunarvim.org/languages/#overriding-the-default-configuration
+-- ---configure a server manually. !!Requires `:LvimCacheReset` to take effect!!
+-- ---see the full default list `:lua print(vim.inspect(lvim.lsp.automatic_configuration.skipped_servers))`
+-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
--- require("lvim.lsp.manager").setup("pylsp", opts)
+-- require("lvim.lsp.manager").setup("pyright", opts)
+
+-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. !!Requires `:LvimCacheReset` to take effect!!
+-- ---`:LvimInfo` lists which server(s) are skiipped for the current filetype
+-- vim.tbl_map(function(server)
+-- return server ~= "emmet_ls"
+-- end, lvim.lsp.automatic_configuration.skipped_servers)
-- -- you can set a custom on_attach function that will be used for all the language servers
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>