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 "session-opening" signal emitted when session opening starts/stops #3707

Closed
wants to merge 1 commit into from

Conversation

techee
Copy link
Member

@techee techee commented Nov 30, 2023

When session opening starts, this signal is emitted with parameter TRUE, when it stops, with FALSE.

This gives plugins information e.g. whether document opening happens as a result of user action or whether it's part of initial session opening.

For the LSP plugin this is used to detect the finally displayed document for which the server is started, otherwise if "document-open" is used, it would start servers for all open document filetypes immediately on Geany start which is unnecessary and could slow start time.

When session opening starts, this signal is emitted with parameter
TRUE, when it stops, with FALSE.

This gives plugins information e.g. whether document opening happens
as a result of user action or whether it's part of initial session
opening.
@techee techee added the lsp Related to LSP API and plugins label Nov 30, 2023
@elextr
Copy link
Member

elextr commented Dec 1, 2023

Does this fix #3684?

@dolik-rce
Copy link
Contributor

This might also be useful for ProjectOrganizer plugin. It could simplify the code introduced geany/geany-plugins#1290, if the project opening and file parsing happened after Geany opens all the files in session.

@techee
Copy link
Member Author

techee commented Dec 1, 2023

This might also be useful for ProjectOrganizer plugin. It could simplify the code introduced geany/geany-plugins#1290, if the project opening and file parsing happened after Geany opens all the files in session.

I'm just afraid that the result would be "stuck on loaded document" instead of "stuck on nothing open" (which looks better) so we'd be back where we were with the idle function...

@techee
Copy link
Member Author

techee commented Dec 1, 2023

Does this fix #3684?

No. I'm not sure what is the right way to fix #3684 - whether "document-activate" should be fired also for the first tab or how exactly it should behave. But the "session-opening" signal could be used to detect this case and handle it.

@techee
Copy link
Member Author

techee commented May 11, 2024

Closing in favor of #3870.

@techee techee closed this May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp Related to LSP API and plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants