From e7b903ecc519d0d5e3595d8dab020a238b2bb2d1 Mon Sep 17 00:00:00 2001 From: Carlos Noguera Date: Mon, 29 Sep 2025 14:24:46 +0200 Subject: [PATCH 1/2] Grab release from github (#22) Fixes issue 22 - https://github.com/emacs-lsp/lsp-mssql/issues/22 --- lsp-mssql.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lsp-mssql.el b/lsp-mssql.el index dcf3365..e360ea2 100644 --- a/lsp-mssql.el +++ b/lsp-mssql.el @@ -46,7 +46,7 @@ :type 'number) (defconst lsp-mssql-server-download-url - "https://download.microsoft.com/download/c/2/f/c9857f58-e569-4677-ad24-f180e83a8252/microsoft.sqltools.servicelayer-%s") + "https://github.com/microsoft/sqltoolsservice/releases/download/5.0.20250910.2/Microsoft.SqlTools.ServiceLayer-%s") (defconst lsp-mssql-executable-files '("MicrosoftSqlToolsServiceLayer.exe" "MicrosoftSqlToolsServiceLayer" "MicrosoftSqlToolsServiceLayer.dll")) @@ -111,9 +111,9 @@ Will not do anything should the file exist already." "Download mssql server. Uses `powershell' on windows and `tar' on Linux to extract the server binary." (interactive) - (let* ((result (cond ((eq system-type 'darwin) "osx-x64-netcoreapp2.2.tar.gz") - ((eq system-type 'gnu/linux) "rhel-x64-netcoreapp2.2.tar.gz") - ((eq system-type 'windows-nt) "win-x64-netcoreapp2.2.zip") + (let* ((result (cond ((eq system-type 'darwin) "osx-arm64-net8.0.tar.gz") + ((eq system-type 'gnu/linux) "linux-x64-net8.0.tar.gz") + ((eq system-type 'windows-nt) "win-x64-net8.0.zip") (t (error (format "Unsupported system: %s" system-type))))) (download-location (f-join temporary-file-directory result)) (url (format lsp-mssql-server-download-url result))) From 8f8e24497ae06954b3ac15b29d4bf6db16108c6b Mon Sep 17 00:00:00 2001 From: Carlos Noguera Date: Mon, 29 Sep 2025 15:27:04 +0200 Subject: [PATCH 2/2] wip fix object explorer lsp treemacs - see https://github.com/emacs-lsp/lsp-treemacs/issues/137#issuecomment-1420298445 --- lsp-mssql.el | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lsp-mssql.el b/lsp-mssql.el index e360ea2..e84784e 100644 --- a/lsp-mssql.el +++ b/lsp-mssql.el @@ -29,6 +29,7 @@ (require 'lsp-mode) (require 'lsp-treemacs) +(require 'lsp-treemacs-generic) (require 'gnutls) (defgroup lsp-mssql nil @@ -205,7 +206,7 @@ PARAMS Session created handler." (prog1 (save-excursion (let ((inhibit-read-only t)) ,@body)) - (org-show-all '(headings blocks))))) + (org-fold-show-all '(headings blocks))))) (defun lsp-mssql--connection-complete (_workspace params) "Connection completed handler. @@ -367,7 +368,7 @@ PARAMS the params." "Hanler for batch complete.") (defun lsp-mssql--complete (_workspace _params) - "Hanler for complete." + "Handler for complete." (lsp-mssql-with-result-buffer)) (defvar-local lsp-mssql--markers (ht)) @@ -663,14 +664,19 @@ NODES - all nodes." "Show explorer. TREE is the data to display, TITLE will be used for the modeline in the result buffer." - (with-current-buffer (get-buffer-create "*SQL Object explorer*") - (lsp-treemacs-initialize) - (setq-local lsp-treemacs-tree tree) - (setq-local face-remapping-alist '((button . default))) - (lsp-treemacs-generic-refresh) - (display-buffer-in-side-window (current-buffer) '((side . right))) - (setq-local mode-name title) - (lsp-mssql-object-explorer-mode))) + (lsp-treemacs-render tree title 0 + "*SQL Object explorer*" nil) + (with-current-buffer "*SQL Object explorer*" + (display-buffer-in-side-window (current-buffer) '((side . right))) + (lsp-mssql-object-explorer-mode))) + +;; - (with-current-buffer (get-buffer-create "*SQL Object explorer*") +;; - (lsp-treemacs-initialize) +;; - (setq-local lsp-treemacs-tree tree) +;; - (setq-local face-remapping-alist '((button . default))) +;; - (lsp-treemacs-generic-refresh);; - +;; - (setq-local mode-name title) +