-
-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Description
Generating PHPDoc annotations for PHP functions fails with E5108: snippet parsing failed when using the nvim snippet engine.
Steps to Reproduce
- Configure neogen with
snippet_engine = "nvim" - Create a PHP function:
function test($data, $message) {
return $data;
}- Run
:Neogenon the function - Error:
E5108: Error executing lua: .../vim/lsp/_snippet_grammar.lua:178: snippet parsing failed
Expected Behavior
PHPDoc comment should be generated successfully.
Actual Behavior
Snippet parsing fails because neogen generates invalid LSP snippet syntax:
Root Cause
Commit aeea21f added $$ escaping for PHP variables, but:
- LSP snippet spec requires
\$for literal dollar signs (not$$) - The
nvimandminiengines use LSP spec - LuaSnip and others use
$$escaping
The current implementation escapes ALL $ to $$, which is incompatible with LSP-compliant engines.
Environment
- Neogen: d7f9461 (latest)
- Neovim: v0.11.5
- Snippet engine:
nvim - Language: PHP
References
Metadata
Metadata
Assignees
Labels
No labels