diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-01-01 03:14:13 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2023-01-05 17:10:02 +0100 |
commit | 45549f031ee52a01601c33acc411f3111cfc4e95 (patch) | |
tree | b9c772a2ba9b0f226f5f6926417d22b0a0f3f207 /src/man | |
parent | 599e1d019aa010d4e3c56e6bad3d1c406dda5b0f (diff) | |
download | rneovim-45549f031ee52a01601c33acc411f3111cfc4e95.tar.gz rneovim-45549f031ee52a01601c33acc411f3111cfc4e95.tar.bz2 rneovim-45549f031ee52a01601c33acc411f3111cfc4e95.zip |
feat(lua): send "--" literally to Lua "-l" script
Problem:
When "-l" is followed by "--", we stop sending args to the Lua script
and treat "--" in the usual way. This was for flexibility but didn't
have a strong use-case, and has these problems:
- prevents Lua "-l" scripts from handling "--" in their own way.
- complicates the startup logic (must call nlua_init before command_line_scan)
Solution:
Don't treat "--" specially if it follows "-l".
Diffstat (limited to 'src/man')
-rw-r--r-- | src/man/nvim.1 | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/man/nvim.1 b/src/man/nvim.1 index 457d785365..c32bdeadc6 100644 --- a/src/man/nvim.1 +++ b/src/man/nvim.1 @@ -122,9 +122,6 @@ modifications. .It Fl b Binary mode. .Ic ":help edit-binary" -.It Fl l -Lisp mode. -Sets the 'lisp' and 'showmatch' options. .It Fl A Arabic mode. Sets the 'arabic' option. @@ -144,7 +141,7 @@ is specified, append messages to instead of printing them. .Ic ":help 'verbose'" .It Fl D -Debug mode for VimL (Vim script). +Vimscript debug mode. Started when executing the first command from a script. :help debug-mode .It Fl n @@ -268,10 +265,26 @@ but execute before processing any vimrc. Up to 10 instances of these can be used independently from instances of .Fl c . +.It Fl l Ar script Op Ar args +Execute Lua +.Ar script +with optional +.Op Ar args +after processing any preceding Nvim startup arguments. +All +.Op Ar args +are treated as script arguments and are passed literally to Lua, that is, +.Fl l +stops processing of Nvim arguments. +.Ic ":help -l" .It Fl S Op Ar session -Source +Execute +.Ar session +after the first file argument has been read. If .Ar session -after the first file argument has been read. +filename ends with +.Pa .lua +it is executed as Lua instead of Vimscript. Equivalent to .Cm -c \(dqsource session\(dq . .Ar session |