mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(lsp): Set dir
completion option for add_workspace_folder
Given that the input is pre-filled with a path, it should be possible to use dir completion.
This commit is contained in:
parent
510ed996d2
commit
7ea652e4bf
@ -339,7 +339,7 @@ end
|
||||
--- Add the folder at path to the workspace folders. If {path} is
|
||||
--- not provided, the user will be prompted for a path using |input()|.
|
||||
function M.add_workspace_folder(workspace_folder)
|
||||
workspace_folder = workspace_folder or npcall(vfn.input, "Workspace Folder: ", vfn.expand('%:p:h'))
|
||||
workspace_folder = workspace_folder or npcall(vfn.input, "Workspace Folder: ", vfn.expand('%:p:h'), 'dir')
|
||||
vim.api.nvim_command("redraw")
|
||||
if not (workspace_folder and #workspace_folder > 0) then return end
|
||||
if vim.fn.isdirectory(workspace_folder) == 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user