FM - now with previews and editor support 0 ▲ Screaming At My Screen by Timo Zimmermann 2 hours ago · Tech · hide · 0 comments My file manager is coming along nicely. I am getting more comfortable with bubbletea and lipgloss. This means (aside from fixing one or two smaller bugs) I can start adding useful features and start refactoring the code a bit. I am not a big fan of putting everything into one 500 line Update method, so pulling apart ever growing functions was number one on the todo list. I was going back and forth if I should add two different structures, one for a regular directory list and one for previews or if I put everything in a Pane view and simply add different render methods. Splitting the whole thing into multiple structures would have been a bit cleaner, but also means more type casting when getting the active view and figuring out how to react to input. Good enough for now, but something I might revisit if there is another "pane type". Rendering the preview pane for text is not too involved. header := lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color("205")).… No comments yet. Log in to reply on the Fediverse. Comments will appear here.