mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +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")
|
||||
|
@@ -400,9 +400,9 @@ end
|
||||
--- let sl = ''
|
||||
--- if luaeval('not vim.tbl_isempty(vim.lsp.buf_get_clients(0))')
|
||||
--- let sl.='%#MyStatuslineLSP#E:'
|
||||
--- let sl.='%#MyStatuslineLSPErrors#%{luaeval("vim.lsp.diagnostic.get_count([[Error]])")}'
|
||||
--- let sl.='%#MyStatuslineLSPErrors#%{luaeval("vim.lsp.diagnostic.get_count(0, [[Error]])")}'
|
||||
--- let sl.='%#MyStatuslineLSP# W:'
|
||||
--- let sl.='%#MyStatuslineLSPWarnings#%{luaeval("vim.lsp.diagnostic.get_count([[Warning]])")}'
|
||||
--- let sl.='%#MyStatuslineLSPWarnings#%{luaeval("vim.lsp.diagnostic.get_count(0, [[Warning]])")}'
|
||||
--- else
|
||||
--- let sl.='%#MyStatuslineLSPErrors#off'
|
||||
--- endif
|
||||
|
@@ -1315,6 +1315,9 @@ function M.make_text_document_params()
|
||||
return { uri = vim.uri_from_bufnr(0) }
|
||||
end
|
||||
|
||||
--- Create the workspace params
|
||||
--@param added
|
||||
--@param removed
|
||||
function M.make_workspace_params(added, removed)
|
||||
return { event = { added = added; removed = removed; } }
|
||||
end
|
||||
|
Reference in New Issue
Block a user