Skip to content

vim-helm causes Neovim v0.11.5 to crash (SIGKILL) on all Helm templates #32

@AsafBeinLevyGD

Description

@AsafBeinLevyGD

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

  1. Install vim-helm with the above configuration
  2. Create a standard Helm chart structure:
    test/
    ├── Chart.yaml
    └── templates/
        └── tests/
            └── test-connection.yaml
    
  3. Open any YAML file in templates/ directory:
    nvim test/templates/tests/test-connection.yaml
  4. 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: Never

Expected 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:

  1. File path contains /templates/
  2. Parent directory contains Chart.yaml
  3. Triggers FileType autocmd to change filetype from yamlhelm

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):

  1. BufReadPre autocmd to set filetype early → Runs before filetype detection, ineffective
  2. FileType helm autocmd to revert to yaml → Creates infinite loop (yaml→helm→yaml→...)
  3. Wrapping vim-helm's function → Can't access script-local functions
  4. 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.yaml

Or 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions