Fix parameter hint position
This commit is contained in:
parent
04128de553
commit
26d2e88b04
@ -413,7 +413,10 @@ pub(crate) fn signature_help(
|
|||||||
pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
|
pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_ext::InlayHint {
|
||||||
lsp_ext::InlayHint {
|
lsp_ext::InlayHint {
|
||||||
label: inlay_hint.label.to_string(),
|
label: inlay_hint.label.to_string(),
|
||||||
position: position(line_index, inlay_hint.range.end()),
|
position: match inlay_hint.kind {
|
||||||
|
InlayKind::ParameterHint => position(line_index, inlay_hint.range.start()),
|
||||||
|
_ => position(line_index, inlay_hint.range.end()),
|
||||||
|
},
|
||||||
kind: match inlay_hint.kind {
|
kind: match inlay_hint.kind {
|
||||||
InlayKind::ParameterHint => Some(lsp_ext::InlayHintKind::PARAMETER),
|
InlayKind::ParameterHint => Some(lsp_ext::InlayHintKind::PARAMETER),
|
||||||
InlayKind::TypeHint => Some(lsp_ext::InlayHintKind::TYPE),
|
InlayKind::TypeHint => Some(lsp_ext::InlayHintKind::TYPE),
|
||||||
|
Loading…
Reference in New Issue
Block a user