}
# Compute the rootpath (based on the directory of the buffer)
- var bufDir = bnr->bufname()->fnamemodify(':p:h')
var rootPath = ''
var rootSearchFiles = lspserver.rootSearchFiles
if !rootSearchFiles->empty()
+ var bufDir = bnr->bufname()->fnamemodify(':p:h')
rootPath = util.FindNearestRootDir(bufDir, rootSearchFiles)
endif
if rootPath == ''
- rootPath = bufDir
+ rootPath = getcwd()
endif
lspserver.workspaceFolders = [rootPath]
closest to the directory of the current buffer is used
as the workspace root. If this parameter is not
specified or the files are not found, then the
- directory of the current buffer is used as the
- workspace root.
+ current working directory is used as the workspace root.
Aditionally the following configurations can be made: