LINE_COMMENT does not give the proper comment string for PHP #1869
-
Contributing guidelines
Module(s)mini.snippets QuestionHi, currently I'am trying to migrate from luasnip to mini.snippets. On testing I stumbled upon the issue that indeed gives Is there a way to set this comment string in mini.snippet for a specific language of is this a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The best suggestion is to set 'commentstring' option to
If for some reason there is a need for a 'commentstring' in php files other what is meant to be used as |
Beta Was this translation helpful? Give feedback.
The best suggestion is to set 'commentstring' option to
'// %s'for php buffers. There are two ways to do that:vim.cmd('au FileType php setlocal commentstring=// %s')vim.bo.commentstring = '// %s'.If for some reason there is a need for a 'commentstring' in php files other what is meant to be used as
$LINE_COMMENT(which I'd highly recommend against), there is also a workaround of writing customconfig.expand.insertthat uses customLINE_COMMENTvalue for buffers withphpfiletype.