akinsho / flutter-tools.nvim

Tools to help create flutter apps in neovim using the native lsp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use on non-app Flutter code

justinmc opened this issue · comments

It seems like flutter-tools does not enable itself when I try to use it to work on the Flutter framework. I assume it's using a heuristic to decide to run only when it detects some typical Flutter app files or structure. However, I'd like to use it within the Flutter framework code, even if it's not possible to run it etc.

Steps to reproduce

  1. cd into your Flutter framework repo code. I usually work out of packages/flutter, but the root directory works, too.
  2. Open any dart file, maybe a common widget like: packages/flutter/lib/src/material/text_field.dart

Expected behavior: flutter-tools starts dartls and I see widget close brace labels, etc.
Actual behavior: flutter-tools and dartls do not start, and I can't use any of their features.

commented

Hi,

A while back some users were finding that they were getting too many diagnostic messages in framework files when they jumped to definition so I added a lot of them to the analysisExcludedFiles. You can reset this value to an empty list if you'd like diagnostics in those files assuming that's what's not working. This should be documented under the full configuration code block

EDIT: The field is actually analysisExcludedFolders.

That worked for me, and indeed it is already in the README. Thank you!