Skip to content

Instantly share code, notes, and snippets.

@sharwell
Created April 19, 2013 14:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sharwell/5420740 to your computer and use it in GitHub Desktop.
Save sharwell/5420740 to your computer and use it in GitHub Desktop.
A minimal implementation of `IVsLanguageInfo`
using System;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.TextManager.Interop;
[Guid("your guid here")]
internal class ExampleLanguageInfo : IVsLanguageInfo
{
public int GetCodeWindowManager(IVsCodeWindow pCodeWin, out IVsCodeWindowManager ppCodeWinMgr)
{
ppCodeWinMgr = null;
return VSConstants.E_NOTIMPL;
}
public int GetColorizer(IVsTextLines pBuffer, out IVsColorizer ppColorizer)
{
ppColorizer = null;
return VSConstants.E_NOTIMPL;
}
public int GetFileExtensions(out string pbstrExtensions)
{
pbstrExtensions = ".e1;.e2";
return VSConstants.S_OK;
}
public int GetLanguageName(out string bstrName)
{
bstrName = "Example";
return VSConstants.S_OK;
}
}
@rossknudsen
Copy link

Hi Sam, I see that GetColorizer is not being implemented (I see the same thing in Python Tools). What class is now doing the job of the IVsColorizer object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment