\unprotect \pushoverloadmode

\appendtoks
    \frozen\instance\protected\edefcsname\e!type\currentbuffer\endcsname
      {\buff_verbatim_type_defined_buffer[\currentbuffer][\currentdefinedbuffer]}%
\to \everydefinebuffer

\tolerant\protected\def\buff_verbatim_type_defined_buffer[#1]#*[#2]#*[#3]% category name settings
  {\begingroup
   \cdef\currenttyping{\namedbufferparameter{#1}\c!category}%
   \ifempty\currenttyping
     \let\currenttyping\v!buffer
   \fi
   \ifhastok={#3}%
     \setupcurrenttyping[#3]%
   \orelse\ifempty{#3}\else
     \cdef\currenttyping{#3}
   \fi
   \buff_verbatim_type_buffer_indeed{\currenttyping}{#2}%
   \useindentnextparameter\typingparameter
   \endgroup
   \dorechecknextindentation}

\popoverloadmode \protect

\usemodule[visual]

\definetyping[MyCode]

\setuptyping
  [MyCode]
  [option=tex,
   numbering=file]

\definebuffer
  [MyBuffer]
  [category=MyCode]

\setuptyping
  [MyBuffer]
  [option=TEX,
   numbering=file]

% \setuptyping
%   [buffer]
%   [option=TEX,
%    numbering=file]

\startMyBuffer
\fakewords{10}{20}
\stopMyBuffer

\starttext

\startMyCode
\fakeword
\stopMyCode

\getMyBuffer

\typeMyBuffer

\typeMyBuffer[MyCode]

\typeMyBuffer[option=TEX]

\stoptext
