Home Download Buy Blog Forum Support

Custom Completions Not Displaying

Re: Custom Completions Not Displaying

Postby dasspunk on Sat Mar 03, 2012 3:42 pm

Thanks for the help all, still can't get this working.

The documentation specifically says you can use just an array of words instead of triggers. So that likely isn't the issue.

No spare commas at the end.

Nothing in the console.

completions are enabled (ctrl-space DOES bring up commands used in the current page... just not my custom completions).

B
dasspunk
 
Posts: 11
Joined: Fri Mar 02, 2012 4:38 pm

Re: Custom Completions Not Displaying

Postby agibsonsw on Sat Mar 03, 2012 8:27 pm

dasspunk wrote:Thanks for the help all, still can't get this working.

The documentation specifically says you can use just an array of words instead of triggers. So that likely isn't the issue.

No spare commas at the end.

Nothing in the console.

completions are enabled (ctrl-space DOES bring up commands used in the current page... just not my custom completions).

B


I suppose you could post the completions file, just in case there's something you've missed.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Custom Completions Not Displaying

Postby dasspunk on Mon Mar 05, 2012 3:33 pm

My completions file is bellow (couldn't attach: "The extension sublime-completions is not allowed."). Thanks for the help again...

B

Filename: sahi.sublime-completions

Code: Select all
{
    "scope": "source.sah",
    [
      "_alert",
      "_assertEqual",
      "_assertNotEqual",
      "_assertNotNull",
      "_assertNull",
      "_assertTrue",
      "_assert",
      "_assertNotTrue",
      "_assertFalse",
      "_assertExists",
      "_assertNotExists",
      "_callServer",
      "_click",
      "_clickLinkByAccessor",
      "_dragDrop",
      "_getSelectedText",
      "_resetSavedRandom",
      "_setSelected",
      "_setValue",
      "_simulateEvent",
      "_call",
      "_eval",
      "_setGlobal",
      "_wait",
      "_highlight",
      "_log",
      "_navigateTo",
      "_doubleClick",
      "_rightClick",
      "_addMock",
      "_removeMock",
      "_expectConfirm",
      "_setFile",
      "_expectPrompt",
      "_debug",
      "_debugToErr",
      "_debugToFile",
      "_mouseOver",
      "_keyPress",
      "_focus",
      "_keyDown",
      "_keyUp",
      "_mockImage",
      "_execute",
      "_assertContainsText",
      "_enableKeepAlive",
      "_disableKeepAlive",
      "_dragDropXY",
      "_deleteCookie",
      "_createCookie",
      "_clearPrintCalled",
      "_saveDownloadedAs",
      "_clearLastDownloadedFileName",
      "_rteWrite",
      "_type",
      "_check",
      "_uncheck",
      "_blur",
      "_removeFocus",
      "_clearLastAlert",
      "_clearLastPrompt",
      "_clearLastConfirm",
      "_closeWindow",
      "_accessor",
      "_button",
      "_check",
      "_checkbox",
      "_image",
      "_imageSubmitButton",
      "_link",
      "_password",
      "_radio",
      "_select",
      "_submit",
      "_textarea",
      "_textbox",
      "_event",
      "_getGlobal",
      "_random",
      "_savedRandom",
      "_cell",
      "_table",
      "_contains",
      "_containsText",
      "_containsHTML",
      "_byId",
      "_row",
      "_getText",
      "_getCellText",
      "_div",
      "_span",
      "_spandiv",
      "_option",
      "_lastConfirm",
      "_reset",
      "_file",
      "_getDB",
      "_readFile",
      "_lastPrompt",
      "_lastAlert",
      "_get",
      "_style",
      "_byText",
      "_cookie",
      "_position",
      "_print",
      "_printCalled",
      "_label",
      "_lastDownloadedFileName",
      "_rteHTML",
      "_rteText",
      "_re",
      "_prompt",
      "_scriptName",
      "_logException",
      "_logExceptionAsFailure",
      "_isVisible",
      "_listItem",
      "_stopOnError",
      "_continueOnError",
      "_parentNode",
      "_parentCell",
      "_parentRow",
      "_parentTable",
      "_in",
      "_scriptPath",
      "_near",
      "_rte",
      "_iframe",
      "_tableHeader",
      "_heading1",
      "_heading2",
      "_heading3",
      "_heading4",
      "_heading5",
      "_heading6",
      "_hidden",
      "_title",
      "_exists",
      "_area",
      "_map",
      "_italic",
      "_bold",
      "_emphasis",
      "_strong",
      "_preformatted",
      "_code",
      "_blockquote",
      "_xy",
      "_popup",
      "_include",
      "_condition",
      "_sahi",
      "_set"

    ]
}
dasspunk
 
Posts: 11
Joined: Fri Mar 02, 2012 4:38 pm

Re: Custom Completions Not Displaying

Postby agibsonsw on Mon Mar 05, 2012 6:05 pm

You've omitted the word "completions"

{
"scope": "source.sah",
"completions": [
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Custom Completions Not Displaying

Postby dasspunk on Mon Mar 05, 2012 10:26 pm

CRAP!

must have happened during one of my MANY trials... Thanks a bunch for sticking with me on this. I had a feeling it was something simple.

FYI, at this point (because I've associated .sah with javascript syntax), the source does indeed need to be "source.js". Source.sah does NOT work.

Glad to have this one solved.

Brian
dasspunk
 
Posts: 11
Joined: Fri Mar 02, 2012 4:38 pm

Re: Custom Completions Not Displaying

Postby agibsonsw on Tue Mar 06, 2012 12:00 am

Perhaps the only way to use 'Source.sah' is to create a tmLanguage file for Sah :( . But perhaps 'text.sah' might work :?:
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
agibsonsw
 
Posts: 901
Joined: Fri Jan 27, 2012 9:11 pm

Re: Custom Completions Not Displaying

Postby C0D312 on Tue Mar 06, 2012 12:09 am

agibsonsw wrote:Perhaps the only way to use 'Source.sah' is to create a tmLanguage file for Sah :( . But perhaps 'text.sah' might work :?:


text.sah won't make a difference. For more info: http://readthedocs.org/docs/sublime-tex ... xdefs.html
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Custom Completions Not Displaying

Postby dasspunk on Tue Mar 06, 2012 10:46 pm

It would be nice to be able to create a tmLanguage for Sahi... but it's really just Javascript with "$" vars (to distinguish sahi vars in Rhino I believe). So in that, Javascript highlighting is totally fine. Maybe I'll eventually dig in and make dollar signs valid on vars...

Thanks again for the help!

B
dasspunk
 
Posts: 11
Joined: Fri Mar 02, 2012 4:38 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], JeriX and 27 guests