Add civi's fork repo to the global config. In the part where it says "repositories.civicrm-coder" the "civicrm-coder" part is arbitrary. It's just a name to give it.
composer config --global repositories.civicrm-coder git https://github.com/civicrm/coder.git
Then install it. Change the 8.x-2.x
to whatever is desired. You can look in buildkit's config to see what it's currently using: https://github.com/civicrm/civicrm-buildkit/blob/master/composer.json. And yes you use "drupal/coder" not "civicrm/coder".
composer global require drupal/coder:dev-8.x-2.x-civi
Then follow the rest as in the https://github.com/civicrm/coder readme which is the same as the original Drupal one at https://git.drupalcode.org/project/coder