# Settings
windowTitleProject   = '${projectDirectory:+ — ${projectDirectory/^.*\///}}'
windowTitleFramework = '${TM_DIRECTORY/.*\/Frameworks\/([^\/]+)\/.*|.*/${1:+ ($1)}/}'
windowTitle          = '$TM_DISPLAYNAME$windowTitleFramework$windowTitleProject$windowTitleSCM'

excludeDirectoriesInFileChooser  = '{bin/CxxTest,build}'
excludeDirectoriesInFolderSearch = '{bin/CxxTest,build}'

# Variables
TM_ORGANIZATION_NAME = 'MacroMates'

TM_TODO_IGNORE       = '/(build|CxxTest|PlugIns|vendor)/|\.(md|html)$'

TM_CXX_FLAGS         = '$TM_CXX_FLAGS    -I"$CWD/Shared/include" -I"${builddir:-$HOME/build/TextMate}/include"'
TM_OBJCXX_FLAGS      = '$TM_OBJCXX_FLAGS -I"$CWD/Shared/include" -I"${builddir:-$HOME/build/TextMate}/include"'

TM_NINJA_FILE        = '${CWD}/build.ninja'
TM_NINJA_TARGET      = 'TextMate/run'

TM_ISSUE_URL         = 'https://github.com/textmate/textmate/issues/%s'

[ 'source.c++, source.objc++' ]
tabSize          = 3
softTabs         = false
TM_C_POINTER     = "* "

[ target ]
fileType         = 'source.tm-properties'

[ *.h ]
fileType         = 'source.objc++'

[ attr.untitled ]
fileType         = 'source.objc++'

[ Applications/**~mate/** ]
TM_NINJA_TARGET = '${TM_DIRECTORY/^.*\/Applications\/([^\/]+)(\/.*)?$/$1\/run/}'

[ tests/t_*.{cc,mm} ]
scopeAttributes  = 'attr.test.cxxtest'
TM_NINJA_TARGET  = '${TM_FILEPATH/^.*?([^\/]*)\/tests\/.*$/$1\/test/}'

[ tests/gui_*.mm ]
GUI_TESTS        = '${TM_FILENAME/^gui_(.*)\.mm$/$1/}'
TM_NINJA_TARGET  = '${TM_FILEPATH/^.*?([^\/]*)\/tests\/.*$/$1\/cxx_test/}'
