diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 07:13:16 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-25 07:13:16 +0000 |
commit | 675943712ce92e0ce04e85e6952f50bcbf1ee611 (patch) | |
tree | 20e611b63e26157457855db38d4fd866e6d3e7cd /crates/ra_lsp_server/src | |
parent | 1d4b421aad0bbcd26d88e65b28dbbb4efb51d155 (diff) | |
parent | 4eff8ddb8b8352d432d87198d43c674696ca9344 (diff) |
Merge #630
630: Fill in DocumentSymbol::detail r=matklad a=hban
Closes: #516
I just pulled type text from the syntax node and "formatted" is bit. VS Code can't really handle multi-line symbol detail (it's will crop it when rendering), so that formatting will just collapse all white-space to singe space. It isn't pretty, but maybe there's a better way.
Issue also mentions "need to be done for `NavigationTarget` to `SymbolInformation`", but `SymbolInformation` doesn't have detail field on it?
Co-authored-by: Hrvoje Ban <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index d84f762f4..c0fe0216d 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -136,7 +136,7 @@ pub fn handle_document_symbol( | |||
136 | for symbol in world.analysis().file_structure(file_id) { | 136 | for symbol in world.analysis().file_structure(file_id) { |
137 | let doc_symbol = DocumentSymbol { | 137 | let doc_symbol = DocumentSymbol { |
138 | name: symbol.label, | 138 | name: symbol.label, |
139 | detail: Some("".to_string()), | 139 | detail: symbol.detail, |
140 | kind: symbol.kind.conv(), | 140 | kind: symbol.kind.conv(), |
141 | deprecated: None, | 141 | deprecated: None, |
142 | range: symbol.node_range.conv_with(&line_index), | 142 | range: symbol.node_range.conv_with(&line_index), |