rescript-lang / rescript-lang/vim-rescript

Create interface files

Open
#66 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
164
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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()")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed createInterfaceFile function and its RescriptCreateInterfaceFile command, then determine how interface-file creation should work for both Neovim and Vim. Done means the supported editor behavior and handling for an existing interface file are clearly defined and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
neovim, vim
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.