@@ -104,11 +104,13 @@ pub struct State {
104104 pub text_documents : HashMap < String , TextDocumentItem > ,
105105 pub text_documents_metadata : HashMap < String , TextDocumentItemMetadata > ,
106106 // filename => diagnostics.
107+ // TODO: convert to filename => line => diagnostics, where line => diagnostics is a TreeMap.
107108 pub diagnostics : HashMap < String , Vec < Diagnostic > > ,
108109 #[ serde( skip_serializing) ]
109110 pub line_diagnostics : HashMap < ( String , u64 ) , String > ,
110111 pub signs : HashMap < String , Vec < Sign > > ,
111112 pub signs_placed : HashMap < String , Vec < Sign > > ,
113+ pub namespace_id : Option < i64 > ,
112114 pub highlight_source : Option < u64 > ,
113115 pub highlights : HashMap < String , Vec < Highlight > > ,
114116 pub highlights_placed : HashMap < String , Vec < Highlight > > ,
@@ -145,6 +147,7 @@ pub struct State {
145147 pub wait_output_timeout : Duration ,
146148 pub hoverPreview : HoverPreviewOption ,
147149 pub completionPreferTextEdit : bool ,
150+ pub use_virtual_text : bool ,
148151
149152 pub loggingFile : Option < String > ,
150153 pub loggingLevel : log:: LevelFilter ,
@@ -182,6 +185,7 @@ impl State {
182185 line_diagnostics : HashMap :: new ( ) ,
183186 signs : HashMap :: new ( ) ,
184187 signs_placed : HashMap :: new ( ) ,
188+ namespace_id : None ,
185189 highlight_source : None ,
186190 highlights : HashMap :: new ( ) ,
187191 highlights_placed : HashMap :: new ( ) ,
@@ -214,6 +218,7 @@ impl State {
214218 wait_output_timeout : Duration :: from_secs ( 10 ) ,
215219 hoverPreview : HoverPreviewOption :: default ( ) ,
216220 completionPreferTextEdit : false ,
221+ use_virtual_text : true ,
217222 loggingFile : None ,
218223 loggingLevel : log:: LevelFilter :: Warn ,
219224 serverStderr : None ,
@@ -307,6 +312,7 @@ pub struct DiagnosticsDisplay {
307312 pub texthl : String ,
308313 pub signText : String ,
309314 pub signTexthl : String ,
315+ pub virtualTexthl : String ,
310316}
311317
312318impl DiagnosticsDisplay {
@@ -319,6 +325,7 @@ impl DiagnosticsDisplay {
319325 texthl : "ALEError" . to_owned ( ) ,
320326 signText : "✖" . to_owned ( ) ,
321327 signTexthl : "ALEErrorSign" . to_owned ( ) ,
328+ virtualTexthl : "Error" . to_owned ( ) ,
322329 } ,
323330 ) ;
324331 map. insert (
@@ -328,6 +335,7 @@ impl DiagnosticsDisplay {
328335 texthl : "ALEWarning" . to_owned ( ) ,
329336 signText : "⚠" . to_owned ( ) ,
330337 signTexthl : "ALEWarningSign" . to_owned ( ) ,
338+ virtualTexthl : "Todo" . to_owned ( ) ,
331339 } ,
332340 ) ;
333341 map. insert (
@@ -337,6 +345,7 @@ impl DiagnosticsDisplay {
337345 texthl : "ALEInfo" . to_owned ( ) ,
338346 signText : "ℹ" . to_owned ( ) ,
339347 signTexthl : "ALEInfoSign" . to_owned ( ) ,
348+ virtualTexthl : "Todo" . to_owned ( ) ,
340349 } ,
341350 ) ;
342351 map. insert (
@@ -346,6 +355,7 @@ impl DiagnosticsDisplay {
346355 texthl : "ALEInfo" . to_owned ( ) ,
347356 signText : "➤" . to_owned ( ) ,
348357 signTexthl : "ALEInfoSign" . to_owned ( ) ,
358+ virtualTexthl : "Todo" . to_owned ( ) ,
349359 } ,
350360 ) ;
351361 map
0 commit comments