Just as a side note, for those who find the size of the shared libs generated from ghc to be very large strip and upx can do wonders.
strip -g -S –strip-unneeded -v HsLexer.dll
strips about 50% and
upx -9 -v HsLexer.dll
compresses another 80% bringing the size from HsLexer from 48mb to 4.8mb.
not bad, not bad indeed, and with virtually no overhead.
UPDATE: Corrected the numbers based on what Cippo mentioned. Thanks, Didn’t check them before posting
The visual studio editor has a bunch of build in settings you can turn on and off per editor.
Since I’m writing a language service for Haskell, I would like to enable replacing tabs with spaces, set the amount of spaces to 4 and turn on line numbering
After a bit of searching I found a blog post from Noah Ric a developer at Microsoft about disabling zooming in a document window.
So using this as a basis I created the following:
internal class ViewCreationListener : IWpfTextViewCreationListener
public void TextViewCreated(IWpfTextView textView)
(sorry no syntax highlighting as I can’t find a theme on here that won’t break it)
Notice the “PredefinedTextViewRoles.Zoomable” , I wanted to use PredefinedTextViewRoles.Document but when doing this the IDE would randomly throw Exceptions saying that the Editor wasn’t fully created yet. Which is odd since Visual Studio is doing all the initializations.
The set of values you can change this way are listed here: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.text.editor.ieditoroptions_members(v=VS.100).aspx
For more things you change take a look at http://msdn.microsoft.com/en-us/library/ee818135.aspx
I’m currently writing a language service/package for visual studio 2010 but one of the things I’ve noticed is that a lot of the stuff I need are largely undocumented.
So I decided to write this Blog, documenting things I’ve found out while writing this. Although now and then there’ll be some odd posts 🙂