-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP doesn't work within duplicated tab. #2251
Comments
This is a known issue (see "LSP not initialized on views that are opened multiple times" in #2007) and it is caused by a bug in Sublime Text: sublimehq/sublime_text#2411 |
We did make a workaround though - #2174 |
From a quick look it seems like the fix would only apply if you manually call the |
Just wonder, why the |
I guess you have to ask this the ST devs, why they employ their bugs only when the duplicate views are created from "Goto Anything", and not via "Split View" 😄 Now seriously, you can test yourself with a little plugin like import sublime_plugin
class ViewEventListener(sublime_plugin.ViewEventListener):
@classmethod
def applies_to_primary_view_only(cls):
return False
def on_activated_async(self):
print(f"on_activated_async View({self.view.id()}) Buffer({self.view.buffer_id()}) File({self.view.file_name()})") and will see, that it does print the message in the console after "File: Split View" (or "Split View" from the tab context menu), but not when using the "Goto Anything" panel. And LSP uses Lines 335 to 339 in 673e513
|
Describe the bug
LSP-Sourcekit
doesn't initiates on opening already opened file in a new tab from command pallet with anoption
orcmd
key.To Reproduce
swift package init
./Sources/<PackageName>/
dir. Let's sayAdditionalClass.swift
,AnotherClass.swift
import Foundation
line to all of those files, just in case.AdditionalClass.swift
and convince thatSourceKit
label appears on Sublime Text status bar.AnotherClass.swift
.cmd
oroption
while hittingenter
on a given file, to open it in a split view.There would be new [duplicated] tab opened with this file, and there would be no
SourceKit
label appeared as well as a LSP support.Expected behavior
To provide LSP support for a files opened with an duplicated tab through command pallet.
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here. For example, whether you're using a helper
package or your manual server configuration in LSP.sublime-settings. When using
a manual server configuration please include it here if you believe it's applicable.
The text was updated successfully, but these errors were encountered: