I'm not sure I understand the - edited in - question
User global like
function myFunc() end -- should be highlighted as a global. (scheme of 'hey this is global are you sure you intended it?')
functions = {} -- highlighted as global.
function functions.myFunc() end -- myFunc is scoped under functions table, not highlighted as global
function functions:myFunc() end -- also scoped, not highlighted as global
Basically expected for me would be that dot or colon in function 'name' prevents it from being highlighted as a global.