Skip to content

Commit 46093fe

Browse files
committed
Merge 'upstream': diagnostic-signs, nvim-dap lazy, which-key typo
- fix: which-key comment typo - Fix nvim-dap not lazy loading - feat: Change to prepare for upcoming deprecation of configuring diagnostic-signs using sign_define()
2 parents ee40a0e + 8d1ef97 commit 46093fe

File tree

3 files changed

+58
-26
lines changed

3 files changed

+58
-26
lines changed

lua/kickstart/plugins/debug.lua

+53-22
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,59 @@ return {
2424
-- Add your own debuggers here
2525
'leoluz/nvim-dap-go',
2626
},
27-
keys = function(_, keys)
28-
local dap = require 'dap'
29-
local dapui = require 'dapui'
30-
return {
31-
-- Basic debugging keymaps, feel free to change to your liking!
32-
{ '<F5>', dap.continue, desc = 'Debug: Start/Continue' },
33-
{ '<F1>', dap.step_into, desc = 'Debug: Step Into' },
34-
{ '<F2>', dap.step_over, desc = 'Debug: Step Over' },
35-
{ '<F3>', dap.step_out, desc = 'Debug: Step Out' },
36-
{ '<leader>b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' },
37-
{
38-
'<leader>B',
39-
function()
40-
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
41-
end,
42-
desc = 'Debug: Set Breakpoint',
43-
},
44-
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
45-
{ '<F7>', dapui.toggle, desc = 'Debug: See last session result.' },
46-
unpack(keys),
47-
}
48-
end,
27+
keys = {
28+
-- Basic debugging keymaps, feel free to change to your liking!
29+
{
30+
'<F5>',
31+
function()
32+
require('dap').continue()
33+
end,
34+
desc = 'Debug: Start/Continue',
35+
},
36+
{
37+
'<F1>',
38+
function()
39+
require('dap').step_into()
40+
end,
41+
desc = 'Debug: Step Into',
42+
},
43+
{
44+
'<F2>',
45+
function()
46+
require('dap').step_over()
47+
end,
48+
desc = 'Debug: Step Over',
49+
},
50+
{
51+
'<F3>',
52+
function()
53+
require('dap').step_out()
54+
end,
55+
desc = 'Debug: Step Out',
56+
},
57+
{
58+
'<leader>b',
59+
function()
60+
require('dap').toggle_breakpoint()
61+
end,
62+
desc = 'Debug: Toggle Breakpoint',
63+
},
64+
{
65+
'<leader>B',
66+
function()
67+
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
68+
end,
69+
desc = 'Debug: Set Breakpoint',
70+
},
71+
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
72+
{
73+
'<F7>',
74+
function()
75+
require('dapui').toggle()
76+
end,
77+
desc = 'Debug: See last session result.',
78+
},
79+
},
4980
config = function()
5081
local dap = require 'dap'
5182
local dapui = require 'dapui'

lua/kickstart/plugins/lspconfig.lua

+4-3
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ return {
152152

153153
-- Change diagnostic symbols in the sign column (gutter)
154154
-- if vim.g.have_nerd_font then
155-
-- local signs = { Error = '', Warn = '', Hint = '', Info = '' }
155+
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
156+
-- local diagnostic_signs = {}
156157
-- for type, icon in pairs(signs) do
157-
-- local hl = 'DiagnosticSign' .. type
158-
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
158+
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
159159
-- end
160+
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
160161
-- end
161162

162163
-- LSP servers and clients are able to communicate to each other what features they support.

lua/kickstart/plugins/which-key.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ return {
2222
-- set icon mappings to true if you have a Nerd Font
2323
mappings = vim.g.have_nerd_font,
2424
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
25-
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
25+
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
2626
keys = vim.g.have_nerd_font and {} or {
2727
Up = '<Up> ',
2828
Down = '<Down> ',

0 commit comments

Comments
 (0)