Skip to content

Commit 3ce17bd

Browse files
authored
Compare paths not URIs for detecting local definitions (#733)
1 parent e3368b4 commit 3ce17bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyls/plugins/highlight.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2017 Palantir Technologies, Inc.
22
import logging
3-
from pyls import hookimpl, lsp, uris
3+
from pyls import hookimpl, lsp
44

55
log = logging.getLogger(__name__)
66

@@ -13,7 +13,7 @@ def is_valid(definition):
1313
return definition.line is not None and definition.column is not None
1414

1515
def local_to_document(definition):
16-
return not definition.module_path or uris.uri_with(document.uri, path=definition.module_path) == document.uri
16+
return not definition.module_path or definition.module_path == document.path
1717

1818
return [{
1919
'range': {

0 commit comments

Comments
 (0)