Sublime Forum

Support for GitLab Code Suggestions


GitLab is rolling out a feature called “Code Suggestions” to help programmers be more lazy. Or as they spin it, “Use Code Suggestions to write code more efficiently by viewing code suggestions as you type.”

As a programmer, I support this goal.

Currently, they only support VS Code. Is adding GitLab Code Suggestions support for Sublime Text on any roadmap?

They’ll need to pry my Sublime editor from my cold, dead fingers…although that feature would be pretty tempting.

1 Like


Isn’t this the same as LSP-copilot?



Copilot takes money.

Although, GitLab implies it may take money in the future too.

Code Suggestions is now available on for all users for free while the feature is in Beta.

You probably also ask GitLab how’s their attitude about making an official plugin for ST.



Support looks like it would be relatively straight forward. They don’t require any agent or library like LSP-copilot does. It is just using normal HTTP requests to with a simple payload like the below. So implementing a plugin that can leverage this should be fairly straight forward. Basically everything you need is below in code snippets

Authorization: `Bearer ${gitlabApiKey}`,
      'Content-Type': 'application/json'

      prompt_version: 1,
      project_path: projectPath,
      project_id: projectId,
      current_file: {
        file_name: fileName,
        content_above_cursor: contentAboveCursor,
        content_below_cursor: contentBelowCursor,
        ?.map(choice => choice.text)
          choiceText =>
            new vscode.InlineCompletionItem(
              choiceText as string,
              new vscode.Range(position, position),
        ) || []
1 Like