Skip to content

Commit aee3541

Browse files
committed
Merge branch 'master' into codemedic-customisations
* master: fix(gitsigns): make visual mode descriptions consistent with normal mode (nvim-lua#1266) Issue 1249 which key comments (nvim-lua#1263) Use consistent syntax style for { ... } "pseudocode" (nvim-lua#1247) Tweak outdated comment about lazy's `config` key usage. (nvim-lua#1250) fix: which-key comment typo (nvim-lua#1227) Fix nvim-dap not lazy loading (nvim-lua#1216) feat: Change to prepare for upcoming deprecation of configuring diagnostic-signs using sign_define() (nvim-lua#1232)
2 parents 3de526d + de44f49 commit aee3541

File tree

3 files changed

+64
-33
lines changed

3 files changed

+64
-33
lines changed

init.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,8 @@ require('lazy').setup({
278278
-- which loads which-key before all the UI elements are loaded. Events can be
279279
-- normal autocommands events (`:help autocmd-events`).
280280
--
281-
-- Then, because we use the `config` key, the configuration only runs
282-
-- after the plugin has been loaded:
283-
-- config = function() ... end
281+
-- Then, because we use the `opts` key (recommended), the configuration runs
282+
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
284283

285284
{ -- Useful plugin to show you pending keybinds.
286285
'folke/which-key.nvim',
@@ -290,7 +289,7 @@ require('lazy').setup({
290289
-- set icon mappings to true if you have a Nerd Font
291290
mappings = vim.g.have_nerd_font,
292291
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
293-
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
292+
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
294293
keys = vim.g.have_nerd_font and {} or {
295294
Up = '<Up> ',
296295
Down = '<Down> ',
@@ -606,11 +605,12 @@ require('lazy').setup({
606605

607606
-- Change diagnostic symbols in the sign column (gutter)
608607
-- if vim.g.have_nerd_font then
609-
-- local signs = { Error = '', Warn = '', Hint = '', Info = '' }
608+
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
609+
-- local diagnostic_signs = {}
610610
-- for type, icon in pairs(signs) do
611-
-- local hl = 'DiagnosticSign' .. type
612-
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
611+
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
613612
-- end
613+
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
614614
-- end
615615

616616
-- LSP servers and clients are able to communicate to each other what features they support.
@@ -658,8 +658,8 @@ require('lazy').setup({
658658
},
659659

660660
lua_ls = {
661-
-- cmd = {...},
662-
-- filetypes = { ...},
661+
-- cmd = { ... },
662+
-- filetypes = { ... },
663663
-- capabilities = {},
664664
settings = {
665665
Lua = {

lua/kickstart/plugins/debug.lua

Lines changed: 53 additions & 22 deletions
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/gitsigns.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ return {
3636
-- visual mode
3737
map('v', '<leader>hs', function()
3838
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
39-
end, { desc = 'stage git hunk' })
39+
end, { desc = 'git [s]tage hunk' })
4040
map('v', '<leader>hr', function()
4141
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
42-
end, { desc = 'reset git hunk' })
42+
end, { desc = 'git [r]eset hunk' })
4343
-- normal mode
4444
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
4545
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })

0 commit comments

Comments
 (0)