Running VSCode 1.26.1 on osx with 2.17.1 of extension
Other people who use this get colorful syntax and code completion or wrapping, TODO, etc.
I have reinstalled VSC and the extension and removed other language extensions.
The tools to debug, choose device, hot reload all work.

I'm slightly confused - the screenshot shows syntax colouring?
If code completion isn't working correctly, please put the cursor somewhere you'd expect to get completion, then run the Dart: Capture Logs command and select the "Analysis Server" category then while logging press Ctrl+Space to trigger code completion, then provide the log.
Also worth checking Help -> Toggle Developer Tools to see if any errors are listed in the console.
The answer was that VS Code Preferences -> Color Theme controls the syntax coloring, so different themes change from mostly white like the screenshot above to more language elements with color.
How do you get TODO: to show up in problems ?
Yeah, I think one of the Dark themes is mostly white; I use the other one.
TODOs should be shown by default (the dart.showTodos setting controls this).
If this isn't working, it's worth capturing an analysis server log to see what's going on at startup.
TODOs aren't showing up for me either. I'm capturing the analysis server log but I don't see anything that hints at the problem. All I see is when I typed in TODO: foo but no actual analysis event occurs. Is there anything specific I should look for in there?
When you type a TODO, it should be sent back from the server as a diagnostic:
[07:42:52] <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[07:42:52] <== {"event":"analysis.errors","params":{"file":"/Users/dantup/Dev/lsp_spec_parser/bin/main.dart","errors":[{"severity":"INFO","type":"TODO","location":{"file":"/Users/dantup/Dev/lsp_spec_parser/bin/main.dart","offset":556,"length":12,"startLine":17,"startColumn":4},"message":"TODO: Fix me","code":"todo","hasFix":false}]}}
[07:42:52] <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
There's a setting to control whether this is displayed (dart.showTodo) but it should always come back from the server even with this disabled (it gets filtered out client side).
Can you try reproducing in a trivial app and attach the server log? How are you typing the TODO? (even just // TODO should be enough). Are there any errors in the console (Help -> Toggle Dev Tools)?
I'm just getting
[12:44:36 AM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/projects/test_flutter_todo/lib/main.dart","errors":[]}}
and I even set dart.showTodos into my user settings as true rather than relying on the default's true, and as expected, that didn't fix anything. I've tried // TODO and // TODO: foo as well as the same in lowercase and within differing comments like doc comments.
No errors in the console.log either, just a seemingly irrelevant warning Overwriting grammar scope name to file mapping for scope source.js. and INFO no standard startup: panel is active
I don't know how the extension works so I'm 90% sure I'm looking at this wrong, but in https://github.com/Dart-Code/Dart-Code/blob/master/src/extension.ts#L74 showTodos doesn't even look like it's ever getting consumed. I have to be missing something. I got there looking for what I should be passing to dartanalyzer in the flutter sdk which I couldn't get to return any todo info directly either
@PeteJodo Could you attach a full analysis server log of reproing this with a small example?
showTodosdoesn't even look like it's ever getting consumed
The server doesn't support filtering TODOs so we have to do it client side. The server will (should) always send them, and if you don't have that setting set, they'll be filtered out here:
The code in extension.ts is just to force a reanalyzer (so the above code runs again) if the setting is changed.
Steps I took:
dart_temp folderdart.analyzerLogFile settingtemp.dart file// TODO and saved!! PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING !!
Dart Code extension: 2.19.0
Flutter extension: 2.19.0
VS Code: 1.28.0
Platform: linux
Workspace type: Dart
Multi-root?: false
Dart SDK:
Loc: /home/pete/SDKs/Flutter/bin/cache/dart-sdk
Ver: 2.1.0-edge.a2eb050044eec93f0844667b8b6132e858467e4e
Flutter SDK:
Loc: /home/pete/SDKs/Flutter
Ver: 0.9.4
[10:30:46 PM]: Spawning /home/pete/SDKs/Flutter/bin/cache/dart-sdk/bin/dart with args ["/home/pete/SDKs/Flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot","--client-id=Dart-Code.dart-code","--client-version=2.19.0"]
[10:30:46 PM]: ==> {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]}}
[10:30:46 PM]: ==> {"id":"2","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"content":"","type":"add"}}}}
[10:30:46 PM]: <== {"event":"server.connected","params":{"version":"1.20.5","pid":17363,"sessionId":""}}
[10:30:46 PM]: ==> {"id":"3","method":"analysis.setAnalysisRoots","params":{"excluded":[],"included":["/home/pete/Projects/dart_temp"]}}
[10:30:46 PM]: ==> {"id":"4","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"offset":0,"length":0,"replacement":"","id":""}],"type":"change"}}}}
[10:30:46 PM]: ==> {"id":"5","method":"analysis.setPriorityFiles","params":{"files":["/home/pete/Projects/dart_temp/temp.dart"]}}
[10:30:46 PM]: ==> {"id":"6","method":"analysis.setSubscriptions","params":{"subscriptions":{"CLOSING_LABELS":["/home/pete/Projects/dart_temp/temp.dart"],"FOLDING":["/home/pete/Projects/dart_temp/temp.dart"],"OCCURRENCES":["/home/pete/Projects/dart_temp/temp.dart"],"OUTLINE":["/home/pete/Projects/dart_temp/temp.dart"]}}}
[10:30:46 PM]: <== {"id":"1"}
[10:30:46 PM]: <== {"id":"2","result":{}}
[10:30:46 PM]: <== {"id":"3"}
[10:30:46 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:46 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:46 PM]: <== {"id":"4","result":{}}
[10:30:46 PM]: <== {"id":"5"}
[10:30:46 PM]: <== {"id":"6"}
[10:30:46 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:46 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:46 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:46 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:46 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":0,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":0,"codeOffset":0,"codeLength":0}}}
[10:30:46 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:48 PM]: ==> {"id":"7","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":0,"replacement":"/"}],"type":"change"}}}}
[10:30:48 PM]: <== {"id":"7","result":{}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:48 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":1,"startLine":1,"startColumn":1},"message":"Expected a method, getter, setter or operator declaration.","correction":"This appears to be incomplete code. Try removing it or completing it.","code":"expected_executable","hasFix":false}]}}
[10:30:48 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:48 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:48 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:48 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":1,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":1,"codeOffset":0,"codeLength":1}}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:48 PM]: ==> {"id":"8","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":1,"replacement":"/"}],"type":"change"}}}}
[10:30:48 PM]: <== {"id":"8","result":{}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:48 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:48 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:48 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:48 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:48 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":2,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":2,"codeOffset":0,"codeLength":2}}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:48 PM]: ==> {"id":"9","method":"edit.getAvailableRefactorings","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":2}}
[10:30:48 PM]: ==> {"id":"10","method":"edit.getFixes","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":2}}
[10:30:48 PM]: ==> {"id":"11","method":"edit.getAssists","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":2}}
[10:30:48 PM]: <== {"id":"9","result":{"kinds":[]}}
[10:30:48 PM]: <== {"id":"10","result":{"fixes":[]}}
[10:30:48 PM]: <== {"id":"11","result":{"assists":[]}}
[10:30:48 PM]: ==> {"id":"12","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":2,"replacement":" "}],"type":"change"}}}}
[10:30:48 PM]: ==> {"id":"13","method":"completion.getSuggestions","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":3}}
[10:30:48 PM]: <== {"id":"12","result":{}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:48 PM]: <== {"id":"13","result":{"id":"0"}}
[10:30:48 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:48 PM]: <== {"event":"completion.results","params":{"id":"0","replacementOffset":3,"replacementLength":0,"results":[{"kind":"INVOCATION","relevance":1000,"completion":"TypeError","selectionOffset":9,"selectionLength":0,"isDeprecated":false,"isPotential":false,"docSummary":"Error thrown by the runtime system when a type assertion fails.","docComplete":"Error thrown by the runtime system when a type assertion fails.","element":{"kind":"CLASS","name":"TypeError","location":{"file":"/home/pete/SDKs/Flutter/bin/cache/dart-sdk/lib/core/errors.dart","offset":3919,"length":9,"startLine":108,"startColumn":7},"flags":0}},{"kind":"INVOCATION","relevance":1000,"completion":"Comparator","selectionOffset":10,"selectionLength":0,"isDeprecated":false,"isPotential":false,"docSummary":"The signature of a generic comparison function.","docComplete":"The signature of a generic comparison function.\n\nA comparison function represents an ordering on a type of objects.\nA total ordering on a type means that for two values, either they\nare equal or one is greater than the other (and the latter must then be\nsmaller than the former).\n\nA [Comparator] function represents such a total ordering by returning\n\n* a negative integer if [a] is smaller than [b],\n* zero if [a] is equal to [b], and\n* a positive integer if [a] is greater than [b].","element":{"kind":"FUNCTION_TYPE_ALIAS","name":"Comparator","location":{"file":"/home/pete/SDKs/Flutter/bin/cache/dart-sdk/lib/core/comparable.dart","offset":775,"length":10,"startLine":21,"startColumn":13},"flags":0,"parameters":"(T a, T b)","returnType":"int","typeParameters":"<T>"},"returnType":"int"},{"kind":"INVOCATION","relevance":1000,"completion":"Match","selectionOffset":5,"selectionLength":0,"isDeprecated":false,"isPotential":false,"docSummary":"A result from searching within a string.","docComplete":"A result from searching within a string.\n\nA Match or an [Iterable] of Match objects is returned from [Pattern]\nmatching methods.\n\nThe following ex…
[10:30:48 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:48 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:48 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:48 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":3,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":3,"codeOffset":0,"codeLength":3}}}
[10:30:48 PM]: ==> {"id":"14","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":3,"replacement":"T"}],"type":"change"}}}}
[10:30:48 PM]: <== {"id":"14","result":{}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:48 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:48 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:48 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:48 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:48 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:48 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":4,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":4,"codeOffset":0,"codeLength":4}}}
[10:30:49 PM]: ==> {"id":"15","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":4,"replacement":"O"}],"type":"change"}}}}
[10:30:49 PM]: <== {"id":"15","result":{}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:49 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:49 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:49 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:49 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:49 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":5,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":5,"codeOffset":0,"codeLength":5}}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:49 PM]: ==> {"id":"16","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":5,"replacement":"D"}],"type":"change"}}}}
[10:30:49 PM]: <== {"id":"16","result":{}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:49 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:49 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:49 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:49 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:49 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":6,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":6,"codeOffset":0,"codeLength":6}}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:49 PM]: ==> {"id":"17","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":6,"replacement":"O"}],"type":"change"}}}}
[10:30:49 PM]: <== {"id":"17","result":{}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:49 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:49 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:49 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:49 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:49 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:49 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":7,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":7,"codeOffset":0,"codeLength":7}}}
[10:30:49 PM]: ==> {"id":"18","method":"edit.getAvailableRefactorings","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":7}}
[10:30:49 PM]: ==> {"id":"19","method":"edit.getFixes","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":7}}
[10:30:49 PM]: ==> {"id":"20","method":"edit.getAssists","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":7}}
[10:30:49 PM]: <== {"id":"18","result":{"kinds":[]}}
[10:30:49 PM]: <== {"id":"19","result":{"fixes":[]}}
[10:30:49 PM]: <== {"id":"20","result":{"assists":[]}}
[10:30:50 PM]: ==> {"id":"21","method":"analysis.updateContent","params":{"files":{"/home/pete/Projects/dart_temp/temp.dart":{"edits":[{"id":"","length":0,"offset":7,"replacement":"\n"}],"type":"change"}}}}
[10:30:50 PM]: <== {"id":"21","result":{}}
[10:30:50 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:50 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:50 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:50 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:50 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:50 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":8,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":8,"codeOffset":0,"codeLength":8}}}
[10:30:50 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:50 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[10:30:50 PM]: <== {"event":"analysis.errors","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","errors":[]}}
[10:30:50 PM]: <== {"event":"analysis.occurrences","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","occurrences":[]}}
[10:30:50 PM]: <== {"event":"analysis.closingLabels","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","labels":[]}}
[10:30:50 PM]: <== {"event":"analysis.folding","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","regions":[]}}
[10:30:50 PM]: <== {"event":"analysis.outline","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>","location":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":0,"length":8,"startLine":1,"startColumn":1},"flags":0},"offset":0,"length":8,"codeOffset":0,"codeLength":8}}}
[10:30:50 PM]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[10:30:50 PM]: ==> {"id":"22","method":"edit.getAvailableRefactorings","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":7}}
[10:30:50 PM]: ==> {"id":"23","method":"edit.getFixes","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","offset":7}}
[10:30:50 PM]: ==> {"id":"24","method":"edit.getAssists","params":{"file":"/home/pete/Projects/dart_temp/temp.dart","length":0,"offset":7}}
[10:30:50 PM]: <== {"id":"22","result":{"kinds":[]}}
[10:30:50 PM]: <== {"id":"23","result":{"fixes":[]}}
[10:30:50 PM]: <== {"id":"24","result":{"assists":[]}}
@PeteJodo Do you have an anaysis_options.yaml file? Looks like it may possible to toggle TODOs coming back in there too:
https://www.dartlang.org/guides/language/analysis-options#the-analysis-options-file
@DanTup added the analysis_options.yaml which made it work! Thanks! The contents were
analyzer:
errors:
todo: info
I'm curious if that overrides some default config though?
I thought the default was to show them. Do you have any analysis_options.yaml file in an ancestor folder that might be affecting it?
I do not, the folder is at the top of my Projects directory and none was created in that directory or my home directory. Is there any way to determine which analysis_options.yaml file, if any, the server is using?
Ok, by coincidence another issue came up recently that I think explains this:
The reason I couldn't repro is that I tried in a Dart project and you're in Flutter. Flutter has its own default analysis_options.yaml:
https://github.com/flutter/flutter/blob/master/packages/flutter/lib/analysis_options_user.yaml
And it includes this:
# allow having TODOs in the code
todo: ignore
So, I think this is working as intended as far as Flutter is concerned, though I think it's a little confusing/unfortunate that Dart/Flutter projects have different defaults (cc @devoncarew - is this something we might want to change?).
For now, having an analysis_options.yaml file should help (if it's completely empty, I think it'll still work, since that'll cause the Flutter one to be ignored - though that will include all those lint options too).
is this something we might want to change?
It does seem overly prescriptive - I'll try and figure out why this is here. Mostly likely just a copy paste from the flutter repo's options?
@devoncarew Thanks!
With https://github.com/flutter/flutter/pull/23274 open to prevent hiding TODOs by default in Flutter, I think all the issues mentioned here are resolved so I'm gonna close this. If anyone still has problems (besides waiting for that fix), please open new issues.