• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: June 30th, 2023

help-circle

  • You probably don’t want the entire terminal rendered in your UI for the reason you gave that it is intended for monospace.

    Rather, you want the buffer which is markdown and contextual info like cursor position.

    You might hit some challenges like how to handle style elements. For example:

    <cursor>*bold*
    

    Moving the cursor to the right of the b will take two key presses in nvim but would typically be one key press in a WYSIWYG editor.

    There are probably many ways to handle this in nvim through the plugin system, but both paths of embedding vs emulating nvim has a good chunk of dev work to be completed.

    Emulating will likely be more rewarding at the start as you can get incremental improvements pretty quickly.

    Embedding is a cool idea, but likely a ton of upfront work to get your first tangible results.

    You might be interested in reviewing https://github.com/MeanderingProgrammer/render-markdown.nvim which attempts to render Markdown in the terminal. They have logic for rendering things like the bold example in bold while hiding the markup.

    I personally just use https://github.com/iamcco/markdown-preview.nvim to render in a different window when render-markdown.nvim isn’t enough.



  • Whatever you do, don’t start down the path of customizing a Linux distro.

    Started messing with NixOS in December and it has been the bittersweet curse of a never ending things to do.

    • More and more of my config now tracks 0 day releases with custom bug fixes.
    • Started writing my own Gnome Shell.
    • Started adding support to my favorite TypeScript framework for GJS (Gnome JS) for my shell.
    • Started writing a a parser combinator to parse GJS stack traces.
    • Started writing custom source map library for GJS so I know where my errors are.
    • Started writing a custom test runner because none of the modern ones work on GJS.
    • Started writing widgets for my new shell.
    • My veovim config is now its own software suite.
    • Started writing syntax tree parsers for poorly supported query languages we use at work.
    • Coding style is enforced with huge linter rule configs and custom plugins.
    • Sleep is now at 75% of what it was.
    • My wife is now working double what she did because I’m always busy.
    • My kids think I’m crazy.
    • My work has doubled their expectations because they think I’m some inhuman wizard.
    • The walls of reality are crumbling down.
    • Brb my morning NixOS update is failing to build (again).