Allow configuration of annotation location.

Previously, annotations would only appear above the name of an item (function signature, struct declaration, etc).

Now, rust-analyzer can be configured to show annotations either above the name or above the whole item (including doc comments and attributes).
This commit is contained in:
Mathew Horner 2022-09-11 22:40:33 -05:00
parent 2e9f1204ca
commit 8a2803d9ae
6 changed files with 132 additions and 19 deletions

View file

@ -74,7 +74,7 @@ use syntax::SourceFile;
use crate::navigation_target::{ToNav, TryToNav};
pub use crate::{
annotations::{Annotation, AnnotationConfig, AnnotationKind},
annotations::{Annotation, AnnotationConfig, AnnotationKind, AnnotationLocation},
call_hierarchy::CallItem,
expand_macro::ExpandedMacro,
file_structure::{StructureNode, StructureNodeKind},