I tried copilot some time ago and it wasn’t really good with Ruby, so I abandoned it, and I wanted to try it again, but didn’t want to pay for it so I simply gave up.
Then I found out about this amazing plugin for VSCode that does most of what copilot does, the plugin is called Continue, and you can install it easily into your VSCode by clicking here. Also if you use Jetbrains IDEs there is also a Continue plugin for them, so you can use this same tutorial, just install the plugin for your IDE.
It has a great advantage over VSCode if you think about the security of your code that it can run completely local from your machine, but for that you’ll also need to install Ollama, it is a local server for Large Language Models, and Continue can talk to it to complete code, use chat with AI in the IDE, comment your code, explain things, …
Very similar to many of the Copilot features.
Again, I used copilot a long time ago, so if you are a Copilot user, and decide to test Continue, please comment bellow on what Copilot offers that is better than Continue, I don’t have the knowledge to really compare them.
After you install Ollama for your platform (they have installers for Mac, Windows and Linux), you need to download some models to work with continue, I tested some and here is my small list:
DeepSeek Coder – it is great for ruby, creates unit tests for your classes with a reasonable coverage.
CodeGemma Instruct – it works amazing for Python, wasn’t that great for Ruby in my tests
Starcoder2 – It is the recommended code completion model for Continue, it is working great up to now, suggesting good code completions and saving some typing, I wouldn’t bet my job on the suggestions but if you know what you are doing it’ll save you some keystrokes.
To install these models in Ollama, after you install it run these commands:
ollama pull deepseek-coder:6.7b ollama pull codegemma:instruct ollama pull starcoder2:7b
After this you’ll need to configure Continue, it comes with a few web API models for trial, but since one of my ideas of using it was to have security and not have anything sent over the web I removed the models and configured it to use only Ollama that runs on my machine, here is my configuration file:
{ "models": [ { "title": "DeepSeek Coder", "provider": "ollama", "model": "deepseek-coder:6.7b" }, { "title": "Codegemma Instruct", "provider": "ollama", "model": "codegemma:instruct" }, { "title": "Starcoder2 7b", "provider": "ollama", "model": "starcoder2:7b" } ], "slashCommands": [ { "name": "edit", "description": "Edit selected code" }, { "name": "comment", "description": "Write comments for the selected code" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ], "customCommands": [ { "name": "test", "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", "description": "Write unit tests for highlighted code" } ], "contextProviders": [ { "name": "code", "params": {} }, { "name": "docs", "params": {} }, { "name": "diff", "params": {} }, { "name": "open", "params": {} }, { "name": "terminal", "params": {} }, { "name": "problems", "params": {} }, { "name": "folder", "params": {} }, { "name": "codebase", "params": {} } ], "tabAutocompleteModel": { "title": "Starcoder2 7b", "provider": "ollama", "model": "starcoder2:7b" }, "allowAnonymousTelemetry": false }
I replaced the starcoders:3b for the starcoder2:7b because I thought it’d work better, I haven’t really tested the 3b (3b means 3 billion parameters used in training, 7b means 7 billion parameters used in training)
All 3 models installed are specific for coding, they ate trained in more code than natural language, but they understand natural language commands, like “write a unit test for this code using only the public methods”.
It wasn’t really smart to know I was in a rails project and wrote the unit test directly using rspec, so I added “write a unit test for this code using only the public methods using minitest in a rails project” and the result was perfect.
It also knows how to write somewhat useful comments for your code, and rewrite code with better variable names.
Once you open Continue for the first time it’ll show you a simple but really useful tutorial in a python file.
Looking at the documentation for Continue, it has some really cool features like integrating with GitHub issues, pool requests, Jira, … you just need to configure it.
Please let me know if you think this mini tutorial was useful 😀