Comments (9)
Hmm I think the best way would be instead to add enabled_filetypes
for neotest-vim-test so everything is disabled by default
from neotest.
I've added the jump consumer so have a look at :h neotest.jump
😄
Also I've added an options
key to the floating windows opts so you can provide the following to setup table
floating = {
options = {
winblend = 50
},
},
from neotest.
Thanks so much for the quick additions! Also, just wondering if there is a better way of defining adapters (especially for the ignore_file_types of vim-test). I understand that it may not be so easy to expose the filetypes from each adapter due to is_test_file
.
local adapter_config = {
go = {
filetypes = { "go" },
},
jest = {
filetypes = { "javascript", "typescript", "javascriptreact", "typescriptreact", "coffee" },
},
python = {
filetypes = { "python" },
},
plenary = {
filetypes = { "lua" },
},
}
local adapters = {}
local adapter_filetypes = {}
for adapter, opts in pairs(adapter_config) do
local ok, neotest_adapter = pcall(require, "neotest-" .. adapter)
if ok then
table.insert(adapters, neotest_adapter(opts))
vim.list_extend(adapter_filetypes, opts.filetypes)
end
end
table.insert(adapters, require("neotest-vim-test")({ ignore_file_types = adapter_filetypes }))
require("neotest").setup({
adapters = adapters,
-- floating = { options = { winblend = 80 } },
})
from neotest.
OK I've added an allow_file_types
option to neotest-vim-test
from neotest.
o.0 how would I adapt the config above to use that option?
from neotest.
So just set allow_file_types
to be a list of filetypes that you do want to use vim-test for, and it'll ignore everything else
from neotest.
Hmm my use case is to find a way to automatically ignore filetypes for adapters that have been registered in the setup function (such as neotest-go automatically prioritising itself over vim-test, neotest-python automatically prioritising itself over vim-test etc.)
from neotest.
I'm not sure why you need the safety check of if adapters are installed but that is a very unique case that won't be covered by neotest. You'll have to do it manually as have above if you want to go that route
from neotest.
Oh my intention was just to prevent conflicts between the newer adapters and the default ones provided by vim-test. Sorry for any potential misunderstandings.
from neotest.
Related Issues (20)
- [BUG] NerdFonts `v3` broke the `mdi-test-tube` icon for neotest in nvim-notify HOT 4
- Crash possibly related to neotest when using it with Rust inside a workspace
- [BUG] lua/neotest-dotnet/strategies/netcoredbg.lua:62: attempt to index field 'dap' (a nil value) HOT 2
- [BUG] neotest adds 3 seconds of startup time to neovim
- [BUG] Rust debugging issue
- [BUG] Watcher fails to find the lsp client after update to latest neotest with nio HOT 4
- [BUG] language name error when running any type of python test HOT 1
- [BUG] Cannot run nearest test or all tests from file HOT 6
- [BUG] Doing `gF` inside `neotest-output` floating window opens the file in same float
- [BUG] nested_tests causes test output from stdout/stderr to be printed undesirably
- [BUG] Files containing no tests shouldn't show up in summary
- [BUG] subprocess fails on non-default environments HOT 1
- Passing additional test arguments to runner HOT 1
- Feature Request: Set Notification Levels
- [BUG] Getting error "Future already set" and output_panel is empty for python tests HOT 7
- [Feature Request] Boost.Test supporting HOT 2
- Deprecation warnings on neovim 0.11
- [BUG] Summary opens, but no help HOT 2
- Graciously handling DAP failure on multistep (build then run) languages HOT 1
- [doc] Replace README recommendation of neodev with lazydev
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neotest.