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
Server logs to panel #811
Server logs to panel #811
Conversation
It only displays the last line now. It should become a circular buffer. Look into using sublime_lib.
Use the Panel class to toggle visibility
…anel It apparently has an infinite buffer so we should make that circular instead. You can click inside the panel and that screws up the output. Should not make it interactive.
No need for set_read_only anymore
It is no longer used.
It is no longer used.
It is unused.
So this will split server logs only? Does it means that it will be hard to correlate specific server messages with the protocol communication? I would sometimes do I would love to have to have all LSP-related logs in one single panel and be able to decide what kind of logs should be shown there (protocol / server / etc. - could be done with a bitmask). |
Yeah, correlating server output to payloads is nice, we could perhaps always have them in a server log panel? The main console should then only contain LSP logging about package initialisation, configuration and failures to start servers - things new users would be most interested in. Another thought - if you are running 2 servers in a given window, it becomes somewhat painful to identify which messages came from which server. We could create an output panel per running configuration? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work.
Curious about your thoughts about OutputPanel, assuming we solve the import/typing issue, did it save us complexity?
So that keybindings with a context keep working if the user's cursor is in the panel somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this became a rather large pull request I looked at some things that jumped out at me. Looking forward to having another look after!
Conflicts: plugin/core/process.py plugin/core/sessions.py plugin/core/test_windows.py plugin/core/windows.py
Instead, we have a logger class now with methods such as outgoing_request, incoming_request. The WindowManager modifies the eventual log sink of that object so that it'll log to a panel. Interestingly, this also makes it easy to log to the console again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes in the last round!
I'd still like to avoid the deprecation of LspShowDiagnosticsPanelCommand, but otherwise it's ready to merge!
You're right...
Thanks!
I was about to write this, hold on for just this evening :) |
This works pretty good already.
attach_tcp_client
was an unused function? I removed it.