File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1414--- @field nvim_meta PlenaryNvimMeta
1515--- @field operators PlenaryOperators
1616--- @field path PlenaryPath
17+ --- @field reload PlenaryReload
1718--- @field scandir PlenaryScandir
1819--- @field strings PlenaryStrings
1920--- @field tbl PlenaryTbl
Original file line number Diff line number Diff line change 1+ --- @class PlenaryReload
12local reload = {}
23
4+ --- @param module_name string
5+ --- @param starts_with_only ? boolean
36reload .reload_module = function (module_name , starts_with_only )
47 -- Default to starts with only
58 if starts_with_only == nil then
@@ -9,17 +12,22 @@ reload.reload_module = function(module_name, starts_with_only)
912 -- TODO: Might need to handle cpath / compiled lua packages? Not sure.
1013 local matcher
1114 if not starts_with_only then
15+ --- @param pack string
16+ --- @return integer ?
1217 matcher = function (pack )
1318 return string.find (pack , module_name , 1 , true )
1419 end
1520 else
1621 local module_name_pattern = vim .pesc (module_name )
22+ --- @param pack string
23+ --- @return integer ?
1724 matcher = function (pack )
1825 return string.find (pack , " ^" .. module_name_pattern )
1926 end
2027 end
2128
2229 -- Handle impatient.nvim automatically.
30+ --- @diagnostic disable-next-line : undefined-field
2331 local luacache = (_G .__luacache or {}).cache
2432
2533 for pack , _ in pairs (package.loaded ) do
You can’t perform that action at this time.
0 commit comments