Skip to content

Avoid linter complaints from missing fields in setup table #91

@adigitoleo

Description

@adigitoleo

Hello, thanks for this wonderful implementation. I contributed previously to vim-floaterm and then used my own functions for a while, but now I'm migrating to init.lua and will adopt FTerm instead.

I have a minor grievance: I implemented a version of :Man that uses the FTerm buffer like this:

vim.api.nvim_create_user_command("MAN", function(opts)
    local arg = vim.fn.expand("<cword>")
    if opts.args ~= "" then arg = opts.args end
    require("FTerm").scratch({ cmd = { "man", arg } })
end, { nargs = "?" })

It works, however my lua linter (from the lua-language-server) is complaining about "Missing fields" in the setup table for scratch(). Do you know of a way to avoid this? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions