forked from nvim-lua/kickstart.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable Copilot + add Gen + change tab indentation.
- Loading branch information
Dorian Maspataud
committed
Apr 30, 2024
1 parent
6a09bf6
commit ac6bdb3
Showing
3 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
return { | ||
'github/copilot.vim', | ||
version = '*', | ||
} | ||
-- return { | ||
-- 'github/copilot.vim', | ||
-- version = '*', | ||
-- } | ||
-- | ||
return {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
return { | ||
'David-Kunz/gen.nvim', | ||
opts = { | ||
model = 'llama3', -- The default model to use. | ||
host = 'localhost', -- The host running the Ollama service. | ||
port = '11434', -- The port on which the Ollama service is listening. | ||
quit_map = 'q', -- set keymap for close the response window | ||
retry_map = '<c-r>', -- set keymap to re-send the current prompt | ||
init = function(options) | ||
pcall(io.popen, 'ollama serve > /dev/null 2>&1 &') | ||
end, | ||
-- Function to initialize Ollama | ||
command = function(options) | ||
local body = { model = options.model, stream = true } | ||
return 'curl --silent --no-buffer -X POST http://' .. options.host .. ':' .. options.port .. '/api/chat -d $body' | ||
end, | ||
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped). | ||
-- This can also be a command string. | ||
-- The executed command must return a JSON object with { response, context } | ||
-- (context property is optional). | ||
-- list_models = '<omitted lua function>', -- Retrieves a list of model names | ||
display_mode = 'float', -- The display mode. Can be "float" or "split". | ||
show_prompt = false, -- Shows the prompt submitted to Ollama. | ||
show_model = false, -- Displays which model you are using at the beginning of your chat session. | ||
no_auto_close = false, -- Never closes the window automatically. | ||
debug = false, -- Prints errors and the command which is run. | ||
}, | ||
} |