Add claude-code plugin and fix nvim-treesitter for neovim 0.12
This commit is contained in:
parent
beca7d3566
commit
76f2c150ee
3 changed files with 44 additions and 14 deletions
|
|
@ -47,4 +47,28 @@ return {
|
|||
end,
|
||||
version = "*",
|
||||
},
|
||||
{
|
||||
"greggh/claude-code.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Required for git operations
|
||||
},
|
||||
config = function()
|
||||
require("claude-code").setup({
|
||||
window = {
|
||||
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||
position = "vertical", -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||
},
|
||||
keymaps = {
|
||||
toggle = {
|
||||
normal = "<leader>cc", -- Normal mode keymap for toggling Claude Code, false to disable
|
||||
terminal = "<leader>cc", -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||
variants = {
|
||||
continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag
|
||||
verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,16 +62,21 @@ return {
|
|||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "master",
|
||||
tag = "v0.9.3",
|
||||
branch = "main",
|
||||
main = "nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "bash", "c", "html", "lua", "markdown", "vim", "vimdoc" },
|
||||
auto_install = true,
|
||||
highlight = { enable = false },
|
||||
indent = { enable = false },
|
||||
})
|
||||
init = function()
|
||||
-- Install parsers that aren't already present
|
||||
local ensure_installed = { "bash", "c", "html", "lua", "markdown", "vim", "vimdoc" }
|
||||
local already_installed = require("nvim-treesitter.config").get_installed()
|
||||
local to_install = vim.iter(ensure_installed)
|
||||
:filter(function(parser)
|
||||
return not vim.tbl_contains(already_installed, parser)
|
||||
end)
|
||||
:totable()
|
||||
if #to_install > 0 then
|
||||
require("nvim-treesitter").install(to_install)
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue