Skip to content

Commit 2749d88

Browse files
fix: ignore case when searching for "justfile", support hidden files (#198)
1 parent 1bd4ae6 commit 2749d88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/overseer/template/just.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ local log = require("overseer.log")
33
---@param opts overseer.SearchParams
44
---@return nil|string
55
local function get_justfile(opts)
6-
return vim.fs.find("justfile", { upward = true, type = "file", path = opts.dir })[1]
6+
local is_justfile = function(name)
7+
name = name:lower()
8+
return name == "justfile" or name == ".justfile"
9+
end
10+
return vim.fs.find(is_justfile, { upward = true, type = "file", path = opts.dir })[1]
711
end
812

913
---@type overseer.TemplateFileProvider

0 commit comments

Comments
 (0)