Home Download Buy Blog Forum Support

Editing Existing Plugin - XQuery

Editing Existing Plugin - XQuery

Postby kliencow on Thu Oct 06, 2011 7:50 pm

Hello SublimeText Folks,

I'm looking at adding some additional functionality to the XQuery plugin. I work with MarkLogic quite a bit and I would like to add a few tweaks. In particular I would like to add the keyword "private" to function declarations (MarkLogic specific, I believe) and I would like to add support for listing the variables and functions in the ctrl-R menu.

I think I can figure out the "private" keyword piece, I believe that I just need to edit the expressions in the XQuery.tmLanguage file.

However, to add support for the ctrl-R menu, I think I need to create a file called function.tmProperties and add references there. I tried this and have had no luck.

This is what I have tried for the tmPrefernces file:

Code: Select all
<plist version="1.0">
  <dict>
        <key>name</key>
        <string>Symbols List: Functions</string>
        <key>scope</key>
        <string>entity.name.function.xquery</string>
        <key>settings</key>
        <dict>
                <key>showInSymbolList</key>
                <integer>1</integer>
        </dict>
        <key>uuid</key>
        <string>5157F71C-2801-4385-92EA-3D0B22AEE7C5</string>
  </dict>
</plist>


Any pointers? I've never tried this with a text editor before, so I'm rather new at this. I think it would be fun to get this working and submit the changes to the original author.
kliencow
 
Posts: 2
Joined: Thu Oct 06, 2011 7:38 pm

Re: Editing Existing Plugin - XQuery

Postby kliencow on Mon Oct 17, 2011 6:28 pm

Perhaps I should simplify and refine my question...

How do I add a language pattern to the symbol list? You can see my attempt in my prior post.

In this case, I would like to add XQuery functions to the symbol list.
kliencow
 
Posts: 2
Joined: Thu Oct 06, 2011 7:38 pm

Re: Editing Existing Plugin - XQuery

Postby cmcenearney on Mon Apr 09, 2012 12:16 am

Hi,

New to Sublime and looking for the same things - I came across this post and also this Textmate bundle:

https://github.com/paxtonhare/xQuery.tmbundle

Just dropping it into Packages/ automatically gets some nice xquery syntax happening - looks like snippets and commands might take some tweaking.

If anyone else has Xquery and/or Marklogic specific stuff happening with Sublime, it would be awesome to know, and use Sublime for everything.

Colin
cmcenearney
 
Posts: 3
Joined: Tue Apr 03, 2012 1:12 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 12 guests