summaryrefslogtreecommitdiff
path: root/support/texlab/src/features/symbol.rs
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-02-26 03:02:12 +0000
committerNorbert Preining <norbert@preining.info>2023-02-26 03:02:12 +0000
commite7ae872926eddb0de09ecfe1c578e0680033955a (patch)
tree01717465b5b26d3b2ccaea9889c720a840e0a16c /support/texlab/src/features/symbol.rs
parent81a9d839224eef4c2bd9bf68410b4049c61cdb14 (diff)
CTAN sync 202302260302
Diffstat (limited to 'support/texlab/src/features/symbol.rs')
-rw-r--r--support/texlab/src/features/symbol.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/support/texlab/src/features/symbol.rs b/support/texlab/src/features/symbol.rs
index c16193efcb..58004b50ef 100644
--- a/support/texlab/src/features/symbol.rs
+++ b/support/texlab/src/features/symbol.rs
@@ -9,7 +9,7 @@ use lsp_types::{DocumentSymbolResponse, SymbolInformation, Url, WorkspaceSymbolP
use crate::{db::Workspace, util::capabilities::ClientCapabilitiesExt, Db};
-use self::project_order::ProjectOrdering;
+use self::{project_order::ProjectOrdering, types::InternalSymbol};
pub fn find_document_symbols(db: &dyn Db, uri: &Url) -> Option<DocumentSymbolResponse> {
let workspace = Workspace::get(db);
@@ -18,6 +18,11 @@ pub fn find_document_symbols(db: &dyn Db, uri: &Url) -> Option<DocumentSymbolRes
let mut buf = Vec::new();
latex::find_symbols(db, document, &mut buf);
bibtex::find_symbols(db, document, &mut buf);
+
+ let options = &Workspace::get(db).options(db).symbols;
+
+ InternalSymbol::filter(&mut buf, &options);
+
if workspace
.client_capabilities(db)
.has_hierarchical_document_symbol_support()