Warning
THIS PROJECT IS STILL EXPERIMENTAL.
A Neovim plugin designed to simplify the implementation of Go interfaces.
go-impl.nvim_Demo.mp4
- Fully Asynchronous: Non-blocking operations for a seamless experience.
- Smart Receiver Detection: Automatically identifies the correct receiver based on cursor position.
- Treesitter Validation:
Ensures the receiver is valid before executing
impl
. - Fast Interface Selection: Uses ibhagwan/fzf-lua for quick and efficient interface selection.
- Generic Parameters Support: Allows specifying types for generic parameters with highlighting and interface declaration.
- Neovim >= 0.10.0
- Latest version of josharian/impl
Install with lazy.nvim
{
"fang2hou/go-impl.nvim",
ft = "go",
dependencies = {
"MunifTanjim/nui.nvim",
"ibhagwan/fzf-lua",
"nvim-lua/plenary.nvim",
},
opts = {},
keys = {
{
"<leader>Gi",
function()
require("go-impl").open()
end,
mode = { "n" },
desc = "Go Impl",
},
},
}
- Open a Go file.
- Place your cursor on the structure you want to implement.
- Run
:lua require("go-impl").open()
or:GoImplOpen
to start implementing.
The default configuration should work for most users.
Check out all available options in config.lua.
- edolphin-ydf/goimpl.nvim -
Partial support for generic interfaces and telescope search.
- This project is inspired by goimpl.nvim.
- olexsmir/gopher.nvim - Supports non-generic interfaces but requires manual input for arguments.
- fatih/vim-go - A comprehensive Go development plugin for Vim.
- rhysd/vim-go-impl -
Wraps the
impl
command in Vim, and also needs manual input for arguments.
MIT