summaryrefslogtreecommitdiff
path: root/support/texlab/src/features/symbol.rs
diff options
context:
space:
mode:
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()