Skip to content

docs: instructions for adding a plugin to Nvim with Lua #168

Closed
@m-kovalevsky

Description

@m-kovalevsky

There is an example of writing a plugin which adds Hello command to Nvim

On the step 3 "Add the following plugin to Nvim:" there is a code example written in Vimscript instead of Lua.

It would be great to have the same example but written in Lua.

Ideally, an example can be extended to have more details for developers who never work with go-client and plugin system before. Specifically, it would be great to give more details on the step "Add the following plugin to Nvim" since it does not clarify where exactly do we need to add plugin (what file, folder, etc. and how to register plugin so Neovim will launch it).

Activity

justinmk

justinmk commented on May 10, 2024

@justinmk
Member

It would be great to have the same example but written in Lua.

sure, that's an easy enough change to make.

Ideally, an example can be extended to have more details for developers who never work with go-client and plugin system before. Specifically, it would be great to give more details on the step "Add the following plugin to Nvim"

Probably the best reference is the _test.go examples in https://github.com/neovim/go-client/tree/main/nvim/plugin

Long-term (hopefully before end of 2024), the answer is to vastly simplify "remote plugins" as outlined in #167

justinmk

justinmk commented on May 13, 2024

@justinmk
Member

Can you try the steps outlined here and report your experience here?

changed the title [-]Update an instruction on adding the plugin to Nvim with Lua code[/-] [+]docs: instructions for adding a plugin to Nvim with Lua[/+] on May 13, 2024
garyburd

garyburd commented on May 13, 2024

@garyburd
Contributor

The code in my comment was not compiled or tested. The comment is missing the Lua side of the code. I'll post a working example in a few days.

garyburd

garyburd commented on May 16, 2024

@garyburd
Contributor

I posted an example of a plugin written in Lua calling functions written in Go. Example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @garyburd@justinmk@m-kovalevsky

        Issue actions

          docs: instructions for adding a plugin to Nvim with Lua · Issue #168 · neovim/go-client