vim.lsp._watchfiles
Methods4
function M._watchfunc(path: string, opts: vim._watch.watch.Opts | nil, callback: vim._watch.Callback) -> cancel fun() -> nil
Parameters
pathstringThe path to watch
optsvim._watch.watch.Opts | nilAdditional options:
- uvflags (table|nil)
Same flags as accepted by |uv.fseventstart()|
callbackvim._watch.CallbackCallback for new events
Returns
cancelfun() -> nilStops the watcher
function M.register(reg: lsp.Registration, client_id: integer) -> nil
Registers the workspace/didChangeWatchedFiles capability dynamically.
Parameters
reglsp.RegistrationLSP Registration object.
client_idintegerClient ID.
Returns
- nil
function M.unregister(unreg: lsp.Unregistration, client_id: integer) -> nil
Unregisters the workspace/didChangeWatchedFiles capability dynamically.
Parameters
unreglsp.UnregistrationLSP Unregistration object.
client_idintegerClient ID.
Returns
- nil
function M.cancel(client_id: integer) -> nil
Fields1
M._poll_exclude_pattern : vim.lpeg.Pattern
Default excludes the same as VSCode's files.watcherExclude setting. https://github.com/microsoft/vscode/blob/eef30e7165e19b33daa1e15e92fa34ff4a5df0d3/src/vs/workbench/contrib/files/browser/files.contribution.ts#L261