nvimdev / guard.nvim

async fast minimalist plugin make format easy in neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`find` stops too early

rawhat opened this issue · comments

The find key for finding the presence of a folder uses the LSP root as the stop property. This seems to stop before actually checking that folder. This seems like maybe it should be using the parent of the root? For example:

05:10:58 PM msg_show   :lua print(vim.inspect(vim.fs.find({"gleam.toml"}, { upward = true, stop = "/home/alex/gleams/mist", path = "/home/alex/gleams/mist/src/mist.gleam"}))) {}
05:11:10 PM msg_show   :lua print(vim.inspect(vim.fs.find({"gleam.toml"}, { upward = true, stop = "/home/alex/gleams", path = "/home/alex/gleams/mist/src/mist.gleam"}))) { "/home/alex/gleams/mist/gleam.toml" }

You can see that the file definitely exists. The top one is what the plugin is using as the arguments. The second is just me testing with the parent.