AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[FR] Master issue for Code Block improvements

Open Xazin opened this issue 1 year ago • 4 comments

Description

Improvements:

  • [ ] Enable hide line numbers
  • [ ] Show the language that is guessed by the "Auto" option
  • [ ] Allow changing the indentation level
  • [ ] Bracket completion
  • [ ] Collapse code block
  • [ ] Auto indentation improvement after opening brakcet

Impact

More control over the behavior of the code block depending on the usage and language.

Additional Context

Code block is over at https://github.com/AppFlowy-IO/AppFlowy-plugins

Much of the implementations can be done in the main repository, but there is a need for some enablers in the plugins repository.

Xazin avatar May 02 '24 08:05 Xazin

I did some basic Bracket Completion using Character Shortcut Events: https://github.com/MayurSMahajan/code_block/blob/main/lib/src/utils/shortcuts/character_shortcuts/braces_shortcut.dart

MayurSMahajan avatar May 03 '24 13:05 MayurSMahajan

Can it support automatic line wrapping switching?

smartyhero avatar May 07 '24 08:05 smartyhero

Can it support automatic line wrapping switching?

Yes, I need to find a suitable implementation for line number replacement when wrapping lines though.

Xazin avatar May 07 '24 08:05 Xazin

I'm not sure if I described it clearly, I need a function like this

https://github.com/AppFlowy-IO/AppFlowy/assets/76774978/0e2b1578-36f2-4d2a-8236-31110d2f1911

smartyhero avatar May 07 '24 09:05 smartyhero