Skip to content

Create interface files #66

Open
Open
@dkirchhof

Description

@dkirchhof

As this plugin is for neovim AND vim, I don't know, how to manage it.
So maybe just for everyones interest, I created a function (for neovim) to automatically create resi files:

function createInterfaceFile()
    local path = vim.api.nvim_buf_get_name(0)

    if vim.fn.filereadable(path .. "i") == 1 then
        print("Interface file already exists")
    else
        -- print("Create interface file")

        vim.lsp.buf_request(
          0, 
          "textDocument/createInterface", 
          { uri = "file://" .. path }, 
          function ()
            print("Interface file created")
          end
        )
    end
end

vim.cmd("command RescriptCreateInterfaceFile lua createInterfaceFile()")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions