Skip to content

Commit c166dd2

Browse files
committed
feat: warn if quarto resource path is not found
closes nvim-lua#36
1 parent 20c693e commit c166dd2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lua/plugins/quarto.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,14 @@ return {
299299
end
300300

301301
local lua_library_files = vim.api.nvim_get_runtime_file("", true)
302-
local resource_path = get_quarto_resource_path()
303-
table.insert(lua_library_files, resource_path .. '/lua-types')
304302
local lua_plugin_paths = {}
305-
table.insert(lua_plugin_paths, resource_path .. '/lua-plugin/plugin.lua')
303+
local resource_path = get_quarto_resource_path()
304+
if resource_path == nil then
305+
vim.notify_once("quarto not found, lua library files not loaded")
306+
else
307+
table.insert(lua_library_files, resource_path .. '/lua-types')
308+
table.insert(lua_plugin_paths, resource_path .. '/lua-plugin/plugin.lua')
309+
end
306310

307311
-- not upadated yet in automatic mason-lspconfig install,
308312
-- open mason manually with `<space>vm` and `/` search for lua.

0 commit comments

Comments
 (0)