vim-go icon indicating copy to clipboard operation
vim-go copied to clipboard

Adds an option to disable gohtmltmpl

Open nkzren opened this issue 2 years ago • 2 comments

Added an option to disable automatic syntax highlighting for gohtmltmpl.

I wanted this behaviour because it conflicts with .tmpl files generated by chezmoi)

nkzren avatar Oct 11 '23 02:10 nkzren

Thank you for contributing. I think a better solution, though, may be to revert https://github.com/fatih/vim-go/pull/3146.

bhcleek avatar Oct 13 '23 01:10 bhcleek

Great, makes sense to me as well since it seems to forcefully override vim's default behaviour

nkzren avatar Oct 24 '23 20:10 nkzren

Closing. This wasn't a revert of 3146, and as explained there, what vim-go does here should be safe since the template filetype that ships with Vim is a subset of what vim-go does for the gohtmltemplate filetype.

If you'd like your .tmpl files to have different behaviors, that can be accomplished by putting au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl in the right place (e.g. your vimrc or a file either in$HOME/ftdetect or $HOME/after/ftdetect) depending on where vim-go sits in your runtimepath.

bhcleek avatar Mar 26 '24 16:03 bhcleek