mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Add render configs for memory layout hovers
This commit is contained in:
parent
76d86502f7
commit
3c862507b9
12 changed files with 400 additions and 163 deletions
|
@ -27,12 +27,27 @@ use crate::{
|
|||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct HoverConfig {
|
||||
pub links_in_hover: bool,
|
||||
pub memory_layout: bool,
|
||||
pub memory_layout: Option<MemoryLayoutHoverConfig>,
|
||||
pub documentation: bool,
|
||||
pub keywords: bool,
|
||||
pub format: HoverDocFormat,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub struct MemoryLayoutHoverConfig {
|
||||
pub size: Option<MemoryLayoutHoverRenderKind>,
|
||||
pub offset: Option<MemoryLayoutHoverRenderKind>,
|
||||
pub alignment: Option<MemoryLayoutHoverRenderKind>,
|
||||
pub niches: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum MemoryLayoutHoverRenderKind {
|
||||
Decimal,
|
||||
Hexadecimal,
|
||||
Both,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub enum HoverDocFormat {
|
||||
Markdown,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue