1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-08-15 00:51:30 +02:00

gnu: emacs-lsp-mode: Update to 10.0.0.

* gnu/packages/emacs-xyz.scm (emacs-lsp-mode): Update to 10.0.0.

Change-Id: Ia4ba4c7bd5d58c3a19fd3c00cf7352fe228b5f57
This commit is contained in:
Nicolas Goaziou
2026-05-01 22:18:54 +02:00
parent f8757ce539
commit 0f8310ddcc
+90 -94
View File
@@ -37776,103 +37776,99 @@ the standard @code{Dockerfile} file format.")
(license license:asl2.0)))
(define-public emacs-lsp-mode
;; Last release is one year old.
;; Latest revision enables support for new lsp spec 3.17 features.
(let ((commit "328c97945c345e32e4b8fd6bb5ccd6bb6c5d462f")
(revision "1"))
(package
(name "emacs-lsp-mode")
(version (git-version "9.0.1" revision commit)) ;taken from lsp-mode.el
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/emacs-lsp/lsp-mode/")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32 "0dyk685q6z7z4bcb9pnwb045b819j6qkbm0qng4kn677laa51ikn"))))
(build-system emacs-build-system)
(arguments
(list
#:emacs emacs-no-x ;need libxml support
#:test-command #~(list "ert-runner"
"-L" "."
"-L" "clients"
"-t" "!no-win"
"-t" "!org")
#:phases
#~(modify-phases %standard-phases
;; Move libraries to the top-level.
(add-after 'unpack 'move-libraries
(lambda _
;; REVIEW; Improve style, pair-for-each ?
(for-each (lambda (d)
(for-each (lambda (f)
(rename-file f (basename f)))
(find-files d "\\.el$")))
(list "use-package/" "clients/"))))
(add-before 'check 'skip-failing-tests
(lambda _
(substitute* "test/lsp-mock-server-test.el"
(("\\(ert-deftest lsp-mock-server-reports.*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp-mock-server-updates-.*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-common-test.el"
(("\\(require 'elenv" all)
(string-append all " nil t"))
(("\\(ert-deftest lsp--path-to-uri-1 .*" all)
(string-append all "(skip-unless (featurep 'elenv))"))
(("\\(ert-deftest lsp-byte-compilation-test .*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp--build-.*-response-test-[34] .*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-mode-test.el"
(("\\(ert-deftest lsp--merge-results .*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-integration-test.el"
(("\\(ert-deftest lsp-.*-hover-request(-tick)? .*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp-test-current-buffer-mode .*" all)
(string-append all "(skip-unless nil)")))
(delete-file "test/lsp-clangd-test.el")))
(add-before 'check 'set-home
(lambda _ (setenv "HOME" (getenv "TMPDIR"))))
(add-after 'unpack 'enable-plists
(lambda _
(substitute* "lsp-protocol.el"
;; This is faster, and it's officially recommended,
;; and it's required by emacs-lsp-booster.
;; See also:
;; <https://emacs-lsp.github.io/lsp-mode/page/performance/>.
(("\\(getenv \"LSP_USE_PLISTS\"\\)") "t"))))
(add-before 'move-libraries 'fix-patch-el-files
;; /bin/ksh is only used on macOS, which we don't support, so we
;; don't want to add it as input.
(lambda _
(substitute* '("clients/lsp-csharp.el"
"clients/lsp-fsharp.el")
(("/bin/ksh") "ksh")))))))
(propagated-inputs
(list emacs-dash
emacs-f
emacs-ht
emacs-hydra
emacs-markdown-mode
emacs-spinner))
(native-inputs
(list emacs-deferred
emacs-el-mock
emacs-ert-runner))
(home-page "https://emacs-lsp.github.io/lsp-mode/")
(synopsis "Emacs client and library for the Language Server Protocol")
(description
"LSP mode is a client and library implementation for the Language
(package
(name "emacs-lsp-mode")
(version "10.0.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/emacs-lsp/lsp-mode/")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "1szhqrg73kivpkzmgqrawbmm293hqwajsgvgiai2k1vwsy4n86cd"))))
(build-system emacs-build-system)
(arguments
(list
#:emacs emacs-no-x ;need libxml support
#:test-command #~(list "ert-runner"
"-L" "."
"-L" "clients"
"-t" "!no-win"
"-t" "!org")
#:phases
#~(modify-phases %standard-phases
;; Move libraries to the top-level.
(add-after 'unpack 'move-libraries
(lambda _
;; REVIEW; Improve style, pair-for-each ?
(for-each (lambda (d)
(for-each (lambda (f)
(rename-file f (basename f)))
(find-files d "\\.el$")))
(list "use-package/" "clients/"))))
(add-before 'check 'skip-failing-tests
(lambda _
(substitute* "test/lsp-mock-server-test.el"
(("\\(ert-deftest lsp-mock-server-reports.*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp-mock-server-updates-.*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-common-test.el"
(("\\(require 'elenv" all)
(string-append all " nil t"))
(("\\(ert-deftest lsp--path-to-uri-1 .*" all)
(string-append all "(skip-unless (featurep 'elenv))"))
(("\\(ert-deftest lsp-byte-compilation-test .*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp--build-.*-response-test-[34] .*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-mode-test.el"
(("\\(ert-deftest lsp--merge-results .*" all)
(string-append all "(skip-unless nil)")))
(substitute* "test/lsp-integration-test.el"
(("\\(ert-deftest lsp-.*-hover-request(-tick)? .*" all)
(string-append all "(skip-unless nil)"))
(("\\(ert-deftest lsp-test-current-buffer-mode .*" all)
(string-append all "(skip-unless nil)")))
(delete-file "test/lsp-clangd-test.el")))
(add-before 'check 'set-home
(lambda _ (setenv "HOME" (getenv "TMPDIR"))))
(add-after 'unpack 'enable-plists
(lambda _
(substitute* "lsp-protocol.el"
;; This is faster, and it's officially recommended,
;; and it's required by emacs-lsp-booster.
;; See also:
;; <https://emacs-lsp.github.io/lsp-mode/page/performance/>.
(("\\(getenv \"LSP_USE_PLISTS\"\\)") "t"))))
(add-before 'move-libraries 'fix-patch-el-files
;; /bin/ksh is only used on macOS, which we don't support, so we
;; don't want to add it as input.
(lambda _
(substitute* '("clients/lsp-csharp.el"
"clients/lsp-fsharp.el")
(("/bin/ksh") "ksh")))))))
(propagated-inputs
(list emacs-dash
emacs-f
emacs-ht
emacs-hydra
emacs-markdown-mode
emacs-spinner))
(native-inputs
(list emacs-deferred
emacs-el-mock
emacs-ert-runner))
(home-page "https://emacs-lsp.github.io/lsp-mode/")
(synopsis "Emacs client and library for the Language Server Protocol")
(description
"LSP mode is a client and library implementation for the Language
Server Protocol. This mode creates an IDE-like experience by providing
optional integration with other popular Emacs packages like Company, Flycheck,
and Projectile.")
(license license:gpl3+))))
(license license:gpl3+)))
(define* (%emacs-lsp-treemacs-upstream-source #:key commit version hash)
(origin