Add hover config linksInHover to suppress links
This commit is contained in:
@@ -307,6 +307,7 @@ impl Config {
|
||||
run: data.hoverActions_enable && data.hoverActions_run,
|
||||
debug: data.hoverActions_enable && data.hoverActions_debug,
|
||||
goto_type_def: data.hoverActions_enable && data.hoverActions_gotoTypeDef,
|
||||
links_in_hover: data.hoverActions_linksInHover,
|
||||
};
|
||||
|
||||
log::info!("Config::update() = {:#?}", self);
|
||||
@@ -451,6 +452,7 @@ config_data! {
|
||||
hoverActions_gotoTypeDef: bool = true,
|
||||
hoverActions_implementations: bool = true,
|
||||
hoverActions_run: bool = true,
|
||||
hoverActions_linksInHover: bool = true,
|
||||
|
||||
inlayHints_chainingHints: bool = true,
|
||||
inlayHints_maxLength: Option<usize> = None,
|
||||
|
||||
@@ -597,7 +597,7 @@ pub(crate) fn handle_hover(
|
||||
) -> Result<Option<lsp_ext::Hover>> {
|
||||
let _p = profile::span("handle_hover");
|
||||
let position = from_proto::file_position(&snap, params.text_document_position_params)?;
|
||||
let info = match snap.analysis.hover(position)? {
|
||||
let info = match snap.analysis.hover(position, snap.config.hover.links_in_hover)? {
|
||||
None => return Ok(None),
|
||||
Some(info) => info,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user