Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

jsonnet-language-server integration for vim

The LSP integration will depend on the vim plugin you're using

require'lspconfig'.jsonnet_ls.setup{
	settings = {
		ext_vars = {
			foo = 'bar',
		},
		formatting = {
			-- default values
			Indent              = 2,
			MaxBlankLines       = 2,
			StringStyle         = 'single',
			CommentStyle        = 'slash',
			PrettyFieldNames    = true,
			PadArrays           = false,
			PadObjects          = true,
			SortImports         = true,
			UseImplicitPlus     = true,
			StripEverything     = false,
			StripComments       = false,
			StripAllButComments = false,
		},
	},
}

Some adjustments you may need to review for above example configs:

  • Both are preset to run jsonnet-language-server -t, i.e. with automatic support for tanka import paths.
  • Depending on how you handle jsonnet import paths, you may also want to add --jpath <JPATH> additional search paths for library imports.