Skip to content
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

Add a way to link a Sublime Text window to an existing LSP's instance #2542

Open
bangbangsheshotmedown opened this issue Nov 2, 2024 · 6 comments
Labels

Comments

@bangbangsheshotmedown
Copy link

If i open Sublime Text and enable a server, all works fine

If i move to tab and create a new window, then no completion is available for that window

Starting a new server just for that moved tab feels wasteful in resources

Suggestion:

Add a command so i can link a Window to a LSP instance

Perhaps:

  • "LSP: attach window to LSP.."

lists active LSP instances

[ LSP: clangd - "window name for clangd" ]
[ LSP: pylsp - "window name for pylsp" ]

user select an instance

window now is able to get completions from that selected LSP instance until it is closed

@rchl
Copy link
Member

rchl commented Nov 2, 2024

I think that added complexity (both code wise and user experience wise) makes it not worth it. The benefit seems seems rather small.

Unless fellow maintainers think otherwise, we'll have to reject this idea.

@bangbangsheshotmedown
Copy link
Author

bangbangsheshotmedown commented Nov 2, 2024

It shouldn't be difficult at all, it is a matter of setting a flag, and skipping server initialization

It's common to use multiple windows, specially when one use a tiling window manager

Difficulty is relative, it shouldn't prevent progress

The benefit seems seems rather small.

If you use clangd on a large project, it can eat multiple GB of ram... no fun at all..

@jfcherng
Copy link
Contributor

jfcherng commented Nov 2, 2024

It shouldn't be difficult at all

Really like this, which means you probably provide a PR right?

If enough people complain about that, then someone may implement it. But just "may".

@rchl
Copy link
Member

rchl commented Nov 2, 2024

It shouldn't be difficult at all, it is a matter of setting a flag, and skipping server initialization

You apparently don't how this client works.
There is a very strong connection between the given window and the folders it includes and the server. Opening individual files in a separate window and pretending like it's another window with complete project is not compatible with this implementation.

@bangbangsheshotmedown
Copy link
Author

It shouldn't be difficult at all

Really like this, which means you probably provide a PR right?

If enough people complain about that, then someone may implement it. But just "may".

I could try to submit a PR, but now right now

@jwortmann
Copy link
Member

I added "wontfix" label because I also think this is not really actionable / feasible. I think the server instance to window correspondence is how this LSP package has always worked and afaik probably also how (all) other editors work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants