How to make the standard full text search handle not only the products, but the categories too?

See how is a frontend full-text search implemented.
The Magento_CatalogSearch::result.phtml template shows only the products, and the catalogsearch_fulltext_scope* tables are not capable to contain the categories information without modifying the tables’ structure, but you can add a custom block to the catalogsearch_result_index page and implement your custom search for the categories.