mirror of
https://github.com/neovim/neovim
synced 2025-07-17 01:31:48 +00:00
vim-patch:0fb6cea: runtime(lua): update 'path' option in filetype plugin #33876
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: vim/vim#17267
0fb6ceac4c
This commit is contained in:
committed by
brianhuster
parent
4621527f59
commit
ae05e0399b
@ -5,7 +5,9 @@
|
|||||||
" Contributor: Dorai Sitaram <ds26@gte.com>
|
" Contributor: Dorai Sitaram <ds26@gte.com>
|
||||||
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
||||||
" Phạm Bình An <phambinhanctb2004@gmail.com>
|
" Phạm Bình An <phambinhanctb2004@gmail.com>
|
||||||
" Last Change: 2025 Feb 27
|
" @konfekt
|
||||||
|
" Last Change: 2025 Apr 04
|
||||||
|
" 2025 May 06 by Vim Project update 'path' setting #17267
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@ -28,6 +30,7 @@ set cpo&vim
|
|||||||
setlocal comments=:---,:--
|
setlocal comments=:---,:--
|
||||||
setlocal commentstring=--\ %s
|
setlocal commentstring=--\ %s
|
||||||
setlocal formatoptions-=t formatoptions+=croql
|
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\)\='
|
let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
||||||
|
|
||||||
@ -35,7 +38,7 @@ let &l:include = '\<\%(\%(do\|load\)file\|require\)\s*('
|
|||||||
setlocal includeexpr=s:LuaInclude(v:fname)
|
setlocal includeexpr=s:LuaInclude(v:fname)
|
||||||
setlocal suffixesadd=.lua
|
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")
|
if exists("loaded_matchit") && !exists("b:match_words")
|
||||||
let b:match_ignorecase = 0
|
let b:match_ignorecase = 0
|
||||||
|
Reference in New Issue
Block a user