Skip to content

Commit

Permalink
Add a todo about correcting file watching to only happen when the ser…
Browse files Browse the repository at this point in the history
…ver has the capability
  • Loading branch information
chipsenkbeil committed Jul 20, 2023
1 parent b9f649a commit 8cb1bcb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/distant/editor/open/configurator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ function M.configure(opts)
end

-- Watch the buffer to detect changes (only applies to files)
--
-- TODO: We need to support getting the version of the server that includes
-- the capabilities and be able to look them up here. The reason for
-- that is some implementations such as ssh do not support file watching
-- and the act of trying to watch will return an error. So we want to know
-- if a server supports the watch capability and skip this (even if enabled)
-- when it does not.
if plugin.settings.buffer.watch.enabled then
plugin.editor.watch({ buf = bufnr })
end
Expand Down

0 comments on commit 8cb1bcb

Please sign in to comment.