Skip to content

Commit

Permalink
docs(README): change lua code block style (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioJCosta authored Oct 18, 2022
1 parent adc99b8 commit afb87c6
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,32 @@ Using packer:

```lua
use({
'nvim-neotest/neotest',
"nvim-neotest/neotest",
requires = {
...,
'nvim-neotest/neotest-go',
}
"nvim-neotest/neotest-go",
-- Your other test adapters here
},
config = function()
-- get neotest namespace (api call creates or returns namespace)
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+", "")
local message =
diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
return message
end,
},
}, neotest_ns)
require('neotest').setup({
...,
require("neotest").setup({
-- your neotest config here
adapters = {
require('neotest-go'),
}
require("neotest-go"),
},
})
end
end,
})

```

The above mentioned `vim.diagnostic.config` is optional but recommended if you
Expand Down

0 comments on commit afb87c6

Please sign in to comment.