diff options
author | Mathias Fussenegger <f.mathias@zignar.net> | 2021-06-25 14:23:53 +0200 |
---|---|---|
committer | Mathias Fussenegger <f.mathias@zignar.net> | 2021-06-25 14:28:17 +0200 |
commit | 7ea652e4bf0307c46c1bc47456a94638e17f9f29 (patch) | |
tree | 2973184623c309aae3fd44175e4f0732ee2e5553 /runtime/lua/vim/lsp/buf.lua | |
parent | 510ed996d2a92de527c70888208e3ad7ce157126 (diff) | |
download | rneovim-7ea652e4bf0307c46c1bc47456a94638e17f9f29.tar.gz rneovim-7ea652e4bf0307c46c1bc47456a94638e17f9f29.tar.bz2 rneovim-7ea652e4bf0307c46c1bc47456a94638e17f9f29.zip |
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.
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index ad5a348d4c..b13d662ccb 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -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 |