1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2026-04-18 10:04:06 +00:00

[neovim] Remove mcphub and fix treesitter

This commit is contained in:
2026-04-12 12:23:28 +02:00
parent 06fe738736
commit 4b36d349bf
8 changed files with 5 additions and 86 deletions

View File

@@ -73,7 +73,7 @@ require("lazy").setup({
},
event = "VeryLazy",
},
{ "nvim-treesitter/nvim-treesitter", event = "BufReadPost" },
{ "nvim-treesitter/nvim-treesitter", branch = "main", event = "BufReadPost" },
{
"folke/snacks.nvim",
priority = 1000,
@@ -209,12 +209,6 @@ require("lazy").setup({
"stevearc/dressing.nvim",
},
},
{
"ravitemer/mcphub.nvim",
-- cmd = "MCPHub", -- lazy load by default
-- uncomment this if you don't want mcp-hub to be available globally or can't use -g
build = "bundled_build.lua", -- Use this and set use_bundled_binary = true in opts (see Advanced configuration)
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",

View File

@@ -5,8 +5,8 @@ require("avante").setup({
-- model = "gpt-4.1",
-- model = "claude-3.7-sonnet",
-- model = "claude-sonnet-4",
-- model = "claude-sonnet-4.5",
model = "claude-opus-4.6",
model = "claude-sonnet-4.5",
-- model = "claude-opus-4.6",
timeout = 120000,
},
},
@@ -20,28 +20,4 @@ require("avante").setup({
behaviour = {
enable_claude_text_editor_tool_mode = true,
},
system_prompt = function()
local hub = require("mcphub").get_hub_instance()
return hub and hub:get_active_servers_prompt() or ""
end,
custom_tools = function()
return {
require("mcphub.extensions.avante").mcp_tool(),
}
end,
-- using the MCP server
-- disabled_tools = {
-- "list_files",
-- "search_files",
-- "read_file",
-- "create_file",
-- "rename_file",
-- "delete_file",
-- "create_dir",
-- "rename_dir",
-- "delete_dir",
-- "bash",
-- },
})

View File

@@ -1,7 +1,6 @@
require("plugins.snacks")
require("plugins.blink")
require("plugins.copilot")
require("plugins.mcphub")
require("plugins.avante")
require("plugins.telescope")
require("plugins.mini-comment")

View File

@@ -8,7 +8,6 @@ local servers = {
"jsonls",
"lua_ls",
"marksman",
-- "basedpyright",
"ruff",
"terraformls",
"ty",

View File

@@ -119,46 +119,6 @@ require("lualine").setup({
cond = require("noice").api.statusline.mode.has,
color = { fg = "#ff9e64" },
},
{
function()
-- Check if MCPHub is loaded
if not vim.g.loaded_mcphub then
return "󰐻 -"
end
local count = vim.g.mcphub_servers_count or 0
local status = vim.g.mcphub_status or "stopped"
local executing = vim.g.mcphub_executing
-- Show "-" when stopped
if status == "stopped" then
return "󰐻 -"
end
-- Show spinner when executing, starting, or restarting
if executing or status == "starting" or status == "restarting" then
local frames = { "", "", "", "", "", "", "", "", "", "" }
local frame = math.floor(vim.loop.now() / 100) % #frames + 1
return "󰐻 " .. frames[frame]
end
return "󰐻 " .. count
end,
color = function()
if not vim.g.loaded_mcphub then
return { fg = "#6c7086" } -- Gray for not loaded
end
local status = vim.g.mcphub_status or "stopped"
if status == "ready" or status == "restarted" then
return { fg = "#50fa7b" } -- Green for connected
elseif status == "starting" or status == "restarting" then
return { fg = "#ffb86c" } -- Orange for connecting
else
return { fg = "#ff5555" } -- Red for error/stopped
end
end,
},
{
require("noice").api.status.search.get,
cond = require("noice").api.status.search.has,

View File

@@ -1,9 +0,0 @@
require("mcphub").setup({
use_bundled_binary = true,
auto_approve = true,
extensions = {
avante = {
make_slash_commands = true,
},
},
})

View File

@@ -41,7 +41,6 @@ require("snacks").setup({
key = "l",
indent = 2,
},
{ icon = "󰐻", desc = "MCPHub", action = ":MCPHub", key = "h", indent = 2 },
{ icon = "", desc = "Mason", action = ":Mason", key = "m", indent = 2 },
{ icon = "", desc = "Tree-sitter", action = ":TSUpdate", key = "t", indent = 2, padding = 2 },

View File

@@ -1,4 +1,4 @@
require("nvim-treesitter.configs").setup({
require("nvim-treesitter.config").setup({
ensure_installed = {
"bash",
"comment",
@@ -26,6 +26,7 @@ require("nvim-treesitter.configs").setup({
"vimdoc",
"yaml",
},
auto_install = true,
highlight = {
enable = true,
disable = { "css" },