diff --git a/README.md b/README.md index 5630c06..dcf54f5 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,17 @@ require("lazy").setup({ end end, }, - }, + rust = { -- custom handler to open rust's cargo packages + filetype = { "toml" }, -- you can also set the required filetype for this handler + filename = "Cargo.toml", -- or the necessary filename + handle = function(mode, line, _) + local crate = require("gx.helper").find(line, mode, "(%w+)%s-=%s") + + if crate then + return "https://crates.io/crates/" .. crate + end + end, + }, }, handler_options = { search_engine = "google", -- you can select between google, bing, duckduckgo, and ecosia