-
Notifications
You must be signed in to change notification settings - Fork 188
Closed
Description
- OS and language server
- macOS 10.15 -
- How you installed LSP (Package Control or from git?)
- Package Control
- Minimal reproduction steps
- create a minimal php package with autoloading
- create a
src/Firstandsrc/Secondfolders - add an App class with the appropriate namespaces, so we have e.g.
Acme\First\AppandAcme\Second\App - In a different class e.g.
Acme/Starttry writing App in a function. It will show two App instance,Acme\First\AppandAcme\Second\App. - Select the second one
- It will use the first App's additionalTextEdits and adds
use Acme\First\Appwhen I clearly selected the second (tried using tab or enter, doesnt matter)
- Log
{'textEdit': {'range': {'end': {'character': 4, 'line': 6}, 'start': {'character': 2, 'line': 6}}, 'newText': 'App'}, 'additionalTextEdits': [{'range': {'end': {'character': 0, 'line': 4}, 'start': {'character': 22, 'line': 2}}, 'newText': '\n\nuse Acme\\Test\\App;\n\n'}], 'kind': 7, 'detail': 'use Acme\\Test\\App', 'sortText': 'App', 'label': 'App', 'data': 1264852955825781},
{'textEdit': {'range': {'end': {'character': 4, 'line': 6}, 'start': {'character': 2, 'line': 6}}, 'newText': 'App'}, 'additionalTextEdits': [{'range': {'end': {'character': 0, 'line': 4}, 'start': {'character': 22, 'line': 2}}, 'newText': '\n\nuse Acme\\Third\\App;\n\n'}], 'kind': 7, 'detail': 'use Acme\\Third\\App', 'sortText': 'App', 'label': 'App', 'data': 4436429581058069}
From the logs, it's clearly seen that the use expression is correct for the different classes. It just that it always uses the first one and there is no way to import the second namespace
Metadata
Metadata
Assignees
Labels
No labels