Skip to content

Commit e0b2b09

Browse files
committed
update minimal.lua
1 parent 68e4611 commit e0b2b09

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lua/tests/go_comment_spec.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ local eq = assert.are.same
33
local busted = require('plenary/busted')
44
local cur_dir = vim.fn.expand('%:p:h')
55
describe('should get nodes ', function()
6+
local queries = require('nvim-treesitter.config').get_installed('queries')
7+
if not vim.tbl_contains(queries, 'go') then
8+
error('No queries for go found')
9+
end
10+
611
_GO_NVIM_CFG.verbose = true
712
_GO_NVIM_CFG.comment_placeholder = ''
8-
913
local status = require('plenary.reload').reload_module('go.nvim')
1014
status = require('plenary.reload').reload_module('nvim-treesitter/nvim-treesitter')
1115

lua/tests/minimal.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ vim.api.nvim_create_autocmd('FileType', {
4646
local ok, parser = pcall(vim.treesitter.get_parser, 0, 'go')
4747
if not ok then
4848
-- Check what parsers are actually installed
49-
local install_info = require('nvim-treesitter.info')
50-
local installed = install_info.installed_parsers()
51-
print('Installed parsers: ' .. vim.inspect(installed))
49+
print('Failed to get go parser')
5250
error('No parser for go found')
5351
end
5452
end,

0 commit comments

Comments
 (0)