fluttervscode-extensionslintriverpod

Riverpod VSCode quick refactoring options are absent


Hello Please help with Riverpod. Everything works on the command line (Code generation, etc) But VSCode quick refactoring options are absent. I have analysis_options.yaml with :

analyzer: plugins: custom_lint

I followed all the installation pages from the official documentation. should I install some plugins or something? Code asistant has no more ideas.


Solution

  • Try this recipe again:

    1. Add all the required dependencies to pubspec.yaml. In the simplest case, this is:
    dependencies:
      flutter_riverpod:
    
    dev_dependencies:
      riverpod_lint:
      custom_lint:
    

    and

    flutter pub get
    
    1. Next we add to analysis_options.yaml:
    analyzer:
      plugins:
        - custom_lint
    
    custom_lint:
      # To check, we forcefully enable all the rules
      enable_all_lint_rules: true
    
    1. If the custom lint is still not displayed, try activating it manually via:
    dart run custom_lint
    

    or

    # install `custom_lint` for all projects
    dart pub global activate custom_lint
    # and run `custom_lint`'s command line in a project
    custom_lint
    
    1. Restart IDE

    If these steps do not help, also try these commands:

    If all else fails, write an issue in the repository Issues · invertase/dart_custom_lint.