A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/lsp.rs')
-rw-r--r--src/lsp.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lsp.rs b/src/lsp.rs
index 40df88a..df96a9b 100644
--- a/src/lsp.rs
+++ b/src/lsp.rs
@@ -32,7 +32,7 @@ use tokio_util::task::AbortOnDropHandle;
use winit::window::Window;
use crate::text::cursor::ceach;
-use crate::text::{SortTedits, TextArea};
+use crate::text::{RopeExt, SortTedits, TextArea};
#[derive(Debug)]
pub struct Client {
pub runtime: tokio::runtime::Runtime,
@@ -479,6 +479,10 @@ impl Client {
t.cursor.first_mut().position = t.l_position(x).unwrap();
}
}
+
+ pub fn legend(&self) -> Option<&SemanticTokensLegend> {
+ match &self.initialized{Some(lsp_types::InitializeResult {capabilities: ServerCapabilities {semantic_tokens_provider:Some(SemanticTokensServerCapabilities::SemanticTokensOptions(SemanticTokensOptions{legend,..})),..}, ..})=> {Some(legend)},_ => None,}
+ }
pub fn inlay(
&'static self,
f: &Path,