A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/gotolist.rs')
-rw-r--r--src/gotolist.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gotolist.rs b/src/gotolist.rs
index 8461021..3fee279 100644
--- a/src/gotolist.rs
+++ b/src/gotolist.rs
@@ -4,7 +4,7 @@ use std::path::Path;
use dsb::Cell;
use dsb::cell::Style;
use lsp_types::request::GotoImplementation;
-use lsp_types::{Location, Range};
+use lsp_types::{Location, LocationLink, Range};
use crate::FG;
use crate::lsp::RqS;
@@ -16,6 +16,7 @@ pub enum GTL {}
#[derive(Debug)]
pub enum O {
Impl(RqS<(), GotoImplementation>),
+ References(RqS<(), lsp_types::request::References>),
Bmk,
}
impl<'a> Key<'a> for GoTo<'a> {
@@ -106,6 +107,17 @@ impl From<&Location> for GoTo<'static> {
}
}
+impl From<&LocationLink> for GoTo<'static> {
+ fn from(
+ LocationLink { target_uri, target_range, .. }: &LocationLink,
+ ) -> Self {
+ Self {
+ path: Cow::Owned(target_uri.to_file_path().unwrap()),
+ at: At::R(*target_range),
+ }
+ }
+}
+
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
pub enum At {
R(Range),