types: update type annotations for LuaLS 3.7
This commit is contained in:
parent
b61bc9b701
commit
e45aeebc2b
9 changed files with 34 additions and 16 deletions
|
|
@ -385,6 +385,7 @@ M.perform_action = function(action, cb)
|
|||
junction = false,
|
||||
}
|
||||
end
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
uv.fs_symlink(target, path, flags, cb)
|
||||
else
|
||||
fs.touch(path, cb)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ local M = {}
|
|||
|
||||
local FIELD_META = constants.FIELD_META
|
||||
|
||||
---@class oil.sshUrl
|
||||
---@class (exact) oil.sshUrl
|
||||
---@field scheme string
|
||||
---@field host string
|
||||
---@field user nil|string
|
||||
|
|
|
|||
|
|
@ -1,10 +1,22 @@
|
|||
local layout = require("oil.layout")
|
||||
local util = require("oil.util")
|
||||
|
||||
---@class oil.sshConnection
|
||||
---@class (exact) oil.sshCommand
|
||||
---@field cmd string|string[]
|
||||
---@field cb fun(err?: string, output?: string[])
|
||||
---@field running? boolean
|
||||
|
||||
---@class (exact) oil.sshConnection
|
||||
---@field new fun(url: oil.sshUrl): oil.sshConnection
|
||||
---@field create_ssh_command fun(url: oil.sshUrl): string[]
|
||||
---@field meta {user?: string, groups?: string[]}
|
||||
---@field connection_error nil|string
|
||||
---@field connected boolean
|
||||
---@field private term_bufnr integer
|
||||
---@field private jid integer
|
||||
---@field private term_winid nil|integer
|
||||
---@field private commands oil.sshCommand[]
|
||||
---@field private _stdout string[]
|
||||
local SSHConnection = {}
|
||||
|
||||
local function output_extend(agg, output)
|
||||
|
|
@ -114,6 +126,7 @@ function SSHConnection.new(url)
|
|||
pty = true, -- This is require for interactivity
|
||||
on_stdout = function(j, output)
|
||||
pcall(vim.api.nvim_chan_send, self.term_id, table.concat(output, "\r\n"))
|
||||
---@diagnostic disable-next-line: invisible
|
||||
local new_i_start = output_extend(self._stdout, output)
|
||||
self:_handle_output(new_i_start)
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ local permissions = require("oil.adapters.files.permissions")
|
|||
local SSHConnection = require("oil.adapters.ssh.connection")
|
||||
local util = require("oil.util")
|
||||
|
||||
---@class oil.sshFs
|
||||
---@class (exact) oil.sshFs
|
||||
---@field new fun(url: oil.sshUrl): oil.sshFs
|
||||
---@field conn oil.sshConnection
|
||||
local SSHFS = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue