mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-06-24 14:18:36 +02:00
add vim-fugitive
This commit is contained in:
parent
5636d0e913
commit
044d74b814
10 changed files with 392 additions and 16 deletions
28
lua/custom/plugins/neotest-java.lua
Normal file
28
lua/custom/plugins/neotest-java.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
{
|
||||
'rcasia/neotest-java',
|
||||
ft = 'java',
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-jdtls',
|
||||
'mfussenegger/nvim-dap', -- for the debugger
|
||||
'rcarriga/nvim-dap-ui', -- recommended
|
||||
'theHamsta/nvim-dap-virtual-text', -- recommended
|
||||
},
|
||||
},
|
||||
{
|
||||
'nvim-neotest/neotest',
|
||||
dependencies = {
|
||||
'rcasia/neotest-java',
|
||||
'nvim-neotest/nvim-nio',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
},
|
||||
init = function()
|
||||
require('neotest').setup {
|
||||
adapters = {
|
||||
require 'neotest-java' {},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
143
lua/custom/plugins/nvim-dap-ui.lua
Normal file
143
lua/custom/plugins/nvim-dap-ui.lua
Normal file
|
@ -0,0 +1,143 @@
|
|||
-- Debugging Support
|
||||
return {
|
||||
-- https://github.com/rcarriga/nvim-dap-ui
|
||||
'rcarriga/nvim-dap-ui',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
-- https://github.com/mfussenegger/nvim-dap
|
||||
'mfussenegger/nvim-dap',
|
||||
-- https://github.com/nvim-neotest/nvim-nio
|
||||
'nvim-neotest/nvim-nio',
|
||||
-- https://github.com/theHamsta/nvim-dap-virtual-text
|
||||
'theHamsta/nvim-dap-virtual-text', -- inline variable text while debugging
|
||||
-- https://github.com/nvim-telescope/telescope-dap.nvim
|
||||
'nvim-telescope/telescope-dap.nvim', -- telescope integration with dap
|
||||
},
|
||||
opts = {
|
||||
controls = {
|
||||
element = 'repl',
|
||||
enabled = false,
|
||||
icons = {
|
||||
disconnect = '',
|
||||
pause = '',
|
||||
play = '',
|
||||
run_last = '',
|
||||
step_back = '',
|
||||
step_into = '',
|
||||
step_out = '',
|
||||
step_over = '',
|
||||
terminate = '',
|
||||
},
|
||||
},
|
||||
element_mappings = {},
|
||||
expand_lines = true,
|
||||
floating = {
|
||||
border = 'single',
|
||||
mappings = {
|
||||
close = { 'q', '<Esc>' },
|
||||
},
|
||||
},
|
||||
force_buffers = true,
|
||||
icons = {
|
||||
collapsed = '',
|
||||
current_frame = '',
|
||||
expanded = '',
|
||||
},
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{
|
||||
id = 'scopes',
|
||||
size = 0.50,
|
||||
},
|
||||
{
|
||||
id = 'stacks',
|
||||
size = 0.30,
|
||||
},
|
||||
{
|
||||
id = 'watches',
|
||||
size = 0.10,
|
||||
},
|
||||
{
|
||||
id = 'breakpoints',
|
||||
size = 0.10,
|
||||
},
|
||||
},
|
||||
size = 40,
|
||||
position = 'left', -- Can be "left" or "right"
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
'repl',
|
||||
'console',
|
||||
},
|
||||
size = 10,
|
||||
position = 'bottom', -- Can be "bottom" or "top"
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
edit = 'e',
|
||||
expand = { '<CR>', '<2-LeftMouse>' },
|
||||
open = 'o',
|
||||
remove = 'd',
|
||||
repl = 'r',
|
||||
toggle = 't',
|
||||
},
|
||||
render = {
|
||||
indent = 1,
|
||||
max_value_lines = 100,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local dap = require 'dap'
|
||||
require('dapui').setup(opts)
|
||||
|
||||
-- Customize breakpoint signs
|
||||
vim.api.nvim_set_hl(0, 'DapStoppedHl', { fg = '#98BB6C', bg = '#2A2A2A', bold = true })
|
||||
vim.api.nvim_set_hl(0, 'DapStoppedLineHl', { bg = '#204028', bold = true })
|
||||
vim.fn.sign_define('DapStopped', { text = '', texthl = 'DapStoppedHl', linehl = 'DapStoppedLineHl', numhl = '' })
|
||||
vim.fn.sign_define('DapBreakpoint', { text = '', texthl = 'DiagnosticSignError', linehl = '', numhl = '' })
|
||||
vim.fn.sign_define('DapBreakpointCondition', { text = '', texthl = 'DiagnosticSignWarn', linehl = '', numhl = '' })
|
||||
vim.fn.sign_define('DapBreakpointRejected', { text = '', texthl = 'DiagnosticSignError', linehl = '', numhl = '' })
|
||||
vim.fn.sign_define('DapLogPoint', { text = '', texthl = 'DiagnosticSignInfo', linehl = '', numhl = '' })
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = function()
|
||||
require('dapui').open()
|
||||
end
|
||||
|
||||
dap.listeners.before.event_terminated['dapui_config'] = function()
|
||||
-- Commented to prevent DAP UI from closing when unit tests finish
|
||||
-- require('dapui').close()
|
||||
end
|
||||
|
||||
dap.listeners.before.event_exited['dapui_config'] = function()
|
||||
-- Commented to prevent DAP UI from closing when unit tests finish
|
||||
-- require('dapui').close()
|
||||
end
|
||||
|
||||
-- Add dap configurations based on your language/adapter settings
|
||||
-- https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation
|
||||
dap.configurations.java = {
|
||||
{
|
||||
name = 'Debug Launch (2GB)',
|
||||
type = 'java',
|
||||
request = 'launch',
|
||||
vmArgs = '' .. '-Xmx2g ',
|
||||
},
|
||||
{
|
||||
name = 'Debug Attach (8000)',
|
||||
type = 'java',
|
||||
request = 'attach',
|
||||
hostName = '127.0.0.1',
|
||||
port = 8000,
|
||||
},
|
||||
{
|
||||
name = 'Debug Attach (5005)',
|
||||
type = 'java',
|
||||
request = 'attach',
|
||||
hostName = '127.0.0.1',
|
||||
port = 5005,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
17
lua/custom/plugins/nvim-dap-virtual-text.lua
Normal file
17
lua/custom/plugins/nvim-dap-virtual-text.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
-- https://github.com/theHamsta/nvim-dap-virtual-text
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
lazy = true,
|
||||
opts = {
|
||||
-- Display debug text as a comment
|
||||
commented = true,
|
||||
-- Customize virtual text
|
||||
display_callback = function(variable, buf, stackframe, node, options)
|
||||
if options.virt_text_pos == 'inline' then
|
||||
return ' = ' .. variable.value
|
||||
else
|
||||
return variable.name .. ' = ' .. variable.value
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
4
lua/custom/plugins/nvim-jdtls.lua
Normal file
4
lua/custom/plugins/nvim-jdtls.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
'mfussenegger/nvim-jdtls',
|
||||
ft = 'java',
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'pmizio/typescript-tools.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
||||
opts = {},
|
||||
},
|
||||
-- {
|
||||
-- 'pmizio/typescript-tools.nvim',
|
||||
-- dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
||||
-- opts = {},
|
||||
-- },
|
||||
}
|
||||
|
|
5
lua/custom/plugins/vim-fugitive.lua
Normal file
5
lua/custom/plugins/vim-fugitive.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{
|
||||
'tpope/vim-fugitive',
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue