Syntax highlighting working. Getting started on markdown support

This commit is contained in:
Keith Simmons 2022-05-31 22:49:47 -07:00
parent 863a3b1886
commit b014352740
7 changed files with 102 additions and 44 deletions

View file

@ -19,9 +19,9 @@ use language::{
point_to_lsp,
proto::{deserialize_anchor, deserialize_version, serialize_anchor, serialize_version},
range_from_lsp, range_to_lsp, Anchor, Bias, Buffer, CodeAction, CodeLabel, Completion,
Diagnostic, DiagnosticEntry, DiagnosticSet, Event as BufferEvent, File as _, Language,
LanguageRegistry, LanguageServerName, LocalFile, LspAdapter, OffsetRangeExt, Operation, Patch,
PointUtf16, TextBufferSnapshot, ToOffset, ToPointUtf16, Transaction,
Diagnostic, DiagnosticEntry, DiagnosticSet, Event as BufferEvent, File as _, HighlightId,
Language, LanguageRegistry, LanguageServerName, LocalFile, LspAdapter, OffsetRangeExt,
Operation, Patch, PointUtf16, TextBufferSnapshot, ToOffset, ToPointUtf16, Transaction,
};
use lsp::{DiagnosticSeverity, DiagnosticTag, DocumentHighlightKind, LanguageServer};
use lsp_command::*;
@ -216,9 +216,15 @@ pub struct Symbol {
pub signature: [u8; 32],
}
#[derive(Debug)]
pub struct HoverContents {
pub text: String,
pub runs: Vec<(Range<usize>, HighlightId)>,
}
#[derive(Debug)]
pub struct Hover {
pub contents: lsp::HoverContents,
pub contents: Vec<HoverContents>,
pub range: Option<Range<language::Anchor>>,
}