Fix treesitter and tmux config for Neovim 0.11

- Update treesitter to use native vim.treesitter API
- Fix catppuccin tmux theme path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Avery Felts 2026-01-23 16:06:30 -07:00
parent 2369df3446
commit 66f880766a
2 changed files with 35 additions and 29 deletions

View File

@ -29,6 +29,6 @@ bind-key l select-pane -R
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#catpuccin theme
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
run ~/.config/tmux/plugins/catppuccin/catppuccin.tmux
run '~/.tmux/plugins/tpm/tpm'

View File

@ -350,35 +350,41 @@ return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
-- Existing
"lua", "vim", "vimdoc", "bash",
-- Web
"javascript", "typescript", "tsx", "json", "yaml", "html", "css", "prisma", "graphql",
-- Rust
"rust", "toml",
-- Python
"python",
-- C/C++
"c", "cpp",
-- Markdown
"markdown", "markdown_inline",
-- Tools
"sql", "http",
},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
-- Install parsers
local ensure_installed = {
"lua", "vim", "vimdoc", "bash",
"javascript", "typescript", "tsx", "json", "yaml", "html", "css", "graphql",
"rust", "toml",
"python",
"c", "cpp",
"markdown", "markdown_inline",
"sql",
}
-- Auto-install missing parsers
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local ft = vim.bo.filetype
local lang = vim.treesitter.language.get_lang(ft) or ft
if vim.tbl_contains(ensure_installed, lang) then
pcall(vim.treesitter.start)
end
end,
})
-- Enable treesitter highlighting globally
vim.treesitter.start = vim.treesitter.start or function() end
-- Run TSUpdate to ensure parsers are installed
vim.defer_fn(function()
for _, lang in ipairs(ensure_installed) do
pcall(function()
if not pcall(vim.treesitter.language.inspect, lang) then
vim.cmd("TSInstall " .. lang)
end
end)
end
end, 100)
end,
},