Skip to content

Commit

Permalink
feat: check if ripgrep is available and show error if not
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 14, 2021
1 parent 09aa8de commit b5cdae7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/todo-comments/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ function M.search(cb)
Util.error("todo-comments isn't loaded. Did you run setup()?")
return
end

if vim.fn.executable("rg") ~= 1 then
Util.error("rg (ripgrep) was not found on your path")
return
end

local stdin = nil
local stdout = uv.new_pipe(false)
local stderr = uv.new_pipe(false)
Expand Down

0 comments on commit b5cdae7

Please sign in to comment.