Details
I am trying to understand the flow of phabricator and wondering what IDE folks use for development. One issue I am seeing is that the source navigation is extremely difficult as the new object is wrapped inside 'id()' method and the IDEs are confused.
Any ideas please?
Answers
I use Coda and I believe @epriestley uses Textmate. That's 100% of the Phabricator dev team. Maybe some frequent contributors might have better answers.
Yeah, I use TextMate. I have a handful of scripts and aliases to make navigation easier; this is the primary one (jump to definition of symbol under cursor) which I have bound to Command-Enter in TextMate:
#!/usr/local/bin/php <?php if (getenv('TM_SELECTED_TEXT')) { $word = getenv('TM_SELECTED_TEXT'); } else { $word = getenv('TM_CURRENT_WORD'); } $paths = array( '/Users/epriestley/dev/phabricator/', '/Users/epriestley/dev/arcanist/', '/Users/epriestley/dev/libphutil/', '/Users/epriestley/dev/instances/', '/Users/epriestley/dev/services/', '/Users/epriestley/dev/core/', ); $word = preg_quote($word, $delim = NULL); $patterns = array( "class +{$word}( |$)", "interface +{$word}( |$)", "function +&?{$word}( |\(|$)", "const +{$word}( |=|$)", "@provides {$word}( |$)", ); foreach ($patterns as $k => $pattern) { $patterns[$k] = '-e '.escapeshellarg($pattern); } $patterns = implode(' --or ', $patterns); $have_untracked = false; foreach ($paths as $path) { $pathesc = escapeshellarg($path); $err = 0; $cmd = "(cd {$pathesc} && /usr/bin/env git grep -n -z -I -E {$patterns} | head -n1)"; $output = exec($cmd, $ref, $err); $output = trim($output); if (!strlen($output)) { continue; } list($local, $line) = explode("\0", $output); $target = $path.'/'.$local; exec('/usr/bin/env mate '.escapeshellarg($target).' -l '.escapeshellarg($line)); return; } echo "No results.\n";
Facebook makes a set of plugins for Atom called Nuclide.
It now integrates directly with arcanist so if you developp for phabricator, nuclide will read you .arconfig and . arclint and highlight.
It also offer completion for php based on hack (which is not supported as a runtime for hosting phabricator but not that bad for completion, just start with <?hh instead of <?php and create and empty .hhconfig at project root).