-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to implement first version of workspace/symbol
- Loading branch information
Showing
7 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2017-2020 Palantir Technologies, Inc. | ||
# Copyright 2021- Python Language Server Contributors. | ||
|
||
import logging | ||
from pathlib import Path | ||
|
||
from pylsp import hookimpl | ||
from pylsp.lsp import SymbolKind | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@hookimpl | ||
def pylsp_workspace_symbol(config, workspace, document, query): | ||
log.debug("pylsp_workspace_symbol is called!") | ||
return [ | ||
{ | ||
"name": "test", | ||
"kind": SymbolKind.File, | ||
"location": { | ||
"uri": "file:/tmp/test.py", | ||
"range": { | ||
"start": {"line": 0, "character": 0}, | ||
"end": {"line": 0, "character": 0}, | ||
}, | ||
}, | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters