neotest-dart icon indicating copy to clipboard operation
neotest-dart copied to clipboard

Watch for changes

Open wwwdata opened this issue 1 year ago • 2 comments

Hi, the plugin works nicely for me, however, I wonder why it does not seem to work when I mark a file or directory to be watched. When I then saved the file, nothing happened. Is this something that needs to be supported by the neotest adapter and is not implemented yet?

wwwdata avatar Feb 25 '24 22:02 wwwdata

Oh, I see the "watch files" feature was added after I implemented this plugin. From the help I see: "If your language is not present in the default config, please submit a PR to add support out of the box!"

I see dart is not mentioned in default config:

    watch = {
      enabled = true,
      symbol_queries = {
        elixir = <function 1>,
        go = "        ;query\n        ;Captures imported types\n        (qualified_type name: (type_identifier) @symbol)\n        ;Captures package-local and built-in types\n        (type_identifier)@symbol\n        ;Captures imported function calls and variables/constants\n        (selector_expression field: (field_identifier) @symbol)\n        ;Captures package-local functions calls\n        (call_expression function: (identifier) @symbol)\n      ",
        lua = '        ;query\n        ;Captures module names in require calls\n        (function_call\n          name: ((identifier) @function (#eq? @function "require"))\n          arguments: (arguments (string) @symbol))\n      ',
        python = "        ;query\n        ;Captures imports and modules they're imported from\n        (import_from_statement (_ (identifier) @symbol))\n        (import_statement (_ (identifier) @symbol))\n      "
      }
    }

Did you added entry in symbol_queries table?

sidlatau avatar Feb 28 '24 06:02 sidlatau

No, I did not add dart to the symbol_queries config. But is that only checking dependencies so for example if I write a test for a widget and I change the widget, the test runs? Or can it also just re-run the test if I edit the test itself, that is more like the use case I would want to have

wwwdata avatar Mar 04 '24 13:03 wwwdata