lsp-mode icon indicating copy to clipboard operation
lsp-mode copied to clipboard

bash-ls won't load in sh-mode when #!/bin/zsh is present at the top of file

Open sethen opened this issue 2 years ago • 22 comments

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [X] You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

Installing bash-ls and opening up a shell I get the following error:

Screenshot from 2023-07-07 12-37-47

Meanwhile Eglot is able to run the language server with no changes flawlessly.

Steps to reproduce

Install bash-ls with lsp-mode and hook into sh-mode to run lsp-deferred. Open a shell file.

Expected behavior

bash-ls should be able to discover sh-mode and provide completions like Eglot

Which Language Server did you use?

bash-ls

OS

Linux

Error callstack

No response

Anything else?

No response

sethen avatar Jul 07 '23 16:07 sethen

When trying to use the lsp-start-plain file in my init.el file with Emacs and trying to install the bash-ls I get this error

Debugger entered--Lisp error: (cl-assertion-failed ((seq-every-p (apply-partially #'stringp) command) "Invalid command list"))
  cl--assertion-failed((seq-every-p (apply-partially #'stringp) command) "Invalid command list" nil nil)
  (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list)))
  (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list))) nil)
  (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially ...) command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil))
  (let* ((command (if (functionp command) (funcall command) command))) (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p ... command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil)))
  lsp-resolve-final-function((closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)))
  (lsp-server-present\? (lsp-resolve-final-function command))
  (closure ((test-command) (command closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))()
  funcall((closure ((test-command) (command closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command))))
  (progn (funcall result))
  (if result (progn (funcall result)))
  (let ((result (let ((result (let (...) (if result ...)))) (if result (progn (plist-get result :test\?)))))) (if result (progn (funcall result))))
  (condition-case nil (let ((result (let ((result (let ... ...))) (if result (progn (plist-get result :test\?)))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil))
  (if (equal (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15)) 'lsp-pwsh) nil (condition-case nil (let ((result (let ((result ...)) (if result (progn ...))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil)))
  lsp--server-binary-present\?(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name)
  (let ((server-name (symbol-name (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))
  (closure ((server-id) (update\?) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name)))(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  funcall((closure ((server-id) (update\?) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))) #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (cons (funcall transform-fn it) it)
  (closure (... ... ... ... ... ... ... ... ... lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region ...) (it) (ignore it) (cons ... it))(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  mapcar((closure ... ... ... ...) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  (let* ((col (mapcar #'(lambda (it) (ignore it) (cons (funcall transform-fn it) it)) collection)) (completion (completing-read prompt #'(lambda (string pred action) (if (eq action ...) '... (complete-with-action action col string pred))) predicate require-match initial-input hist def inherit-input-method))) (cdr (assoc completion col)))
  lsp--completing-read("Select server ..." (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (closure ... ... ...) nil t)
  (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn (-not #'lsp--client-download-in-progress\?) #'lsp--client-download-server-fn) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))) nil t))
  (let* ((chosen-client (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn ... ...) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ... ...)) nil t))) (update\? (or update\? (and (not (progn (or ... ...) (aref chosen-client 31))) (lsp--server-binary-present\? chosen-client))))) (lsp--install-server-internal chosen-client update\?))
  lsp-install-server(nil)
  funcall-interactively(lsp-install-server nil)
  command-execute(lsp-install-server record)
  execute-extended-command(nil "lsp-install-server" "lsp-install-s")
  funcall-interactively(execute-extended-command nil "lsp-install-server" "lsp-install-s")
  command-execute(execute-extended-command)

sethen avatar Jul 07 '23 21:07 sethen

When trying to use the lsp-start-plain file in my init.el file with Emacs and trying to install the bash-ls I get this error

Debugger entered--Lisp error: (cl-assertion-failed ((seq-every-p (apply-partially #'stringp) command) "Invalid command list"))
  cl--assertion-failed((seq-every-p (apply-partially #'stringp) command) "Invalid command list" nil nil)
  (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list)))
  (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list))) nil)
  (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially ...) command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil))
  (let* ((command (if (functionp command) (funcall command) command))) (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p ... command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil)))
  lsp-resolve-final-function((closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)))
  (lsp-server-present\? (lsp-resolve-final-function command))
  (closure ((test-command) (command closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))()
  funcall((closure ((test-command) (command closure (t) nil (cons (or (executable-find lsp-marksman-server-command) (lsp-package-path 'marksman)) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command))))
  (progn (funcall result))
  (if result (progn (funcall result)))
  (let ((result (let ((result (let (...) (if result ...)))) (if result (progn (plist-get result :test\?)))))) (if result (progn (funcall result))))
  (condition-case nil (let ((result (let ((result (let ... ...))) (if result (progn (plist-get result :test\?)))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil))
  (if (equal (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15)) 'lsp-pwsh) nil (condition-case nil (let ((result (let ((result ...)) (if result (progn ...))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil)))
  lsp--server-binary-present\?(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name)
  (let ((server-name (symbol-name (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))
  (closure ((server-id) (update\?) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name)))(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  funcall((closure ((server-id) (update\?) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))) #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (cons (funcall transform-fn it) it)
  (closure (... ... ... ... ... ... ... ... ... lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region ...) (it) (ignore it) (cons ... it))(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test\? (closure ((test-command) (command closure (t) nil (cons (or ... ...) lsp-marksman-server-command-args)) view-inhibit-help-message lsp-help-mode-abbrev-table lsp-help-mode-syntax-table eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) nil (lsp-server-present\? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x155ce8ef18a7> :request-handlers #<hash-table equal 0/65 0x155ce8ef18c7> :response-handlers #<hash-table eql 0/65 0x155ce9048143> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x155ce9048163> :action-handlers #<hash-table equal 0/65 0x155ce908fac3> :major-modes nil :activation-fn (closure ((languages "markdown") eldoc-documentation-default cl-struct-lsp--log-entry-tags cl-struct-lsp-session-tags cl-struct-lsp--workspace-tags cl-struct-lsp--registered-capability-tags lsp-mode-menu cl-struct-lsp--folding-range-tags cl-struct-lsp-watch-tags cl-struct-lsp--client-tags lsp--log-lines company-minimum-prefix-length dap-ui-menu-items dap-auto-configure-mode yas-also-auto-indent-first-line yas-wrap-around-region yas-indent-line yas-inhibit-overlay-modification-protection t) (_file-name _mode) (-contains\? languages (lsp-buffer-language))) :priority -1 :server-id marksman :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn (closure (t) (workspace) (let ((lsp--cur-workspace workspace)) (lsp--set-configuration (lsp-configuration-section "marksman")))) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x155ce908fae3> :download-server-fn (closure (t) (_client callback error-callback _update\?) (lsp-package-ensure 'marksman callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  mapcar((closure ... ... ... ...) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  (let* ((col (mapcar #'(lambda (it) (ignore it) (cons (funcall transform-fn it) it)) collection)) (completion (completing-read prompt #'(lambda (string pred action) (if (eq action ...) '... (complete-with-action action col string pred))) predicate require-match initial-input hist def inherit-input-method))) (cdr (assoc completion col)))
  lsp--completing-read("Select server ..." (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (closure ... ... ...) nil t)
  (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn (-not #'lsp--client-download-in-progress\?) #'lsp--client-download-server-fn) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present\? client) (concat server-name " (Already installed)") server-name))) nil t))
  (let* ((chosen-client (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn ... ...) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ... ...)) nil t))) (update\? (or update\? (and (not (progn (or ... ...) (aref chosen-client 31))) (lsp--server-binary-present\? chosen-client))))) (lsp--install-server-internal chosen-client update\?))
  lsp-install-server(nil)
  funcall-interactively(lsp-install-server nil)
  command-execute(lsp-install-server record)
  execute-extended-command(nil "lsp-install-server" "lsp-install-s")
  funcall-interactively(execute-extended-command nil "lsp-install-server" "lsp-install-s")
  command-execute(execute-extended-command)

Hi, I have the same issue trying to use lsp in markdown mode, even with the language server already installed.

Xalares avatar Jul 08 '23 14:07 Xalares

Indeed lsp-start-plain gives me the same error too.

Xalares avatar Jul 09 '23 09:07 Xalares

pushed a fix about the issue related to marksman

yyoncho avatar Jul 09 '23 12:07 yyoncho

@yyoncho Indeed it corrected the issue I mentioned, ~~but now I've got another one in *marksman::stderr*: emacs: /home/username/.emacs.d/.cache/lsp/marksman/marksman: Erreur de format pour exec() Which says : "Format error for exec()"~~ While the above is still certainly true, I've installed remak-ls, and it works with it. Thanks :)

Xalares avatar Jul 09 '23 17:07 Xalares

Still an issue for me even with a clean install

sethen avatar Jul 10 '23 01:07 sethen

@sethen Are you sure you got the last build for lsp-mode ? I could have the update because I use straight package manager and it download package directly from git. Maybe your package manager repositories are not up to date with the master branch ?

Xalares avatar Jul 10 '23 07:07 Xalares

@Xalares @yyoncho still an issue for me for whatever reason

sethen avatar Jul 17 '23 00:07 sethen

wow i thought i am the only one experiencing this :D

uncomfyhalomacro avatar Jul 22 '23 08:07 uncomfyhalomacro

@Xalares @yyoncho still an issue for me for whatever reason

can you describe what you are seeing when doing M-x lsp-start-plain and installing the server...

yyoncho avatar Jul 22 '23 09:07 yyoncho

@Xalares @yyoncho still an issue for me for whatever reason

can you describe what you are seeing when doing M-x lsp-start-plain and installing the server...

This is what I get with lsp-start-plain.el and trying to install a server with lsp-install-server

Debugger entered--Lisp error: (cl-assertion-failed ((seq-every-p (apply-partially #'stringp) command) "Invalid command list"))
  cl--assertion-failed((seq-every-p (apply-partially #'stringp) command) "Invalid command list" nil nil)
  (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list)))
  (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list))) nil)
  (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially ...) command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil))
  (let* ((command (if (functionp command) (funcall command) command))) (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p ... command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil)))
  lsp-resolve-final-function((closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command))))
  (lsp-server-present? (lsp-resolve-final-function command))
  (closure ((command closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))()
  funcall((closure ((command closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command))))
  (progn (funcall result))
  (if result (progn (funcall result)))
  (let ((result (let ((result (let (...) (if result ...)))) (if result (progn (plist-get result :test?)))))) (if result (progn (funcall result))))
  (condition-case nil (let ((result (let ((result (let ... ...))) (if result (progn (plist-get result :test?)))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil))
  (if (equal (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15)) 'lsp-pwsh) nil (condition-case nil (let ((result (let ((result ...)) (if result (progn ...))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil)))
  lsp--server-binary-present?(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)
  (let ((server-name (symbol-name (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))
  (closure (t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)))(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  funcall((closure (t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))) #s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (cons (funcall transform-fn it) it)
  (closure ((transform-fn closure (t) (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)))) (it) (ignore it) (cons (funcall transform-fn it) it))(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  mapcar((closure ... ... ... ...) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  (let* ((col (mapcar #'(lambda (it) (ignore it) (cons (funcall transform-fn it) it)) collection)) (completion (completing-read prompt #'(lambda (string pred action) (if (eq action ...) '... (complete-with-action action col string pred))) predicate require-match initial-input hist def inherit-input-method))) (cdr (assoc completion col)))
  lsp--completing-read("Select server ..." (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (closure ... ... ...) nil t)
  (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn (-not #'lsp--client-download-in-progress?) #'lsp--client-download-server-fn) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))) nil t))
  (let* ((chosen-client (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn ... ...) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ... ...)) nil t))) (update? (or update? (and (not (progn (or ... ...) (aref chosen-client 31))) (lsp--server-binary-present? chosen-client))))) (lsp--install-server-internal chosen-client update?))
  lsp-install-server(nil)
  funcall-interactively(lsp-install-server nil)
  call-interactively(lsp-install-server record nil)
  command-execute(lsp-install-server record)
  execute-extended-command(nil "lsp-install-server" "lsp-install-se")
  funcall-interactively(execute-extended-command nil "lsp-install-server" "lsp-install-se")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
  recursive-edit()
  debug(error (cl-assertion-failed ((seq-every-p (apply-partially #'stringp) command) "Invalid command list")))
  cl--assertion-failed((seq-every-p (apply-partially #'stringp) command) "Invalid command list" nil nil)
  (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list)))
  (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially #'stringp) command) "Invalid command list" (list) (list))) nil)
  (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p (apply-partially ...) command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil))
  (let* ((command (if (functionp command) (funcall command) command))) (cond ((listp command) (progn (or (seq-every-p (apply-partially #'stringp) command) (cl--assertion-failed '(seq-every-p ... command) "Invalid command list" (list) (list))) nil) command) ((stringp command) (list command)) ((error "cl-etypecase failed: %s, %s" command '(list string)) nil)))
  lsp-resolve-final-function((closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command))))
  (lsp-server-present? (lsp-resolve-final-function command))
  (closure ((command closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))()
  funcall((closure ((command closure (t) nil (cons (or (executable-find (cl-first lsp-credo-command)) (lsp-package-path 'credo-language-server)) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command))))
  (progn (funcall result))
  (if result (progn (funcall result)))
  (let ((result (let ((result (let (...) (if result ...)))) (if result (progn (plist-get result :test?)))))) (if result (progn (funcall result))))
  (condition-case nil (let ((result (let ((result (let ... ...))) (if result (progn (plist-get result :test?)))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil))
  (if (equal (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 15)) 'lsp-pwsh) nil (condition-case nil (let ((result (let ((result ...)) (if result (progn ...))))) (if result (progn (funcall result)))) (error nil) (args-out-of-range nil)))
  lsp--server-binary-present?(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)
  (let ((server-name (symbol-name (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))
  (closure (t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)))(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  funcall((closure (t) (client) (let ((server-name (symbol-name (progn (or ... ...) (aref client 15))))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))) #s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  (cons (funcall transform-fn it) it)
  (closure ((transform-fn closure (t) (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name)))) (it) (ignore it) (cons (funcall transform-fn it) it))(#s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) (filter sentinel name environment-fn workspace) (if (functionp 'json-rpc-connection) (lsp-json-rpc-connection workspace (lsp-resolve-final-function command)) (let ((final-command ...) (process-name ...) (process-environment ...)) (let* (... ... ...) (set-process-query-on-exit-flag proc nil) (set-process-query-on-exit-flag ... nil) (save-current-buffer ... ...) (cons proc proc))))) :test? (closure ((command closure (t) nil (cons (or ... ...) (cl-rest lsp-credo-command)))) nil (lsp-server-present? (lsp-resolve-final-function command)))) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x157e7e67a087> :request-handlers #<hash-table equal 0/65 0x157e7e5b1215> :response-handlers #<hash-table eql 0/65 0x157e7e6d9ebf> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x157e7e9dd541> :action-handlers #<hash-table equal 0/65 0x157e7ea2b017> :major-modes nil :activation-fn (closure ((languages "elixir")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id credo-language-server :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x157e7e64db05> :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'credo-language-server callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  mapcar((closure ... ... ... ...) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  (let* ((col (mapcar #'(lambda (it) (ignore it) (cons (funcall transform-fn it) it)) collection)) (completion (completing-read prompt #'(lambda (string pred action) (if (eq action ...) '... (complete-with-action action col string pred))) predicate require-match initial-input hist def inherit-input-method))) (cdr (assoc completion col)))
  lsp--completing-read("Select server ..." (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (closure ... ... ...) nil t)
  (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn (-not #'lsp--client-download-in-progress?) #'lsp--client-download-server-fn) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ((server-name (symbol-name ...))) (if (lsp--server-binary-present? client) (concat server-name " (Already installed)") server-name))) nil t))
  (let* ((chosen-client (or (gethash server-id lsp-clients) (lsp--completing-read "Select server to install/re-install: " (or (-filter (-andfn ... ...) (ht-values lsp-clients)) (user-error "There are no servers with automatic installation")) #'(lambda (client) (let ... ...)) nil t))) (update? (or update? (and (not (progn (or ... ...) (aref chosen-client 31))) (lsp--server-binary-present? chosen-client))))) (lsp--install-server-internal chosen-client update?))
  lsp-install-server(nil)
  funcall-interactively(lsp-install-server nil)
  call-interactively(lsp-install-server record nil)
  command-execute(lsp-install-server record)
  execute-extended-command(nil "lsp-install-server" "lsp-install-serverbash")
  funcall-interactively(execute-extended-command nil "lsp-install-server" "lsp-install-serverbash")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

sethen avatar Jul 25 '23 18:07 sethen

Still an issue for me

sethen avatar Aug 03 '23 00:08 sethen

There was a recent fix in lsp-credo. Can you test it out?

yyoncho avatar Aug 03 '23 05:08 yyoncho

There was a recent fix in lsp-credo. Can you test it out?

Still seeing this issue

sethen avatar Aug 03 '23 19:08 sethen

Anything else I can do to trouble shoot this or provide context?

sethen avatar Aug 28 '23 20:08 sethen

Following up again -- any thoughts here? Looks like still an issue for me

sethen avatar Oct 11 '23 23:10 sethen

The installation is fixed for me but I am still seeing this for whatever reason. No error when starting with --debug-init.

Screenshot from 2023-10-16 16-39-23

sethen avatar Oct 16 '23 20:10 sethen

Execute (require 'lsp-bash) and then do M-x lsp. Also, check the content of the install *lsp-install... buffer.

yyoncho avatar Oct 17 '23 04:10 yyoncho

I figured it out. So my scripts have the #!/bin/zsh at the top of the files. If I take that out and start the lsp everything works perfectly. Why does this happen? The LSP is getting confused because of the zsh notation at the top?

sethen avatar Oct 27 '23 02:10 sethen

@sethen it is introduced here: https://github.com/emacs-lsp/lsp-mode/pull/2670

yyoncho avatar Oct 27 '23 08:10 yyoncho

@sethen it is introduced here: https://github.com/emacs-lsp/lsp-mode/pull/2670

So... All I can do is use bash? Doesn't seem like there is any alternative here.

sethen avatar Oct 27 '23 10:10 sethen

I get the same result without a shebang when the file has the .zsh file extension.

zoechi avatar Dec 15 '23 12:12 zoechi