From 055e17449b1ffbffb6c6bd8974e634b57d18dea6 Mon Sep 17 00:00:00 2001 From: Juan David Merchan Torres Date: Fri, 12 Jul 2024 07:30:30 -0500 Subject: [PATCH 1/5] docs(readme): Remove white spaces --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4616583..3d14d12 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ vim.cmd [[packadd packer.nvim]] require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'nvim-lua/plenary.nvim' - + -- Add groq-nvim plugin from GitHub use { 'cdreetz/groq-nvim', @@ -34,7 +34,6 @@ require('packer').startup(function(use) end) ``` - ## Commands These are the current available commands @@ -49,28 +48,30 @@ These are the current available commands To use GroqGenerate, all you do is :GroqGenerate your prompt and the code will be generated at the place of the cursor -To use GroqGenerateWithContext, you start with :GroqGenerateWithContext your prompt /path/to/context/file.py +To use GroqGenerateWithContext, you start with :GroqGenerateWithContext your prompt /path/to/context/file.py To use GroqEdit, you begin by selecting some text, typically in visual mode, and then using :GroqEdit your prompt the selected code will be rewritten based on your prompt ## Examples ### Groq Generate + ``` :GroqGenerate write a python function that prints hello world ``` ![](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqGenerateGif.gif) - ### Groq Edit ``` :GroqEdit rewrite this method while adding debug lines to it ``` + ![](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqEditGif.gif) ### Groq Generate With Context + ``` :GroqGenerateWithContext write a new version of the method found in this file ./file.py ``` From 5bc7451424e17829c4f0edc01d370a163f686466 Mon Sep 17 00:00:00 2001 From: Juan David Merchan Torres Date: Fri, 12 Jul 2024 07:33:41 -0500 Subject: [PATCH 2/5] docs(readme): Add better syntax highlighting --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3d14d12..75ce977 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ A Neovim plugin for interacting with the Groq API. If you don't have it already, install Packer with this command -``` +```sh git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` -With that installed, we can now add our packer setup to our '~/.config/nvim/init.lua' +With that installed, we can now add our packer setup to our `~/.config/nvim/init.lua` -``` +```lua -- packer setup vim.cmd [[packadd packer.nvim]] require('packer').startup(function(use) @@ -38,7 +38,7 @@ end) These are the current available commands -``` +```vim - :GroqGenerate - :GroqGenerateWithContext @@ -46,17 +46,17 @@ These are the current available commands - :GroqEdit ``` -To use GroqGenerate, all you do is :GroqGenerate your prompt and the code will be generated at the place of the cursor +To use `GroqGenerate`, all you do is `:GroqGenerate` your prompt and the code will be generated at the place of the cursor -To use GroqGenerateWithContext, you start with :GroqGenerateWithContext your prompt /path/to/context/file.py +To use `GroqGenerateWithContext`, you start with `:GroqGenerateWithContext` your prompt `/path/to/context/file.py` -To use GroqEdit, you begin by selecting some text, typically in visual mode, and then using :GroqEdit your prompt the selected code will be rewritten based on your prompt +To use `GroqEdit`, you begin by selecting some text, typically in visual mode, and then using `:GroqEdit` your prompt the selected code will be rewritten based on your prompt ## Examples ### Groq Generate -``` +```vim :GroqGenerate write a python function that prints hello world ``` @@ -64,7 +64,7 @@ To use GroqEdit, you begin by selecting some text, typically in visual mode, and ### Groq Edit -``` +```vim :GroqEdit rewrite this method while adding debug lines to it ``` @@ -72,6 +72,6 @@ To use GroqEdit, you begin by selecting some text, typically in visual mode, and ### Groq Generate With Context -``` +```vim :GroqGenerateWithContext write a new version of the method found in this file ./file.py ``` From 46c1a292a46913372fe865cc9118f6dd310c3bf7 Mon Sep 17 00:00:00 2001 From: Juan David Merchan Torres Date: Fri, 12 Jul 2024 07:36:16 -0500 Subject: [PATCH 3/5] style(readme): Change formatting --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 75ce977..c915861 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ With that installed, we can now add our packer setup to our `~/.config/nvim/init ```lua -- packer setup vim.cmd [[packadd packer.nvim]] + require('packer').startup(function(use) use 'wbthomason/packer.nvim' use 'nvim-lua/plenary.nvim' @@ -23,7 +24,7 @@ require('packer').startup(function(use) -- Add groq-nvim plugin from GitHub use { 'cdreetz/groq-nvim', - requires = {'nvim-lua/plenary.nvim'}, + requires = { 'nvim-lua/plenary.nvim' }, config = function() require('groq-nvim').setup({ api_key = "your_groq_api_key", From 2628121d0148a341bcc8084b7995ef2649ea75df Mon Sep 17 00:00:00 2001 From: Juan David Merchan Torres Date: Fri, 12 Jul 2024 07:38:37 -0500 Subject: [PATCH 4/5] docs(readme): Add lazy setup --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c915861..10c7ab5 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,26 @@ git clone --depth 1 https://github.com/wbthomason/packer.nvim\ With that installed, we can now add our packer setup to our `~/.config/nvim/init.lua` +### Lazy Setup + +```lua +---@type LazySpec +return { + "cdreetz/groq-nvim", + enabled = true, + + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("groq-nvim").setup({ + api_key = "your_groq_api_key", + model = "llama3-70b-8192", + }) + end, +} +``` + +### Packer Setup + ```lua -- packer setup vim.cmd [[packadd packer.nvim]] From e7c9303bfccf62f5e622007949d0cff2abba04d8 Mon Sep 17 00:00:00 2001 From: Juan David Merchan Torres Date: Fri, 12 Jul 2024 07:40:01 -0500 Subject: [PATCH 5/5] docs(readme): Add image alt text --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 10c7ab5..74ff1e0 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ To use `GroqEdit`, you begin by selecting some text, typically in visual mode, a :GroqGenerate write a python function that prints hello world ``` -![](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqGenerateGif.gif) +![Groq Generate Demo](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqGenerateGif.gif) ### Groq Edit @@ -89,7 +89,7 @@ To use `GroqEdit`, you begin by selecting some text, typically in visual mode, a :GroqEdit rewrite this method while adding debug lines to it ``` -![](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqEditGif.gif) +![Groq Edit Demo](https://github.com/cdreetz/groq-nvim/blob/master/public/GroqEditGif.gif) ### Groq Generate With Context