mirror of https://github.com/neovim/neovim.git
Compare commits
21 Commits
1d042c7d45
...
e2e44ea835
Author | SHA1 | Date |
---|---|---|
dundargoc | e2e44ea835 | |
Gregory Anders | d3fa88b70f | |
Christian Clason | 9b1628da98 | |
zeertzjq | e4e230a0cd | |
zeertzjq | 064f3e42e8 | |
Christian Clason | 17c89eac1a | |
Justin M. Keyes | 69bd611d2d | |
tom-anders | 5c40f3e86a | |
tom-anders | b0cc85c005 | |
tom-anders | 80d108eeee | |
tom-anders | cdc0974063 | |
tom-anders | 6ffc209a8a | |
Jongwook Choi | e14e750998 | |
tom-anders | 3da251efc6 | |
tom-anders | 4e5086a67e | |
Jaehwang Jung | e7f50f43c8 | |
Jaehwang Jung | 4caf71af58 | |
James Trew | 93940af1d4 | |
Yi Ming | c3c673cdec | |
zeertzjq | d8deb91819 | |
Christian Clason | d40b0a96c4 |
|
@ -36,7 +36,7 @@ Windows 8+ is required. Windows 7 or older is not supported.
|
|||
|
||||
### [Chocolatey](https://chocolatey.org)
|
||||
|
||||
- **Release (v0.7):** `choco install neovim` (use -y for automatically skipping confirmation messages)
|
||||
- **Latest Release:** `choco install neovim` (use -y for automatically skipping confirmation messages)
|
||||
- **Development (pre-release):** `choco install neovim --pre`
|
||||
|
||||
### [Scoop](https://scoop.sh/)
|
||||
|
|
|
@ -49,8 +49,8 @@ TREESITTER_VIM_URL https://github.com/neovim/tree-sitter-vim/archive/v0.4.0.tar.
|
|||
TREESITTER_VIM_SHA256 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5
|
||||
TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v2.5.1.tar.gz
|
||||
TREESITTER_VIMDOC_SHA256 063645096504b21603585507c41c6d8718ff3c11b2150c5bfc31e8f3ee9afea3
|
||||
TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.2.0.tar.gz
|
||||
TREESITTER_QUERY_SHA256 5a0ee26c4af94adb9ab850a518613f75e7040354f5b049a5b85457ebf579ae8b
|
||||
TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.3.0.tar.gz
|
||||
TREESITTER_QUERY_SHA256 f878ff37abcb83250e31a6569e997546f3dbab74dcb26683cb2d613f7568cfc0
|
||||
TREESITTER_PYTHON_URL https://github.com/tree-sitter/tree-sitter-python/archive/v0.21.0.tar.gz
|
||||
TREESITTER_PYTHON_SHA256 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
|
||||
TREESITTER_BASH_URL https://github.com/tree-sitter/tree-sitter-bash/archive/v0.21.0.tar.gz
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
" 2024 Feb 19 by Vim Project: (announce adoption)
|
||||
" 2024 Feb 29 by Vim Project: handle symlinks in tree mode correctly
|
||||
" 2024 Apr 03 by Vim Project: detect filetypes for remote edited files
|
||||
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||
|
@ -281,7 +282,7 @@ if !exists("g:netrw_scp_cmd")
|
|||
if executable("scp")
|
||||
call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
|
||||
elseif executable("pscp")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable('c:\private.ppk')
|
||||
if has("win32") && filereadable('c:\private.ppk')
|
||||
call s:NetrwInit("g:netrw_scp_cmd", 'pscp -i c:\private.ppk')
|
||||
else
|
||||
call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q')
|
||||
|
@ -294,7 +295,7 @@ endif
|
|||
call s:NetrwInit("g:netrw_sftp_cmd" , "sftp")
|
||||
call s:NetrwInit("g:netrw_ssh_cmd" , "ssh")
|
||||
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
\ && exists("g:netrw_use_nt_rcp")
|
||||
\ && g:netrw_use_nt_rcp
|
||||
\ && executable( $SystemRoot .'/system32/rcp.exe')
|
||||
|
@ -309,12 +310,8 @@ endif
|
|||
" Default values for netrw's global variables {{{2
|
||||
" Cygwin Detection ------- {{{3
|
||||
if !exists("g:netrw_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32unix") && &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:netrw_cygwin= 1
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
if has("win32unix") && &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:netrw_cygwin= 1
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
|
@ -370,7 +367,7 @@ endif
|
|||
call s:NetrwInit("g:netrw_keepdir",1)
|
||||
if !exists("g:netrw_list_cmd")
|
||||
if g:netrw_scp_cmd =~ '^pscp' && executable("pscp")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk")
|
||||
if has("win32") && filereadable("c:\\private.ppk")
|
||||
" provide a pscp-based listing command
|
||||
let g:netrw_scp_cmd ="pscp -i C:\\private.ppk"
|
||||
endif
|
||||
|
@ -401,7 +398,7 @@ if !exists("g:netrw_localcmdshell")
|
|||
let g:netrw_localcmdshell= ""
|
||||
endif
|
||||
if !exists("g:netrw_localcopycmd")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
if g:netrw_cygwin
|
||||
let g:netrw_localcopycmd= "cp"
|
||||
else
|
||||
|
@ -415,7 +412,7 @@ if !exists("g:netrw_localcopycmd")
|
|||
endif
|
||||
endif
|
||||
if !exists("g:netrw_localcopydircmd")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
if g:netrw_cygwin
|
||||
let g:netrw_localcopydircmd = "cp"
|
||||
let g:netrw_localcopydircmdopt= " -R"
|
||||
|
@ -437,7 +434,7 @@ if exists("g:netrw_local_mkdir")
|
|||
let g:netrw_localmkdir= g:netrw_local_mkdir
|
||||
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87)
|
||||
endif
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
if g:netrw_cygwin
|
||||
call s:NetrwInit("g:netrw_localmkdir","mkdir")
|
||||
else
|
||||
|
@ -453,7 +450,7 @@ if exists("g:netrw_local_movecmd")
|
|||
call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88)
|
||||
endif
|
||||
if !exists("g:netrw_localmovecmd")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
if g:netrw_cygwin
|
||||
let g:netrw_localmovecmd= "mv"
|
||||
else
|
||||
|
@ -486,7 +483,7 @@ call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh
|
|||
call s:NetrwInit("g:netrw_retmap" , 0)
|
||||
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
|
||||
call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
elseif has("win32")
|
||||
call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM")
|
||||
else
|
||||
call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
|
||||
|
@ -545,14 +542,13 @@ if !exists("g:netrw_xstrlen")
|
|||
endif
|
||||
endif
|
||||
call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
|
||||
call s:NetrwInit("g:netrw_win95ftp",1)
|
||||
call s:NetrwInit("g:netrw_winsize",50)
|
||||
call s:NetrwInit("g:netrw_wiw",1)
|
||||
if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif
|
||||
" ---------------------------------------------------------------------
|
||||
" Default values for netrw's script variables: {{{2
|
||||
call s:NetrwInit("g:netrw_fname_escape",' ?&;%')
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$')
|
||||
else
|
||||
call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\')
|
||||
|
@ -684,7 +680,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
|
|||
" record current directory
|
||||
let curdir = simplify(b:netrw_curdir)
|
||||
let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
|
||||
if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !exists("g:netrw_cygwin") && has("win32")
|
||||
let curdir= substitute(curdir,'\','/','g')
|
||||
endif
|
||||
" call Decho("curdir<".curdir."> curfiledir<".curfiledir.">",'~'.expand("<slnum>"))
|
||||
|
@ -837,7 +833,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
|
|||
" handle .../**/.../filepat
|
||||
" call Decho("case starpat=4: Explore .../**/.../filepat",'~'.expand("<slnum>"))
|
||||
let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','')
|
||||
if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16")))
|
||||
if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && has("win32"))
|
||||
let b:netrw_curdir = prefixdir
|
||||
else
|
||||
let b:netrw_curdir= getcwd().'/'.prefixdir
|
||||
|
@ -874,7 +870,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
|
|||
else
|
||||
if dirname == ""
|
||||
let dirname= getcwd()
|
||||
elseif (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin
|
||||
elseif has("win32") && !g:netrw_cygwin
|
||||
" Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo',
|
||||
" depending on whether backslashes have been converted to forward slashes by earlier code).
|
||||
if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+'
|
||||
|
@ -1383,7 +1379,7 @@ fun! netrw#Obtain(islocal,fname,...)
|
|||
" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir,'~'.expand("<slnum>"))
|
||||
if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir
|
||||
let topath= s:ComposePath(tgtdir,"")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
" transfer files one at time
|
||||
" call Decho("transfer files one at a time",'~'.expand("<slnum>"))
|
||||
for fname in fnamelist
|
||||
|
@ -2254,7 +2250,7 @@ fun! netrw#NetRead(mode,...)
|
|||
endif
|
||||
" 'C' in 'C:\path\to\file' is handled as hostname on windows.
|
||||
" This is workaround to avoid mis-handle windows local-path:
|
||||
if g:netrw_scp_cmd =~ '^scp' && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if g:netrw_scp_cmd =~ '^scp' && has("win32")
|
||||
let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '')
|
||||
else
|
||||
let tmpfile_get = tmpfile
|
||||
|
@ -3174,7 +3170,7 @@ fun! s:NetrwMethod(choice)
|
|||
if exists("s:netrw_hup[host]")
|
||||
call NetUserPass("ftp:".host)
|
||||
|
||||
elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~# '-[sS]:'
|
||||
elseif has("win32") && s:netrw_ftp_cmd =~# '-[sS]:'
|
||||
" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
|
||||
" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
|
||||
if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>'
|
||||
|
@ -3289,38 +3285,6 @@ fun! s:NetrwMethod(choice)
|
|||
" call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port)
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" NetReadFixup: this sort of function is typically written by the user {{{2
|
||||
" to handle extra junk that their system's ftp dumps
|
||||
" into the transfer. This function is provided as an
|
||||
" example and as a fix for a Windows 95 problem: in my
|
||||
" experience, win95's ftp always dumped four blank lines
|
||||
" at the end of the transfer.
|
||||
if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
|
||||
fun! NetReadFixup(method, line1, line2)
|
||||
" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
|
||||
|
||||
" sanity checks -- attempt to convert inputs to integers
|
||||
let method = a:method + 0
|
||||
let line1 = a:line1 + 0
|
||||
let line2 = a:line2 + 0
|
||||
if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0
|
||||
" call Dret("NetReadFixup")
|
||||
return
|
||||
endif
|
||||
|
||||
if method == 3 " ftp (no <.netrc>)
|
||||
let fourblanklines= line2 - 3
|
||||
if fourblanklines >= line1
|
||||
exe "sil NetrwKeepj ".fourblanklines.",".line2."g/^\s*$/d"
|
||||
call histdel("/",-1)
|
||||
endif
|
||||
endif
|
||||
|
||||
" call Dret("NetReadFixup")
|
||||
endfun
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetUserPass: set username and password for subsequent ftp transfer {{{2
|
||||
" Usage: :call NetUserPass() -- will prompt for userid and password
|
||||
|
@ -3943,7 +3907,7 @@ fun! s:NetrwBrowse(islocal,dirname)
|
|||
if b:netrw_curdir =~ '[/\\]$'
|
||||
let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
|
||||
endif
|
||||
if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if b:netrw_curdir =~ '\a:$' && has("win32")
|
||||
let b:netrw_curdir= b:netrw_curdir."/"
|
||||
endif
|
||||
if b:netrw_curdir == ''
|
||||
|
@ -4097,7 +4061,7 @@ fun! s:NetrwFile(fname)
|
|||
let b:netrw_curdir= getcwd()
|
||||
endif
|
||||
|
||||
if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !exists("g:netrw_cygwin") && has("win32")
|
||||
if fname =~ '^\' || fname =~ '^\a:\'
|
||||
" windows, but full path given
|
||||
let ret= fname
|
||||
|
@ -4817,7 +4781,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
|
|||
call s:SavePosn(s:netrw_posn)
|
||||
NetrwKeepj call s:NetrwOptionsSave("s:")
|
||||
NetrwKeepj call s:NetrwOptionsSafe(a:islocal)
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
let dirname = substitute(b:netrw_curdir,'\\','/','ge')
|
||||
else
|
||||
let dirname = b:netrw_curdir
|
||||
|
@ -5064,7 +5028,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
|
|||
endif
|
||||
" call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)",'~'.expand("<slnum>"))
|
||||
|
||||
elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
elseif !g:netrw_cygwin && has("win32")
|
||||
" windows
|
||||
if a:islocal
|
||||
let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
|
||||
|
@ -5349,7 +5313,7 @@ fun! netrw#BrowseX(fname,remote)
|
|||
" set up the filename
|
||||
" (lower case the extension, make a local copy of a remote file)
|
||||
let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
let exten= substitute(exten,'^.*$','\L&\E','')
|
||||
endif
|
||||
if exten =~ "[\\/]"
|
||||
|
@ -5396,12 +5360,12 @@ fun! netrw#BrowseX(fname,remote)
|
|||
" by default, g:netrw_suppress_gx_mesg is true
|
||||
if g:netrw_suppress_gx_mesg
|
||||
if &srr =~ "%s"
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
let redir= substitute(&srr,"%s","nul","")
|
||||
else
|
||||
let redir= substitute(&srr,"%s","/dev/null","")
|
||||
endif
|
||||
elseif (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
elseif has("win32")
|
||||
let redir= &srr . "nul"
|
||||
else
|
||||
let redir= &srr . "/dev/null"
|
||||
|
@ -5444,7 +5408,7 @@ fun! netrw#BrowseX(fname,remote)
|
|||
call s:NetrwExe("sil !".viewer." ".viewopt.s:ShellEscape(fname,1).redir)
|
||||
let ret= v:shell_error
|
||||
|
||||
elseif has("win32") || has("win64")
|
||||
elseif has("win32")
|
||||
" call Decho("(netrw#BrowseX) win".(has("win32")? "32" : "64"),'~'.expand("<slnum>"))
|
||||
if executable("start")
|
||||
call s:NetrwExe('sil! !start rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(fname,1))
|
||||
|
@ -7167,7 +7131,7 @@ fun! s:NetrwMarkFileCopy(islocal,...)
|
|||
let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"s:ShellEscape(b:netrw_curdir.\"/\".v:val)"))
|
||||
let tgt = s:ShellEscape(s:netrwmftgt)
|
||||
endif
|
||||
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
let args= substitute(args,'/','\\','g')
|
||||
let tgt = substitute(tgt, '/','\\','g')
|
||||
endif
|
||||
|
@ -7181,7 +7145,7 @@ fun! s:NetrwMarkFileCopy(islocal,...)
|
|||
" call Decho("args<".args."> is a directory",'~'.expand("<slnum>"))
|
||||
let copycmd= g:netrw_localcopydircmd
|
||||
" call Decho("using copydircmd<".copycmd.">",'~'.expand("<slnum>"))
|
||||
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
" window's xcopy doesn't copy a directory to a target properly. Instead, it copies a directory's
|
||||
" contents to a target. One must append the source directory name to the target to get xcopy to
|
||||
" do the right thing.
|
||||
|
@ -7799,7 +7763,7 @@ fun! s:NetrwMarkFileMove(islocal)
|
|||
endif
|
||||
let tgt = s:ShellEscape(s:netrwmftgt)
|
||||
" call Decho("tgt<".tgt.">",'~'.expand("<slnum>"))
|
||||
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
let tgt= substitute(tgt, '/','\\','g')
|
||||
" call Decho("windows exception: tgt<".tgt.">",'~'.expand("<slnum>"))
|
||||
if g:netrw_localmovecmd =~ '\s'
|
||||
|
@ -7820,7 +7784,7 @@ fun! s:NetrwMarkFileMove(islocal)
|
|||
" Jul 19, 2022: fixing file move when g:netrw_keepdir is 1
|
||||
let fname= b:netrw_curdir."/".fname
|
||||
endif
|
||||
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
let fname= substitute(fname,'/','\\','g')
|
||||
endif
|
||||
" call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("<slnum>"))
|
||||
|
@ -10239,7 +10203,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd)
|
|||
endif
|
||||
|
||||
" cleanup for Windows " {{{3
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
sil! NetrwKeepj %s/\r$//e
|
||||
NetrwKeepj call histdel("/",-1)
|
||||
endif
|
||||
|
@ -10747,7 +10711,7 @@ fun! netrw#FileUrlEdit(fname)
|
|||
let fname= substitute(fname,'^file://localhost/','file:///','')
|
||||
" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
if fname =~ '^file:///\=\a[|:]/'
|
||||
" call Decho('converting file:///\a|/ -to- file://\a:/','~'.expand("<slnum>"))
|
||||
let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','')
|
||||
|
@ -10757,7 +10721,7 @@ fun! netrw#FileUrlEdit(fname)
|
|||
let fname2396 = netrw#RFC2396(fname)
|
||||
let fname2396e= fnameescape(fname2396)
|
||||
let plainfname= substitute(fname2396,'file://\(.*\)','\1',"")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
" call Decho("windows exception for plainfname",'~'.expand("<slnum>"))
|
||||
if plainfname =~ '^/\+\a:'
|
||||
" call Decho('removing leading "/"s','~'.expand("<slnum>"))
|
||||
|
@ -10969,7 +10933,7 @@ fun! s:LocalFastBrowser()
|
|||
let s:netrw_events= 1
|
||||
augroup AuNetrwEvent
|
||||
au!
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
" call Decho("installing autocmd: ShellCmdPost",'~'.expand("<slnum>"))
|
||||
au ShellCmdPost * call s:LocalBrowseRefresh()
|
||||
else
|
||||
|
@ -11011,7 +10975,7 @@ fun! s:LocalListing()
|
|||
let filelist = filelist + s:NetrwGlob(dirname,".*",0)
|
||||
" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
|
||||
|
||||
if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if g:netrw_cygwin == 0 && has("win32")
|
||||
" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
|
||||
elseif index(filelist,'..') == -1 && b:netrw_curdir !~ '/'
|
||||
" include ../ in the glob() entry if its missing
|
||||
|
@ -11057,7 +11021,7 @@ fun! s:LocalListing()
|
|||
let pfile= filename."/"
|
||||
|
||||
elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(s:NetrwFile(filename))
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if has("win32")
|
||||
if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$'
|
||||
" indicate an executable
|
||||
" call Decho("indicate <".filename."> is executable with trailing *",'~'.expand("<slnum>"))
|
||||
|
@ -11534,7 +11498,7 @@ endfun
|
|||
" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2
|
||||
fun! netrw#WinPath(path)
|
||||
" call Dfunc("netrw#WinPath(path<".a:path.">)")
|
||||
if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && has("win32")
|
||||
" remove cygdrive prefix, if present
|
||||
let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','')
|
||||
" remove trailing slash (Win95)
|
||||
|
@ -11594,11 +11558,11 @@ fun! s:ComposePath(base,subdir)
|
|||
endif
|
||||
|
||||
" COMBAK: test on windows with changing to root directory: :e C:/
|
||||
elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32")
|
||||
" call Decho("windows",'~'.expand("<slnum>"))
|
||||
let ret= a:subdir
|
||||
|
||||
elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && has("win32")
|
||||
" call Decho("windows",'~'.expand("<slnum>"))
|
||||
if a:base =~ '[/\\]$'
|
||||
let ret= a:base.a:subdir
|
||||
|
@ -11710,7 +11674,7 @@ fun! s:GetTempfile(fname)
|
|||
" o/s dependencies
|
||||
if g:netrw_cygwin != 0
|
||||
let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e')
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
elseif has("win32")
|
||||
if !exists("+shellslash") || !&ssl
|
||||
let tmpfile = substitute(tmpfile,'/','\','g')
|
||||
endif
|
||||
|
@ -11926,7 +11890,7 @@ fun! s:NetrwDelete(path)
|
|||
" call Dfunc("s:NetrwDelete(path<".a:path.">)")
|
||||
|
||||
let path = netrw#WinPath(a:path)
|
||||
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
if !g:netrw_cygwin && has("win32")
|
||||
if exists("+shellslash")
|
||||
let sskeep= &shellslash
|
||||
setl noshellslash
|
||||
|
@ -12117,7 +12081,7 @@ fun! s:NetrwLcd(newdir)
|
|||
" 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or
|
||||
" forward slashes ('//Foo'), depending on whether backslashes have been converted to
|
||||
" forward slashes by earlier code; so check for both.
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin
|
||||
if has("win32") && !g:netrw_cygwin
|
||||
if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+'
|
||||
let dirname = '\'
|
||||
exe 'NetrwKeepj sil lcd '.fnameescape(dirname)
|
||||
|
@ -12590,7 +12554,7 @@ endfun
|
|||
" ---------------------------------------------------------------------
|
||||
" s:ShellEscape: shellescape(), or special windows handling {{{2
|
||||
fun! s:ShellEscape(s, ...)
|
||||
if (has('win32') || has('win64')) && $SHELL == '' && &shellslash
|
||||
if has('win32') && $SHELL == '' && &shellslash
|
||||
return printf('"%s"', substitute(a:s, '"', '""', 'g'))
|
||||
endif
|
||||
let f = a:0 > 0 ? a:1 : 0
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" Version: 18
|
||||
" Last Change:
|
||||
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
|
@ -91,7 +93,6 @@ fun! netrwSettings#NetrwSettings()
|
|||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
put = 'let g:netrw_silent = '.g:netrw_silent
|
||||
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
|
||||
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
|
||||
let s:netrw_xfer_stop= line(".")
|
||||
put =''
|
||||
put ='+ Netrw Messages'
|
||||
|
|
|
@ -281,10 +281,6 @@ gr{char} Replace the virtual characters under the cursor with
|
|||
that have a special meaning in Insert mode, such as
|
||||
most CTRL-keys, cannot be used.
|
||||
|
||||
*gr-default*
|
||||
Mapped to |vim.lsp.buf.references()| by default.
|
||||
|default-mappings|
|
||||
|
||||
*digraph-arg*
|
||||
The argument for Normal mode commands like |r| and |t| is a single character.
|
||||
When 'cpo' doesn't contain the 'D' flag, this character can also be entered
|
||||
|
|
|
@ -29,13 +29,6 @@ Use the stable (release) https://github.com/neovim/neovim/releases/latest
|
|||
version for a more predictable experience.
|
||||
|
||||
|
||||
CAN I USE RUBY-BASED VIM PLUGINS (E.G. LUSTYEXPLORER)? ~
|
||||
|
||||
Yes, starting with Nvim 0.1.5 PR #4980
|
||||
https://github.com/neovim/neovim/pull/4980 the legacy Vim `if_ruby` interface
|
||||
is supported.
|
||||
|
||||
|
||||
CAN I USE LUA-BASED VIM PLUGINS (E.G. NEOCOMPLETE)? ~
|
||||
|
||||
No. Starting with Nvim 0.2 PR #4411
|
||||
|
|
|
@ -544,14 +544,14 @@ LspNotify *LspNotify*
|
|||
LspProgress *LspProgress*
|
||||
Upon receipt of a progress notification from the server. Notifications can
|
||||
be polled from a `progress` ring buffer of a |vim.lsp.Client| or use
|
||||
|vim.lsp.status()| to get an aggregate message
|
||||
|vim.lsp.status()| to get an aggregate message.
|
||||
|
||||
If the server sends a "work done progress", the `pattern` is set to `kind`
|
||||
(one of `begin`, `report` or `end`).
|
||||
|
||||
When used from Lua, the event contains a `data` table with `client_id` and
|
||||
`result` properties. `result` will contain the request params sent by the
|
||||
server.
|
||||
`params` properties. `params` will contain the request params sent by the
|
||||
server (see `lsp.ProgressParams`).
|
||||
|
||||
Example: >vim
|
||||
autocmd LspProgress * redrawstatus
|
||||
|
@ -1201,12 +1201,11 @@ Lua module: vim.lsp.buf *lsp-buf*
|
|||
vim.lsp.buf.references(nil, { on_list = on_list })
|
||||
<
|
||||
|
||||
If you prefer loclist do something like this: >lua
|
||||
local function on_list(options)
|
||||
vim.fn.setloclist(0, {}, ' ', options)
|
||||
vim.cmd.lopen()
|
||||
end
|
||||
If you prefer loclist instead of qflist: >lua
|
||||
vim.lsp.buf.definition({ loclist = true })
|
||||
vim.lsp.buf.references(nil, { loclist = true })
|
||||
<
|
||||
• {loclist}? (`boolean`)
|
||||
|
||||
*vim.lsp.LocationOpts*
|
||||
Extends: |vim.lsp.ListOpts|
|
||||
|
@ -1235,30 +1234,30 @@ add_workspace_folder({workspace_folder})
|
|||
clear_references() *vim.lsp.buf.clear_references()*
|
||||
Removes document highlights from current buffer.
|
||||
|
||||
code_action({options}) *vim.lsp.buf.code_action()*
|
||||
code_action({opts}) *vim.lsp.buf.code_action()*
|
||||
Selects a code action available at the current cursor position.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`table?`) A table with the following fields:
|
||||
• {context}? (`lsp.CodeActionContext`) Corresponds to
|
||||
`CodeActionContext` of the LSP specification:
|
||||
• {diagnostics}? (`table`) LSP `Diagnostic[]`. Inferred
|
||||
from the current position if not provided.
|
||||
• {only}? (`table`) List of LSP `CodeActionKind`s used to
|
||||
filter the code actions. Most language servers support
|
||||
values like `refactor` or `quickfix`.
|
||||
• {triggerKind}? (`integer`) The reason why code actions
|
||||
were requested.
|
||||
• {filter}? (`fun(x: lsp.CodeAction|lsp.Command):boolean`)
|
||||
Predicate taking an `CodeAction` and returning a boolean.
|
||||
• {apply}? (`boolean`) When set to `true`, and there is
|
||||
just one remaining action (after filtering), the action
|
||||
is applied without user query.
|
||||
• {range}? (`{start: integer[], end: integer[]}`) Range for
|
||||
which code actions should be requested. If in visual mode
|
||||
this defaults to the active selection. Table must contain
|
||||
`start` and `end` keys with {row,col} tuples using
|
||||
mark-like indexing. See |api-indexing|
|
||||
• {opts} (`table?`) A table with the following fields:
|
||||
• {context}? (`lsp.CodeActionContext`) Corresponds to
|
||||
`CodeActionContext` of the LSP specification:
|
||||
• {diagnostics}? (`table`) LSP `Diagnostic[]`. Inferred from
|
||||
the current position if not provided.
|
||||
• {only}? (`table`) List of LSP `CodeActionKind`s used to
|
||||
filter the code actions. Most language servers support
|
||||
values like `refactor` or `quickfix`.
|
||||
• {triggerKind}? (`integer`) The reason why code actions
|
||||
were requested.
|
||||
• {filter}? (`fun(x: lsp.CodeAction|lsp.Command):boolean`)
|
||||
Predicate taking an `CodeAction` and returning a boolean.
|
||||
• {apply}? (`boolean`) When set to `true`, and there is just
|
||||
one remaining action (after filtering), the action is
|
||||
applied without user query.
|
||||
• {range}? (`{start: integer[], end: integer[]}`) Range for
|
||||
which code actions should be requested. If in visual mode
|
||||
this defaults to the active selection. Table must contain
|
||||
`start` and `end` keys with {row,col} tuples using mark-like
|
||||
indexing. See |api-indexing|
|
||||
|
||||
See also: ~
|
||||
• https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction
|
||||
|
@ -1277,7 +1276,7 @@ completion({context}) *vim.lsp.buf.completion()*
|
|||
See also: ~
|
||||
• vim.lsp.protocol.CompletionTriggerKind
|
||||
|
||||
declaration({options}) *vim.lsp.buf.declaration()*
|
||||
declaration({opts}) *vim.lsp.buf.declaration()*
|
||||
Jumps to the declaration of the symbol under the cursor.
|
||||
|
||||
Note: ~
|
||||
|
@ -1285,13 +1284,13 @@ declaration({options}) *vim.lsp.buf.declaration()*
|
|||
|vim.lsp.buf.definition()| instead.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
• {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
|
||||
definition({options}) *vim.lsp.buf.definition()*
|
||||
definition({opts}) *vim.lsp.buf.definition()*
|
||||
Jumps to the definition of the symbol under the cursor.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
• {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
|
||||
document_highlight() *vim.lsp.buf.document_highlight()*
|
||||
Send request to the server to resolve document highlights for the current
|
||||
|
@ -1307,11 +1306,11 @@ document_highlight() *vim.lsp.buf.document_highlight()*
|
|||
highlights. |hl-LspReferenceText| |hl-LspReferenceRead|
|
||||
|hl-LspReferenceWrite|
|
||||
|
||||
document_symbol({options}) *vim.lsp.buf.document_symbol()*
|
||||
document_symbol({opts}) *vim.lsp.buf.document_symbol()*
|
||||
Lists all symbols in the current buffer in the quickfix window.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
• {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
|
||||
execute_command({command_params}) *vim.lsp.buf.execute_command()*
|
||||
Executes an LSP server command.
|
||||
|
@ -1322,53 +1321,53 @@ execute_command({command_params}) *vim.lsp.buf.execute_command()*
|
|||
See also: ~
|
||||
• https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
|
||||
|
||||
format({options}) *vim.lsp.buf.format()*
|
||||
format({opts}) *vim.lsp.buf.format()*
|
||||
Formats a buffer using the attached (and optionally filtered) language
|
||||
server clients.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`table?`) A table with the following fields:
|
||||
• {formatting_options}? (`table`) Can be used to specify
|
||||
FormattingOptions. Some unspecified options will be
|
||||
automatically derived from the current Nvim options. See
|
||||
https://microsoft.github.io/language-server-protocol/specification/#formattingOptions
|
||||
• {timeout_ms}? (`integer`, default: `1000`) Time in
|
||||
milliseconds to block for formatting requests. No effect
|
||||
if async=true.
|
||||
• {bufnr}? (`integer`, default: current buffer) Restrict
|
||||
formatting to the clients attached to the given buffer.
|
||||
• {filter}? (`fun(client: vim.lsp.Client): boolean?`)
|
||||
Predicate used to filter clients. Receives a client as
|
||||
argument and must return a boolean. Clients matching the
|
||||
predicate are included. Example: >lua
|
||||
-- Never request typescript-language-server for formatting
|
||||
vim.lsp.buf.format {
|
||||
filter = function(client) return client.name ~= "tsserver" end
|
||||
}
|
||||
• {opts} (`table?`) A table with the following fields:
|
||||
• {formatting_options}? (`table`) Can be used to specify
|
||||
FormattingOptions. Some unspecified options will be
|
||||
automatically derived from the current Nvim options. See
|
||||
https://microsoft.github.io/language-server-protocol/specification/#formattingOptions
|
||||
• {timeout_ms}? (`integer`, default: `1000`) Time in
|
||||
milliseconds to block for formatting requests. No effect if
|
||||
async=true.
|
||||
• {bufnr}? (`integer`, default: current buffer) Restrict
|
||||
formatting to the clients attached to the given buffer.
|
||||
• {filter}? (`fun(client: vim.lsp.Client): boolean?`)
|
||||
Predicate used to filter clients. Receives a client as
|
||||
argument and must return a boolean. Clients matching the
|
||||
predicate are included. Example: >lua
|
||||
-- Never request typescript-language-server for formatting
|
||||
vim.lsp.buf.format {
|
||||
filter = function(client) return client.name ~= "tsserver" end
|
||||
}
|
||||
<
|
||||
• {async}? (`boolean`, default: false) If true the method
|
||||
won't block. Editing the buffer while formatting
|
||||
asynchronous can lead to unexpected changes.
|
||||
• {id}? (`integer`) Restrict formatting to the client with
|
||||
ID (client.id) matching this field.
|
||||
• {name}? (`string`) Restrict formatting to the client with
|
||||
name (client.name) matching this field.
|
||||
• {range}? (`{start:integer[],end:integer[]}`, default:
|
||||
current selection in visual mode, `nil` in other modes,
|
||||
formatting the full buffer) Range to format. Table must
|
||||
contain `start` and `end` keys with {row,col} tuples
|
||||
using (1,0) indexing.
|
||||
• {async}? (`boolean`, default: false) If true the method
|
||||
won't block. Editing the buffer while formatting
|
||||
asynchronous can lead to unexpected changes.
|
||||
• {id}? (`integer`) Restrict formatting to the client with ID
|
||||
(client.id) matching this field.
|
||||
• {name}? (`string`) Restrict formatting to the client with
|
||||
name (client.name) matching this field.
|
||||
• {range}? (`{start:integer[],end:integer[]}`, default:
|
||||
current selection in visual mode, `nil` in other modes,
|
||||
formatting the full buffer) Range to format. Table must
|
||||
contain `start` and `end` keys with {row,col} tuples using
|
||||
(1,0) indexing.
|
||||
|
||||
hover() *vim.lsp.buf.hover()*
|
||||
Displays hover information about the symbol under the cursor in a floating
|
||||
window. Calling the function twice will jump into the floating window.
|
||||
|
||||
implementation({options}) *vim.lsp.buf.implementation()*
|
||||
implementation({opts}) *vim.lsp.buf.implementation()*
|
||||
Lists all the implementations for the symbol under the cursor in the
|
||||
quickfix window.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
• {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
|
||||
incoming_calls() *vim.lsp.buf.incoming_calls()*
|
||||
Lists all the call sites of the symbol under the cursor in the |quickfix|
|
||||
|
@ -1383,13 +1382,13 @@ outgoing_calls() *vim.lsp.buf.outgoing_calls()*
|
|||
|quickfix| window. If the symbol can resolve to multiple items, the user
|
||||
can pick one in the |inputlist()|.
|
||||
|
||||
references({context}, {options}) *vim.lsp.buf.references()*
|
||||
references({context}, {opts}) *vim.lsp.buf.references()*
|
||||
Lists all the references to the symbol under the cursor in the quickfix
|
||||
window.
|
||||
|
||||
Parameters: ~
|
||||
• {context} (`table?`) Context for the request
|
||||
• {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
• {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
|
||||
See also: ~
|
||||
• https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
|
||||
|
@ -1402,13 +1401,13 @@ remove_workspace_folder({workspace_folder})
|
|||
Parameters: ~
|
||||
• {workspace_folder} (`string?`)
|
||||
|
||||
rename({new_name}, {options}) *vim.lsp.buf.rename()*
|
||||
rename({new_name}, {opts}) *vim.lsp.buf.rename()*
|
||||
Renames all references to the symbol under the cursor.
|
||||
|
||||
Parameters: ~
|
||||
• {new_name} (`string?`) If not provided, the user will be prompted for
|
||||
a new name using |vim.ui.input()|.
|
||||
• {options} (`table?`) Additional options:
|
||||
• {opts} (`table?`) Additional options:
|
||||
• {filter}? (`fun(client: vim.lsp.Client): boolean?`)
|
||||
Predicate used to filter clients. Receives a client as
|
||||
argument and must return a boolean. Clients matching the
|
||||
|
@ -1421,11 +1420,11 @@ signature_help() *vim.lsp.buf.signature_help()*
|
|||
Displays signature information about the symbol under the cursor in a
|
||||
floating window.
|
||||
|
||||
type_definition({options}) *vim.lsp.buf.type_definition()*
|
||||
type_definition({opts}) *vim.lsp.buf.type_definition()*
|
||||
Jumps to the definition of the type of the symbol under the cursor.
|
||||
|
||||
Parameters: ~
|
||||
• {options} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
• {opts} (`vim.lsp.LocationOpts?`) See |vim.lsp.LocationOpts|.
|
||||
|
||||
typehierarchy({kind}) *vim.lsp.buf.typehierarchy()*
|
||||
Lists all the subtypes or supertypes of the symbol under the cursor in the
|
||||
|
@ -1435,7 +1434,7 @@ typehierarchy({kind}) *vim.lsp.buf.typehierarchy()*
|
|||
Parameters: ~
|
||||
• {kind} (`"subtypes"|"supertypes"`)
|
||||
|
||||
workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()*
|
||||
workspace_symbol({query}, {opts}) *vim.lsp.buf.workspace_symbol()*
|
||||
Lists all symbols in the current workspace in the quickfix window.
|
||||
|
||||
The list is filtered against {query}; if the argument is omitted from the
|
||||
|
@ -1443,8 +1442,8 @@ workspace_symbol({query}, {options}) *vim.lsp.buf.workspace_symbol()*
|
|||
string means no filtering is done.
|
||||
|
||||
Parameters: ~
|
||||
• {query} (`string?`) optional
|
||||
• {options} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
• {query} (`string?`) optional
|
||||
• {opts} (`vim.lsp.ListOpts?`) See |vim.lsp.ListOpts|.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
|
|
@ -2673,7 +2673,6 @@ vim.filetype.add({filetypes}) *vim.filetype.add()*
|
|||
vim.filetype.add {
|
||||
pattern = {
|
||||
['.*'] = {
|
||||
priority = -math.huge,
|
||||
function(path, bufnr)
|
||||
local content = vim.api.nvim_buf_get_lines(bufnr, 0, 1, false)[1] or ''
|
||||
if vim.regex([[^#!.*\\<mine\\>]]):match_str(content) ~= nil then
|
||||
|
@ -2682,6 +2681,7 @@ vim.filetype.add({filetypes}) *vim.filetype.add()*
|
|||
return 'drawing'
|
||||
end
|
||||
end,
|
||||
{ priority = -math.huge },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -4346,7 +4346,7 @@ vim.snippet.jump({direction}) *vim.snippet.jump()*
|
|||
|
||||
You can use this function to navigate a snippet as follows: >lua
|
||||
vim.keymap.set({ 'i', 's' }, '<Tab>', function()
|
||||
if vim.snippet.jumpable(1) then
|
||||
if vim.snippet.active({ direction = 1 }) then
|
||||
return '<cmd>lua vim.snippet.jump(1)<cr>'
|
||||
else
|
||||
return '<Tab>'
|
||||
|
|
|
@ -178,6 +178,8 @@ cycle (Nvim HEAD, the "master" branch).
|
|||
|
||||
• Renamed vim.snippet.exit() to vim.snippet.stop().
|
||||
|
||||
• Changed |event-data| table for |LspProgress|: renamed `result` to `params`.
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *news-features*
|
||||
|
||||
|
@ -266,6 +268,9 @@ The following new APIs and features were added.
|
|||
respective capability can be unset.
|
||||
• |vim.lsp.start()| accepts a "silent" option for suppressing messages
|
||||
if an LSP server failed to start.
|
||||
• |vim.lsp.buf.definition()|, |vim.lsp.buf.declaration()|,
|
||||
|vim.lsp.buf.type_definition()|, and |vim.lsp.buf.implementation()| now
|
||||
support the `loclist` field of |vim.lsp.ListOpts|.
|
||||
|
||||
• Treesitter
|
||||
• Bundled parsers and queries (highlight, folds) for Markdown, Python, and
|
||||
|
@ -418,6 +423,7 @@ The following changes to existing APIs or features add new behavior.
|
|||
• 'shortmess' includes the "C" flag.
|
||||
• 'grepprg' uses the -H and -I flags for grep by default,
|
||||
and defaults to using ripgrep if available.
|
||||
• "]d" and "[d" in Normal mode map to |vim.diagnostic.goto_next()| and
|
||||
|vim.diagnostic.goto_prev()|, respectively. |]d-default| |[d-default|
|
||||
• <C-W>d (and <C-W><C-D>) map to |vim.diagnostic.open_float()|
|
||||
|CTRL-W_d-default|
|
||||
|
|
|
@ -6886,8 +6886,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||
options options and mappings local to a window or buffer (not
|
||||
global values for local options)
|
||||
localoptions same as "options"
|
||||
slash |deprecated| Always enabled. Uses "/" in filenames.
|
||||
unix |deprecated| Always enabled. Uses "\n" line endings.
|
||||
|
||||
*'virtualedit'* *'ve'*
|
||||
'virtualedit' 've' string (default "")
|
||||
|
|
|
@ -446,10 +446,6 @@ settings are described below, in |netrw-browser-options|, and in
|
|||
messages don't always seem to show up this
|
||||
way, but one doesn't have to quit the window.
|
||||
|
||||
*g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
|
||||
lines that o/s's ftp "provides" on transfers
|
||||
=0 force normal ftp behavior (no trailing line removal)
|
||||
|
||||
*g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
|
||||
permits network browsing to use ls with time and
|
||||
size sorting (default if windows)
|
||||
|
@ -825,8 +821,6 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
|
|||
g:netrw_uid Holds current user-id for ftp.
|
||||
g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
|
||||
=1 use WinNT/2K/XP's rcp, binary mode
|
||||
g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
|
||||
=1 use default method to do ftp >
|
||||
-----------------------------------------------------------------------
|
||||
<
|
||||
*netrw-internal-variables*
|
||||
|
@ -955,21 +949,8 @@ messages) you may write a NetReadFixup() function:
|
|||
endfunction
|
||||
>
|
||||
The NetReadFixup() function will be called if it exists and thus allows you to
|
||||
customize your reading process. As a further example, <netrw.vim> contains
|
||||
just such a function to handle Windows 95 ftp. For whatever reason, Windows
|
||||
95's ftp dumps four blank lines at the end of a transfer, and so it is
|
||||
desirable to automate their removal. Here's some code taken from <netrw.vim>
|
||||
itself:
|
||||
>
|
||||
if has("win95") && g:netrw_win95ftp
|
||||
fun! NetReadFixup(method, line1, line2)
|
||||
if method == 3 " ftp (no <.netrc>)
|
||||
let fourblanklines= line2 - 3
|
||||
silent fourblanklines .. "," .. line2 .. "g/^\s*/d"
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
>
|
||||
customize your reading process.
|
||||
|
||||
(Related topics: |ftp| |netrw-userpass| |netrw-start|)
|
||||
|
||||
==============================================================================
|
||||
|
@ -3397,16 +3378,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
(This section is likely to grow as I get feedback)
|
||||
(also see |netrw-debug|)
|
||||
*netrw-p1*
|
||||
P1. I use windows 95, and my ftp dumps four blank lines at the {{{2
|
||||
end of every read.
|
||||
|
||||
See |netrw-fixup|, and put the following into your
|
||||
<.vimrc> file:
|
||||
|
||||
let g:netrw_win95ftp= 1
|
||||
|
||||
*netrw-p2*
|
||||
P2. I use Windows, and my network browsing with ftp doesn't sort by {{{2
|
||||
P1. I use Windows, and my network browsing with ftp doesn't sort by {{{2
|
||||
time or size! -or- The remote system is a Windows server; why
|
||||
don't I get sorts by time or size?
|
||||
|
||||
|
@ -3432,8 +3404,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
modify its listing behavior.
|
||||
|
||||
|
||||
*netrw-p3*
|
||||
P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2
|
||||
*netrw-p2*
|
||||
P2. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2
|
||||
used ssh! That wasn't what I asked for...
|
||||
|
||||
Netrw has two methods for browsing remote directories: ssh
|
||||
|
@ -3441,8 +3413,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
When it comes time to do download a file (not just a directory
|
||||
listing), netrw will use the given protocol to do so.
|
||||
|
||||
*netrw-p4*
|
||||
P4. I would like long listings to be the default. {{{2
|
||||
*netrw-p3*
|
||||
P3. I would like long listings to be the default. {{{2
|
||||
|
||||
Put the following statement into your |vimrc|: >
|
||||
|
||||
|
@ -3451,8 +3423,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
Check out |netrw-browser-var| for more customizations that
|
||||
you can set.
|
||||
|
||||
*netrw-p5*
|
||||
P5. My times come up oddly in local browsing {{{2
|
||||
*netrw-p4*
|
||||
P4. My times come up oddly in local browsing {{{2
|
||||
|
||||
Does your system's strftime() accept the "%c" to yield dates
|
||||
such as "Sun Apr 27 11:49:23 1997"? If not, do a
|
||||
|
@ -3461,16 +3433,16 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
|
||||
let g:netrw_timefmt= "%X" (where X is the option)
|
||||
<
|
||||
*netrw-p6*
|
||||
P6. I want my current directory to track my browsing. {{{2
|
||||
*netrw-p5*
|
||||
P5. I want my current directory to track my browsing. {{{2
|
||||
How do I do that?
|
||||
|
||||
Put the following line in your |vimrc|:
|
||||
>
|
||||
let g:netrw_keepdir= 0
|
||||
<
|
||||
*netrw-p7*
|
||||
P7. I use Chinese (or other non-ascii) characters in my filenames, {{{2
|
||||
*netrw-p6*
|
||||
P6. I use Chinese (or other non-ascii) characters in my filenames, {{{2
|
||||
and netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
|
||||
|
||||
(taken from an answer provided by Wu Yongwei on the vim
|
||||
|
@ -3484,8 +3456,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
|
||||
(...it is one more reason to recommend that people use utf-8!)
|
||||
|
||||
*netrw-p8*
|
||||
P8. I'm getting "ssh is not executable on your system" -- what do I {{{2
|
||||
*netrw-p7*
|
||||
P7. I'm getting "ssh is not executable on your system" -- what do I {{{2
|
||||
do?
|
||||
|
||||
(Dudley Fox) Most people I know use putty for windows ssh. It
|
||||
|
@ -3567,8 +3539,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
of the others will use the string in g:netrw_ssh_cmd by
|
||||
default.
|
||||
|
||||
*netrw-p9* *netrw-ml_get*
|
||||
P9. I'm browsing, changing directory, and bang! ml_get errors {{{2
|
||||
*netrw-p8* *netrw-ml_get*
|
||||
P8. I'm browsing, changing directory, and bang! ml_get errors {{{2
|
||||
appear and I have to kill vim. Any way around this?
|
||||
|
||||
Normally netrw attempts to avoid writing swapfiles for
|
||||
|
@ -3578,8 +3550,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
in your <.vimrc>: >
|
||||
let g:netrw_use_noswf= 0
|
||||
<
|
||||
*netrw-p10*
|
||||
P10. I'm being pestered with "[something] is a directory" and {{{2
|
||||
*netrw-p9*
|
||||
P9. I'm being pestered with "[something] is a directory" and {{{2
|
||||
"Press ENTER or type command to continue" prompts...
|
||||
|
||||
The "[something] is a directory" prompt is issued by Vim,
|
||||
|
@ -3589,8 +3561,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
I also suggest that you set your |'cmdheight'| to 2 (or more) in
|
||||
your <.vimrc> file.
|
||||
|
||||
*netrw-p11*
|
||||
P11. I want to have two windows; a thin one on the left and my {{{2
|
||||
*netrw-p10*
|
||||
P10. I want to have two windows; a thin one on the left and my {{{2
|
||||
editing window on the right. How may I accomplish this?
|
||||
|
||||
You probably want netrw running as in a side window. If so, you
|
||||
|
@ -3615,8 +3587,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
<middlemouse> to select the file.
|
||||
|
||||
|
||||
*netrw-p12*
|
||||
P12. My directory isn't sorting correctly, or unwanted letters are {{{2
|
||||
*netrw-p11*
|
||||
P11. My directory isn't sorting correctly, or unwanted letters are {{{2
|
||||
appearing in the listed filenames, or things aren't lining
|
||||
up properly in the wide listing, ...
|
||||
|
||||
|
@ -3625,8 +3597,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
Multibyte encodings use two (or more) bytes per character.
|
||||
You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
|
||||
|
||||
*netrw-p13*
|
||||
P13. I'm a Windows + putty + ssh user, and when I attempt to {{{2
|
||||
*netrw-p12*
|
||||
P12. I'm a Windows + putty + ssh user, and when I attempt to {{{2
|
||||
browse, the directories are missing trailing "/"s so netrw treats
|
||||
them as file transfers instead of as attempts to browse
|
||||
subdirectories. How may I fix this?
|
||||
|
@ -3646,8 +3618,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
|
||||
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
|
||||
<
|
||||
*netrw-p14*
|
||||
P14. I would like to speed up writes using Nwrite and scp/ssh {{{2
|
||||
*netrw-p13*
|
||||
P13. I would like to speed up writes using Nwrite and scp/ssh {{{2
|
||||
style connections. How? (Thomer M. Gil)
|
||||
|
||||
Try using ssh's ControlMaster and ControlPath (see the ssh_config
|
||||
|
@ -3673,8 +3645,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
|
||||
vim scp://host.domain.com//home/user/.bashrc
|
||||
<
|
||||
*netrw-p15*
|
||||
P15. How may I use a double-click instead of netrw's usual single {{{2
|
||||
*netrw-p14*
|
||||
P14. How may I use a double-click instead of netrw's usual single {{{2
|
||||
click to open a file or directory? (Ben Fritz)
|
||||
|
||||
First, disable netrw's mapping with >
|
||||
|
@ -3686,8 +3658,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
all netrw's mouse mappings, not just the <leftmouse> one.
|
||||
(see |g:netrw_mousemaps|)
|
||||
|
||||
*netrw-p16*
|
||||
P16. When editing remote files (ex. :e ftp://hostname/path/file), {{{2
|
||||
*netrw-p15*
|
||||
P15. When editing remote files (ex. :e ftp://hostname/path/file), {{{2
|
||||
under Windows I get an |E303| message complaining that its unable
|
||||
to open a swap file.
|
||||
|
||||
|
@ -3695,8 +3667,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
directory. Start netrw from your $HOME or other writable
|
||||
directory.
|
||||
|
||||
*netrw-p17*
|
||||
P17. Netrw is closing buffers on its own. {{{2
|
||||
*netrw-p16*
|
||||
P16. Netrw is closing buffers on its own. {{{2
|
||||
What steps will reproduce the problem?
|
||||
1. :Explore, navigate directories, open a file
|
||||
2. :Explore, open another file
|
||||
|
@ -3709,15 +3681,15 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
It appears that the buffers are not exactly closed;
|
||||
a ":ls!" will show them (although ":ls" does not).
|
||||
|
||||
*netrw-P18*
|
||||
P18. How to locally edit a file that's only available via {{{2
|
||||
*netrw-P17*
|
||||
P17. How to locally edit a file that's only available via {{{2
|
||||
another server accessible via ssh?
|
||||
See http://stackoverflow.com/questions/12469645/
|
||||
"Using Vim to Remotely Edit A File on ServerB Only
|
||||
Accessible From ServerA"
|
||||
|
||||
*netrw-P19*
|
||||
P19. How do I get numbering on in directory listings? {{{2
|
||||
*netrw-P18*
|
||||
P18. How do I get numbering on in directory listings? {{{2
|
||||
With |g:netrw_bufsettings|, you can control netrw's buffer
|
||||
settings; try putting >
|
||||
let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu"
|
||||
|
@ -3725,8 +3697,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
instead, try >
|
||||
let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu"
|
||||
<
|
||||
*netrw-P20*
|
||||
P20. How may I have gvim start up showing a directory listing? {{{2
|
||||
*netrw-P19*
|
||||
P19. How may I have gvim start up showing a directory listing? {{{2
|
||||
Try putting the following code snippet into your .vimrc: >
|
||||
augroup VimStartup
|
||||
au!
|
||||
|
@ -3738,8 +3710,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
This snippet assumes that you have client-server enabled
|
||||
(ie. a "huge" vim version).
|
||||
|
||||
*netrw-P21*
|
||||
P21. I've made a directory (or file) with an accented character, {{{2
|
||||
*netrw-P20*
|
||||
P20. I've made a directory (or file) with an accented character, {{{2
|
||||
but netrw isn't letting me enter that directory/read that file:
|
||||
|
||||
Its likely that the shell or o/s is using a different encoding
|
||||
|
@ -3749,8 +3721,8 @@ Example: Clear netrw's marked file list via a mapping on gu >
|
|||
|
||||
au FileType netrw set enc=latin1
|
||||
<
|
||||
*netrw-P22*
|
||||
P22. I get an error message when I try to copy or move a file: {{{2
|
||||
*netrw-P21*
|
||||
P21. I get an error message when I try to copy or move a file: {{{2
|
||||
>
|
||||
**error** (netrw) tried using g:netrw_localcopycmd<cp>; it doesn't work!
|
||||
<
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
" Vim filetype plugin
|
||||
" Language: jj description
|
||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||
" Last Change: 2024 May 8
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Use the same formatoptions and textwidth as the gitcommit ftplugin
|
||||
setlocal nomodeline formatoptions+=tl textwidth=72
|
||||
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
|
||||
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+
|
||||
|
||||
setlocal comments=b:JJ:
|
||||
setlocal commentstring=JJ:\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl modeline< formatoptions< textwidth< formatlistpat< comments< commentstring<'
|
|
@ -4,7 +4,7 @@
|
|||
" Previous Maintainer: Dan Sharp
|
||||
" Contributor: Enno Nagel <ennonagel+vim@gmail.com>
|
||||
" Eisuke Kawashima
|
||||
" Last Change: 2024 Feb 27
|
||||
" Last Change: 2024 May 06 by Vim Project (MANPAGER=)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
@ -46,11 +46,11 @@ endif
|
|||
|
||||
if get(b:, "is_bash", 0)
|
||||
if !has("gui_running") && executable("less")
|
||||
command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || man "<args>"; } | LESS= less"' | redraw!
|
||||
command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || MANPAGER= man "<args>"; } | LESS= less"' | redraw!
|
||||
elseif has("terminal")
|
||||
command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'
|
||||
else
|
||||
command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || man "<args>"')
|
||||
command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || MANPAGER= man "<args>"')
|
||||
endif
|
||||
setlocal keywordprg=:ShKeywordPrg
|
||||
let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2023-10-07
|
||||
" Latest Revision: 2024 May 06 by Vim Project (MANPAGER=)
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
|
@ -24,7 +24,7 @@ if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
|
|||
elseif has('terminal')
|
||||
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 ZshKeywordPrg echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
if !exists('current_compiler')
|
||||
compiler zsh
|
||||
|
|
|
@ -7504,8 +7504,6 @@ vim.go.vdir = vim.go.viewdir
|
|||
--- options options and mappings local to a window or buffer (not
|
||||
--- global values for local options)
|
||||
--- localoptions same as "options"
|
||||
--- slash `deprecated` Always enabled. Uses "/" in filenames.
|
||||
--- unix `deprecated` Always enabled. Uses "\n" line endings.
|
||||
---
|
||||
--- @type string
|
||||
vim.o.viewoptions = "folds,cursor,curdir"
|
||||
|
|
|
@ -570,6 +570,7 @@ local extension = {
|
|||
jsx = 'javascriptreact',
|
||||
clp = 'jess',
|
||||
jgr = 'jgraph',
|
||||
jjdescription = 'jj',
|
||||
j73 = 'jovial',
|
||||
jov = 'jovial',
|
||||
jovial = 'jovial',
|
||||
|
@ -2308,7 +2309,6 @@ end
|
|||
--- vim.filetype.add {
|
||||
--- pattern = {
|
||||
--- ['.*'] = {
|
||||
--- priority = -math.huge,
|
||||
--- function(path, bufnr)
|
||||
--- local content = vim.api.nvim_buf_get_lines(bufnr, 0, 1, false)[1] or ''
|
||||
--- if vim.regex([[^#!.*\\<mine\\>]]):match_str(content) ~= nil then
|
||||
|
@ -2317,6 +2317,7 @@ end
|
|||
--- return 'drawing'
|
||||
--- end
|
||||
--- end,
|
||||
--- { priority = -math.huge },
|
||||
--- },
|
||||
--- },
|
||||
--- }
|
||||
|
|
|
@ -35,13 +35,13 @@ function M.hover()
|
|||
request(ms.textDocument_hover, params)
|
||||
end
|
||||
|
||||
local function request_with_options(name, params, options)
|
||||
local function request_with_opts(name, params, opts)
|
||||
local req_handler --- @type function?
|
||||
if options then
|
||||
if opts then
|
||||
req_handler = function(err, result, ctx, config)
|
||||
local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
|
||||
local handler = client.handlers[name] or vim.lsp.handlers[name]
|
||||
handler(err, result, ctx, vim.tbl_extend('force', config or {}, options))
|
||||
handler(err, result, ctx, vim.tbl_extend('force', config or {}, opts))
|
||||
end
|
||||
end
|
||||
request(name, params, req_handler)
|
||||
|
@ -62,14 +62,13 @@ end
|
|||
--- vim.lsp.buf.references(nil, { on_list = on_list })
|
||||
--- ```
|
||||
---
|
||||
--- If you prefer loclist do something like this:
|
||||
--- If you prefer loclist instead of qflist:
|
||||
--- ```lua
|
||||
--- local function on_list(options)
|
||||
--- vim.fn.setloclist(0, {}, ' ', options)
|
||||
--- vim.cmd.lopen()
|
||||
--- end
|
||||
--- vim.lsp.buf.definition({ loclist = true })
|
||||
--- vim.lsp.buf.references(nil, { loclist = true })
|
||||
--- ```
|
||||
--- @field on_list? fun(t: vim.lsp.LocationOpts.OnList)
|
||||
--- @field loclist? boolean
|
||||
|
||||
--- @class vim.lsp.LocationOpts.OnList
|
||||
--- @field items table[] Structured like |setqflist-what|
|
||||
|
@ -83,32 +82,32 @@ end
|
|||
|
||||
--- Jumps to the declaration of the symbol under the cursor.
|
||||
--- @note Many servers do not implement this method. Generally, see |vim.lsp.buf.definition()| instead.
|
||||
--- @param options? vim.lsp.LocationOpts
|
||||
function M.declaration(options)
|
||||
--- @param opts? vim.lsp.LocationOpts
|
||||
function M.declaration(opts)
|
||||
local params = util.make_position_params()
|
||||
request_with_options(ms.textDocument_declaration, params, options)
|
||||
request_with_opts(ms.textDocument_declaration, params, opts)
|
||||
end
|
||||
|
||||
--- Jumps to the definition of the symbol under the cursor.
|
||||
--- @param options? vim.lsp.LocationOpts
|
||||
function M.definition(options)
|
||||
--- @param opts? vim.lsp.LocationOpts
|
||||
function M.definition(opts)
|
||||
local params = util.make_position_params()
|
||||
request_with_options(ms.textDocument_definition, params, options)
|
||||
request_with_opts(ms.textDocument_definition, params, opts)
|
||||
end
|
||||
|
||||
--- Jumps to the definition of the type of the symbol under the cursor.
|
||||
--- @param options? vim.lsp.LocationOpts
|
||||
function M.type_definition(options)
|
||||
--- @param opts? vim.lsp.LocationOpts
|
||||
function M.type_definition(opts)
|
||||
local params = util.make_position_params()
|
||||
request_with_options(ms.textDocument_typeDefinition, params, options)
|
||||
request_with_opts(ms.textDocument_typeDefinition, params, opts)
|
||||
end
|
||||
|
||||
--- Lists all the implementations for the symbol under the cursor in the
|
||||
--- quickfix window.
|
||||
--- @param options? vim.lsp.LocationOpts
|
||||
function M.implementation(options)
|
||||
--- @param opts? vim.lsp.LocationOpts
|
||||
function M.implementation(opts)
|
||||
local params = util.make_position_params()
|
||||
request_with_options(ms.textDocument_implementation, params, options)
|
||||
request_with_opts(ms.textDocument_implementation, params, opts)
|
||||
end
|
||||
|
||||
--- Displays signature information about the symbol under the cursor in a
|
||||
|
@ -213,25 +212,25 @@ end
|
|||
--- Formats a buffer using the attached (and optionally filtered) language
|
||||
--- server clients.
|
||||
---
|
||||
--- @param options? vim.lsp.buf.format.Opts
|
||||
function M.format(options)
|
||||
options = options or {}
|
||||
local bufnr = options.bufnr or api.nvim_get_current_buf()
|
||||
--- @param opts? vim.lsp.buf.format.Opts
|
||||
function M.format(opts)
|
||||
opts = opts or {}
|
||||
local bufnr = opts.bufnr or api.nvim_get_current_buf()
|
||||
local mode = api.nvim_get_mode().mode
|
||||
local range = options.range
|
||||
local range = opts.range
|
||||
if not range and mode == 'v' or mode == 'V' then
|
||||
range = range_from_selection(bufnr, mode)
|
||||
end
|
||||
local method = range and ms.textDocument_rangeFormatting or ms.textDocument_formatting
|
||||
|
||||
local clients = vim.lsp.get_clients({
|
||||
id = options.id,
|
||||
id = opts.id,
|
||||
bufnr = bufnr,
|
||||
name = options.name,
|
||||
name = opts.name,
|
||||
method = method,
|
||||
})
|
||||
if options.filter then
|
||||
clients = vim.tbl_filter(options.filter, clients)
|
||||
if opts.filter then
|
||||
clients = vim.tbl_filter(opts.filter, clients)
|
||||
end
|
||||
|
||||
if #clients == 0 then
|
||||
|
@ -250,12 +249,12 @@ function M.format(options)
|
|||
return params
|
||||
end
|
||||
|
||||
if options.async then
|
||||
if opts.async then
|
||||
local function do_format(idx, client)
|
||||
if not client then
|
||||
return
|
||||
end
|
||||
local params = set_range(client, util.make_formatting_params(options.formatting_options))
|
||||
local params = set_range(client, util.make_formatting_params(opts.formatting_options))
|
||||
client.request(method, params, function(...)
|
||||
local handler = client.handlers[method] or vim.lsp.handlers[method]
|
||||
handler(...)
|
||||
|
@ -264,9 +263,9 @@ function M.format(options)
|
|||
end
|
||||
do_format(next(clients))
|
||||
else
|
||||
local timeout_ms = options.timeout_ms or 1000
|
||||
local timeout_ms = opts.timeout_ms or 1000
|
||||
for _, client in pairs(clients) do
|
||||
local params = set_range(client, util.make_formatting_params(options.formatting_options))
|
||||
local params = set_range(client, util.make_formatting_params(opts.formatting_options))
|
||||
local result, err = client.request_sync(method, params, timeout_ms, bufnr)
|
||||
if result and result.result then
|
||||
util.apply_text_edits(result.result, bufnr, client.offset_encoding)
|
||||
|
@ -295,18 +294,18 @@ end
|
|||
---
|
||||
---@param new_name string|nil If not provided, the user will be prompted for a new
|
||||
--- name using |vim.ui.input()|.
|
||||
---@param options? vim.lsp.buf.rename.Opts Additional options:
|
||||
function M.rename(new_name, options)
|
||||
options = options or {}
|
||||
local bufnr = options.bufnr or api.nvim_get_current_buf()
|
||||
---@param opts? vim.lsp.buf.rename.Opts Additional options:
|
||||
function M.rename(new_name, opts)
|
||||
opts = opts or {}
|
||||
local bufnr = opts.bufnr or api.nvim_get_current_buf()
|
||||
local clients = vim.lsp.get_clients({
|
||||
bufnr = bufnr,
|
||||
name = options.name,
|
||||
name = opts.name,
|
||||
-- Clients must at least support rename, prepareRename is optional
|
||||
method = ms.textDocument_rename,
|
||||
})
|
||||
if options.filter then
|
||||
clients = vim.tbl_filter(options.filter, clients)
|
||||
if opts.filter then
|
||||
clients = vim.tbl_filter(opts.filter, clients)
|
||||
end
|
||||
|
||||
if #clients == 0 then
|
||||
|
@ -415,21 +414,21 @@ end
|
|||
---
|
||||
---@param context (table|nil) Context for the request
|
||||
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references
|
||||
---@param options? vim.lsp.ListOpts
|
||||
function M.references(context, options)
|
||||
---@param opts? vim.lsp.ListOpts
|
||||
function M.references(context, opts)
|
||||
validate({ context = { context, 't', true } })
|
||||
local params = util.make_position_params()
|
||||
params.context = context or {
|
||||
includeDeclaration = true,
|
||||
}
|
||||
request_with_options(ms.textDocument_references, params, options)
|
||||
request_with_opts(ms.textDocument_references, params, opts)
|
||||
end
|
||||
|
||||
--- Lists all symbols in the current buffer in the quickfix window.
|
||||
--- @param options? vim.lsp.ListOpts
|
||||
function M.document_symbol(options)
|
||||
--- @param opts? vim.lsp.ListOpts
|
||||
function M.document_symbol(opts)
|
||||
local params = { textDocument = util.make_text_document_params() }
|
||||
request_with_options(ms.textDocument_documentSymbol, params, options)
|
||||
request_with_opts(ms.textDocument_documentSymbol, params, opts)
|
||||
end
|
||||
|
||||
--- @param call_hierarchy_items lsp.CallHierarchyItem[]?
|
||||
|
@ -542,7 +541,7 @@ function M.typehierarchy(kind)
|
|||
)
|
||||
end
|
||||
else
|
||||
local opts = {
|
||||
local select_opts = {
|
||||
prompt = 'Select a type hierarchy item:',
|
||||
kind = 'typehierarchy',
|
||||
format_item = function(item)
|
||||
|
@ -553,7 +552,7 @@ function M.typehierarchy(kind)
|
|||
end,
|
||||
}
|
||||
|
||||
vim.ui.select(merged_results, opts, function(item)
|
||||
vim.ui.select(merged_results, select_opts, function(item)
|
||||
local client = vim.lsp.get_client_by_id(item[1])
|
||||
if client then
|
||||
--- @type lsp.TypeHierarchyItem
|
||||
|
@ -626,14 +625,14 @@ end
|
|||
--- string means no filtering is done.
|
||||
---
|
||||
--- @param query string? optional
|
||||
--- @param options? vim.lsp.ListOpts
|
||||
function M.workspace_symbol(query, options)
|
||||
--- @param opts? vim.lsp.ListOpts
|
||||
function M.workspace_symbol(query, opts)
|
||||
query = query or npcall(vim.fn.input, 'Query: ')
|
||||
if query == nil then
|
||||
return
|
||||
end
|
||||
local params = { query = query }
|
||||
request_with_options(ms.workspace_symbol, params, options)
|
||||
request_with_opts(ms.workspace_symbol, params, opts)
|
||||
end
|
||||
|
||||
--- Send request to the server to resolve document highlights for the current
|
||||
|
@ -825,19 +824,19 @@ end
|
|||
--- Selects a code action available at the current
|
||||
--- cursor position.
|
||||
---
|
||||
---@param options? vim.lsp.buf.code_action.Opts
|
||||
---@param opts? vim.lsp.buf.code_action.Opts
|
||||
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction
|
||||
---@see vim.lsp.protocol.CodeActionTriggerKind
|
||||
function M.code_action(options)
|
||||
validate({ options = { options, 't', true } })
|
||||
options = options or {}
|
||||
function M.code_action(opts)
|
||||
validate({ options = { opts, 't', true } })
|
||||
opts = opts or {}
|
||||
-- Detect old API call code_action(context) which should now be
|
||||
-- code_action({ context = context} )
|
||||
--- @diagnostic disable-next-line:undefined-field
|
||||
if options.diagnostics or options.only then
|
||||
options = { options = options }
|
||||
if opts.diagnostics or opts.only then
|
||||
opts = { options = opts }
|
||||
end
|
||||
local context = options.context or {}
|
||||
local context = opts.context or {}
|
||||
if not context.triggerKind then
|
||||
context.triggerKind = vim.lsp.protocol.CodeActionTriggerKind.Invoked
|
||||
end
|
||||
|
@ -867,17 +866,17 @@ function M.code_action(options)
|
|||
results[ctx.client_id] = { error = err, result = result, ctx = ctx }
|
||||
remaining = remaining - 1
|
||||
if remaining == 0 then
|
||||
on_code_action_results(results, options)
|
||||
on_code_action_results(results, opts)
|
||||
end
|
||||
end
|
||||
|
||||
for _, client in ipairs(clients) do
|
||||
---@type lsp.CodeActionParams
|
||||
local params
|
||||
if options.range then
|
||||
assert(type(options.range) == 'table', 'code_action range must be a table')
|
||||
local start = assert(options.range.start, 'range must have a `start` property')
|
||||
local end_ = assert(options.range['end'], 'range must have a `end` property')
|
||||
if opts.range then
|
||||
assert(type(opts.range) == 'table', 'code_action range must be a table')
|
||||
local start = assert(opts.range.start, 'range must have a `start` property')
|
||||
local end_ = assert(opts.range['end'], 'range must have a `end` property')
|
||||
params = util.make_given_range_params(start, end_, bufnr, client.offset_encoding)
|
||||
elseif mode == 'v' or mode == 'V' then
|
||||
local range = range_from_selection(bufnr, mode)
|
||||
|
|
|
@ -22,16 +22,16 @@ M[ms.workspace_executeCommand] = function(_, _, _, _)
|
|||
end
|
||||
|
||||
--- @see # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress
|
||||
---@param result lsp.ProgressParams
|
||||
---@param params lsp.ProgressParams
|
||||
---@param ctx lsp.HandlerContext
|
||||
M[ms.dollar_progress] = function(_, result, ctx)
|
||||
M[ms.dollar_progress] = function(_, params, ctx)
|
||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
||||
if not client then
|
||||
err_message('LSP[id=', tostring(ctx.client_id), '] client has shut down during progress update')
|
||||
return vim.NIL
|
||||
end
|
||||
local kind = nil
|
||||
local value = result.value
|
||||
local value = params.value
|
||||
|
||||
if type(value) == 'table' then
|
||||
kind = value.kind
|
||||
|
@ -39,21 +39,21 @@ M[ms.dollar_progress] = function(_, result, ctx)
|
|||
-- So that consumers always have it available, even if they consume a
|
||||
-- subset of the full sequence
|
||||
if kind == 'begin' then
|
||||
client.progress.pending[result.token] = value.title
|
||||
client.progress.pending[params.token] = value.title
|
||||
else
|
||||
value.title = client.progress.pending[result.token]
|
||||
value.title = client.progress.pending[params.token]
|
||||
if kind == 'end' then
|
||||
client.progress.pending[result.token] = nil
|
||||
client.progress.pending[params.token] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
client.progress:push(result)
|
||||
client.progress:push(params)
|
||||
|
||||
api.nvim_exec_autocmds('LspProgress', {
|
||||
pattern = kind,
|
||||
modeline = false,
|
||||
data = { client_id = ctx.client_id, result = result },
|
||||
data = { client_id = ctx.client_id, params = params },
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -253,26 +253,24 @@ M[ms.textDocument_references] = function(_, result, ctx, config)
|
|||
local title = 'References'
|
||||
local items = util.locations_to_items(result, client.offset_encoding)
|
||||
|
||||
local list = { title = title, items = items, context = ctx }
|
||||
if config.loclist then
|
||||
vim.fn.setloclist(0, {}, ' ', { title = title, items = items, context = ctx })
|
||||
api.nvim_command('lopen')
|
||||
vim.fn.setloclist(0, {}, ' ', list)
|
||||
vim.cmd.lopen()
|
||||
elseif config.on_list then
|
||||
assert(type(config.on_list) == 'function', 'on_list is not a function')
|
||||
config.on_list({ title = title, items = items, context = ctx })
|
||||
assert(vim.is_callable(config.on_list), 'on_list is not a function')
|
||||
config.on_list(list)
|
||||
else
|
||||
vim.fn.setqflist({}, ' ', { title = title, items = items, context = ctx })
|
||||
api.nvim_command('botright copen')
|
||||
vim.fn.setqflist({}, ' ', list)
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
end
|
||||
|
||||
--- Return a function that converts LSP responses to list items and opens the list
|
||||
---
|
||||
--- The returned function has an optional {config} parameter that accepts a table
|
||||
--- with the following keys:
|
||||
--- The returned function has an optional {config} parameter that accepts |vim.lsp.ListOpts|
|
||||
---
|
||||
--- loclist: (boolean) use the location list (default is to use the quickfix list)
|
||||
---
|
||||
---@param map_result function `((resp, bufnr) -> list)` to convert the response
|
||||
---@param map_result fun(resp, bufnr: integer): table to convert the response
|
||||
---@param entity string name of the resource used in a `not found` error message
|
||||
---@param title_fn fun(ctx: lsp.HandlerContext): string Function to call to generate list title
|
||||
---@return lsp.Handler
|
||||
|
@ -286,15 +284,16 @@ local function response_to_list(map_result, entity, title_fn)
|
|||
local title = title_fn(ctx)
|
||||
local items = map_result(result, ctx.bufnr)
|
||||
|
||||
local list = { title = title, items = items, context = ctx }
|
||||
if config.loclist then
|
||||
vim.fn.setloclist(0, {}, ' ', { title = title, items = items, context = ctx })
|
||||
api.nvim_command('lopen')
|
||||
vim.fn.setloclist(0, {}, ' ', list)
|
||||
vim.cmd.lopen()
|
||||
elseif config.on_list then
|
||||
assert(type(config.on_list) == 'function', 'on_list is not a function')
|
||||
config.on_list({ title = title, items = items, context = ctx })
|
||||
assert(vim.is_callable(config.on_list), 'on_list is not a function')
|
||||
config.on_list(list)
|
||||
else
|
||||
vim.fn.setqflist({}, ' ', { title = title, items = items, context = ctx })
|
||||
api.nvim_command('botright copen')
|
||||
vim.fn.setqflist({}, ' ', list)
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -436,7 +435,7 @@ local function location_handler(_, result, ctx, config)
|
|||
local items = util.locations_to_items(result, client.offset_encoding)
|
||||
|
||||
if config.on_list then
|
||||
assert(type(config.on_list) == 'function', 'on_list is not a function')
|
||||
assert(vim.is_callable(config.on_list), 'on_list is not a function')
|
||||
config.on_list({ title = title, items = items })
|
||||
return
|
||||
end
|
||||
|
@ -444,8 +443,13 @@ local function location_handler(_, result, ctx, config)
|
|||
util.jump_to_location(result[1], client.offset_encoding, config.reuse_win)
|
||||
return
|
||||
end
|
||||
vim.fn.setqflist({}, ' ', { title = title, items = items })
|
||||
api.nvim_command('botright copen')
|
||||
if config.loclist then
|
||||
vim.fn.setloclist(0, {}, ' ', { title = title, items = items })
|
||||
vim.cmd.lopen()
|
||||
else
|
||||
vim.fn.setqflist({}, ' ', { title = title, items = items })
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
end
|
||||
|
||||
--- @see # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_declaration
|
||||
|
@ -555,7 +559,7 @@ local function make_call_hierarchy_handler(direction)
|
|||
end
|
||||
end
|
||||
vim.fn.setqflist({}, ' ', { title = 'LSP call hierarchy', items = items })
|
||||
api.nvim_command('botright copen')
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -594,7 +598,7 @@ local function make_type_hierarchy_handler()
|
|||
})
|
||||
end
|
||||
vim.fn.setqflist({}, ' ', { title = 'LSP type hierarchy', items = items })
|
||||
api.nvim_command('botright copen')
|
||||
vim.cmd('botright copen')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ function M.enable(enable, filter)
|
|||
|
||||
if filter.bufnr == nil then
|
||||
globalstate.enabled = enable
|
||||
for bufnr, _ in pairs(bufstates) do
|
||||
for _, bufnr in ipairs(api.nvim_list_bufs()) do
|
||||
if api.nvim_buf_is_loaded(bufnr) then
|
||||
if enable == false then
|
||||
_disable(bufnr)
|
||||
|
|
|
@ -539,7 +539,7 @@ end
|
|||
---
|
||||
--- ```lua
|
||||
--- vim.keymap.set({ 'i', 's' }, '<Tab>', function()
|
||||
--- if vim.snippet.jumpable(1) then
|
||||
--- if vim.snippet.active({ direction = 1 }) then
|
||||
--- return '<cmd>lua vim.snippet.jump(1)<cr>'
|
||||
--- else
|
||||
--- return '<Tab>'
|
||||
|
|
|
@ -103,20 +103,6 @@ local function edit_range(range, srow, erow_old, erow_new)
|
|||
range[2] = math.max(range[2], erow_new)
|
||||
end
|
||||
|
||||
--- If a parser doesn't have any ranges explicitly set, treesitter will
|
||||
--- return a range with end_row and end_bytes with a value of UINT32_MAX,
|
||||
--- so clip end_row to the max buffer line.
|
||||
---
|
||||
--- TODO(lewis6991): Handle this generally
|
||||
---
|
||||
--- @param bufnr integer
|
||||
--- @param erow integer? 0-indexed, exclusive
|
||||
--- @return integer
|
||||
local function normalise_erow(bufnr, erow)
|
||||
local max_erow = api.nvim_buf_line_count(bufnr)
|
||||
return math.min(erow or max_erow, max_erow)
|
||||
end
|
||||
|
||||
-- TODO(lewis6991): Setup a decor provider so injections folds can be parsed
|
||||
-- as the window is redrawn
|
||||
---@param bufnr integer
|
||||
|
@ -126,7 +112,7 @@ end
|
|||
---@param parse_injections? boolean
|
||||
local function compute_folds_levels(bufnr, info, srow, erow, parse_injections)
|
||||
srow = srow or 0
|
||||
erow = normalise_erow(bufnr, erow)
|
||||
erow = erow or api.nvim_buf_line_count(bufnr)
|
||||
|
||||
local parser = ts.get_parser(bufnr)
|
||||
|
||||
|
@ -314,9 +300,16 @@ end
|
|||
local function on_changedtree(bufnr, foldinfo, tree_changes)
|
||||
schedule_if_loaded(bufnr, function()
|
||||
local srow_upd, erow_upd ---@type integer?, integer?
|
||||
local max_erow = api.nvim_buf_line_count(bufnr)
|
||||
for _, change in ipairs(tree_changes) do
|
||||
local srow, _, erow, ecol = Range.unpack4(change)
|
||||
if ecol > 0 then
|
||||
-- If a parser doesn't have any ranges explicitly set, treesitter will
|
||||
-- return a range with end_row and end_bytes with a value of UINT32_MAX,
|
||||
-- so clip end_row to the max buffer line.
|
||||
-- TODO(lewis6991): Handle this generally
|
||||
if erow > max_erow then
|
||||
erow = max_erow
|
||||
elseif ecol > 0 then
|
||||
erow = erow + 1
|
||||
end
|
||||
-- Start from `srow - foldminlines`, because this edit may have shrunken the fold below limit.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
" PLUGIN SECTION
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Date: Feb 09, 2021
|
||||
" Last Change:
|
||||
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 1999-2021 Charles E. Campbell {{{1
|
||||
|
@ -35,7 +37,7 @@ augroup FileExplorer
|
|||
au BufLeave * if &ft != "netrw"|let w:netrw_prvfile= expand("%:p")|endif
|
||||
au BufEnter * sil call s:LocalBrowse(expand("<amatch>"))
|
||||
au VimEnter * sil call s:VimEnter(expand("<amatch>"))
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if has("win32")
|
||||
au BufEnter .* sil call s:LocalBrowse(expand("<amatch>"))
|
||||
endif
|
||||
augroup END
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2023 Dec 08
|
||||
" Last Change: 2024 May 04
|
||||
" 2024 May 04 by Vim Project (fix digit separator in octals and floats)
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
@ -55,11 +56,11 @@ if !exists("cpp_no_cpp14")
|
|||
syn match cppNumbers display transparent "\<\d\|\.\d" contains=cppNumber,cppFloat
|
||||
syn match cppNumber display contained "\<0\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0\o\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0\('\=\o\+\)\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\('\=\d\+\)*\.\(\d\('\=\d\+\)*\)\=\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\.\d\('\=\d\+\)*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>"
|
||||
syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
" Vim syntax file
|
||||
" Language: jj description
|
||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||
" Last Change: 2024 May 8
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = 'jj'
|
||||
|
||||
syn match jjAdded "A .*" contained
|
||||
syn match jjRemoved "D .*" contained
|
||||
syn match jjChanged "M .*" contained
|
||||
|
||||
syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged
|
||||
|
||||
hi def link jjComment Comment
|
||||
hi def link jjAdded Added
|
||||
hi def link jjRemoved Removed
|
||||
hi def link jjChanged Changed
|
|
@ -170,7 +170,7 @@ local grammar = P {
|
|||
ltype = parenOpt(v.ty_union),
|
||||
|
||||
ty_union = v.ty_opt * rep(Pf('|') * v.ty_opt),
|
||||
ty = v.ty_fun + ident + v.ty_table + literal + paren(v.ty),
|
||||
ty = v.ty_fun + ident + v.ty_table + literal + paren(v.ty) + v.ty_generic,
|
||||
ty_param = Pf('<') * comma1(v.ltype) * fill * P('>'),
|
||||
ty_opt = v.ty * opt(v.ty_param) * opt(P('[]')) * opt(P('?')),
|
||||
ty_index = (Pf('[') * (v.ltype + ident + rep1(num)) * fill * P(']')),
|
||||
|
@ -179,6 +179,7 @@ local grammar = P {
|
|||
ty_table = Pf('{') * comma1(v.table_elem) * fill * P('}'),
|
||||
fun_param = lname * opt(colon * v.ltype),
|
||||
ty_fun = Pf('fun') * paren(comma(lname * opt(colon * v.ltype))) * opt(colon * comma1(v.ltype)),
|
||||
ty_generic = P('`') * letter * P('`'),
|
||||
}
|
||||
|
||||
return grammar --[[@as nvim.luacats.grammar]]
|
||||
|
|
|
@ -221,7 +221,7 @@ static void changed_lines_invalidate_win(win_T *wp, linenr_T lnum, colnr_T col,
|
|||
void changed_lines_invalidate_buf(buf_T *buf, linenr_T lnum, colnr_T col, linenr_T lnume,
|
||||
linenr_T xtra)
|
||||
{
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp) {
|
||||
if (wp->w_buffer == buf) {
|
||||
changed_lines_invalidate_win(wp, lnum, col, lnume, xtra);
|
||||
}
|
||||
|
|
|
@ -353,7 +353,7 @@ void check_cursor_col(win_T *win)
|
|||
// Allow cursor past end-of-line when:
|
||||
// - in Insert mode or restarting Insert mode
|
||||
// - in Visual mode and 'selection' isn't "old"
|
||||
// - 'virtualedit' is set */
|
||||
// - 'virtualedit' is set
|
||||
if ((State & MODE_INSERT) || restart_edit
|
||||
|| (VIsual_active && *p_sel != 'o')
|
||||
|| (cur_ve_flags & VE_ONEMORE)
|
||||
|
|
|
@ -4082,7 +4082,7 @@ void separate_nextcmd(exarg_T *eap)
|
|||
break;
|
||||
}
|
||||
} else if (
|
||||
// Check for '"': start of comment or '|': next command */
|
||||
// Check for '"': start of comment or '|': next command
|
||||
// :@" does not start a comment!
|
||||
// :redir @" doesn't either.
|
||||
(*p == '"'
|
||||
|
|
|
@ -443,7 +443,7 @@ int grid_line_puts(int col, const char *text, int textlen, int attr)
|
|||
|
||||
if (col + mbyte_cells > max_col) {
|
||||
// Only 1 cell left, but character requires 2 cells:
|
||||
// display a '>' in the last column to avoid wrapping. */
|
||||
// display a '>' in the last column to avoid wrapping.
|
||||
schar = schar_from_ascii('>');
|
||||
mbyte_cells = 1;
|
||||
}
|
||||
|
|
|
@ -1963,7 +1963,7 @@ int syn_name2id_len(const char *name, size_t len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// Avoid using stricmp() too much, it's slow on some systems */
|
||||
// Avoid using stricmp() too much, it's slow on some systems
|
||||
// Avoid alloc()/free(), these are slow too.
|
||||
vim_memcpy_up(name_u, name, len);
|
||||
name_u[len] = '\0';
|
||||
|
|
|
@ -1197,7 +1197,7 @@ static int cin_is_cpp_baseclass(cpp_baseclass_cache_T *cached)
|
|||
s = line;
|
||||
}
|
||||
if (s == line) {
|
||||
// don't recognize "case (foo):" as a baseclass */
|
||||
// don't recognize "case (foo):" as a baseclass
|
||||
if (cin_iscase(s, false)) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -549,19 +549,21 @@ static int nlua_iconv(lua_State *lstate)
|
|||
static int nlua_foldupdate(lua_State *lstate)
|
||||
{
|
||||
handle_T window = (handle_T)luaL_checkinteger(lstate, 1);
|
||||
Error err = ERROR_INIT;
|
||||
win_T *win = find_window_by_handle(window, &err);
|
||||
if (ERROR_SET(&err)) {
|
||||
nlua_push_errstr(lstate, err.msg);
|
||||
api_clear_error(&err);
|
||||
lua_error(lstate);
|
||||
return 0;
|
||||
win_T *win = handle_get_window(window);
|
||||
if (!win) {
|
||||
return luaL_error(lstate, "invalid window");
|
||||
}
|
||||
// input is zero-based end-exclusive range
|
||||
linenr_T top = (linenr_T)luaL_checkinteger(lstate, 2) + 1;
|
||||
if (top < 1 || top > win->w_buffer->b_ml.ml_line_count) {
|
||||
return luaL_error(lstate, "invalid top");
|
||||
}
|
||||
linenr_T bot = (linenr_T)luaL_checkinteger(lstate, 3);
|
||||
if (top > bot) {
|
||||
return luaL_error(lstate, "invalid bot");
|
||||
}
|
||||
|
||||
linenr_T start = (linenr_T)luaL_checkinteger(lstate, 2);
|
||||
linenr_T end = (linenr_T)luaL_checkinteger(lstate, 3);
|
||||
|
||||
foldUpdate(win, start + 1, end);
|
||||
foldUpdate(win, top, bot);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1812,8 +1812,7 @@ int makemap(FILE *fd, buf_T *buf)
|
|||
iemsg(_("E228: makemap: Illegal mode"));
|
||||
return FAIL;
|
||||
}
|
||||
do {
|
||||
// do this twice if c2 is set, 3 times with c3 */
|
||||
do { // do this twice if c2 is set, 3 times with c3
|
||||
// When outputting <> form, need to make sure that 'cpo'
|
||||
// is set to the Vim default.
|
||||
if (!did_cpo) {
|
||||
|
|
|
@ -286,6 +286,7 @@ void update_topline(win_T *wp)
|
|||
}
|
||||
wp->w_topline = 1;
|
||||
wp->w_botline = 2;
|
||||
wp->w_skipcol = 0;
|
||||
wp->w_valid |= VALID_BOTLINE|VALID_BOTLINE_AP;
|
||||
wp->w_viewport_invalid = true;
|
||||
wp->w_scbind_pos = 1;
|
||||
|
|
|
@ -9388,8 +9388,6 @@ return {
|
|||
options options and mappings local to a window or buffer (not
|
||||
global values for local options)
|
||||
localoptions same as "options"
|
||||
slash |deprecated| Always enabled. Uses "/" in filenames.
|
||||
unix |deprecated| Always enabled. Uses "\n" line endings.
|
||||
]=],
|
||||
expand_cb = 'expand_set_sessionoptions',
|
||||
full_name = 'viewoptions',
|
||||
|
|
|
@ -999,7 +999,7 @@ static void uniquefy_paths(garray_T *gap, char *pattern)
|
|||
memmove(path, path_cutoff, strlen(path_cutoff) + 1);
|
||||
} else {
|
||||
// Here all files can be reached without path, so get shortest
|
||||
// unique path. We start at the end of the path. */
|
||||
// unique path. We start at the end of the path.
|
||||
char *pathsep_p = path + len - 1;
|
||||
while (find_previous_pathsep(path, &pathsep_p)) {
|
||||
if (vim_regexec(®match, pathsep_p + 1, 0)
|
||||
|
|
|
@ -4195,6 +4195,12 @@ static void qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int q
|
|||
}
|
||||
}
|
||||
|
||||
FOR_ALL_TAB_WINDOWS(tp, wp) {
|
||||
if (wp->w_buffer == curbuf) {
|
||||
wp->w_skipcol = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all undo information
|
||||
u_clearallandblockfree(curbuf);
|
||||
}
|
||||
|
|
|
@ -10555,7 +10555,7 @@ nfa_do_multibyte:
|
|||
// NFA_END_COMPOSING is the ). Note that right now we are
|
||||
// building the postfix form, not the NFA itself;
|
||||
// a composing char could be: a, b, c, NFA_COMPOSING
|
||||
// where 'b' and 'c' are chars with codes > 256. */
|
||||
// where 'b' and 'c' are chars with codes > 256.
|
||||
while (true) {
|
||||
EMIT(c);
|
||||
if (i > 0) {
|
||||
|
|
|
@ -2460,7 +2460,7 @@ int current_search(int count, bool forward)
|
|||
// beginning of the file (cursor might be on the search match)
|
||||
// except when Visual mode is active, so that extending the visual
|
||||
// selection works.
|
||||
if (i == 1 && !result) { // not found, abort */
|
||||
if (i == 1 && !result) { // not found, abort
|
||||
curwin->w_cursor = orig_pos;
|
||||
if (VIsual_active) {
|
||||
VIsual = save_VIsual;
|
||||
|
@ -3677,9 +3677,8 @@ void find_pattern_in_path(char *ptr, Direction dir, size_t len, bool whole, bool
|
|||
true) & kEqualFiles) {
|
||||
if (type != CHECK_PATH
|
||||
&& action == ACTION_SHOW_ALL && files[i].matched) {
|
||||
msg_putchar('\n'); // cursor below last one */
|
||||
if (!got_int) { // don't display if 'q' typed at "--more--"
|
||||
// message
|
||||
msg_putchar('\n'); // cursor below last one
|
||||
if (!got_int) { // don't display if 'q' typed at "--more--" message
|
||||
msg_home_replace_hl(new_fname);
|
||||
msg_puts(_(" (includes previously listed match)"));
|
||||
prev_fname = NULL;
|
||||
|
|
|
@ -913,6 +913,119 @@ describe('smoothscroll', function()
|
|||
assert_alive()
|
||||
end)
|
||||
|
||||
-- oldtest: Test_smoothscroll_insert_bottom()
|
||||
it('works in Insert mode at bottom of window', function()
|
||||
screen:try_resize(40, 9)
|
||||
exec([[
|
||||
call setline(1, repeat([repeat('A very long line ...', 10)], 5))
|
||||
set wrap smoothscroll scrolloff=0
|
||||
]])
|
||||
feed('Go123456789<CR>')
|
||||
screen:expect([[
|
||||
{1:<<<}ery long line ...A very long line ...|
|
||||
A very long line ...A very long line ...|*5
|
||||
123456789 |
|
||||
^ |
|
||||
{5:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_smoothscroll_in_qf_window()
|
||||
it('works in quickfix window when changing quickfix list', function()
|
||||
screen:try_resize(60, 20)
|
||||
exec([[
|
||||
set nocompatible display=lastline
|
||||
copen 5
|
||||
setlocal number smoothscroll
|
||||
let g:l = [{'text': 'foo'}] + repeat([{'text': join(range(30))}], 10)
|
||||
call setqflist(g:l, 'r')
|
||||
normal! G
|
||||
wincmd t
|
||||
let g:l1 = [{'text': join(range(1000))}]
|
||||
]])
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|*11
|
||||
{3:[No Name] }|
|
||||
{1:<<<}{8: }21 22 23 24 25 26 27 28 29 |
|
||||
{8: 10 }|| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
||||
{8: }21 22 23 24 25 26 27 28 29 |
|
||||
{8: 11 }|| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
||||
{8: }21 22 23 24 25 26 27 28 29 |
|
||||
{2:[Quickfix List] }|
|
||||
|
|
||||
]])
|
||||
|
||||
feed([[:call setqflist([], 'r')<CR>]])
|
||||
local screen_empty = [[
|
||||
^ |
|
||||
{1:~ }|*11
|
||||
{3:[No Name] }|
|
||||
{8: 1 } |
|
||||
{1:~ }|*4
|
||||
{2:[Quickfix List] }|
|
||||
:call setqflist([], 'r') |
|
||||
]]
|
||||
screen:expect(screen_empty)
|
||||
|
||||
feed([[:call setqflist(g:l, 'r')<CR>]])
|
||||
local screen_l_top = [[
|
||||
^ |
|
||||
{1:~ }|*11
|
||||
{3:[No Name] }|
|
||||
{8: 1 }{10:|| foo }|
|
||||
{8: 2 }|| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
||||
{8: }21 22 23 24 25 26 27 28 29 |
|
||||
{8: 3 }|| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
||||
{8: }21 22 23 24 25 26 27 28 29 |
|
||||
{2:[Quickfix List] }|
|
||||
:call setqflist(g:l, 'r') |
|
||||
]]
|
||||
screen:expect(screen_l_top)
|
||||
|
||||
feed([[:call setqflist(g:l1, 'r')<CR>]])
|
||||
local screen_l1_top = [[
|
||||
^ |
|
||||
{1:~ }|*11
|
||||
{3:[No Name] }|
|
||||
{8: 1 }{10:|| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 }|
|
||||
{8: }{10:21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39}|
|
||||
{8: }{10: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 5}|
|
||||
{8: }{10:8 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 }|
|
||||
{8: }{10:77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95}|
|
||||
{2:[Quickfix List] }|
|
||||
:call setqflist(g:l1, 'r') |
|
||||
]]
|
||||
screen:expect(screen_l1_top)
|
||||
|
||||
feed('<C-W>b$<C-W>t')
|
||||
local screen_l1_bot = [[
|
||||
^ |
|
||||
{1:~ }|*11
|
||||
{3:[No Name] }|
|
||||
{1:<<<}{8: }{10: 937 938 939 940 941 942 943 944 945 946 947 948 949 950}|
|
||||
{8: }{10: 951 952 953 954 955 956 957 958 959 960 961 962 963 964}|
|
||||
{8: }{10: 965 966 967 968 969 970 971 972 973 974 975 976 977 978}|
|
||||
{8: }{10: 979 980 981 982 983 984 985 986 987 988 989 990 991 992}|
|
||||
{8: }{10: 993 994 995 996 997 998 999 }|
|
||||
{2:[Quickfix List] }|
|
||||
:call setqflist(g:l1, 'r') |
|
||||
]]
|
||||
screen:expect(screen_l1_bot)
|
||||
|
||||
feed([[:call setqflist([], 'r')<CR>]])
|
||||
screen:expect(screen_empty)
|
||||
|
||||
feed([[:call setqflist(g:l1, 'r')<CR>]])
|
||||
screen:expect(screen_l1_top)
|
||||
|
||||
feed('<C-W>b$<C-W>t')
|
||||
screen:expect(screen_l1_bot)
|
||||
|
||||
feed([[:call setqflist(g:l, 'r')<CR>]])
|
||||
screen:expect(screen_l_top)
|
||||
end)
|
||||
|
||||
it('works with virt_lines above and below', function()
|
||||
screen:try_resize(55, 7)
|
||||
exec([=[
|
||||
|
@ -986,22 +1099,6 @@ describe('smoothscroll', function()
|
|||
]])
|
||||
end)
|
||||
|
||||
it('works in Insert mode at bottom of window', function()
|
||||
screen:try_resize(40, 9)
|
||||
exec([[
|
||||
call setline(1, repeat([repeat('A very long line ...', 10)], 5))
|
||||
set wrap smoothscroll scrolloff=0
|
||||
]])
|
||||
feed('Go123456789<CR>')
|
||||
screen:expect([[
|
||||
{1:<<<}ery long line ...A very long line ...|
|
||||
A very long line ...A very long line ...|*5
|
||||
123456789 |
|
||||
^ |
|
||||
{5:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
|
||||
it('<<< marker shows with tabline, winbar and splits', function()
|
||||
screen:try_resize(40, 12)
|
||||
screen:set_default_attr_ids({
|
||||
|
|
|
@ -152,4 +152,11 @@ describe('luacats grammar', function()
|
|||
name = '[1]',
|
||||
type = 'integer',
|
||||
})
|
||||
|
||||
test('@param type `T` this is a generic type', {
|
||||
desc = 'this is a generic type',
|
||||
kind = 'param',
|
||||
name = 'type',
|
||||
type = '`T`',
|
||||
})
|
||||
end)
|
||||
|
|
|
@ -360,6 +360,7 @@ func s:GetFilenameChecks() abort
|
|||
\ 'javascriptreact': ['file.jsx'],
|
||||
\ 'jess': ['file.clp'],
|
||||
\ 'jgraph': ['file.jgr'],
|
||||
\ 'jj': ['file.jjdescription'],
|
||||
\ 'jq': ['file.jq'],
|
||||
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
||||
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
|
||||
|
|
|
@ -964,6 +964,51 @@ func Test_smoothscroll_insert_bottom()
|
|||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_smoothscroll_in_qf_window()
|
||||
CheckFeature quickfix
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
set nocompatible display=lastline
|
||||
copen 5
|
||||
setlocal number smoothscroll
|
||||
let g:l = [{'text': 'foo'}] + repeat([{'text': join(range(30))}], 10)
|
||||
call setqflist(g:l, 'r')
|
||||
normal! G
|
||||
wincmd t
|
||||
let g:l1 = [{'text': join(range(1000))}]
|
||||
END
|
||||
call writefile(lines, 'XSmoothScrollInQfWindow', 'D')
|
||||
let buf = RunVimInTerminal('-u NONE -S XSmoothScrollInQfWindow', #{rows: 20, cols: 60})
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_1', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_2', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_3', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_4', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-W>b$\<C-W>t")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_5', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_2', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_4', {})
|
||||
|
||||
call term_sendkeys(buf, "\<C-W>b$\<C-W>t")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_5', {})
|
||||
|
||||
call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>")
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_3', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_smoothscroll_in_zero_width_window()
|
||||
set cpo+=n number smoothscroll
|
||||
set winwidth=99999 winminwidth=0
|
||||
|
|
Loading…
Reference in New Issue