-
Notifications
You must be signed in to change notification settings - Fork 8
Grab release from github (#22) #28
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -29,6 +29,7 @@ | |||||||||||||
|
||||||||||||||
(require 'lsp-mode) | ||||||||||||||
(require 'lsp-treemacs) | ||||||||||||||
(require 'lsp-treemacs-generic) | ||||||||||||||
(require 'gnutls) | ||||||||||||||
|
||||||||||||||
(defgroup lsp-mssql nil | ||||||||||||||
|
@@ -46,7 +47,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 +112,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))) | ||||||||||||||
|
@@ -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))) | ||||||||||||||
Comment on lines
+667
to
+671
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indentation uses tabs instead of spaces, which is inconsistent with Emacs Lisp conventions. Use consistent space-based indentation. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||
|
||||||||||||||
;; - (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) | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
|
||||||||||||||
Comment on lines
+673
to
682
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commented-out code should be removed rather than left in the source. If this code might be needed for reference, consider documenting the migration in a commit message instead.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||
|
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.
The hardcoded ARM64 architecture for macOS may not work on Intel-based Macs. Consider detecting the actual architecture or providing both x64 and arm64 options for macOS.
Copilot uses AI. Check for mistakes.
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.
This seems like a valid concern, but I have no way to verify the values of
system-configuration
on a mac as I don't have one or anyone who could check. The variable does exist though and on my linux system it has value"x86_64-pc-linux-gnu"
so it seems legit.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.
I think it's pretty safe to do it this way. I have several packages that do this, and I have no issues with them.
Examples:
I'm running both packages on macOS M3.