You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A small inconvenience that I noticed when you open a fresh instance of Sublime Text and start to type in the initial buffer.
I'm not sure why exactly it happens, maybe it's some timing issue or even a ST bug could be the cause?
To Reproduce
With a language server configured to be active for unsaved buffers, e.g. LSP-pyright with default config "schemes": ["file", "buffer", "res"] ...
Case A:
Start ST
Run Set Syntax: Python from the command palette
Type print('hello')
Case B:
Start ST
Type print('hello')
Run Set Syntax: Python from the command palette
Case C:
Start ST
Ctrl+N (invokes new_file command)
Run Set Syntax: Python from the command palette
Type print('hello')
Expected behavior
Case A: no LSP (ideally only until you select another tab and then the first tab again)1
Case B: LSP started
Case C: LSP started
Actual behavior
Case A: no LSP (even after you select another tab and then the first tab again!)
Case B: no LSP
Case C: LSP started
Environment (please complete the following information):
OS: Windows 11
Sublime Text version: 4152
LSP version: 663afdc (latest commit at the time of writing this)
Additional context
With debug logging enabled, LSP: couldn't find a text change listener for ViewListener(12) gets printed to the console (twice). But if you add a print statement for debugging into the TextChangeListener.attach method from the plugin/core/documents.py file, you can see that this method does get called even for the initial buffer 🤷
Footnotes
This expectation is with the limitations of the current implementation in mind, i.e. check in DocumentSyncListener.on_activated_async whether to start a language server ↩
The text was updated successfully, but these errors were encountered:
A small inconvenience that I noticed when you open a fresh instance of Sublime Text and start to type in the initial buffer.
I'm not sure why exactly it happens, maybe it's some timing issue or even a ST bug could be the cause?
To Reproduce
With a language server configured to be active for unsaved buffers, e.g. LSP-pyright with default config
"schemes": ["file", "buffer", "res"]
...Case A:
print('hello')
Case B:
print('hello')
Case C:
new_file
command)print('hello')
Expected behavior
Case A: no LSP (ideally only until you select another tab and then the first tab again)1
Case B: LSP started
Case C: LSP started
Actual behavior
Case A: no LSP (even after you select another tab and then the first tab again!)
Case B: no LSP
Case C: LSP started
Environment (please complete the following information):
Additional context
With debug logging enabled,
LSP: couldn't find a text change listener for ViewListener(12)
gets printed to the console (twice). But if you add a print statement for debugging into theTextChangeListener.attach
method from theplugin/core/documents.py
file, you can see that this method does get called even for the initial buffer 🤷Footnotes
This expectation is with the limitations of the current implementation in mind, i.e. check in
DocumentSyncListener.on_activated_async
whether to start a language server ↩The text was updated successfully, but these errors were encountered: