enddef
# open a window and display all the symbols in a file (outline)
-export def Outline()
- outline.OpenOutlineWindow()
+export def Outline(cmdmods: string)
+ outline.OpenOutlineWindow(cmdmods)
g:LspRequestDocSymbols()
enddef
enddef
# open the symbol outline window
-export def OpenOutlineWindow()
+export def OpenOutlineWindow(cmdmods: string)
var wid: number = bufwinid('LSP-Outline')
if wid != -1
return
var prevWinID: number = win_getid()
- if opt.lspOptions.outlineOnRight
- execute $':botright :{opt.lspOptions.outlineWinSize}vnew LSP-Outline'
- else
- execute $':topleft :{opt.lspOptions.outlineWinSize}vnew LSP-Outline'
+ var mods = cmdmods
+ if mods == ''
+ if opt.lspOptions.outlineOnRight
+ mods = ':botright'
+ else
+ mods = ':topleft'
+ endif
endif
+
+ execute $'{mods} :{opt.lspOptions.outlineWinSize}vnew LSP-Outline'
:setlocal modifiable
:setlocal noreadonly
:silent! :%d _
command! -nargs=0 -bar LspHover lsp.Hover()
command! -nargs=0 -bar LspIncomingCalls lsp.IncomingCalls()
command! -nargs=0 -bar LspOutgoingCalls lsp.OutgoingCalls()
-command! -nargs=0 -bar LspOutline lsp.Outline()
+command! -nargs=0 -bar LspOutline lsp.Outline(<q-mods>)
command! -nargs=0 -bar LspPeekDeclaration lsp.GotoDeclaration(v:true, <q-mods>)
command! -nargs=0 -bar LspPeekDefinition lsp.GotoDefinition(v:true, <q-mods>)
command! -nargs=0 -bar LspPeekImpl lsp.GotoImplementation(v:true, <q-mods>)