SparkSense Mixed Up?

67 views
Skip to first unread message

Mike Hatfield

unread,
Sep 18, 2010, 3:54:40 PM9/18/10
to spar...@googlegroups.com
Hi there,

I've installed SparkSense from the VS2010 galleries today.  Once installed, and VS2010 had been restarted, I opened my Spark MVC application (test application) and I got syntax highlighting but no intellisense.

I uninstalled SparkSense from the VS2010 Extension Manager then downloaded the master Spark branch from github.  I manually built the SparkSense from the source and installed the plug-in by double-clicking the SparkSense.vsix file in my bin\debug folder.  When I launched VS2010 and opened my Spark MVC application I have syntax highlighting but it appears that my .spark file is being considered an XML file and my intellisense is for XML markup.  For example, see my attached screenshot.

Any ideas?

Thanks!!

Mike Hatfield
vs2010-spark-1.png
vs2010-spark-2.png

Rob G

unread,
Sep 18, 2010, 6:39:14 PM9/18/10
to spar...@googlegroups.com
Hey Mike,

SparkSense doesn't do any syntax highlighting yet - I'm considering adding it later for "Spark" bits, but it does nothing yet. So any syntax highlighting you're seeing is coming from VS natively  applying to an XML document.

This is also where your problem lies - your *.spark files are associated with the XML editor in VS instead of the HTML editor in VS. To change this, simply right click any .spark file and choose "Open With..." - Then choose the HTML editor from the list and set as your default. This is a one time setting. Now if you close and reopen the spark files your should get SparkSense. 

Lastly, there is no need to download and compile from the source, the plugin in the Gallery works just fine, but I know you were just covering your bases.

Anyway, hope that helps,
Let me know if that doesn't work and I'll try help out further,

Rob

--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To post to this group, send email to spar...@googlegroups.com.
To unsubscribe from this group, send email to spark-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spark-dev?hl=en.

Mike Hatfield

unread,
Sep 18, 2010, 9:11:32 PM9/18/10
to spar...@googlegroups.com
Thanks Rob that did it.

Mike

Rob G

unread,
Feb 2, 2013, 5:35:21 PM2/2/13
to spar...@googlegroups.com
Hi Tonci,

Glad it's working for you - although it's very alpha and needs a lot of work.

I personally use the html editor (without encoding) to edit spark files.

All the best,
Rob


On Sat, Feb 2, 2013 at 5:41 PM, Tonko Zanne <tkor...@gmail.com> wrote:
hi rob,

i followed your instructions and it really works!
if you type < only intellisense is detected.
typing <% and coloring plus intellisense.
typing !{ and viewdata variables are automatically detected.
maybe also typing @{ and the same variables will be detected.
now, i can see spark keywords for files with spark extension.
now, i have design, split and source options for spark files in visual studio 2010.
the project i am working on (in c#) has a very old spark view engine version.
however, your add in works as well with this version i am working with.
indentation seems to work better now as well in spark files, meaning after installing your add in.
now html, jquery, javascript, inline css and spark source code itself are well-colored, differentiated, well-indented and finally easy to read.
typing only $ brings what looks to be javascript and html elements with and id attribute in intellisense.
some spark tags like render, viewdata and test are underline in green simply because the html editor knows these tags are not standard html.
code inside <% and %> is well colored, for example, var and new keywords are displayed in blue, plus <% and %> are well colored in yellow similar to what happened with classic asp.

i only have one question: is it better to use the html editor, or the html editor with encoding to view spark views?

best regards,

tonci korsano
To unsubscribe from this group and stop receiving emails from it, send an email to spark-dev+...@googlegroups.com.

To post to this group, send email to spar...@googlegroups.com.

Artem Smirnov

unread,
Dec 23, 2014, 12:31:44 PM12/23/14
to spar...@googlegroups.com
Sent a PR for making it compatible with VS 2012+ (hint hint)
Reply all
Reply to author
Forward
0 new messages