emacs-lsp / lsp-dart

lsp-mode :heart: dart
https://emacs-lsp.github.io/lsp-dart
GNU General Public License v3.0
202 stars 25 forks source link

Can't open menu inside lsp-dart-show-flutter-outline #176

Open reimager opened 2 years ago

reimager commented 2 years ago

Describe the bug After running M-x lsp-dart-show-flutter-outline, I right click on a Widget (same as example gif in README) and I expect a popup to allow wrapping a widget or whatever. Instead I get an error

To Reproduce Right click on Widget in flutter outline window

This is the error: Error running timer: (wrong-type-argument listp #[128 "\302\205\0\303\300\301\"\207" ["file:///home/user/foo/lib/view/workflow_list_page.dart" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("end" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("character" 7 "line" 244)) "start" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("character" 14 "line" 207)))) t lsp-dart-outline--build-flutter-outline-widget-actions] 4 "

This is the error with toggle-debug-on-error: Debugger entered--Lisp error: (wrong-type-argument listp #f(compiled-function (&rest ) #<bytecode 0x1581c0c8a611>)) easy-menu-create-menu(nil #f(compiled-function (&rest ) #<bytecode 0x1581c0c8a611>))

f(compiled-function () #<bytecode 0x1581c084d6f9>)()

apply(#f(compiled-function () #<bytecode 0x1581c084d6f9>) nil) timer-event-handler([t 0 0 1000 nil #f(compiled-function () #<bytecode 0x1581c084d6f9>) nil idle 0])

LSP :: lsp-mode 8.0.0, Emacs 27.1, gnu/linux [LSP Dart] 1.22.2 at 2022.09.05 @ Emacs 27.1 [Dart SDK] Dart SDK version: 2.18.0 (stable) (Fri Aug 26 10:22:54 2022 +0000) on "linux_x64" [Flutter SDK] /home/user/flutter [Flutter project] true [Project entrypoint] /home/user/foo/lib/main.dart

ericdallo commented 1 year ago

@reimager I just tried latest lsp-dart with latest lsp-mode and managed to right click and call actions like wrap widget properly, could you try latest in this sample project

reimager commented 1 year ago

Now right click (for me) does nothing. lsp-dart 1.24.1. No error anymore, but no response.

Sorry I had forgotten all about this because I actually use lsp-execute-code-action to do this