-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from Cassin01/update
doc: add input
- Loading branch information
Showing
5 changed files
with
47 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
select() wf.txt /*select()* | ||
which_key() wf.txt /*which_key()* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
local H = {} | ||
|
||
-- Default documentation targets ---------------------------------------------- | ||
H.input = function() | ||
-- Search in current and recursively in other directories for files with | ||
-- 'lua' extension | ||
local res = {} | ||
for _, dir_glob in ipairs({ ".", "lua/**", "after/**", "colors/**", "lua/builtin/**" }) do | ||
local files = vim.fn.globpath(dir_glob, "*.lua", false, true) | ||
|
||
-- Use full paths | ||
files = vim.tbl_map(function(x) | ||
return vim.fn.fnamemodify(x, ":p") | ||
end, files) | ||
|
||
-- Put 'init.lua' first among files from same directory | ||
table.sort(files, function(a, b) | ||
if vim.fn.fnamemodify(a, ":h") == vim.fn.fnamemodify(b, ":h") then | ||
if vim.fn.fnamemodify(a, ":t") == "init.lua" then | ||
return true | ||
end | ||
if vim.fn.fnamemodify(b, ":t") == "init.lua" then | ||
return false | ||
end | ||
end | ||
|
||
return a < b | ||
end) | ||
table.insert(res, files) | ||
end | ||
|
||
return vim.tbl_flatten(res) | ||
end | ||
|
||
return H |
This file was deleted.
Oops, something went wrong.