mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
feat: Allow incremental sync & lsp flags (#13371)
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user