diff --git a/clients/lsp-nix.el b/clients/lsp-nix.el index 19d847f5c6..b50b40c659 100644 --- a/clients/lsp-nix.el +++ b/clients/lsp-nix.el @@ -56,7 +56,7 @@ (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection (lambda () lsp-nix-nixd-server-path)) - :major-modes '(nix-mode) + :major-modes '(nix-mode nix-ts-mode) :server-id 'nixd-lsp :priority -1)) diff --git a/clients/lsp-ruby-lsp.el b/clients/lsp-ruby-lsp.el index e6039dafd7..3127169fe5 100644 --- a/clients/lsp-ruby-lsp.el +++ b/clients/lsp-ruby-lsp.el @@ -43,11 +43,35 @@ (if lsp-ruby-lsp-use-bundler '("bundle" "exec")) '("ruby-lsp"))) +(defun lsp-ruby-lsp--open-file (arg_hash) + "Open a file. This function is for code-lens provided by ruby-lsp-rails." + (let* ((arguments (gethash "arguments" arg_hash)) + (uri (aref (aref arguments 0) 0)) + (path-with-line-number (split-string (lsp--uri-to-path uri) "#L")) + (path (car path-with-line-number)) + (line-number (cadr path-with-line-number))) + (find-file path) + (when line-number (forward-line (1- (string-to-number line-number)))))) + +(defun lsp-ruby-lsp--run-test (arg_hash) + "Run a test file. This function is for code-lens provided by ruby-lsp-rails." + (let* ((arguments (gethash "arguments" arg_hash)) + (command (aref arguments 2)) + (default-directory (lsp-workspace-root)) + (buffer-name "*run test results*") + (buffer (progn + (when (get-buffer buffer-name) (kill-buffer buffer-name)) + (generate-new-buffer buffer-name)))) + (async-shell-command command buffer))) + (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection #'lsp-ruby-lsp--build-command) :activation-fn (lsp-activate-on "ruby") :priority -2 + :action-handlers (ht ("rubyLsp.openFile" #'lsp-ruby-lsp--open-file) + ("rubyLsp.runTest" #'lsp-ruby-lsp--run-test) + ("rubyLsp.runTestInTerminal" #'lsp-ruby-lsp--run-test)) :server-id 'ruby-lsp-ls)) (lsp-consistency-check lsp-ruby-lsp) diff --git a/clients/lsp-sqls.el b/clients/lsp-sqls.el index e60f69b7b4..7ea5ae6f5d 100644 --- a/clients/lsp-sqls.el +++ b/clients/lsp-sqls.el @@ -29,7 +29,7 @@ (defgroup lsp-sqls nil "LSP support for SQL, using sqls." :group 'lsp-mode - :link '(url-link "https://github.com/lighttiger2505/sqls") + :link '(url-link "https://github.com/sqls-server/sqls") :package-version `(lsp-mode . "7.0")) (defcustom lsp-sqls-server "sqls" diff --git a/docs/lsp-clients.json b/docs/lsp-clients.json index b87170014b..b3d88fef39 100644 --- a/docs/lsp-clients.json +++ b/docs/lsp-clients.json @@ -1029,8 +1029,8 @@ "name": "sqls", "full-name": "SQL (sqls)", "server-name": "sqls", - "server-url": "https://github.com/lighttiger2505/sqls", - "installation": "go install github.com/lighttiger2505/sqls@latest", + "server-url": "https://github.com/sqls-server/sqls", + "installation": "go install github.com/sqls-server/sqls@latest", "debugger": "Not available" }, { diff --git a/lsp-mode.el b/lsp-mode.el index 827ec7c9ab..343b14b5a6 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -938,7 +938,7 @@ Changes take effect only when a new session is started." (robot-mode . "robot") (racket-mode . "racket") (nix-mode . "nix") - (nix-ts-mode . "Nix") + (nix-ts-mode . "nix") (prolog-mode . "prolog") (vala-mode . "vala") (actionscript-mode . "actionscript")