feat: add testing and debugging
This commit is contained in:
parent
b602bc5ebd
commit
ad58a317b4
@ -1,5 +1,6 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "31b6951c53a59bccfa91bf3984ed1510a940c836" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
@ -20,9 +21,13 @@
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "bc0c609e3568a171e0549b449aa1b2b4b5b20e8c" },
|
||||
"neotest": { "branch": "master", "commit": "6d6ad113f56edc7c3f2a77a0836ea8c1b955ebea" },
|
||||
"neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-coverage": { "branch": "main", "commit": "aa4b4400588e2259e87e372b1e4e90ae13cf5a39" },
|
||||
"nvim-dap": { "branch": "master", "commit": "20a4859ebde1c9bc8e96f8cc11a20667e7fdd516" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||
"nvim-test": { "branch": "main", "commit": "e06f3d029ee161f3ead6193cf27354d1eb8723c3" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "00f128dd73086aa578dc3d9142de06c633b7c685" },
|
||||
|
||||
@ -5,6 +5,7 @@ lspconfig.ts_ls.setup {}
|
||||
lspconfig.eslint.setup {}
|
||||
lspconfig.angularls.setup {}
|
||||
lspconfig.ccls.setup {}
|
||||
lspconfig.nixd.setup{}
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
||||
21
lua/plugins/debug.lua
Normal file
21
lua/plugins/debug.lua
Normal file
@ -0,0 +1,21 @@
|
||||
return {
|
||||
{
|
||||
'mfussenegger/nvim-dap',
|
||||
keys = {
|
||||
{ '<F5>', require 'dap'.continue, desc = 'Continue debugging' },
|
||||
{ '<F10>', require 'dap'.step_over, desc = 'Step over statement' },
|
||||
{ '<F11>', require 'dap'.step_into, desc = 'Step into statement' },
|
||||
{ '<F12>', require 'dap'.step_out, desc = 'Step out' },
|
||||
{ '<leader>b', require 'dap'.toggle_breakpoint, desc = 'Toggle breakpoint' },
|
||||
{
|
||||
'<leader>B',
|
||||
function()
|
||||
vim.ui.input({ prompt = 'Breakpoint condition: ' }, function(input)
|
||||
require 'dap'.set_breakpoint(input)
|
||||
end)
|
||||
end
|
||||
}
|
||||
},
|
||||
lazy = true
|
||||
}
|
||||
}
|
||||
29
lua/plugins/test.lua
Normal file
29
lua/plugins/test.lua
Normal file
@ -0,0 +1,29 @@
|
||||
return {
|
||||
{
|
||||
'nvim-neotest/neotest',
|
||||
config = function ()
|
||||
require('neotest').setup({
|
||||
adapters = {
|
||||
require('neotest-jest')({
|
||||
jestCommand = "npm test --",
|
||||
jestConfigFile = "custom.jest.config.ts",
|
||||
cwd = function(path)
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
}),
|
||||
}
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-neotest/nvim-nio',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'antoinemadec/FixCursorHold.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'nvim-neotest/neotest-jest'
|
||||
}
|
||||
},
|
||||
{
|
||||
'andythigpen/nvim-coverage',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user