Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit d88b93e

Browse files
fix: installation
add else branch to fix the installation when no arg is provided
1 parent e1f423c commit d88b93e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lua/nvim-devdocs/init.lua

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ M.fetch_registery = function() operations.fetch() end
1616

1717
M.install_doc = function(args)
1818
if registery_path:exists() then
19-
if vim.tbl_isempty(args.fargs) then pickers.installation_picker() end
20-
21-
operations.install_args(args.fargs, true)
19+
if vim.tbl_isempty(args.fargs) then
20+
pickers.installation_picker()
21+
else
22+
operations.install_args(args.fargs, true)
23+
end
2224
else
2325
notify.log_err("DevDocs registery not found, please run :DevdocsFetch")
2426
end
@@ -64,9 +66,11 @@ end
6466

6567
M.update = function(args)
6668
if registery_path:exists() then
67-
if vim.tbl_isempty(args.fargs) then pickers.update_picker() end
68-
69-
operations.install_args(args.fargs, true, true)
69+
if vim.tbl_isempty(args.fargs) then
70+
pickers.update_picker()
71+
else
72+
operations.install_args(args.fargs, true, true)
73+
end
7074
else
7175
notify.log_err("DevDocs registery not found, please run :DevdocsFetch")
7276
end

0 commit comments

Comments
 (0)