Skip to content

Conversation

@MrLuje
Copy link

@MrLuje MrLuje commented Jan 26, 2026

fixes #22

Summary by CodeRabbit

  • Bug Fixes
    • Improved error handling in parser retrieval to prevent unexpected failures when processing certain file types.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

A single-line bug fix adding error suppression to Treesitter parser retrieval. The { error = false } option prevents the parser from throwing an error when encountering filetypes without corresponding language parsers.

Changes

Cohort / File(s) Summary
Error handling for unknown filetypes
lua/helm-ls/indent-hints.lua
Modified vim.treesitter.get_parser() call to include { error = false } option, allowing graceful handling of filetypes without available parsers instead of raising an error

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A parser that stumbles on unknown tongues,
Now whispers "false" instead of alarming songs,
One gentle option brought peace to the night,
Where snacks and helm-ls now play just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding error suppression to treesitter parser retrieval, directly addressing the reported issue.
Linked Issues check ✅ Passed The PR addresses issue #22 by suppressing parser-creation errors via the {error = false} option, directly implementing the expected behavior of preventing errors when filetypes lack Treesitter parsers.
Out of Scope Changes check ✅ Passed The single change modifies only the treesitter parser call with error suppression, remaining fully scoped to addressing the reported runtime error in issue #22.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Parser could not be created for unknown language

1 participant