Sublime Forum

Implement AI into Sublime Text

#1

Artificial Intelligence (AI) has experienced a surge in popularity and is now being widely embraced by people who recognize its immense potential and are utilizing it wisely.

I’m tired of visiting any popular AI like ChatGPT and Google Bard every time when I need help with coding and getting info / suggestion.

I’m actually coming from Visual Studio Code years ago and recently I am really struggling to go back due to AI ( Github Copilot and Amazon CodeWhisperer )

But then the lightweight of Sublime Text pull me back, and when I need the AI, Visual Studio Code pull me go. Recently I’m in this state for like n times a day.

I just want to know if this is on the roadmap or possible in the near future?

1 Like

#2

https://packagecontrol.io/packages/LSP-copilot

1 Like

#3

Sadly I don’t need the LSP, only the AI. :frowning:
Currently, there is no API for GitHub Copilot that would allow us to create a plugin for Sublime Text 4.

It seems there is no clean way to only implement the official one, and I don’t see this in their roadmap, sad for Sublime Text users.

0 Likes

#4

Sadly I don’t need the LSP, only the AI.

That doesn’t really make any sense. LSP is a protocol. Why would it matter whether a plugin uses that or not?

0 Likes

#5

GitHub doesn’t reveal how to communicate with Copilot. So, by an “official” one, you should ask GitHub to implement a ST plugin. In that case, people has been asked for you and their answer is “we would consider that”. That just means it’s not rejected and that’s all. And almost 1 year after that answer, we, the community created LSP-copilot. https://github.com/orgs/community/discussions/6617

Fwiw, the official one careted by GitHub staff for VIM uses LSP protocol. And hence LSP-copilot utilize that too without caring about more low-level implementation details.

The only way to get rid of LSP is to reverse engineer plugins from GitHub’s official plugin for VIM (or VSCode, other editors). And that won’t bring you any new feature but potential more issues in the future.

I can image one would be really a LSP hater, then he/she can begin his reverse engineer journey here: https://github.com/github/copilot.vim/tree/release/copilot/dist

1 Like

#6

I mean I don’t need the LSP package ( the lsp-copilot require you to install lsp package too ), not the LSP. Sorry for the confusion.

0 Likes

#7

There are benefits for the community to get the service ( the extesion / package ) from the official one. Why I said I’m being pull to Visual Studio Code is not because there are many community extensions than Sublime Text, but many offical sources / companies create their extension there and offer regular update which is relevant to their latest services.

As I can see the packages here ( Sublime Text packages ), almost or most of them are updated long time ago like 5 years and above or even being archived. Although it is currently still working, you just cannot sure it will continue to work in the future and you just not confident when using them.

Back to the AI topic, I’m more intersted in Amazon CodeWhisperer and if I’m a VS code users, I can choose between them and not only have one choice, there are many other alternative.

It’s totally a waste of time for reverse engineer for a product that is offically available and free to use on other places. I rather use the openai API to create a plugin and implement it on Sublime Text myself.

1 Like

#8

Probably this is the best answer. CodeWhisperer’s API is much more transparent than Copilot, it’s basically HTTP requests iirc. The only issue is your plugin is not official :wink:

0 Likes

#9

What I’m trying to say is that Github Copilot uses openai API too, I can rather create one myself instead of using Github Copilot ( I already created one that is web version before ). I’m not sure about CodeWhisperer’s API though.

It’s still the best to get the service from the official source and enjoy regular updates. Created one by self and maintain it is the last resort.

It’s a bit awkward that a free product ( VS Code ) has more features and more convenient than a paid one ( Sublime Text ). In real life, people paid for something that has more value than the free one. Anyway, that’s just my personal perspective. Good day.

0 Likes

#10

I would argue that the best one who knows how to use AI tool will be the AI dev team. I.e., in your case, Amazon. It’s best that Amazon creates a ST plugin rather than ST creates a plugin for CodeWhisperer. Everyone just wants ST staff to create plugins for everything but there are just like 3 developers there.

0 Likes

#11

That’ true, that’s why I wish I can get it from the official source and not from the community. Plus the updates from the offical source is regular and relevent.

It’s best that Amazon creates a ST plugin rather than ST creates a plugin for CodeWhisperer

From me:

Why I said I’m being pull to Visual Studio Code is not because there are many community extensions than Sublime Text, but many offical sources / companies create their extension there and offer regular update which is relevant to their latest services.

It’s a bit awkward that a free product ( VS Code ) has more features and more convenient than a paid one ( Sublime Text ). In real life, people paid for something that has more value than the free one.

0 Likes

#12

Have you tried the one that i’ve implemented? Open​AI completion. It does exactly what you’re asking for: Open AI assistant built right into ST in a convenient and straightforward way.

1 Like

#13

@bschaaf,

I was actually looking for this recently and had to stumble on this forum thread to find the information.

Is there a reason LSP-copilot isn’t documented on the LSP for Sublime Text ?

0 Likes

#14

Honestly, I won’t expect people who want to use Copilot go to LSP’s document to find it. The expected flow would be people just type “copilot” on Package Control (either website or plugin) and find it.

As for your request, any person can file a PR to LSP’s document. If it gets rejected, you most likely will get a reason. https://github.com/sublimelsp/LSP/tree/main/docs

0 Likes

#15

AI integration in coding environments like Sublime Text is definitely a hot topic these days. A lot of folks are finding themselves torn between the simplicity and speed of Sublime Text and the advanced AI features in editors like Visual Studio Code with GitHub Copilot and Amazon CodeWhisperer. It’s like a tug-of-war between efficiency and cutting-edge tools.

0 Likes

#16

Curious, how do you guys use AI in your editor?

Chatting with it? Like phind or chatgpt?
Autocomplete? Like tabnine?
or autogenerating code? like auto generating unit tests?

Personally, I just use phind if I need artificial intelligence. LSP provides enough auto completion. I guess, I need it for auto generating code

0 Likes

#17

I don’t think that we will need to chat with. The AI tools are designed to speed up the processes. Perhaps an AI tool in Sublime will automatically detect some errors, and with the help of its commands, it will significantly speed up certain processes.

0 Likes