0
Answered

custom code completion?

Oscar Campo yesterday at 8:43 a.m. in iPad updated by Alexander Blach (Developer) 4 hours ago 8

Hi,

Textastic accepts TextMate bundles and sublime text packages with syntax definitions and code completion, but only syntax highlighting works. Any idea how to make code completion defined in tm or sublime text packages functional in Textastic?

GOOD, I'M SATISFIED
Satisfaction mark by Oscar Campo 7 hours ago
Answered

You can find the built-in code completion files in this GitHub repository:

https://github.com/blach/Textastic-Customization

They are in this folder:

https://github.com/blach/Textastic-Customization/tree/master/CodeCompletion

See https://github.com/blach/Textastic-Customization/tree/master?tab=readme-ov-file#code-completion for information on where to put custom code completion files.

Have a look at the manual to see how you can reload customizations without quitting the app:

https://www.textasticapp.com/v10/manual/customization/custom_syntax_themes_templates.html#reload-customizations

thaks! 

Following that structure and instructions I adapt my code completion json file for gmsh (.geo). I drop that file onto #Textastic/CodeCompletion folder, then restart the app, but nothing happens, no code completion pop ups on my .geo files

Please, could you check the attached gmsh.json file?

gmsh.json

some news...

1) I change the name of #Textastic/CodeCompletion to #Textastic/CodeCompletions 

2) Restarted the app

3) open a .geo file and...

3) I realized that on log file there are a lot of warnings with this message: "Warning: proxied object #Functions not found" and "Warning: proxied object #gmshSyntaxing not found"

please could you give me some idea on how to solve this?

The correct folder is "Local Files/#Textastic/CodeCompletion" (not CodeCompletions)

Can you please give me an example .geo file and tell me which syntax definition you are using?

thanks,

I found the problem inside the language definition on my sublime text package:

Inside my .geo file I check the scope via Ctr-Shift-P and realized that was "source.gmsh".

Then fix that inside my gmsh.tmLanguage definition.

Reloaded my customizations and voilà! completions are working when I edit my .geo files

Thank you again

It's great to hear that it works now!

+1

On iPad with an external keyboard, you can show the scope at the cursor location by using the keyboard shortcut Control-Shift-P. 

Please check that "source.geo" is the correct scope.

+1

Also, you don't need to restart the app.

Just use Settings -> Other -> Reload Customizations or use Cmd-Shift-R to reload customizations.