Skip to content

Commit ee40a0e

Browse files
committed
Merge 'upstream' 5 changes from 2024-10-30
* Remove two because there are more than two. * Set breakpoint icons and their highlight colors * Change diagnostic symbols if vim.g.have_nerd_font is true * fix: lazy help tag on line 931 * Disable linting autocmd for readonly buffers
2 parents c0a254f + 2ba39c6 commit ee40a0e

4 files changed

Lines changed: 33 additions & 3 deletions

File tree

lua/kickstart/plugins/debug.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@ return {
8989
},
9090
}
9191

92+
-- Change breakpoint icons
93+
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
94+
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
95+
-- local breakpoint_icons = vim.g.have_nerd_font
96+
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
97+
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
98+
-- for type, icon in pairs(breakpoint_icons) do
99+
-- local tp = 'Dap' .. type
100+
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
101+
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
102+
-- end
103+
92104
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
93105
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
94106
dap.listeners.before.event_exited['dapui_config'] = dapui.close

lua/kickstart/plugins/lint.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ return {
4747
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
4848
group = lint_augroup,
4949
callback = function()
50-
lint.try_lint()
50+
-- Only run the linter in buffers that you can modify in order to
51+
-- avoid superfluous noise, notably within the handy LSP pop-ups that
52+
-- describe the hovered symbol using Markdown.
53+
if vim.opt_local.modifiable:get() then
54+
lint.try_lint()
55+
end
5156
end,
5257
})
5358
end,

lua/kickstart/plugins/lspconfig.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ return {
150150
end,
151151
})
152152

153+
-- Change diagnostic symbols in the sign column (gutter)
154+
-- if vim.g.have_nerd_font then
155+
-- local signs = { Error = '', Warn = '', Hint = '', Info = '' }
156+
-- for type, icon in pairs(signs) do
157+
-- local hl = 'DiagnosticSign' .. type
158+
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
159+
-- end
160+
-- end
161+
153162
-- LSP servers and clients are able to communicate to each other what features they support.
154163
-- By default, Neovim doesn't support everything that is in the LSP specification.
155164
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.

lua/lazy-plugins.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ require('lazy').setup({
4444

4545
require 'kickstart/plugins/treesitter',
4646

47-
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
47+
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
4848
-- init.lua. If you want these files, they are in the repository, so you can just download them and
4949
-- place them in the correct locations.
5050

@@ -63,8 +63,12 @@ require('lazy').setup({
6363
-- This is the easiest way to modularize your config.
6464
--
6565
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
66-
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
6766
-- { import = 'custom.plugins' },
67+
--
68+
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
69+
-- Or use telescope!
70+
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
71+
-- you can continue same window with `<space>sr` which resumes last telescope search
6872
}, {
6973
ui = {
7074
-- If you are using a Nerd Font: set icons to an empty table which will use the

0 commit comments

Comments
 (0)