Skip to content
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

Unhandled method completionItem/resolve in emmet-ls #4498

Open
3 tasks done
leafarbelm opened this issue Jul 18, 2024 · 0 comments
Open
3 tasks done

Unhandled method completionItem/resolve in emmet-ls #4498

leafarbelm opened this issue Jul 18, 2024 · 0 comments
Labels

Comments

@leafarbelm
Copy link

Thank you for the bug report

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

Bug description

When using emmet-ls it dosent provide the completions and i get the following error when i try to complete some tag: Error processing message (error "Unhandled method completionItem/resolve").

Steps to reproduce

  1. Create a .html file
  2. M-x lsp-install-server > emmet-ls
  3. M-x lsp
  4. type: div. then press tab (completion-at-point)

Expected behavior

It expands div. to <div class=""></div>, which is correct, but I don't get any completions using emmet-ls and after the expansion i get the error: Error processing message (error "Unhandled method completionItem/resolve").

Which Language Server did you use?

emmet-ls

OS

Linux

Error callstack

[Trace - 09:06:11 ] Sending notification 'textDocument/didOpen'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "languageId": "html",
    "version": 3,
    "text": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n\t    <meta charset=\"UTF-8\">\n\t    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t    <title>Document</title>\n    </head>\n    <body>\n\t    <ul id=\"nav\">\n\t      <li></li>\n          \n        </ul>\n    </body>\n</html>\n"
  }
}


[Trace - 09:06:15 ] Sending notification 'textDocument/didOpen'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "languageId": "html",
    "version": 3,
    "text": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n\t    <meta charset=\"UTF-8\">\n\t    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t    <title>Document</title>\n    </head>\n    <body>\n\t    <ul id=\"nav\">\n\t      <li></li>\n          \n        </ul>\n    </body>\n</html>\n"
  }
}


[Trace - 09:06:17 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 4
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "d"
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 5
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 11
        },
        "end": {
          "line": 10,
          "character": 11
        }
      },
      "rangeLength": 0,
      "text": "i"
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 6
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 12
        },
        "end": {
          "line": 10,
          "character": 12
        }
      },
      "rangeLength": 0,
      "text": "v"
    }
  ]
}


[Trace - 09:06:18 ] Sending request 'textDocument/completion - (2)'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html"
  },
  "position": {
    "line": 10,
    "character": 13
  },
  "context": {
    "triggerKind": 1
  }
}


[Trace - 09:06:18 ] Received response 'textDocument/completion - (2)' in 10ms.
Result: [
  {
    "data": {
      "range": {
        "end": {
          "character": 13,
          "line": 10
        },
        "start": {
          "character": 10,
          "line": 10
        }
      },
      "textResult": "<div>${1}</div>"
    },
    "detail": "div",
    "documentation": "<div>${1}</div>",
    "insertTextFormat": 2,
    "kind": 15,
    "label": "div",
    "textEdit": {
      "newText": "<div>${1}</div>",
      "range": {
        "end": {
          "character": 13,
          "line": 10
        },
        "start": {
          "character": 10,
          "line": 10
        }
      }
    }
  }
]


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 7
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 13
        }
      },
      "rangeLength": 3,
      "text": ""
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 8
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "div"
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 9
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 13
        }
      },
      "rangeLength": 3,
      "text": ""
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 10
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "<div>${1}</div>"
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 11
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 25
        }
      },
      "rangeLength": 15,
      "text": ""
    }
  ]
}


[Trace - 09:06:18 ] Sending notification 'textDocument/didChange'.
Params: {
  "textDocument": {
    "uri": "file:///tmp/asda.html",
    "version": 12
  },
  "contentChanges": [
    {
      "range": {
        "start": {
          "line": 10,
          "character": 10
        },
        "end": {
          "line": 10,
          "character": 10
        }
      },
      "rangeLength": 0,
      "text": "<div></div>"
    }
  ]
}


[Trace - 09:06:18 ] Sending request 'completionItem/resolve - (3)'.
Params: {
  "data": {
    "range": {
      "end": {
        "character": 13,
        "line": 10
      },
      "start": {
        "character": 10,
        "line": 10
      }
    },
    "textResult": "<div>${1}</div>"
  },
  "detail": "div",
  "documentation": "<div>${1}</div>",
  "insertTextFormat": 2,
  "kind": 15,
  "label": "div",
  "textEdit": {
    "newText": "<div>${1}</div>",
    "range": {
      "end": {
        "character": 13,
        "line": 10
      },
      "start": {
        "character": 10,
        "line": 10
      }
    }
  }
}


[Trace - 09:06:18 ] Sending request 'completionItem/resolve - (4)'.
Params: {
  "data": {
    "range": {
      "end": {
        "character": 13,
        "line": 10
      },
      "start": {
        "character": 10,
        "line": 10
      }
    },
    "textResult": "<div>${1}</div>"
  },
  "detail": "div",
  "documentation": "<div>${1}</div>",
  "insertTextFormat": 2,
  "kind": 15,
  "label": "div",
  "textEdit": {
    "newText": "<div>${1}</div>",
    "range": {
      "end": {
        "character": 13,
        "line": 10
      },
      "start": {
        "character": 10,
        "line": 10
      }
    }
  }
}


[Trace - 09:06:18 ] Received response 'completionItem/resolve - (3)' in 4ms.
Result: {
  "code": -32601,
  "message": "Unhandled method completionItem/resolve"
}


[Trace - 09:06:18 ] Received response 'completionItem/resolve - (4)' in 4ms.
Result: {
  "code": -32601,
  "message": "Unhandled method completionItem/resolve"
}

Anything else?

Backtrace
Debugger entered--Lisp error: (error "Unhandled method completionItem/resolve") error("Unhandled method completionItem/resolve") (closure ((cleanup-fn closure ((func closure ((first-edited)) (start &rest _) (setq first-edited (if first-edited ... start)))) nil (remove-hook 'before-change-functions func t))) (err) (if cleanup-fn (progn (funcall cleanup-fn))) (error (lsp:json-error-message err)))((:code -32601 :message "Unhandled method completionItem/resolve")) funcall((closure ((cleanup-fn closure ((func closure ((first-edited)) (start &rest _) (setq first-edited (if first-edited ... start)))) nil (remove-hook 'before-change-functions func t))) (err) (if cleanup-fn (progn (funcall cleanup-fn))) (error (lsp:json-error-message err))) (:code -32601 :message "Unhandled method completionItem/resolve")) (progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method)))) (if (and (not (eq (length errors) (length workspaces))) (eq (+ (length errors) (length results)) (length workspaces))) (progn (funcall callback (if no-merge results (lsp--merge-results (-map #'cl-rest results) method))))) (closure ((errors) (results (... :code -32601 :message "Unhandled method completionIt...")) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities ... :registered-server-capabilities ... :root "/tmp" :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) (no-merge) (method . "completionItem/resolve") (callback closure (...) (err) (if cleanup-fn ...) (error ...))) (result) (let* ((x ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...))))((:code -32601 :message "Unhandled method completionItem/resolve")) funcall((closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider ... :workspace ...) :registered-server-capabilities (... ...) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn ... :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #) :code -32601 :message "Unhandled method completionItem/resolve")) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider (:resolveProvider t :triggerCharacters ...) :workspace (:workspaceFolders ...)) :registered-server-capabilities (#s(lsp--registered-capability :id "24e42382-b062-4442-b819-fe9fb6e808e0" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "60d6f585-6cc8-43c0-a4ef-fd94ab6968f5" :method "workspace/didChangeConfiguration" :options nil)) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection (:connect ... :test? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn (closure ... ... ...) :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn (closure ... ... ...) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) (no-merge) (method . "completionItem/resolve") (callback closure ((cleanup-fn closure (...) nil (remove-hook ... func t))) (err) (if cleanup-fn (progn (funcall cleanup-fn))) (error (lsp:json-error-message err)))) (result) (let* ((x (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons x errors)) (setq results (cons x results)))) (if (and (not (eq (length errors) (length workspaces))) (eq (+ (length errors) (length results)) (length workspaces))) (progn (funcall callback (if no-merge results (lsp--merge-results ... method)))))) (:code -32601 :message "Unhandled method completionItem/resolve")) (closure ((error-callback closure ((errors) (results (... :code -32601 :message "Unhandled method completionItem/resolve")) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities ... :registered-server-capabilities ... :root "/tmp" :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) (no-merge) (method . "completionItem/resolve") (callback closure (...) (err) (if cleanup-fn ...) (error ...))) (result) (let* ((x ...)) (if (eq result :error) (setq errors ...) (setq results ...))) (if (and (not ...) (eq ... ...)) (progn (funcall callback ...)))) (callback closure ((callback closure (... ... ... ... ... ...) (result) (let* ... ...) (if ... ...)) (id . 12)) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) (id . 12)) (error) (funcall callback :error) (lsp--request-cleanup-hooks id) (funcall error-callback error))((:code -32601 :message "Unhandled method completionItem/resolve")) funcall((closure ((error-callback closure ((errors) (results (#s(lsp--workspace :ewoc nil :server-capabilities ... :registered-server-capabilities ... :root "/tmp" :client ... :host-root nil :proc # :cmd-proc # :buffers ... :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #) :code -32601 :message "Unhandled method completionItem/resolve")) (workspaces #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider ... :workspace ...) :registered-server-capabilities (... ...) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection ... :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn ... :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn ... :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) (no-merge) (method . "completionItem/resolve") (callback closure ((cleanup-fn closure ... nil ...)) (err) (if cleanup-fn (progn ...)) (error (lsp:json-error-message err)))) (result) (let* ((x (cons lsp--cur-workspace result))) (if (eq result :error) (setq errors (cons x errors)) (setq results (cons x results)))) (if (and (not (eq ... ...)) (eq (+ ... ...) (length workspaces))) (progn (funcall callback (if no-merge results ...))))) (callback closure ((callback closure ((errors ...) (results) (workspaces ...) (no-merge) (method . "completionItem/resolve") (callback closure ... ... ...)) (result) (let* (...) (if ... ... ...)) (if (and ... ...) (progn ...))) (id . 12)) (result) (lsp--request-cleanup-hooks id) (funcall callback result)) (id . 12)) (error) (funcall callback :error) (lsp--request-cleanup-hooks id) (funcall error-callback error)) (:code -32601 :message "Unhandled method completionItem/resolve")) (progn (remhash id (progn (or (progn (and (memq (type-of client) cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data))) (if callback (progn (remhash id (progn (or (progn (and (memq ... cl-struct-lsp--client-tags) t)) (signal 'wrong-type-argument (list 'lsp--client client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data)))) (let* ((--dash-source-458-- (cdr (gethash id (progn (or (progn ...) (signal ... ...)) (aref client 8))))) (callback (car-safe (prog1 --dash-source-458-- (setq --dash-source-458-- (cdr --dash-source-458--))))) (method (car-safe (prog1 --dash-source-458-- (setq --dash-source-458-- (cdr --dash-source-458--))))) (before-send (car (cdr --dash-source-458--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id (lsp:json-response-error-error json-data) 'incoming-resp (lsp--ms-since before-send)) workspace))) (if callback (progn (remhash id (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... client))) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data))))) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-458-- (cdr (gethash id (progn (or ... ...) (aref client 8))))) (callback (car-safe (prog1 --dash-source-458-- (setq --dash-source-458-- (cdr --dash-source-458--))))) (method (car-safe (prog1 --dash-source-458-- (setq --dash-source-458-- (cdr --dash-source-458--))))) (before-send (car (cdr --dash-source-458--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id (lsp:json-response-error-error json-data) 'incoming-resp (lsp--ms-since before-send)) workspace))) (if callback (progn (remhash id (progn (or (progn ...) (signal ... ...)) (aref client 8))) (funcall callback (lsp:json-response-error-error json-data)))))) (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-456-- (gethash id (progn ... ...))) (callback (car-safe (prog1 --dash-source-456-- ...))) (method (prog1 (car ...) (setq --dash-source-456-- ...))) (before-send (car (cdr --dash-source-456--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id data ... ...) workspace))) (if callback (progn (remhash id (progn ... ...)) (funcall callback (lsp:json-response-result json-data))))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-458-- (cdr (gethash id ...))) (callback (car-safe (prog1 --dash-source-458-- ...))) (method (car-safe (prog1 --dash-source-458-- ...))) (before-send (car (cdr --dash-source-458--)))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new (lsp--make-log-entry method id ... ... ...) workspace))) (if callback (progn (remhash id (progn ... ...)) (funcall callback (lsp:json-response-error-error json-data))))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data)))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-456-- (gethash id ...)) (callback (car-safe ...)) (method (prog1 ... ...)) (before-send (car ...))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new ... workspace))) (if callback (progn (remhash id ...) (funcall callback ...)))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed 'id)) nil) (let* ((--dash-source-458-- (cdr ...)) (callback (car-safe ...)) (method (car-safe ...)) (before-send (car ...))) (if (lsp--log-io-p method) (progn (lsp--log-entry-new ... workspace))) (if callback (progn (remhash id ...) (funcall callback ...)))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))) (let* ((client (progn (or (progn (and (memq ... cl-struct-lsp--workspace-tags) t)) (signal 'wrong-type-argument (list 'lsp--workspace workspace))) (aref workspace 5))) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if (stringp it) (string-to-number it) it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-456-- ...) (callback ...) (method ...) (before-send ...)) (if (lsp--log-io-p method) (progn ...)) (if callback (progn ... ...))))) ((eq val 'response-error) (let nil (progn (or id (cl--assertion-failed ...)) nil) (let* ((--dash-source-458-- ...) (callback ...) (method ...) (before-send ...)) (if (lsp--log-io-p method) (progn ...)) (if callback (progn ... ...))))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data)))))) (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (progn (and ... t)) (signal 'wrong-type-argument (list ... workspace))) (aref workspace 5))) (id (let ((it (lsp:json-response-id json-data))) (if it (progn (if ... ... it))))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn (or id ...) nil) (let* (... ... ... ...) (if ... ...) (if callback ...)))) ((eq val 'response-error) (let nil (progn (or id ...) nil) (let* (... ... ... ...) (if ... ...) (if callback ...)))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))))) (condition-case err (let ((lsp--cur-workspace workspace)) (let* ((client (progn (or (progn ...) (signal ... ...)) (aref workspace 5))) (id (let ((it ...)) (if it (progn ...)))) (data (lsp:json-response-result json-data))) (let* ((val (lsp--get-message-type json-data))) (cond ((eq val 'response) (let nil (progn ... nil) (let* ... ... ...))) ((eq val 'response-error) (let nil (progn ... nil) (let* ... ... ...))) ((eq val 'notification) (let nil (lsp--on-notification workspace json-data))) ((eq val 'request) (let nil (lsp--on-request workspace json-data))))))) ((debug error) (message "Error processing message %S." err) nil)) lsp--parser-on-message((:jsonrpc "2.0" :id 12 :error (:code -32601 :message "Unhandled method completionItem/resolve")) #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider (:resolveProvider t :triggerCharacters [">" ")" "]" "}" "@" "*" "$" "+" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]) :workspace (:workspaceFolders (:supported t))) :registered-server-capabilities (#s(lsp--registered-capability :id "24e42382-b062-4442-b819-fe9fb6e808e0" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "60d6f585-6cc8-43c0-a4ef-fd94ab6968f5" :method "workspace/didChangeConfiguration" :options nil)) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ((command closure (t) nil (cons ... ...)) tramp-ssh-controlmaster-options tramp-use-ssh-controlmaster-options) (filter sentinel name environment-fn workspace) (if (and (functionp ...) (not ...)) (lsp-json-rpc-connection workspace (lsp-resolve-final-command command)) (let (... ... ...) (let* ... ... ... ... ...)))) :test? (closure ((command closure (t) nil (cons ... ...))) nil (lsp-server-present? (lsp-resolve-final-command command t)))) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn (closure ((languages "html" "css" "scss" "less" "javascriptreact" "typescriptreact")) (_file-name _mode) (-contains? languages (lsp-buffer-language))) :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure 'emmet-ls callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #)) (closure ((workspace . #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider (:resolveProvider t :triggerCharacters [">" ")" "]" "}" "@" "*" "$" "+" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]) :workspace (:workspaceFolders (:supported t))) :registered-server-capabilities (#s(lsp--registered-capability :id "24e42382-b062-4442-b819-fe9fb6e808e0" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "60d6f585-6cc8-43c0-a4ef-fd94ab6968f5" :method "workspace/didChangeConfiguration" :options nil)) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn (closure (...) (_file-name _mode) (-contains? languages ...)) :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure ... callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #))) (msg) (lsp--parser-on-message msg workspace))((:jsonrpc "2.0" :id 12 :error (:code -32601 :message "Unhandled method completionItem/resolve"))) mapc((closure ((workspace . #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider (:resolveProvider t :triggerCharacters [">" ")" "]" "}" "@" "*" "$" "+" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]) :workspace (:workspaceFolders (:supported t))) :registered-server-capabilities (#s(lsp--registered-capability :id "24e42382-b062-4442-b819-fe9fb6e808e0" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "60d6f585-6cc8-43c0-a4ef-fd94ab6968f5" :method "workspace/didChangeConfiguration" :options nil)) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection (:connect (closure ... ... ...) :test? (closure ... nil ...)) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn (closure (...) (_file-name _mode) (-contains? languages ...)) :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn (closure (t) (_client callback error-callback _update?) (lsp-package-ensure ... callback error-callback)) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #))) (msg) (lsp--parser-on-message msg workspace)) ((:jsonrpc "2.0" :id 12 :error (:code -32601 :message "Unhandled method completionItem/resolve")) (:jsonrpc "2.0" :id 13 :error (:code -32601 :message "Unhandled method completionItem/resolve")))) (let (messages) (while (not (s-blank? chunk)) (if (not body-length) (let* ((body-sep-pos (and t (string-match-p "\15\n\15\n" chunk)))) (if body-sep-pos (progn (setq body-length (lsp--get-body-length ...)) (setq body-received 0) (setq leftovers nil) (setq chunk (substring-no-properties chunk ...))) (progn (setq leftovers chunk) (setq chunk nil)))) (let* ((chunk-length (string-bytes chunk)) (left-to-receive (- body-length body-received)) (this-body (if (< left-to-receive chunk-length) (prog1 ... ...) (prog1 chunk ...))) (body-bytes (string-bytes this-body))) (setq body (cons this-body body)) (setq body-received (+ body-received body-bytes)) (if (>= chunk-length left-to-receive) (progn (condition-case err (let ... ...) (error ...))))))) (mapc #'(lambda (msg) (lsp--parser-on-message msg workspace)) (nreverse messages))) (closure ((chunk) (body) (body-length) (leftovers) (body-received) (workspace . #s(lsp--workspace :ewoc nil :server-capabilities (:textDocumentSync 2 :completionProvider (:resolveProvider t :triggerCharacters ...) :workspace (:workspaceFolders ...)) :registered-server-capabilities (#s(lsp--registered-capability :id "24e42382-b062-4442-b819-fe9fb6e808e0" :method "workspace/didChangeWorkspaceFolders" :options nil) #s(lsp--registered-capability :id "60d6f585-6cc8-43c0-a4ef-fd94ab6968f5" :method "workspace/didChangeConfiguration" :options nil)) :root "/tmp" :client #s(lsp--client :language-id nil :add-on? t :new-connection (:connect ... :test? ...) :ignore-regexps nil :ignore-messages nil :notification-handlers # :request-handlers # :response-handlers # :prefix-function nil :uri-handlers # :action-handlers # :action-filter nil :major-modes nil :activation-fn (closure ... ... ...) :priority -1 :server-id emmet-ls :multi-root t :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 # :download-server-fn (closure ... ... ...) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc # :cmd-proc # :buffers (#) :semantic-tokens-faces nil :semantic-tokens-modifier-faces nil :extra-client-capabilities nil :status initialized :metadata # :watches # :workspace-folders nil :last-id 0 :status-string nil :shutdown-action nil :diagnostics # :work-done-tokens #))) (_proc input) (setq chunk (if (s-blank? leftovers) input (concat leftovers input))) (let (messages) (while (not (s-blank? chunk)) (if (not body-length) (let* (...) (if body-sep-pos ... ...)) (let* (... ... ... ...) (setq body ...) (setq body-received ...) (if ... ...)))) (mapc #'(lambda (msg) (lsp--parser-on-message msg workspace)) (nreverse messages))))(# "Content-Length: 101\15\n\15\n{\"jsonrpc\":\"2.0\",\"id\":12,\"e...")
@leafarbelm leafarbelm added the bug label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant