Combine sugar, milk, and butter in a saucepan. Bring to a boil; simmer until sugar is dissolved, about 2 minutes. Remove from heat; stir in chocolate chips, oats, coconut, and walnuts. Drop spoonfuls of mixture 1 inch apart on the lined baking sheet.