mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2026-07-23 23:25:45 +00:00
[neovim] Remove copilot support
This commit is contained in:
@@ -125,9 +125,9 @@ require("lazy").setup({
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"fang2hou/blink-copilot",
|
||||
},
|
||||
-- dependencies = {
|
||||
-- "fang2hou/blink-copilot",
|
||||
-- },
|
||||
},
|
||||
|
||||
-- LSP
|
||||
@@ -217,12 +217,12 @@ require("lazy").setup({
|
||||
{ "mzlogin/vim-markdown-toc" },
|
||||
|
||||
-- AI
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
},
|
||||
{ "AndreM222/copilot-lualine" },
|
||||
-- {
|
||||
-- "zbirenbaum/copilot.lua",
|
||||
-- cmd = "Copilot",
|
||||
-- event = "InsertEnter",
|
||||
-- },
|
||||
-- { "AndreM222/copilot-lualine" },
|
||||
{
|
||||
"nickjvandyke/opencode.nvim",
|
||||
version = "*", -- Latest stable release
|
||||
|
||||
@@ -41,18 +41,7 @@ require("blink.cmp").setup({
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "buffer", "copilot" },
|
||||
providers = {
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
module = "blink-copilot",
|
||||
score_offset = 100,
|
||||
async = true,
|
||||
opts = {
|
||||
max_completions = 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
default = { "lsp", "path", "buffer" },
|
||||
},
|
||||
|
||||
keymap = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require("plugins.snacks")
|
||||
require("plugins.blink")
|
||||
require("plugins.copilot")
|
||||
-- require("plugins.copilot")
|
||||
require("plugins.telescope")
|
||||
require("plugins.mini-comment")
|
||||
require("plugins.mini-pairs")
|
||||
|
||||
@@ -1,67 +1,67 @@
|
||||
local hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end
|
||||
|
||||
local diagnostics = {
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
sections = { "error", "warn" },
|
||||
symbols = { error = " ", warn = " " },
|
||||
colored = false,
|
||||
always_visible = true,
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
sections = { "error", "warn" },
|
||||
symbols = { error = " ", warn = " " },
|
||||
colored = false,
|
||||
always_visible = true,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
"diff",
|
||||
colored = false,
|
||||
symbols = { added = "+", modified = "", removed = "" },
|
||||
cond = hide_in_width,
|
||||
"diff",
|
||||
colored = false,
|
||||
symbols = { added = "+", modified = "", removed = "" },
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
local lsp_progress = {
|
||||
"lsp_progress",
|
||||
display_components = { "spinner" },
|
||||
spinner_symbols = { "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾" },
|
||||
"lsp_progress",
|
||||
display_components = { "spinner" },
|
||||
spinner_symbols = { "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾" },
|
||||
}
|
||||
|
||||
local spaces = function()
|
||||
local expandtab = vim.api.nvim_get_option_value("expandtab", { buf = 0 })
|
||||
local expandtab = vim.api.nvim_get_option_value("expandtab", { buf = 0 })
|
||||
|
||||
local title = "spaces: "
|
||||
if not expandtab then
|
||||
title = "tab: "
|
||||
end
|
||||
local title = "spaces: "
|
||||
if not expandtab then
|
||||
title = "tab: "
|
||||
end
|
||||
|
||||
return title .. vim.api.nvim_get_option_value("shiftwidth", { buf = 0 })
|
||||
return title .. vim.api.nvim_get_option_value("shiftwidth", { buf = 0 })
|
||||
end
|
||||
|
||||
local venv = function()
|
||||
local venv = os.getenv("VIRTUAL_ENV")
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
local venv = os.getenv("VIRTUAL_ENV")
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
|
||||
venv = require("venv-selector").get_active_venv()
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
venv = require("venv-selector").get_active_venv()
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
|
||||
return ""
|
||||
return ""
|
||||
end
|
||||
|
||||
local get_filetype = function()
|
||||
local ft = vim.bo.filetype or ""
|
||||
local ft = vim.bo.filetype or ""
|
||||
|
||||
if ft == "yaml" then
|
||||
local schema = require("schema-companion").get_current_schemas() or ""
|
||||
if schema == "" then
|
||||
return ft
|
||||
end
|
||||
if ft == "yaml" then
|
||||
local schema = require("schema-companion").get_current_schemas() or ""
|
||||
if schema == "" then
|
||||
return ft
|
||||
end
|
||||
|
||||
return ft .. " (" .. schema:sub(0, 50) .. ")"
|
||||
else
|
||||
return ft
|
||||
end
|
||||
return ft .. " (" .. schema:sub(0, 50) .. ")"
|
||||
else
|
||||
return ft
|
||||
end
|
||||
end
|
||||
|
||||
local gitblame = require("gitblame")
|
||||
@@ -71,69 +71,69 @@ vim.g.gitblame_display_virtual_text = 0
|
||||
vim.g.gitblame_message_template = "<author>, <date>"
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", venv },
|
||||
lualine_c = {
|
||||
diagnostics,
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
cond = function()
|
||||
if
|
||||
vim.bo.filetype == "snacks_picker_list"
|
||||
or vim.bo.filetype == "mason"
|
||||
or vim.bo.filetype == "lazy"
|
||||
or vim.bo.filetype == "help"
|
||||
or vim.bo.filetype == "starter"
|
||||
or vim.bo.filetype == "TelescopePrompt"
|
||||
or vim.bo.filetype == "noice"
|
||||
then
|
||||
return false
|
||||
end
|
||||
options = {
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", venv },
|
||||
lualine_c = {
|
||||
diagnostics,
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
cond = function()
|
||||
if
|
||||
vim.bo.filetype == "snacks_picker_list"
|
||||
or vim.bo.filetype == "mason"
|
||||
or vim.bo.filetype == "lazy"
|
||||
or vim.bo.filetype == "help"
|
||||
or vim.bo.filetype == "starter"
|
||||
or vim.bo.filetype == "TelescopePrompt"
|
||||
or vim.bo.filetype == "noice"
|
||||
then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
},
|
||||
{
|
||||
"copilot",
|
||||
symbols = {
|
||||
status = {
|
||||
icons = {
|
||||
enabled = " ",
|
||||
sleep = " ",
|
||||
disabled = " ",
|
||||
warning = " ",
|
||||
unknown = " ",
|
||||
},
|
||||
},
|
||||
spinners = require("copilot-lualine.spinners").dots,
|
||||
},
|
||||
},
|
||||
lsp_progress,
|
||||
{
|
||||
require("noice").api.statusline.mode.get,
|
||||
cond = require("noice").api.statusline.mode.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
require("noice").api.status.search.get,
|
||||
cond = require("noice").api.status.search.has,
|
||||
color = { fg = "#c69026" },
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{ gitblame.get_current_blame_text, cond = gitblame.is_blame_text_available },
|
||||
diff,
|
||||
spaces,
|
||||
"encoding",
|
||||
{ get_filetype, separator = "" },
|
||||
},
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
extensions = { "lazy", "mason", "trouble" },
|
||||
return true
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- "copilot",
|
||||
-- symbols = {
|
||||
-- status = {
|
||||
-- icons = {
|
||||
-- enabled = " ",
|
||||
-- sleep = " ",
|
||||
-- disabled = " ",
|
||||
-- warning = " ",
|
||||
-- unknown = " ",
|
||||
-- },
|
||||
-- },
|
||||
-- spinners = require("copilot-lualine.spinners").dots,
|
||||
-- },
|
||||
-- },
|
||||
lsp_progress,
|
||||
{
|
||||
require("noice").api.statusline.mode.get,
|
||||
cond = require("noice").api.statusline.mode.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
require("noice").api.status.search.get,
|
||||
cond = require("noice").api.status.search.has,
|
||||
color = { fg = "#c69026" },
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{ gitblame.get_current_blame_text, cond = gitblame.is_blame_text_available },
|
||||
diff,
|
||||
spaces,
|
||||
"encoding",
|
||||
{ get_filetype, separator = "" },
|
||||
},
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
extensions = { "lazy", "mason", "trouble" },
|
||||
})
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
local projects = function()
|
||||
local projects_path = vim.fn.expand("~/.config/nvim/neovim-projects.json")
|
||||
local data = require("util.files").read(projects_path)
|
||||
local projects_path = vim.fn.expand("~/.config/nvim/neovim-projects.json")
|
||||
local data = require("util.files").read(projects_path)
|
||||
|
||||
if data then
|
||||
local ok, decoded = pcall(vim.json.decode, data)
|
||||
return ok and decoded or {}
|
||||
end
|
||||
if data then
|
||||
local ok, decoded = pcall(vim.json.decode, data)
|
||||
return ok and decoded or {}
|
||||
end
|
||||
|
||||
return {}
|
||||
return {}
|
||||
end
|
||||
|
||||
require("neovim-project").setup({
|
||||
projects = projects(),
|
||||
last_session_on_startup = false,
|
||||
dashboard_mode = false,
|
||||
filetype_autocmd_timeout = 0,
|
||||
session_manager_opts = {
|
||||
autosave_ignore_filetypes = {
|
||||
"snacks_picker_list",
|
||||
"trouble",
|
||||
"grug-far",
|
||||
"copilot-chat",
|
||||
"trouble",
|
||||
},
|
||||
},
|
||||
projects = projects(),
|
||||
last_session_on_startup = false,
|
||||
dashboard_mode = false,
|
||||
filetype_autocmd_timeout = 0,
|
||||
session_manager_opts = {
|
||||
autosave_ignore_filetypes = {
|
||||
"snacks_picker_list",
|
||||
"trouble",
|
||||
"grug-far",
|
||||
-- "copilot-chat",
|
||||
"trouble",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -2,7 +2,11 @@ require("snacks").setup({
|
||||
animate = {},
|
||||
bigfile = {},
|
||||
explorer = {},
|
||||
input = {
|
||||
enabled = true,
|
||||
},
|
||||
picker = {
|
||||
enabled = true,
|
||||
sources = {
|
||||
explorer = {
|
||||
hidden = true,
|
||||
@@ -10,8 +14,14 @@ require("snacks").setup({
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
opencode_send = function(...)
|
||||
return require("opencode").snacks_picker_send(...)
|
||||
opencode_send = function(picker)
|
||||
local items = vim.tbl_map(function(item)
|
||||
return item.file
|
||||
and require("opencode").format({ path = item.file, from = item.pos, to = item.end_pos })
|
||||
or item.text
|
||||
end, picker:selected({ fallback = true }))
|
||||
|
||||
require("opencode").prompt(table.concat(items, ", ") .. " ")
|
||||
end,
|
||||
},
|
||||
win = {
|
||||
|
||||
Reference in New Issue
Block a user