GithubHelp home page GithubHelp logo

Comments (10)

nshen avatar nshen commented on August 10, 2024 3

no virtual text display

image

from neotest-go.

akinsho avatar akinsho commented on August 10, 2024

@Davincible have you added

    diagnostic = {
      enabled = true,
    },

To your neotest config?

from neotest-go.

Davincible avatar Davincible commented on August 10, 2024

Yup.

Config:

local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
	virtual_text = {
		format = function(diagnostic)
			local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
			return message
		end,
	},
}, neotest_ns)

local neotest = require("neotest")

neotest.setup({
	diagnostic = {
		enabled = true,
	},
	status = {
		virtual_text = true,
		signs = true,
	},
	strategies = {
		integrated = {
			width = 180,
		},
	},
	icons = {
		running_animated = {
			"",
			"🞅",
			"🞈",
			"🞉",
			"",
			"",
			"🞉",
			"🞈",
			"🞅",
			"",
		},
	},
	adapters = {
		require("neotest-go")({
			args = { "-count=1", "-timeout=60s", "-race", "-cover" },
		}),
		require("neotest-python")({
			dap = { justMyCode = false, console = "integratedTerminal" },
		}),
	},
})

from neotest-go.

akinsho avatar akinsho commented on August 10, 2024

I'm able to see virtual text but to be clear it only appears when a test has been run and has failed, otherwise there will be no virtual text. It isn't really controlled here, but in neotest itself. Are you able to see virtual text with any adapters? If not, this is likely a config issue but at worst an issue there rather than here since this plugin doesn't do any logic to enable or disable the virtual text.

from neotest-go.

Davincible avatar Davincible commented on August 10, 2024

I do see virtual text, but only icons. Could you make a screenshot with how it looks for you?

image

Some code to test;

func TestSuite(t *testing.T) {
	t.Run("TestOne", testOne)
	t.Run("TestTwo", func(t *testing.T) {})
	t.Run("TestThree", func(t *testing.T) {})
}

func testOne(t *testing.T) {
	t.Fatal("Yiiikes")
}

from neotest-go.

akinsho avatar akinsho commented on August 10, 2024

image

The message is quite long, so you can't see much of it, but the red text is the message of the full thing 🤷🏿‍♂️. Maybe try a more minimal configuration. Anyway, I'll leave further debugging to you +/- anyone else who wants to pitch in.

from neotest-go.

Davincible avatar Davincible commented on August 10, 2024

Hm strange. Thanks

from neotest-go.

Davincible avatar Davincible commented on August 10, 2024

Side note; I do see them with python, which I why I asked here

image

from neotest-go.

franroa avatar franroa commented on August 10, 2024

I have the same issue over here, I can only see icons. Could it be the golang version? I am using the 1.20.4. Neovim version: 0.9 2.1.0-beta3

from neotest-go.

Thevetat avatar Thevetat commented on August 10, 2024

Likewise only seeing icons.

image

from neotest-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.