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 some commands #21

Merged
merged 4 commits into from
Mar 16, 2023
Merged

Add some commands #21

merged 4 commits into from
Mar 16, 2023

Conversation

Fuco1
Copy link
Collaborator

@Fuco1 Fuco1 commented Mar 16, 2023

  • lsp-mssql-cancel to cancel current query
  • lsp-mssql-format-region to format the region this is already by default in lsp-mode

I also changed various display/pop commands to use display-buffer which is user-configurable via display-buffer-alist. For example, I have multiple monitors and I want the result set to be shown (not selected) on the second one if the window is already visible there, such that I can keep editing the queries without having to switch back-and-forth between windows.

Display buffer is better choice than pop-to-buffer because most of the
time the user wants to edit the query and see the result somewhere
else without being forced to switch the active window.

Also display-buffer is customizable via display-buffer-alist settings,
so this way users have more freedom on how exactly results are
displayed.
The variable can be used by other packages or hooks for additional
processing of the result buffer, such as fontification or navigation.
@@ -243,11 +248,16 @@ PARAMS the params."
"Result set complete handler.
WORKSPACE is the active workspace.
PARAMS the params."
(-let* ((marker (lsp-mssql-with-result-buffer
(-let* ((column-info (gethash "columnInfo" (gethash "resultSetSummary" params)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW here we should start defining interfaces and using lsp-protocol.el otherwise it won't work with plists. I will let this in due to the fact that we are still using gethash and related on other places.

@yyoncho yyoncho merged commit 9d9a14a into emacs-lsp:master Mar 16, 2023
@yyoncho
Copy link
Member

yyoncho commented Mar 16, 2023

I added you as a maintainer. Feel free to push the trivial PRs directly.

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

Successfully merging this pull request may close these issues.

None yet

2 participants