remove AI pluging from neovim
This commit is contained in:
parent
2cbac54509
commit
3fffa9d78e
3 changed files with 4 additions and 166 deletions
|
|
@ -72,7 +72,10 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-mod
|
|||
{{#if (and dotter.packages.rust (ne (len cargo.packages) 0)) }}
|
||||
|
||||
{{ header "Installing crates" }}
|
||||
cargo install --locked {{# each (flatten_table cargo.packages) }} "{{ this }}" {{ /each }}
|
||||
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
|
||||
cargo binstall --locked {{# each (flatten_table cargo.packages) }} "{{ this }}" {{ /each }}
|
||||
|
||||
{{ /if }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
return {
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
build = "make tiktoken",
|
||||
cmd = "CopilotChat",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
})
|
||||
|
||||
vim.g.copilot_autocomplete_enabled = false
|
||||
|
||||
vim.api.nvim_create_user_command("CopilotToggleAutocomplete", function()
|
||||
vim.g.copilot_autocomplete_enabled = not vim.g.copilot_autocomplete_enabled
|
||||
print("Copilot autocompletion: " .. tostring(vim.g.copilot_autocomplete_enabled))
|
||||
end, { desc = "Toggle Copilot autocompletion" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts =
|
||||
---@type CopilotChat.config
|
||||
{
|
||||
---@type table<string, CopilotChat.config.prompt>
|
||||
prompts = {
|
||||
HowDoI = {
|
||||
system_prompt = [[
|
||||
> /COPILOT_EXPLAIN
|
||||
|
||||
You are gonna be asked for guidance about how to solve a problem or archeive a goal. For that your answers need to follow these rules:
|
||||
|
||||
1. Provide brief, consice and unambiguos responses.
|
||||
2. You need to response with an step by step list of actions needed to complete the task.
|
||||
3. **You never have to give an explicit answer**, instead provide a high level overview of how to complete the task.
|
||||
4. Unless explicity asked by the user, **you never have to provide code snippets** in your responses. Only provide code snippets when the user says so in each question.
|
||||
5. If the user ask for a code snippet, **prefer to respond in pseudo code**, unless the user explicity asked for a concrete language.
|
||||
6. You need to have into consideration good and clean code practices, code performance and other standards, comunicate in your response this considerations and common pitfalls to avoid.
|
||||
7. If possible, include how the user can test the task is completed successfully with the title "## Testing".
|
||||
8. Use markdawn syntax highlighting when possible.
|
||||
9. You are allowed to reference the following elements but without giving examples of usage (unless the user ask for it):
|
||||
- Elements from the language syntaxis.
|
||||
- Standard library of the lenguage.
|
||||
- External libraries and/or frameworks.
|
||||
- The idiomatic way of acomplish something in the language.
|
||||
- Data structures and algorithms that could help complete the task.
|
||||
|
||||
If you have multiple aproaches of how the task can be solved, insert the title "## Options", then generate separate list of task, each in the form of "### Option A", "### Option B", etc so he/her can have it into consideration.
|
||||
The numbering of each list needs to be independen of each other, also provide only 1 list per aproach.
|
||||
|
||||
The user can ask follow up question, which needs to follow the same rules.
|
||||
]]
|
||||
},
|
||||
},
|
||||
question_header = " " .. vim.env.USER or "User" .. " ",
|
||||
answer_header = " Copilot ",
|
||||
auto_follow_cursor = false,
|
||||
window = {
|
||||
layout = 'float', -- 'vertical', 'horizontal', 'float', 'replace'
|
||||
width = 0.8, -- fractional width of parent, or absolute width in columns when > 1
|
||||
height = 0.8, -- fractional height of parent, or absolute height in rows when > 1
|
||||
-- Options below only apply to floating windows
|
||||
relative = 'editor', -- 'editor', 'win', 'cursor', 'mouse'
|
||||
border = 'rounded', -- 'none', single', 'double', 'rounded', 'solid', 'shadow'
|
||||
title = ' ', -- title of chat window
|
||||
zindex = 1, -- determines if window is on top or below other floating windows
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>at",
|
||||
function()
|
||||
require("CopilotChat").toggle()
|
||||
end,
|
||||
desc = "Toggle window",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>aa",
|
||||
function()
|
||||
local input = vim.fn.input(" Quick Chat: ")
|
||||
if input == "" then
|
||||
return
|
||||
end
|
||||
require("CopilotChat").ask(input)
|
||||
end,
|
||||
desc = "Quick chat",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>ah",
|
||||
function()
|
||||
local input = vim.fn.input(" How do I...")
|
||||
if input == "" then
|
||||
return
|
||||
end
|
||||
|
||||
local chat = require("CopilotChat")
|
||||
|
||||
local promptConfig = chat.prompts()["HowDoI"]
|
||||
chat.ask(input, promptConfig)
|
||||
end,
|
||||
desc = "How do I...",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>aA",
|
||||
function()
|
||||
-- Pick a prompt using vim.ui.select
|
||||
local actions = require("CopilotChat.actions")
|
||||
|
||||
-- Pick prompt actions
|
||||
actions.pick(actions.prompt_actions({}), {
|
||||
prompt = " Prompts:",
|
||||
}
|
||||
)
|
||||
end,
|
||||
desc = "Select action",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>ax",
|
||||
function()
|
||||
return require("CopilotChat").reset()
|
||||
end,
|
||||
desc = "Clear chat",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>al",
|
||||
function()
|
||||
return require("CopilotChat").log_level("debug")
|
||||
end,
|
||||
desc = "Set debug level",
|
||||
},
|
||||
{
|
||||
"<leader>ad",
|
||||
"<CMD>CopilotChatDocs<CR>",
|
||||
desc = "Generate documentation",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@ return {
|
|||
version = "*",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"giuxtaposition/blink-cmp-copilot",
|
||||
"folke/lazydev.nvim",
|
||||
{ "saghen/blink.compat", version = "*", },
|
||||
},
|
||||
|
|
@ -21,17 +20,6 @@ return {
|
|||
providers = {
|
||||
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
||||
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
module = "blink-cmp-copilot",
|
||||
score_offset = 5,
|
||||
enabled = function()
|
||||
if vim.g.copilot_autocomplete_enabled == nil then
|
||||
return false
|
||||
end
|
||||
return vim.g.copilot_autocomplete_enabled
|
||||
end,
|
||||
},
|
||||
luasnip = {
|
||||
name = 'luasnip',
|
||||
module = 'blink.compat.source',
|
||||
|
|
@ -46,7 +34,6 @@ return {
|
|||
compat = {},
|
||||
completion = {
|
||||
enabled_providers = {
|
||||
"copilot",
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
|
|
@ -85,10 +72,6 @@ return {
|
|||
components = {
|
||||
kind_icon = {
|
||||
text = function(ctx)
|
||||
if ctx.item.source_name == "copilot" then
|
||||
ctx.kind_icon = require("aleidk.constants").icons.kinds.Copilot
|
||||
end
|
||||
|
||||
return ctx.kind_icon .. ctx.icon_gap
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue