[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang
1--- *gopher.nvim* Enhance your golang experience 2--- 3--- MIT License Copyright (c) 2025 Oleksandr Smirnov 4--- 5--- ============================================================================== 6--- 7--- gopher.nvim is a minimalistic plugin for Go development in Neovim written in Lua. 8--- It's not an LSP tool, the main goal of this plugin is add go tooling support in Neovim. 9--- 10--- Table of Contents 11---@toc 12 13local log = require "gopher._utils.log" 14local tags = require "gopher.struct_tags" 15local tests = require "gopher.gotests" 16local go = require "gopher.go" 17local gopher = {} 18 19---@toc_entry Setup 20---@tag gopher.nvim-setup() 21---@text Setup function. This method simply merges default config with opts table. 22--- You can read more about configuration at |gopher.nvim-config| 23--- Calling this function is optional, if you ok with default settings. 24--- See |gopher.nvim.config| 25--- 26---@usage >lua 27--- require("gopher").setup {} -- use default config or replace {} with your own 28--- < 29---@param user_config gopher.Config See |gopher.nvim-config| 30gopher.setup = function(user_config) 31 log.debug "setting up config" 32 require("gopher.config").setup(user_config) 33 log.debug(vim.inspect(user_config)) 34end 35 36---@toc_entry Install dependencies 37---@tag gopher.nvim-dependencies 38---@text 39--- Gopher.nvim implements most of its features using third-party tools. To 40--- install plugin's dependencies, you can run: 41--- `:GoInstallDeps` or `:GoInstallDepsSync` 42--- or use `require("gopher").install_deps()` if you prefer lua api. 43gopher.install_deps = require("gopher.installer").install_deps 44 45gopher.impl = require("gopher.impl").impl 46gopher.iferr = require("gopher.iferr").iferr 47gopher.comment = require("gopher.comment").comment 48 49gopher.tags = { 50 add = tags.add, 51 rm = tags.remove, 52 clear = tags.clear, 53} 54 55gopher.test = { 56 add = tests.func_test, 57 exported = tests.all_exported_tests, 58 all = tests.all_tests, 59} 60 61gopher.get = go.get 62gopher.mod = go.mod 63gopher.work = go.work 64gopher.generate = go.generate 65 66return gopher