flutter-tools.nvim icon indicating copy to clipboard operation
flutter-tools.nvim copied to clipboard

feat: Add format instead of only prefix for labels

Open tjdevries opened this issue 4 years ago • 3 comments

I wanted to be able to have closing labels do something like </ $NAME > (or at least play with the idea).

This change should be backwards compat with prefix

tjdevries avatar May 15 '21 14:05 tjdevries

Although now I'm kind of thinking, what if you allowed a function to be passed that returned the virtual text chunk (so it could be text + highlights if you wanted to configure that. it would be basically just as easy to implement)

tjdevries avatar May 15 '21 14:05 tjdevries

Well the thing I was thinking for the function was I kind of wanted to be able to do different highlights for the // at the beginning of the line and then something else for the actual closing label. So doing a function might just be easier to make that, rather than having some convluted mess of options.

tjdevries avatar May 16 '21 03:05 tjdevries

That's fair enough, in which case I'd rather approach this by leaving the existing option as is, and offering a second option which is a function that does what you describe.

I'd approach it this way because by far the majority of issues I've seen are from users who are just trying to get to grips with nvim/lua in the first place so I'd definitely rather there be a very simple option much like coc or vscode where all they have to do is change a string and a more advanced option using a lua function for people who want to do fancier things.

akinsho avatar May 16 '21 07:05 akinsho