Page MenuHomePhabricator

Phabricator development - IDE
Closed, ResolvedPublic

Asked by EnterTheMusic on Nov 19 2015, 2:06 AM.

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

chad
Updated 3,317 Days Ago

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.

joshuaspence
Updated 3,317 Days Ago

I use Sublime Text.

richardvanvelzen
Updated 3,317 Days Ago

I use phpstorm, but most of its most useful features aren't usable when working on phabricator-esque code.

epriestley
Updated 3,316 Days Ago

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";

avivey
Updated 3,317 Days Ago

I use Notepad++.

My biggest tricks are shell functions for "git grep | xargs edit" and "git ls-files | grep | xargs edit".

hach-que
Updated 3,316 Days Ago

I use KDevelop4 with the PHP plugin. It's autocompletion feature is pretty good, and looking up types is easy from the toolbar (if you aren't sure what methods a class provides).

tycho.tatitscheff
Updated 3,308 Days Ago

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).

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.