health check for treesitter-go parser issue#86

pull/93/head
ray-x 2 years ago
parent c622c27bf8
commit 3e905d07ac

@ -28,7 +28,8 @@ The plugin covers most features required for a gopher.
## Installation
Use your favorite package manager to install. The dependency `treesitter` (and optionally, treesitter-objects)
will be installed the first time you use it.
should be installed the first time you use it.
Also Run `TSInstall go` to install the go parser if not installed yet.
### [vim-plug](https://github.com/junegunn/vim-plug)

@ -45,15 +45,28 @@ local function plugin_check()
"telescope",
}
local any_warn = false
local ts_installed = false
for _, plugin in ipairs(plugins) do
local pi = util.load_plugin(plugin)
if pi ~= nil then
ok(string.format("%s: plugin is installed", plugin))
if plugin == "nvim-treesitter" then
ts_installed = true
end
else
any_warn = true
warn(string.format("%s: not installed/loaded", plugin))
end
end
if ts_installed then
local info = require("nvim-treesitter.info").installed_parsers()
if vim.tbl_contains(info, "go") then
ok("nvim-treesitter-go is installed")
else
warn("nvim-treesitter-go is not installed, Please run TSInstall go to install")
any_warn = true
end
end
plugins = {
["nvim-dap"] = "dap",
["nvim-dap-ui"] = "dapui",

Loading…
Cancel
Save