We will have the means shepard many small asteroid fairly soon using solar sails, solar electric sails and highly efficient propulsion mated to light robotic spacecraft. Then we could inflate the an actual living space inside and be protected from radiation and micrometeorites. I think that moving asteroids of various sizes into positions to act as floors, walls and ceilings of a space habitat would be more near term than excavating an asteroid.
In space it is relatively easy to move quite large space rocks using solar sails, ion drives and other means. There are a lot of space rocks and a survey could be done to select the rocks that would have to be moved with the least amount of effort.
Then once each asteroid is moved into place they would be locked into place.
It could be easier to gather asteroids to make desired shapes instead of digging out a larger asteroid. Different sized asteroids could be used from 500 kg, to tons up to asteroids that are 100 to 1000 meters across.
Six large asteroids (4 walls and a roof and a ceiling) could be brought together to enclose a very large cube like void.
Pushing asteroids together easier than excavating a large asteroid
It is far easier to push very large objects in space. Tiny ion engines or plasma rockets that can accelerate for years can move huge mountain size objects while digging out an asteroid is not much easier than digging out a very large hole on earth.
It is far more near term to look at assembling asteroids into structures than it is to create or bring heavy construction equipment out to the asteroids.
I had the idea for this when I was on a snow weekend in Tahoe and other people had created the base of snowmen and we pushed them together to create the beginnings of a wall for a larger fort. We also tunneled into the snow. Pushing things together gave a quick start to the effort.
Holding the asteroids in place
The engines that moved the asteroids might be left in place, or some other form of space cement or binding needs to be created.
As noted smaller asteroids of 500 kilogram or less could be used as ready made bricks. The smaller asteroids could be used inside the voids where larger asteroids have been brought together. The smaller asteroids could be formed into walls and floors.