-
Notifications
You must be signed in to change notification settings - Fork 23
Description
vim-helm Crash Bug Report
Summary
vim-helm causes Neovim to crash (SIGKILL) when opening any Helm template file under specific configuration.
Environment
- OS: macOS 26.0.1 (build 25A362)
- Neovim Version: v0.11.5 (Release, LuaJIT 2.1.1763318511), tried with v12 too
- vim-helm Commit:
2c8525fd98e57472769d137317bca83e477858ce(master) - Plugin Manager: lazy.nvim (LazyVim distribution)
Configuration
-- lua/plugins/helm.lua
return {
{
"towolf/vim-helm",
ft = { "helm" },
init = function()
vim.g.helm_syntax_disable = {}
end,
config = function()
-- Disable Treesitter and diagnostics for helm files
vim.api.nvim_create_autocmd("FileType", {
pattern = "helm",
callback = function(args)
pcall(vim.cmd, "TSBufDisable highlight")
pcall(vim.cmd, "TSBufDisable indent")
pcall(vim.diagnostic.disable, args.buf)
end,
})
end,
},
}Steps to Reproduce
- Install vim-helm with the above configuration
- Create a standard Helm chart structure:
test/ ├── Chart.yaml └── templates/ └── tests/ └── test-connection.yaml - Open any YAML file in
templates/directory:nvim test/templates/tests/test-connection.yaml
- Neovim immediately crashes with SIGKILL
Example Helm Template Content
# test/templates/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "test.fullname" . }}-test-connection"
labels:
{{- include "test.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "test.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: NeverExpected Behavior
Neovim should open the file with Helm syntax highlighting applied without crashing.
Actual Behavior
Neovim crashes immediately with SIGKILL when opening any Helm template file detected by vim-helm.
Detection Mechanism
vim-helm detects Helm templates via:
- File path contains
/templates/ - Parent directory contains
Chart.yaml - Triggers FileType autocmd to change filetype from
yaml→helm
Crash Timing
The crash occurs during the syntax loading phase when vim-helm's syntax engine processes the file content.
Debugging Attempts
What We Tried (All Failed):
- BufReadPre autocmd to set filetype early → Runs before filetype detection, ineffective
- FileType helm autocmd to revert to yaml → Creates infinite loop (yaml→helm→yaml→...)
- Wrapping vim-helm's function → Can't access script-local functions
- Various timing/priority approaches → All failed because crash happens during syntax loading
Only Working Solution:
Completely disable vim-helm:
return {
{
"towolf/vim-helm",
enabled = false, -- Only way to prevent crash
-- ... rest of config
},
}Additional Notes
- The crash is consistent and reproducible across all Helm template files
- No error messages are logged before the crash (immediate SIGKILL)
- Standard YAML syntax highlighting works fine for these files
- The issue appears to be in vim-helm's syntax engine itself, not the detection mechanism
Workaround
Users can disable vim-helm via environment variable:
NVIM_DISABLE_HELM=1 nvim test/templates/tests/test-connection.yamlOr permanently disable in configuration:
enabled = false,Request
Could the vim-helm maintainers investigate what in the syntax engine causes this crash? Is there a way to make the syntax loading more robust, or add error handling that prevents the SIGKILL?
Would appreciate any guidance or fixes for this issue. Happy to provide more debugging information if needed.