Trim root end of leeks, then cut off hard green leaves, leaving a bit of green where they meet the white part. Split leeks down the middle, then chop them, not too finely. Wash very well, and spin or shake dry. Set a large pot of water to boil, and salt it.
Put half the butter or oil in a large skillet, and turn heat to medium-high. A minute later add garlic and chilies, and cook, stirring occasionally, until garlic browns; remove chilies (and garlic if you prefer). Add leeks, and cook, stirring occasionally, until they wilt, about 10 minutes. Add pepper or tomato, and mushrooms, lower heat; continue to cook, stirring once in a while, until leeks begin to brown.
Cook pasta until tender but not mushy. When it's done, drain it, reserving about ½ cup cooking liquid. Toss pasta and leeks together with remaining butter or oil, a few sprinklings of black pepper and all but a little of the parsley, adding a bit of cooking liquid if mixture seems dry. Taste and adjust seasoning, garnish with remaining parsley, and serve.