1

The code completion feature works really well when I type Java code, but I've recently made a build system for Modula-2, and while the auto-complete works when I press ctrl+space, it doesn't suggest the words on it's own. I have to hit ctrl+space every time, which (kind of) defeats the purpose.

I realize that modula-2 is not a very popular language, but sublimetext has a nice feature which remembers every word the user writes, and uses it in the code-completion. This is why the ctrl+space combo works in the first place. Does anyone know how to enable the suggestions?

programstinator
  • 1,354
  • 3
  • 12
  • 31

2 Answers2

1

What triggers the pop up is controlled by the auto_complete_selector setting. You will need to add the proper scope to that. If you are not using a syntax highlighter for those files, I believe this will apply the source scope to the file, which will then lead the pop up to show.

{ 
    "name": "Modula-2",
    "scopeName": "source.modula-2",
    "fileTypes": [""],
    "patterns": [
    ],
    "uuid": "f8005a03-62cf-460b-84be-1184508464ed"
}

This is the JSON form, you can use PlistJsonConverter to convert to a plist. Then save that as a .tmLanguage file in the packages folder, probably the User Directory, or maybe a Modula-2 directory if you have other stuff associated with those types of files.

skuroda
  • 19,514
  • 4
  • 50
  • 34
1

You should try Modula-2 Language Sintax it is a new package. You can install it using Package Control or simply by git clone git://github.com/harogaston/Sublime-Modula-2.git

harogaston
  • 124
  • 1
  • 10