fix(nvim): new config
This commit is contained in:
@@ -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,
|
||||
}
|
||||
@@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
{ "<leader>ft", grepInFiles, desc = "Live grep by filetype" },
|
||||
{ "<leader>*", function() require("telescope.builtin").grep_string() end, desc = "Grep current string" },
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user