-
Notifications
You must be signed in to change notification settings - Fork 23
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
Weird output when adding overrides via lsp #198
Comments
As a workaround, I'm using the following: (defun my/lsp--apply-workspace-edit-advice-dart (orig workspace-edit &rest args)
(let ((document-changes (gethash "documentChanges" workspace-edit)))
(mapc
(lambda (dc-ht)
(let* ((edits (gethash "edits" dc-ht)))
(mapc (lambda (ht)
(let* ((new-text (gethash "newText" ht))
(filtered (if (eq major-mode 'dart-mode)
(my/filter-snippet-for-dart new-text)
new-text)))
(puthash "newText" filtered ht))
)
edits)))
document-changes))
(apply orig workspace-edit args))
(defun advice-unadvice (sym)
"Remove all advices from symbol SYM."
(interactive "aFunction symbol: ")
(advice-mapc (lambda (advice _props) (advice-remove sym advice)) sym))
(advice-add 'lsp--apply-workspace-edit :around #'my/lsp--apply-workspace-edit-advice-dart) |
@yyoncho do you think this fix ☝🏻 should go to lsp-mode? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
As requested, opening a new issue
When I create a simple widget class
and then invoke
lsp-execute-code-action
with the cursor onFoo
and selectcreate missing override
I get this weird output:To Reproduce
{populate}
Expected behavior
Version
Include here the result of: M-x
lsp-dart-version
The text was updated successfully, but these errors were encountered: