Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,17 @@ function start_neovim_background_setup() {
echo "⚠️ Lazy sync failed with exit code $lazy_exit_code" >> $neovim_log
fi

# Compile TreeSitter parsers (poll until all are loadable, then exit)
echo "Compiling TreeSitter parsers..." >> $neovim_log
timeout 180 nvim --headless +"lua local p=require('config.treesitter-parsers'); vim.wait(170000, function() for _,l in ipairs(p) do if not pcall(vim.treesitter.language.inspect,l) then return false end end; return true end, 2000); vim.cmd('qa!')" >> $neovim_log 2>&1
ts_exit_code=$?

if [ $ts_exit_code -eq 0 ]; then
echo "✅ TreeSitter parsers compiled successfully" >> $neovim_log
else
echo "⚠️ TreeSitter parser compilation may not have completed (exit code $ts_exit_code)" >> $neovim_log
fi

echo "Installing Mason tools in Neovim..." >> $neovim_log
nvim --headless "+MasonToolsInstallSync" +qa >> $neovim_log 2>&1
mason_exit_code=$?
Expand Down
53 changes: 53 additions & 0 deletions nvim/lua/config/treesitter-parsers.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
return {
"bash",
"c",
"cpp",
"css",
"csv",
"diff",
"dockerfile",
"elixir",
"erlang",
"fish",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"go",
"gomod",
"gosum",
"gowork",
"gotmpl",
"graphql",
"haskell",
"html",
"javascript",
"jq",
"jsdoc",
"json",
"latex",
"lua",
"luadoc",
"markdown",
"markdown_inline",
"python",
"regex",
"ruby",
"rust",
"scss",
"sql",
"ssh_config",
"supercollider",
"svelte",
"tmux",
"toml",
"tsx",
"typescript",
"typst",
"vim",
"vimdoc",
"vue",
"yaml",
"zig",
}
57 changes: 1 addition & 56 deletions nvim/lua/plugins/nvim-treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,6 @@ return {
},
config = function()
require("nvim-treesitter").setup()

local ensure_installed = {
"bash",
"c",
"cpp",
"css",
"csv",
"diff",
"dockerfile",
"elixir",
"erlang",
"fish",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"go",
"gomod",
"gosum",
"gowork",
"gotmpl",
"graphql",
"haskell",
"html",
"javascript",
"jq",
"jsdoc",
"json",
"latex",
"lua",
"luadoc",
"markdown",
"markdown_inline",
"python",
"regex",
"ruby",
"rust",
"scss",
"sql",
"ssh_config",
"supercollider",
"svelte",
"tmux",
"toml",
"tsx",
"typescript",
"typst",
"vim",
"vimdoc",
"vue",
"yaml",
"zig",
}

require("nvim-treesitter").install(ensure_installed)
require("nvim-treesitter").install(require("config.treesitter-parsers"))
end,
}