Skip to content

4ngelf/gotmpl-injections.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gotmpl injections for neovim

Select the desired injection language into any go template. I made this plugin for use with chezmoi but it can be used for any go template.

Usage

Add the comment {{- /*lang:{injection.language}*/ -}} at the top of the template replacing injection.language. This comment may be preceded by any text but it must be the first go template action in the template.

Example in an index.html file:

{{- /*lang:html*/ -}}
<html>
<head>
    <title>{{.mytitle}}</title>
</head>
</html>

<!-- You can use vim modelines for files without the .tmpl extension -->
<!-- vim: ft=gotmpl -->

Contents

This plugin just has two things:

  1. The query for the injections
  2. A filetype definition for .tmpl files

About

Select the desired injection language into any go template.

Topics

Resources

License

Stars

Watchers

Forks