mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
test: trigger loading event manually for mason (#4343)
This commit is contained in:
parent
10b9123b7d
commit
2f45be36de
2 changed files with 4 additions and 1 deletions
|
@ -143,7 +143,7 @@ function M.load_defaults()
|
||||||
local buftype = vim.api.nvim_get_option_value("buftype", { buf = args.buf })
|
local buftype = vim.api.nvim_get_option_value("buftype", { buf = args.buf })
|
||||||
if not (vim.fn.expand "%" == "" or buftype == "nofile") then
|
if not (vim.fn.expand "%" == "" or buftype == "nofile") then
|
||||||
vim.api.nvim_del_augroup_by_name "_file_opened"
|
vim.api.nvim_del_augroup_by_name "_file_opened"
|
||||||
vim.cmd "do User FileOpened"
|
vim.api.nvim_exec_autocmds("User", { pattern = "FileOpened" })
|
||||||
require("lvim.lsp").setup()
|
require("lvim.lsp").setup()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -24,6 +24,9 @@ describe("lsp workflow", function()
|
||||||
local plugins = require "lvim.plugins"
|
local plugins = require "lvim.plugins"
|
||||||
require("lvim.plugin-loader").load { plugins, lvim.plugins }
|
require("lvim.plugin-loader").load { plugins, lvim.plugins }
|
||||||
|
|
||||||
|
-- trigger loading event manually for mason
|
||||||
|
vim.api.nvim_exec_autocmds("User", { pattern = "FileOpened" })
|
||||||
|
|
||||||
it("should be able to delete ftplugin templates", function()
|
it("should be able to delete ftplugin templates", function()
|
||||||
if utils.is_directory(lvim.lsp.templates_dir) then
|
if utils.is_directory(lvim.lsp.templates_dir) then
|
||||||
assert.equal(vim.fn.delete(lvim.lsp.templates_dir, "rf"), 0)
|
assert.equal(vim.fn.delete(lvim.lsp.templates_dir, "rf"), 0)
|
||||||
|
|
Loading…
Reference in a new issue