Skip to content

Commit e87fbdc

Browse files
authored
lsp-sqls: Add lsp-sql-show-tables command (#4534)
1 parent f02aac0 commit e87fbdc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Add support for C# via the [[https://github.com/dotnet/roslyn/tree/main/src/LanguageServer][Roslyn language server]].
1010
* Add basic support for [[https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics][pull diagnostics]] requests.
1111
* Add ~lsp-flush-delayed-changes-before-next-message~ customization point to enforce throttling document change notifications.
12+
* Add ~lsp-sql-show-tables~ command.
1213
* Fix bug in ~rust-analyzer.check.features~ configuration via ~lsp-rust-checkonsave-features~ Emacs setting: we were defaulting to ~[]~, but ~rust-analyzer~ defaults to inheriting the value from ~rust-analyzer.cargo.features~. The bug resulted in code hidden behind features not getting type checked when those features were enabled by setting ~rust-analyzer.cargo.features~ via the ~lsp-rust-features~ Emacs setting.
1314
* Change ~ruff-lsp~ to ~ruff~ for python lsp client. All ~ruff-lsp~ customizable variable change to ~ruff~. Lsp server command now is ~["ruff" "server"]~ instead of ~["ruff-lsp"]~.
1415
* Add futhark support

clients/lsp-sqls.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ use the current region if set, otherwise the entire buffer."
143143
"workspace/executeCommand"
144144
(list :command "showConnections" :timeout lsp-sqls-timeout))))
145145

146+
(defun lsp-sql-show-tables (&optional _command)
147+
"Show tables."
148+
(interactive)
149+
(lsp-sqls--show-results
150+
(lsp-request
151+
"workspace/executeCommand"
152+
(list :command "showTables" :timeout lsp-sqls-timeout))))
153+
146154
(defun lsp-sql-switch-database (&optional _command)
147155
"Switch database."
148156
(interactive)
@@ -176,6 +184,7 @@ use the current region if set, otherwise the entire buffer."
176184
("showDatabases" #'lsp-sql-show-databases)
177185
("showSchemas" #'lsp-sql-show-schemas)
178186
("showConnections" #'lsp-sql-show-connections)
187+
("showTables" #'lsp-sql-show-tables)
179188
("switchDatabase" #'lsp-sql-switch-database)
180189
("switchConnections" #'lsp-sql-switch-connection))
181190
:server-id 'sqls

0 commit comments

Comments
 (0)