all repos

gopher.nvim @ ea28fc4e6fd9edd4556b3431199c6112cfdb9c65

Minimalistic plugin for Go development
3 files changed, 3 insertions(+), 28 deletions(-)
chore: remove nvim-treesitter from dependencies (#107)

* refactor(health): remove treesitter from required plugins

* chore: remove nvim-treesitter from dependencies

* chore(health): update messages
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed by: GitHub noreply@github.com
Committed at: 2025-03-27 23:18:27 +0200
Parent: 847c79a
M README.md

@@ -13,7 +13,7 @@

Requirements: - **Neovim 0.10** or later -- Treesitter `go` parser(`:TSInstall go`) +- Treesitter `go` parser(`:TSInstall go` if you use [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)) - [Go](https://github.com/golang/go) installed (tested on 1.23) ```lua

@@ -21,9 +21,6 @@ {

"olexsmir/gopher.nvim", ft = "go", -- branch = "develop" - dependencies = { - "nvim-treesitter/nvim-treesitter", - }, -- (optional) will update plugin's deps on every update build = function() vim.cmd.GoInstallDeps()
M lua/gopher/health.lua

@@ -2,13 +2,10 @@ local health = {}

local cmd = require("gopher.config").commands local deps = { - plugin = { - { lib = "nvim-treesitter", msg = "required for everything in gopher.nvim" }, - }, bin = { { bin = cmd.go, - msg = "required for `:GoGet`, `:GoMod`, `:GoGenerate`, `:GoWork`, `:GoInstallDeps`", + msg = "required for `:GoGet`, `:GoMod`, `:GoGenerate`, `:GoWork`, `:GoInstallDeps`, `:GoInstallDepsSync`", optional = false, }, { bin = cmd.gomodifytags, msg = "required for `:GoTagAdd`, `:GoTagRm`", optional = true },

@@ -21,17 +18,10 @@ optional = true,

}, }, treesitter = { - { parser = "go", msg = "required for `gopher.nvim`" }, + { parser = "go", msg = "required for most of the parts of `gopher.nvim`" }, }, } ----@param module string ----@return boolean -local function is_lualib_found(module) - local is_found, _ = pcall(require, module) - return is_found -end - ---@param bin string ---@return boolean local function is_binary_found(bin)

@@ -46,15 +36,6 @@ return ok and parser ~= nil

end function health.check() - vim.health.start "required plugins" - for _, plugin in ipairs(deps.plugin) do - if is_lualib_found(plugin.lib) then - vim.health.ok(plugin.lib .. " installed") - else - vim.health.error(plugin.lib .. " not found, " .. plugin.msg) - end - end - vim.health.start "required binaries" vim.health.info "all those binaries can be installed by `:GoInstallDeps`" for _, bin in ipairs(deps.bin) do
M pkg.json

@@ -6,8 +6,5 @@ },

"repository": { "type": "git", "url": "https://github.com/olexsmir/gopher.nvim" - }, - "dependencies": { - "https://github.com/nvim-treesitter/nvim-treesitter": "*" } }