diff --git a/nvim/lua/olinpin/plugins/mcphub.lua b/nvim/lua/olinpin/plugins/mcphub.lua deleted file mode 100644 index ebca30f..0000000 --- a/nvim/lua/olinpin/plugins/mcphub.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "ravitemer/mcphub.nvim", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - }, - build = "npm install -g mcp-hub@latest", -- Installs `mcp-hub` node binary globally - config = function() - require("mcphub").setup({ - extensions = { - avante = { - make_slash_commands = true, - }, - }, - }) - end, -} diff --git a/nvim/lua/olinpin/plugins/smart-open.lua b/nvim/lua/olinpin/plugins/smart-open.lua index 76217c7..ad7fc49 100644 --- a/nvim/lua/olinpin/plugins/smart-open.lua +++ b/nvim/lua/olinpin/plugins/smart-open.lua @@ -13,7 +13,12 @@ return { }, }, dependencies = { - "kkharji/sqlite.lua", + { + "kkharji/sqlite.lua", + config = function() + vim.g.sqlite_clib_path = "/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib" + end, + }, "nvim-telescope/telescope.nvim", }, } diff --git a/nvim/lua/olinpin/plugins/telescope.lua b/nvim/lua/olinpin/plugins/telescope.lua index 99f0dc3..2c0dcc2 100644 --- a/nvim/lua/olinpin/plugins/telescope.lua +++ b/nvim/lua/olinpin/plugins/telescope.lua @@ -44,8 +44,10 @@ end return { "nvim-telescope/telescope.nvim", cmd = "Telescope", - tag = "0.1.8", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + }, keys = { { "ft", grepInFiles, desc = "Live grep by filetype" }, { "*", function() require("telescope.builtin").grep_string() end, desc = "Grep current string" }, diff --git a/nvim/lua/olinpin/plugins/treesitter.lua b/nvim/lua/olinpin/plugins/treesitter.lua index 7ac2c5c..f197c62 100644 --- a/nvim/lua/olinpin/plugins/treesitter.lua +++ b/nvim/lua/olinpin/plugins/treesitter.lua @@ -1,51 +1,26 @@ return { 'nvim-treesitter/nvim-treesitter', - event = "VeryLazy", - cmd = 'TSUpdate', + event = "VeryLazy", + build = ':TSUpdate', config = function() - require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { - "vimdoc", - "bash", - "css", - "javascript", - "python", - "c", - "lua", - "vim", - "vimdoc", - "query", - "go", - "markdown", - "markdown_inline", - "regex", - "swift", - "php", - "kotlin", - "rust", - "haskell", - "html" - }, + -- Neovim's built-in treesitter handles highlighting automatically + -- nvim-treesitter is now mainly a parser installer - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = {"markdown"} - }, - } - - end + -- Auto-install parsers when opening files + vim.api.nvim_create_autocmd("FileType", { + callback = function(args) + local ft = args.match + local lang = vim.treesitter.language.get_lang(ft) or ft + -- Try to start treesitter highlighting + local ok = pcall(vim.treesitter.start, args.buf, lang) + if not ok then + -- Parser not installed, try to install it + pcall(function() + vim.cmd('TSInstall ' .. lang) + end) + end + end + }) + end }