feat: Allow incremental sync & lsp flags (#13371)

This commit is contained in:
TJ DeVries
2020-12-08 21:09:33 -05:00
committed by GitHub
parent 4383c0f952
commit 08ec36efaf
5 changed files with 70 additions and 20 deletions

View File

@@ -239,6 +239,7 @@ function M.outgoing_calls()
end
--- List workspace folders.
---
function M.list_workspace_folders()
local workspace_folders = {}
for _, client in ipairs(vim.lsp.buf_get_clients()) do
@@ -249,7 +250,8 @@ function M.list_workspace_folders()
return workspace_folders
end
--- Add a workspace folder.
--- 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'))
vim.api.nvim_command("redraw")
@@ -275,7 +277,9 @@ function M.add_workspace_folder(workspace_folder)
end
end
--- Remove a workspace folder.
--- Remove the folder at path from the workspace folders. If
--- {path} is not provided, the user will be prompted for
--- a path using |input()|.
function M.remove_workspace_folder(workspace_folder)
workspace_folder = workspace_folder or npcall(vfn.input, "Workspace Folder: ", vfn.expand('%:p:h'))
vim.api.nvim_command("redraw")