We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
As requested, opening a new issue
When I create a simple widget class
class Foo extends StatelessWidget { }
and then invoke lsp-execute-code-action with the cursor on Foo and select create missing override I get this weird output:
lsp-execute-code-action
Foo
create missing override
class Foo extends StatelessWidget { @override Widget build(1|BuildContext,Object| context) { // TODO: implement build throw UnimplementedError(); } }
To Reproduce {populate}
Expected behavior
class Foo extends StatelessWidget { @override Widget build(BuildContext context) { // TODO: implement build throw UnimplementedError(); } }
Version Include here the result of: M-x lsp-dart-version
lsp-dart-version
[LSP Dart] 1.24.2 at 2023.07.05 @ Emacs 30.0.50 [Dart SDK] Dart SDK version: 3.0.5 (stable) (Mon Jun 12 18:31:49 2023 +0000) on "linux_x64" [Flutter SDK] /home/ale/src/3rdparty/flutter [Flutter project] true [Project entrypoint] Not found
The text was updated successfully, but these errors were encountered:
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)
Sorry, something went wrong.
@yyoncho do you think this fix ☝🏻 should go to lsp-mode?
No branches or pull requests
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: