code: def _chooseSmartIndenter(self, syntax):
          
          if syntax.indenter is not None:
              try:
                  return _getSmartIndenter(syntax.indenter, self._qpart, self)
              except KeyError:
                  logger.error("Indenter '%s' is not finished yet. But you can do it!" % syntax.indenter)
  
          try:
              return _getSmartIndenter(syntax.name, self._qpart, self)
          except KeyError:
              pass
  
          return _getSmartIndenter('normal', self._qpart, self)
docs: Get indenter for syntax