runtime(lua): update 'path' option in filetype plugin Commit: https://github.com/vim/vim/commit/0fb6ceac4ce6c2360a1c45d41ca72779af9f6b2f Author: Phạm Bình An <phambinhanctb2...@gmail.com> Date: Tue May 6 18:08:38 2025 +0200
runtime(lua): update 'path' option in filetype plugin Problem: Lua doesn't support importing module in path related to current file like JS does (https://www.reddit.com/r/lua/comments/wi0bau/whats_the_correct_way_to_run_a_lua_file_that_uses/) Solution: Remove `.` from Lua buffer-local option `'path'` closes: #17267 Signed-off-by: Phạm Bình An <phambinhanctb2...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/ftplugin/lua.vim b/runtime/ftplugin/lua.vim index 33471cc64..e3bb3a5dd 100644 --- a/runtime/ftplugin/lua.vim +++ b/runtime/ftplugin/lua.vim @@ -9,6 +9,7 @@ " Phạm Bình An <phambinhanctb2...@gmail.com> " @konfekt " Last Change: 2025 Apr 04 +" 2025 May 06 by Vim Project update 'path' setting #17267 if exists("b:did_ftplugin") finish @@ -31,6 +32,7 @@ set cpo&vim setlocal comments=:---,:-- setlocal commentstring=--\ %s setlocal formatoptions-=t formatoptions+=croql +setlocal path-=. " Lua doesn't support importing module in path related to current file like JS let &l:define = '\<function\|\<local\%(\s\+function\)\=' @@ -38,7 +40,7 @@ let &l:include = '\<\%(\%(do\|load\)file\|require\)\s*(' setlocal includeexpr=s:LuaInclude(v:fname) setlocal suffixesadd=.lua -let b:undo_ftplugin = "setl cms< com< def< fo< inc< inex< sua<" +let b:undo_ftplugin = "setl cms< com< def< fo< inc< inex< sua< pa<" if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uCKwi-00BjO8-Aq%40256bit.org.