Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ local opts = {
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
reload_workspace_from_cargo_toml = true,

-- function for opening external URLs
open_url = function(url)
vim.fn["netrw#BrowseX"](url, 0)
end,

-- These apply to the default RustSetInlayHints command
inlay_hints = {
-- automatically set inlay hints (type hints)
Expand Down
5 changes: 5 additions & 0 deletions lua/rust-tools/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ local defaults = {
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
reload_workspace_from_cargo_toml = true,

-- function for opening external URLs
open_url = function(url)
vim.fn["netrw#BrowseX"](url, 0)
end,

-- These apply to the default RustSetInlayHints command
inlay_hints = {
-- automatically set inlay hints (type hints)
Expand Down
2 changes: 1 addition & 1 deletion lua/rust-tools/external_docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function M.open_external_docs()
vim.lsp.util.make_position_params(),
function(_, url)
if url then
vim.fn["netrw#BrowseX"](url, 0)
rt.config.options.tools.open_url(url)
end
end
)
Expand Down