emacs-lsp / dap-mode

Emacs :heart: Debug Adapter Protocol
https://emacs-lsp.github.io/dap-mode
GNU General Public License v3.0
1.29k stars 180 forks source link

Error while RET in not debugged files #213

Open seagle0128 opened 4 years ago

seagle0128 commented 4 years ago

After turning on debug-on-error and entering dap-debug in python or golang, etc. files, while RET in some elisp files without lsp-mode, got these errors.

Debugger entered--Lisp error: (error "The connected server(s) does not support method te...")
  signal(error ("The connected server(s) does not support method te..."))
  error("The connected server(s) does not support method %s..." "textDocument/onTypeFormatting")
  lsp--send-request-async((:jsonrpc "2.0" :method "textDocument/onTypeFormatting" :params (:textDocument (:uri "file:///Users/vincent/.emacs.d/lisp/init-lsp.el") :options (:tabSize 4 :insertSpaces t) :ch "\n" :position (:line 72 :character 5))) lsp--apply-text-edits tick nil nil nil)
  lsp-request-async("textDocument/onTypeFormatting" (:textDocument (:uri "file:///Users/vincent/.emacs.d/lisp/init-lsp.el") :options (:tabSize 4 :insertSpaces t) :ch "\n" :position (:line 72 :character 5)) lsp--apply-text-edits :mode tick)
  lsp--on-type-formatting("\n" [";" ":"])
  #f(compiled-function () #<bytecode 0x1fee6106113ff>)()
  self-insert-command(1)
  newline(nil 1)
  funcall-interactively(newline nil 1)
  call-interactively(newline nil nil)
  #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1aca639137ab3575>)(newline nil nil nil)
  ad-Advice-command-execute(#f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1aca639137ab3575>) newline)
  apply(ad-Advice-command-execute #f(compiled-function (cmd &optional record-flag keys special) "Execute CMD as an editor command.\nCMD must be a symbol that satisfies the `commandp' predicate.\nOptional second arg RECORD-FLAG non-nil\nmeans unconditionally put this command in the variable `command-history'.\nOtherwise, that is done only if an arg is read using the minibuffer.\nThe argument KEYS specifies the value to use instead of (this-command-keys)\nwhen reading the arguments; if it is nil, (this-command-keys) is used.\nThe argument SPECIAL, if non-nil, means that this command is executing\na special event, so ignore the prefix argument and don't clear it." #<bytecode 0x1aca639137ab3575>) newline)
  command-execute(newline)
nbfalcon commented 3 years ago

I cannot reproduce. I am debugging a python file, with ptvsd and lsp-pyright; visiting some elisp file and pressing RET throws no error (with debug-on-error enabled).