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

Flutter support #1

Closed
hatem-u opened this issue Mar 28, 2021 · 2 comments
Closed

Flutter support #1

hatem-u opened this issue Mar 28, 2021 · 2 comments

Comments

@hatem-u
Copy link

hatem-u commented Mar 28, 2021

You can see that it says return MaterialApp( which should just be either return MaterialApp or MaterialApp, also in the bottom it is putting the whole definition of the class which looks odd.

This is how it looks using VS Code with the official Flutter plugin:

That's not really important as much as this next thing which is really Flutter/Dart specific, I think. Here several things can be improved:

  1. <Widget>[ This is missing the closing bracket.
  2. child: Column( this should be just Column
  3. body: Center( same as the previous
  4. you can see FloatingActionButton isn't showing the biscuit (with or without the comment) which is kind of weird because it is the same as the previous Column and Center classes.

Official Flutter plugin:

@akinsho
Copy link

akinsho commented Apr 25, 2021

@hatemU closing tags for flutter are actually provided via the language server since the treesitter grammar won't identify those nodes correctly (I helped add the treesitter dart grammar a while ago and it doesn't return the same information as you'd see in the vscode example above which uses the lsp) I've actually created a plugin that does this and other things for flutter over in https://github.com/akinsho/flutter-tools.nvim.

This is a great plugin for a wider range of languages though, just thought I'd mention

@cmgriffing
Copy link
Contributor

After revisiting this again, please use akinsho's plugin if you desire more specific (and more correct) Dart/Flutter annotations.

This gave me an idea just now though:

You can see that it says return MaterialApp( which should just be either return MaterialApp or MaterialApp

I think it might make sense to have a global and per language character/word filter as configuration. Then users could customize which characters or words show up. ie: "(" or "return".

Creating a new issue for that and closing this.

#29

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