As you saw, this is massively customizable. You can even get listing to do syntax highlighting, I believe.The Embedded Objects has an URL to a very long document explaining {listing} in and out - long, but eventually I found itbasewidth=0.5em to make it look like LyX-Code. The default 0.6em is quite "spacey".
rh