Peanuts, often referred to as nuts, are actually legumes and not tree nuts at all.
Some people who are allergic to peanuts are only allergic to peanuts. It does not necessarily follow that someone who's allergic to peanuts is also allergic to other legumes.
The same applies in reverse: you can be allergic to one legume, or some, or all. Some people can eat peas but not peanuts, beans but not chickpeas, and so on.
Being allergic to one item in a food group is not necessarily a reason to avoid all foods in that group and every allergy is different - please consult your allergy clinic if you're unsure.
Here is a list of all the legumes we can possibly think of:
Alfafa
Asparagus bean/pea (not asparagus itself)
Lima bean
Black bean
Black-eyed pea
Black turtle bean
Boston (navy) bean
Broad bean
Cannellini bean
Carob bean (locust bean)
Chickpea (also 'gram flour')
Chilli bean
Cranberry bean (not cranberries themselves)
Dwarf bean
Edamame (soya bean)
Egyptian (white broad) bean
English bean
Fava bean
Fava coceira
Field pea
French green bean
Frijol bola roja
Frijole negro
Gram flour (from chickpeas)
Great northern bean
Green and yellow peas
Houmous (from chickpeas)
Kidney bean
Lentils
Lespedeza
Liquorice
Lima bean
Locust bean (carob bean)
Lupin
Madagascar bean
Mange tout
Mange tout
Mexican black bean
Mexican red bean
Molasses face bean
Mung bean
Mung pea
Navy bean
Pea bean
Peanut
Peruvian bean
Pinto bean
Red bean
Red clover
Red eye bean
Red kidney bean
Rice bean
Runner bean
Scarlet runner bean
Small red bean
Snow pea
Southern pea
Sugar snap pea
Soya bean / soy bean (edamame)
Wax bean
White clover
White kidney bean
White pea bean.