mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2026-07-23 23:25:45 +00:00
[cosmic-desktop] Update config
This commit is contained in:
@@ -125,9 +125,6 @@ require("lazy").setup({
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "*",
|
||||
-- dependencies = {
|
||||
-- "fang2hou/blink-copilot",
|
||||
-- },
|
||||
},
|
||||
|
||||
-- LSP
|
||||
@@ -217,12 +214,6 @@ require("lazy").setup({
|
||||
{ "mzlogin/vim-markdown-toc" },
|
||||
|
||||
-- AI
|
||||
-- {
|
||||
-- "zbirenbaum/copilot.lua",
|
||||
-- cmd = "Copilot",
|
||||
-- event = "InsertEnter",
|
||||
-- },
|
||||
-- { "AndreM222/copilot-lualine" },
|
||||
{
|
||||
"nickjvandyke/opencode.nvim",
|
||||
version = "*", -- Latest stable release
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
-- copilot_model = "claude-4",
|
||||
server_opts_overrides = {
|
||||
settings = {
|
||||
telemetry = {
|
||||
telemetryLevel = "NotAuthorized",
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
dockerfile = true,
|
||||
go = true,
|
||||
gothtmltmpl = true,
|
||||
gotexttmpl = true,
|
||||
hcl = true,
|
||||
helm = true,
|
||||
javascript = true,
|
||||
json = true,
|
||||
lua = true,
|
||||
make = true,
|
||||
markdown = true,
|
||||
python = true,
|
||||
sh = true,
|
||||
typescript = true,
|
||||
yaml = true,
|
||||
["*"] = false,
|
||||
},
|
||||
})
|
||||
@@ -1,6 +1,5 @@
|
||||
require("plugins.snacks")
|
||||
require("plugins.blink")
|
||||
-- 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,54 @@ 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,
|
||||
},
|
||||
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,26 @@
|
||||
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",
|
||||
"trouble",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user