#Intro to qed

Continuing my experiments in development environments with C++ to gain some performance over python, primarily at startup time but hopefully also with processing file trees.

I sometimes refer to qed as a text editor because that is its primary function and yet I also want it to encompass documentation browsing, hypertext, file management and subprocess management. The intent is to create a general purpose computing tool,
something you could load files into, inspect them, write a program to manipulate those files, run that program and view the output all from a single environment.


#Basic elements

    Central Stack of Tools
        By default text editors are opened on the central stack.
        Navigated with Ctrl+PageUp/Ctrl+PageDown

    Side Docks (Shelf)
        Secondary tools (File Manager, Search, etc) open on the shelf
        Tools can be moved between the central stack and the shelf

    Text editor
        Default Mode: insert text
        Other commands implemented as menu actions

    File selector
        Typing fuzzy searches
        Commands that run on a file(s) can be selected from the menu

    Text search
        Ctrl-F opens (or closes) the search box.
        Real-time search as you type.

    Config files (json)
        Shortcuts
        Styling

    External commands
        Load data/cmds/*.json to build menu.

    Syntax Highlighting 
        Based on QSyntaxHighlighter and tree-sitter
        Automatic language detection based on filenames


#Dependencies

QtWidgets
https://github.com/pantor/inja
https://github.com/nlohmann/json
Tree-sitter



#WIP

#Bugs
    FMan won't enter directory if it's first in the list
    FMan moves cursor to weird places in a new directory
    Changing CWD breaks loading config files
    C++ highlights query seems broken

#Future
    CI
        Linux build
        Windows build

    Config files
        Reloading
        Validation (syntax, shortcuts, uniqueness, etc).

    Text Editor
        Menus to be implemented as modes later on
        Line Numbers
        Goto char
        Goto line
        Overview 

    Data Table
        Default mode navigates
        Insert mode edits cell contents

    Command box
        When a command is selected from the menu it first attempts to derive its arguments from the current context (tool in focus, cursor selection, etc) 
        If it cannot an error message is generated and displayed in the status bar and possibly the most appropriate tool (eg File Selector) is opened.
        A new Text Buffer is opened for the output (or redirected to current buffer?)

    Commands
        Think of like a spell book. Uses two tiered menu.
        Commands are stored in json files that contain both the command line invocation and configuration such as hot-key, where to redirect stderr/stdout, required arguments, label/sublabel, etc.
        global and project specific commands.
        Run with argument substitution. Ie. currentFilename() -> {}
        Load output into a read-only text buffer. New Tool.
        Accept magic word to parse output as json and feed interprocess API. Design API.
        Allow long running subprocesses using jsonrpc (eg. LSP server).

    Terminal Emulator
        Works on linux and windows
        built-in gnu clone tools (ls, cd, cp, mv, etc)
        Runs external subprocesses

    Embedded Scripting
        Include lua, python, tinyjs VMs as long running subprocesses.
        Include jsonrpc API for interprocess communication (IPC).

    LSP Client
        Jump to definition.
        Hover help: display in new Tool.
        Autocomplete.
        Syntax errors.
        Linting.
        Formatting.

    Syntax highlighting
        More parsers
        Manual language selection
        Automatic language detection based on content

    VCS user interface
        Please make git bearable. 

    Testing
        A script launches qed with a CLI arg to immediately launch the test harness as an external command connected via jsonrpc. Test harness is written in python and uses the jsonrpc API to control the UI and perform testing.
