From 4e0f3529610bb39cb8e808fe5163000dd0a402bc Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Sat, 16 Oct 2021 10:52:55 +0800 Subject: [PATCH] fix(lang#lua): fix unknown variable close https://github.com/SpaceVim/SpaceVim/issues/4495 --- autoload/SpaceVim/layers/lang/lua.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/lang/lua.vim b/autoload/SpaceVim/layers/lang/lua.vim index cec51a8d5..9bc6acf6f 100644 --- a/autoload/SpaceVim/layers/lang/lua.vim +++ b/autoload/SpaceVim/layers/lang/lua.vim @@ -69,6 +69,7 @@ let s:lua_file_head = [ \ '--!/usr/bin/lua', \ '' \ ] +let s:format_on_save = 0 function! SpaceVim#layers#lang#lua#plugins() abort let plugins = [] @@ -123,7 +124,7 @@ endfunction function! SpaceVim#layers#lang#lua#set_variable(opt) abort let s:lua_repl_command = get(a:opt, 'repl_command', '') let s:lua_foldmethod = get(a:opt, 'foldmethod', 'manual') - let s:format_on_save = get(a:var, 'format_on_save', s:format_on_save) + let s:format_on_save = get(a:opt, 'format_on_save', s:format_on_save) endfunction " Add language specific mappings