Skip to content

Commit

Permalink
lsp-sqls: Add lsp-sql-show-tables command
Browse files Browse the repository at this point in the history
* Call `showTables` on the `sqls` server
  • Loading branch information
suzuki committed Aug 30, 2024
1 parent c36b95b commit fb76be6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Add support for C# via the [[https://github.com/dotnet/roslyn/tree/main/src/LanguageServer][Roslyn language server]].
* Add basic support for [[https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics][pull diagnostics]] requests.
* Add ~lsp-flush-delayed-changes-before-next-message~ customization point to enforce throttling document change notifications.
* Add ~lsp-sql-show-tables~ command.

** 9.0.0
* Add language server config for QML (Qt Modeling Language) using qmlls.
Expand Down
9 changes: 9 additions & 0 deletions clients/lsp-sqls.el
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ use the current region if set, otherwise the entire buffer."
"workspace/executeCommand"
(list :command "showConnections" :timeout lsp-sqls-timeout))))

(defun lsp-sql-show-tables (&optional _command)
"Show tables."
(interactive)
(lsp-sqls--show-results
(lsp-request
"workspace/executeCommand"
(list :command "showTables" :timeout lsp-sqls-timeout))))

(defun lsp-sql-switch-database (&optional _command)
"Switch database."
(interactive)
Expand Down Expand Up @@ -176,6 +184,7 @@ use the current region if set, otherwise the entire buffer."
("showDatabases" #'lsp-sql-show-databases)
("showSchemas" #'lsp-sql-show-schemas)
("showConnections" #'lsp-sql-show-connections)
("showTables" #'lsp-sql-show-tables)
("switchDatabase" #'lsp-sql-switch-database)
("switchConnections" #'lsp-sql-switch-connection))
:server-id 'sqls
Expand Down

0 comments on commit fb76be6

Please sign in to comment.