I have finally got some time to work on this.
From my initial understanding of `sh-script-mode' is that it supports many shell scripting languages via an elegant "inheritance" structured code.
As part of the tree-sitter project, I only found a repo to generate the parser for bash. So it is my impression that other shell languages might not be correctly parsed by tree-sitter-bash from here:
https://github.com/tree-sitter/tree-sitter-bash.
My idea to incrementally add support for shell languages is to start with bash and setup three `tree-sitter-font-lock-rules' for it, like so:
(defvar sh-script--treesit-settings (treesit-font-lock-rules :language 'bash
:feature 'basic
;; queries for 'basic feature here
:language 'bash
:feature 'moderate
;; queries for 'moderate feature here
:language 'bash
:feature 'full
;; queries for 'full feature here))
Would that be acceptable? Or should I use a function in the `language:' field that returns a shell language symbol?