Skip to content
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

:CocFix doesn't work #57

Closed
rasuru opened this issue Aug 20, 2020 · 3 comments
Closed

:CocFix doesn't work #57

rasuru opened this issue Aug 20, 2020 · 3 comments

Comments

@rasuru
Copy link

rasuru commented Aug 20, 2020

Hello, @iamcco! Thank you for the extension. My issue is I get nothing when I run :CocFix. It seems coc runs quickfix with :CocAction quickfix, and coc-flutter runs :CocAction -quickfix, right? I discovered this by accident, and I could simply remap :CocFix to using :CocAction -quickfix instead, but is this behavior expected?

To Reproduce
Steps to reproduce the behavior:

  1. Run :CocFix
  2. See Press ? on normal mode to get help..

Expected behavior
Quickfixes, e.g. imports, making a field final, create non-existing variable.

Desktop (please complete the following information):

  • OS: Linux
  • Vim or Neovim: Neovim
  • (Neo)vim version: 0.4.4

Log:

[dev-command]: register dev command
[sdk]: which flutter command => /usr/bin/flutter
[sdk]: flutter command path => /opt/flutter/bin/flutter
[sdk]: dart sdk home => /opt/flutter/bin/cache/dart-sdk
[sdk]: analyzer path => /opt/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
[sdk]: dart command path => /opt/flutter/bin/cache/dart-sdk/bin/dart
[sdk]: dart version: v2.9.0
[lsp-server]: rightVersion true
[Trace - 7:39:59 PM] Sending request 'initialize - (0)'.
Params: {
    "processId": 175172,
    "rootPath": "/home/rasuru/dev/progressbook-clean2",
    "rootUri": "file:///home/rasuru/dev/progressbook-clean2",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional"
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "workspaceFolders": true
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                }
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    }
                }
            },
            "definition": {
                "dynamicRegistration": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                }
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true
            },
            "implementation": {
                "dynamicRegistration": true
            },
            "declaration": {
                "dynamicRegistration": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            }
        },
        "window": {
            "workDoneProgress": true
        }
    },
    "initializationOptions": {
        "onlyAnalyzeProjectsWithOpenFiles": true,
        "suggestFromUnimportedLibraries": true,
        "closingLabels": true
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///home/rasuru/dev/progressbook-clean2",
            "name": "progressbook-clean2"
        }
    ],
    "clientInfo": {
        "name": "coc.nvim",
        "version": "0.0.78"
    }
}


[Trace - 7:39:59 PM] Received response 'initialize - (0)' in 332ms.
Result: {
    "capabilities": {
        "workspaceSymbolProvider": true,
        "documentRangeFormattingProvider": false,
        "executeCommandProvider": {
            "commands": [
                "edit.sortMembers",
                "edit.organizeImports",
                "edit.sendWorkspaceEdit",
                "refactor.perform"
            ]
        },
        "workspace": {
            "workspaceFolders": {
                "supported": true,
                "changeNotifications": true
            }
        }
    }
}


[Trace - 7:39:59 PM] Sending notification 'initialized'.
Params: {}


[lsp-server]: analysis server ready!
[lsp-closing-labels]: register closing labels
[Trace - 7:39:59 PM] Received request 'workspace/configuration - (1)'.
Params: {
    "items": [
        {
            "section": "dart"
        }
    ]
}


[Trace - 7:39:59 PM] Sending response 'workspace/configuration - (1)'. Processing request took 1ms
Result: [
    {}
]


[Trace - 7:39:59 PM] Received request 'client/registerCapability - (2)'.
Params: {
    "registrations": [
        {
            "id": "0",
            "method": "textDocument/didOpen",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/pubspec.yaml"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/analysis_options.yaml"
                    }
                ]
            }
        },
        {
            "id": "1",
            "method": "textDocument/didClose",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/pubspec.yaml"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/analysis_options.yaml"
                    }
                ]
            }
        },
        {
            "id": "2",
            "method": "textDocument/didChange",
            "registerOptions": {
                "syncKind": 2,
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/pubspec.yaml"
                    },
                    {
                        "language": "yaml",
                        "scheme": "file",
                        "pattern": "**/analysis_options.yaml"
                    }
                ]
            }
        },
        {
            "id": "3",
            "method": "textDocument/completion",
            "registerOptions": {
                "triggerCharacters": [
                    ".",
                    "=",
                    "(",
                    "$"
                ],
                "resolveProvider": true,
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "4",
            "method": "textDocument/hover",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "5",
            "method": "textDocument/signatureHelp",
            "registerOptions": {
                "triggerCharacters": [],
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "6",
            "method": "textDocument/references",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "7",
            "method": "textDocument/documentHighlight",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "8",
            "method": "textDocument/documentSymbol",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "9",
            "method": "textDocument/formatting",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "10",
            "method": "textDocument/onTypeFormatting",
            "registerOptions": {
                "firstTriggerCharacter": "}",
                "moreTriggerCharacter": [
                    ";"
                ],
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "11",
            "method": "textDocument/definition",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "12",
            "method": "textDocument/implementation",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "13",
            "method": "textDocument/codeAction",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ],
                "codeActionKinds": [
                    "source",
                    "source.organizeImports",
                    "source.sortMembers",
                    "quickfix"
                ]
            }
        },
        {
            "id": "14",
            "method": "textDocument/rename",
            "registerOptions": {
                "prepareProvider": true,
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "15",
            "method": "textDocument/foldingRange",
            "registerOptions": {
                "documentSelector": [
                    {
                        "language": "dart",
                        "scheme": "file"
                    }
                ]
            }
        },
        {
            "id": "16",
            "method": "workspace/didChangeConfiguration"
        }
    ]
}


[Trace - 7:39:59 PM] Sending notification 'textDocument/didOpen'.
Params: {
    "textDocument": {
        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart",
        "languageId": "dart",
        "version": 1,
        "text": "import 'package:flutter/material.dart';\nimport 'package:immortal/immortal.dart';\n\nimport 'utils/tasks/taskable_list.dart';\nimport 'adapters/data/gateway.dart';\nimport 'adapters/ui/controller.dart';\nimport 'adapters/ui/states.dart';\nimport 'attachments/adapters/ui/models.dart';\nimport 'entries/adapters/ui/models.dart';\nimport 'entries/api.dart';\nimport 'quests/adapters/ui/models.dart';\nimport 'retro_ui/app.dart';\n\nvoid main() {\n  final BehaviorSubject<int> hey;\n  WidgetsFlutterBinding.ensureInitialized();\n  final gateway = DataGateway();\n  final entriesApi = EntriesApi(\n    dataPort: gateway,\n  );\n  final uiController = UiController(\n    states: UiStates(),\n    entriesApi: entriesApi,\n  );\n\n  ImmortalList([\n    EntryModel(\n      dateTime: DateTime.now(),\n      id: 1,\n      tags: ImmortalList.empty(),\n      title: \"Hello\",\n      attachment: QuestModel(\n        id: 1,\n        completionTemplate: AchievementModel(\n          points: 65,\n        ),\n      ),\n    ),\n    EntryModel(\n      id: 3,\n      tags: ImmortalList.empty(),\n      title: \"Hello\",\n      dateTime: DateTime.now(),\n      attachment: UserTextModel(\"Some thoughts...\"),\n    ),\n    EntryModel(\n      id: 4,\n      tags: ImmortalList.empty(),\n      title: \"\",\n      dateTime: DateTime.now(),\n      attachment: UserTextModel(\"Some thoughts...\"),\n    ),\n  ])\n      .taskAll(\n        uiController.addEntry,\n      )\n      .andThen(\n        uiController.getAllEntries(),\n      )\n      .run();\n\n  runApp(App(controller: uiController));\n}\n"
    }
}


[Trace - 7:39:59 PM] Sending response 'client/registerCapability - (2)'. Processing request took 4ms
No result returned.


[Trace - 7:40:02 PM] Received notification '$/analyzerStatus'.
Params: {
    "isAnalyzing": true
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 14,
                    "character": 29
                },
                "end": {
                    "line": 14,
                    "character": 32
                }
            },
            "severity": 3,
            "code": "unused_local_variable",
            "source": "dart",
            "message": "The value of the local variable 'hey' isn't used.\nTry removing the variable, or using it."
        },
        {
            "range": {
                "start": {
                    "line": 14,
                    "character": 29
                },
                "end": {
                    "line": 14,
                    "character": 32
                }
            },
            "severity": 1,
            "code": "final_not_initialized",
            "source": "dart",
            "message": "The final variable 'hey' must be initialized.\nTry initializing the variable."
        },
        {
            "range": {
                "start": {
                    "line": 14,
                    "character": 8
                },
                "end": {
                    "line": 14,
                    "character": 23
                }
            },
            "severity": 1,
            "code": "undefined_class",
            "source": "dart",
            "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'dart/textDocument/publishClosingLabels'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart",
    "labels": [
        {
            "range": {
                "start": {
                    "line": 20,
                    "character": 23
                },
                "end": {
                    "line": 23,
                    "character": 3
                }
            },
            "label": "UiController"
        },
        {
            "range": {
                "start": {
                    "line": 25,
                    "character": 2
                },
                "end": {
                    "line": 52,
                    "character": 4
                }
            },
            "label": "ImmortalList"
        },
        {
            "range": {
                "start": {
                    "line": 26,
                    "character": 4
                },
                "end": {
                    "line": 37,
                    "character": 5
                }
            },
            "label": "EntryModel"
        },
        {
            "range": {
                "start": {
                    "line": 31,
                    "character": 18
                },
                "end": {
                    "line": 36,
                    "character": 7
                }
            },
            "label": "QuestModel"
        },
        {
            "range": {
                "start": {
                    "line": 33,
                    "character": 28
                },
                "end": {
                    "line": 35,
                    "character": 9
                }
            },
            "label": "AchievementModel"
        },
        {
            "range": {
                "start": {
                    "line": 38,
                    "character": 4
                },
                "end": {
                    "line": 44,
                    "character": 5
                }
            },
            "label": "EntryModel"
        },
        {
            "range": {
                "start": {
                    "line": 45,
                    "character": 4
                },
                "end": {
                    "line": 51,
                    "character": 5
                }
            },
            "label": "EntryModel"
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/tags/entities/tag.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/tags/ports/data.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/tags/adapters/ui/models.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/tags/api.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/retro_ui/utils/sheet.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/retro_ui/states.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/retro_ui/app.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/retro_ui/widgets/menu.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 3,
                    "character": 7
                },
                "end": {
                    "line": 3,
                    "character": 33
                }
            },
            "severity": 3,
            "code": "unused_import",
            "source": "dart",
            "message": "Unused import: 'package:dartz/dartz.dart'.\nTry removing the import directive."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/math/is_in_range.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/lists/immortal.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/lists/take_while_pairs.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/lists/mortal.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/eithers/catch_type.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/create_state.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/task_utils.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/options/get.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/pipe.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/mixins/identifiable.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/tasks/taskable_list.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/tasks/taskable_function.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/tasks/value.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/utils/list_utils.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 0,
                    "character": 7
                },
                "end": {
                    "line": 0,
                    "character": 25
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'list/mortal.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        },
        {
            "range": {
                "start": {
                    "line": 1,
                    "character": 7
                },
                "end": {
                    "line": 1,
                    "character": 27
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'list/immortal.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        },
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 7
                },
                "end": {
                    "line": 2,
                    "character": 35
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'list/take_while_pairs.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/adapters/data/gateway.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/adapters/ui/states.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/adapters/ui/controller.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/attachments/entities/user_text.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/attachments/entities/attachment.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/attachments/entities/achievement.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/attachments/retro_ui/models/entry.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/attachments/adapters/ui/models.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/quests/entities/quest.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/quests/entities/completion.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/quests/retro_ui/models/entry.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/quests/adapters/ui/models.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/failures/failure.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/entities/entry.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/retro_ui/models/entry.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/ports/data.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/adapters/data/gateway.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/adapters/ui/models.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/adapters/ui/states.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/adapters/ui/controller.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/entries/api.dart",
    "diagnostics": []
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/test/utils/either/catch_type_test.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 7
                },
                "end": {
                    "line": 2,
                    "character": 58
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'package:progressbook/utils/either/catch_type.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        },
        {
            "range": {
                "start": {
                    "line": 40,
                    "character": 8
                },
                "end": {
                    "line": 40,
                    "character": 17
                }
            },
            "severity": 1,
            "code": "undefined_function",
            "source": "dart",
            "message": "The function 'catchType' isn't defined.\nTry importing the library that defines 'catchType', correcting the name to the name of an existing function, or defining a function named 'catchType'."
        },
        {
            "range": {
                "start": {
                    "line": 16,
                    "character": 6
                },
                "end": {
                    "line": 16,
                    "character": 15
                }
            },
            "severity": 1,
            "code": "undefined_function",
            "source": "dart",
            "message": "The function 'catchType' isn't defined.\nTry importing the library that defines 'catchType', correcting the name to the name of an existing function, or defining a function named 'catchType'."
        },
        {
            "range": {
                "start": {
                    "line": 34,
                    "character": 6
                },
                "end": {
                    "line": 34,
                    "character": 15
                }
            },
            "severity": 1,
            "code": "undefined_function",
            "source": "dart",
            "message": "The function 'catchType' isn't defined.\nTry importing the library that defines 'catchType', correcting the name to the name of an existing function, or defining a function named 'catchType'."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/test/utils/list/take_while_pairs_test.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 7
                },
                "end": {
                    "line": 2,
                    "character": 51
                }
            },
            "severity": 3,
            "code": "unused_import",
            "source": "dart",
            "message": "Unused import: 'package:progressbook/utils/list_utils.dart'.\nTry removing the import directive."
        },
        {
            "range": {
                "start": {
                    "line": 16,
                    "character": 29
                },
                "end": {
                    "line": 16,
                    "character": 36
                }
            },
            "severity": 1,
            "code": "undefined_method",
            "source": "dart",
            "message": "The method 'upgrade' isn't defined for the type 'List'.\nTry correcting the name to the name of an existing method, or defining a method named 'upgrade'."
        },
        {
            "range": {
                "start": {
                    "line": 15,
                    "character": 28
                },
                "end": {
                    "line": 15,
                    "character": 35
                }
            },
            "severity": 1,
            "code": "undefined_method",
            "source": "dart",
            "message": "The method 'upgrade' isn't defined for the type 'List'.\nTry correcting the name to the name of an existing method, or defining a method named 'upgrade'."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///home/rasuru/dev/progressbook-clean2/test/.test_coverage.dart",
    "diagnostics": [
        {
            "range": {
                "start": {
                    "line": 4,
                    "character": 7
                },
                "end": {
                    "line": 4,
                    "character": 51
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'habits/use_cases/calculate_combo_test.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        },
        {
            "range": {
                "start": {
                    "line": 3,
                    "character": 7
                },
                "end": {
                    "line": 3,
                    "character": 52
                }
            },
            "severity": 1,
            "code": "uri_does_not_exist",
            "source": "dart",
            "message": "Target of URI doesn't exist: 'habits/entities/habit_constructor_test.dart'.\nTry creating the file referenced by the URI, or Try using a URI for a file that does exist."
        }
    ]
}


[Trace - 7:40:02 PM] Received notification '$/analyzerStatus'.
Params: {
    "isAnalyzing": false
}


[Trace - 7:40:08 PM] Sending request 'textDocument/codeAction - (1)'.
Params: {
    "textDocument": {
        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
    },
    "range": {
        "start": {
            "line": 14,
            "character": 0
        },
        "end": {
            "line": 15,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 29
                    },
                    "end": {
                        "line": 14,
                        "character": 32
                    }
                },
                "severity": 3,
                "code": "unused_local_variable",
                "source": "dart",
                "message": "The value of the local variable 'hey' isn't used.\nTry removing the variable, or using it."
            },
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 29
                    },
                    "end": {
                        "line": 14,
                        "character": 32
                    }
                },
                "severity": 1,
                "code": "final_not_initialized",
                "source": "dart",
                "message": "The final variable 'hey' must be initialized.\nTry initializing the variable."
            },
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 8
                    },
                    "end": {
                        "line": 14,
                        "character": 23
                    }
                },
                "severity": 1,
                "code": "undefined_class",
                "source": "dart",
                "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
            }
        ],
        "only": [
            "quickfix"
        ]
    }
}


[Trace - 7:40:08 PM] Received response 'textDocument/codeAction - (1)' in 167ms.
Result: [
    {
        "title": "Sort Members",
        "kind": "source.sortMembers",
        "command": {
            "title": "Sort Members",
            "command": "edit.sortMembers",
            "arguments": [
                "/home/rasuru/dev/progressbook-clean2/lib/main.dart"
            ]
        }
    },
    {
        "title": "Organize Imports",
        "kind": "source.organizeImports",
        "command": {
            "title": "Organize Imports",
            "command": "edit.organizeImports",
            "arguments": [
                "/home/rasuru/dev/progressbook-clean2/lib/main.dart"
            ]
        }
    },
    {
        "title": "Surround with block",
        "kind": "refactor.surround.block",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 15,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  }\n"
                        },
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "    final BehaviorSubject<int> hey;\n"
                        },
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 14,
                                    "character": 0
                                }
                            },
                            "newText": "  {\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'if'",
        "kind": "refactor.surround.if",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  if (condition) {\n    final BehaviorSubject<int> hey;\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'while'",
        "kind": "refactor.surround.while",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  while (condition) {\n    final BehaviorSubject<int> hey;\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'for-in'",
        "kind": "refactor.surround.forIn",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  for (var item in iterable) {\n    final BehaviorSubject<int> hey;\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'for'",
        "kind": "refactor.surround.forEach",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  for (var v = init; condition; increment) {\n    final BehaviorSubject<int> hey;\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'do-while'",
        "kind": "refactor.surround.doWhile",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  do {\n    final BehaviorSubject<int> hey;\n  } while (condition);\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'try-catch'",
        "kind": "refactor.surround.tryCatch",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  try {\n    final BehaviorSubject<int> hey;\n  } on Exception catch (e) {\n    // TODO\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Surround with 'try-finally'",
        "kind": "refactor.surround.tryFinally",
        "diagnostics": [],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": "  try {\n    final BehaviorSubject<int> hey;\n  } finally {\n    // TODO\n  }\n"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Extract Method",
        "kind": "refactor.extract",
        "command": {
            "title": "Extract Method",
            "command": "refactor.perform",
            "arguments": [
                "EXTRACT_METHOD",
                "/home/rasuru/dev/progressbook-clean2/lib/main.dart",
                1,
                431,
                34,
                null
            ]
        }
    },
    {
        "title": "Remove unused local variable",
        "kind": "quickfix.remove.unusedLocalVariable",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 29
                    },
                    "end": {
                        "line": 14,
                        "character": 32
                    }
                },
                "severity": 3,
                "code": "unused_local_variable",
                "source": "dart",
                "message": "The value of the local variable 'hey' isn't used.\nTry removing the variable, or using it."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 14,
                                    "character": 0
                                },
                                "end": {
                                    "line": 15,
                                    "character": 0
                                }
                            },
                            "newText": ""
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Import library 'package:rxdart/rxdart.dart'",
        "kind": "quickfix.import.libraryProject2",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 8
                    },
                    "end": {
                        "line": 14,
                        "character": 23
                    }
                },
                "severity": 1,
                "code": "undefined_class",
                "source": "dart",
                "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 1,
                                    "character": 40
                                },
                                "end": {
                                    "line": 1,
                                    "character": 40
                                }
                            },
                            "newText": "\nimport 'package:rxdart/rxdart.dart';"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Import library 'package:rxdart/subjects.dart'",
        "kind": "quickfix.import.libraryProject2",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 8
                    },
                    "end": {
                        "line": 14,
                        "character": 23
                    }
                },
                "severity": 1,
                "code": "undefined_class",
                "source": "dart",
                "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 1,
                                    "character": 40
                                },
                                "end": {
                                    "line": 1,
                                    "character": 40
                                }
                            },
                            "newText": "\nimport 'package:rxdart/subjects.dart';"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Create class 'BehaviorSubject'",
        "kind": "quickfix.create.class",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 8
                    },
                    "end": {
                        "line": 14,
                        "character": 23
                    }
                },
                "severity": 1,
                "code": "undefined_class",
                "source": "dart",
                "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 62,
                                    "character": 1
                                },
                                "end": {
                                    "line": 62,
                                    "character": 1
                                }
                            },
                            "newText": "\n\nclass BehaviorSubject {\n}"
                        }
                    ]
                }
            ]
        }
    },
    {
        "title": "Create mixin 'BehaviorSubject'",
        "kind": "quickfix.create.mixin",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 14,
                        "character": 8
                    },
                    "end": {
                        "line": 14,
                        "character": 23
                    }
                },
                "severity": 1,
                "code": "undefined_class",
                "source": "dart",
                "message": "Undefined class 'BehaviorSubject'.\nTry changing the name to the name of an existing class, or creating a class with the name 'BehaviorSubject'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 1,
                        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 62,
                                    "character": 1
                                },
                                "end": {
                                    "line": 62,
                                    "character": 1
                                }
                            },
                            "newText": "\n\nmixin BehaviorSubject {\n}"
                        }
                    ]
                }
            ]
        }
    }
]


[Trace - 7:40:10 PM] Sending request 'textDocument/documentHighlight - (2)'.
Params: {
    "textDocument": {
        "uri": "file:///home/rasuru/dev/progressbook-clean2/lib/main.dart"
    },
    "position": {
        "line": 14,
        "character": 3
    }
}


[Trace - 7:40:10 PM] Received response 'textDocument/documentHighlight - (2)' in 37ms.
No result returned.
@iamcco
Copy link
Owner

iamcco commented Aug 21, 2020

I don't know what CocFix do, seems more relative to coc. Need time to see the code of coc what does it do when run CocFix.

@Kavantix
Copy link
Collaborator

Kavantix commented Feb 9, 2021

This is indeed caused by coc
it only picks quickfix actions that have kind quickfix but the dart server for instance returns quickfix.import

@Kavantix
Copy link
Collaborator

This should be fixed now in the master branch of coc.nvim

@rasuru rasuru closed this as completed Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants