Skip to content

Commit bc41bd5

Browse files
committed
Merge branch 'up'
2 parents 9627164 + 8d1ef97 commit bc41bd5

File tree

4 files changed

+87
-29
lines changed

4 files changed

+87
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ examples of adding popularly requested plugins.
130130
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
131131
distribution that you would like to try out.
132132
* What if I want to "uninstall" this configuration:
133-
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
133+
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
134134
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
135135
* The main purpose of kickstart is to serve as a teaching tool and a reference
136136
configuration that someone can easily use to `git clone` as a basis for their own.

init.lua

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ require('lazy').setup({
279279
-- set icon mappings to true if you have a Nerd Font
280280
mappings = vim.g.have_nerd_font,
281281
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
282-
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
282+
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
283283
keys = vim.g.have_nerd_font and {} or {
284284
Up = '<Up> ',
285285
Down = '<Down> ',
@@ -588,6 +588,16 @@ require('lazy').setup({
588588
end,
589589
})
590590

591+
-- Change diagnostic symbols in the sign column (gutter)
592+
-- if vim.g.have_nerd_font then
593+
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
594+
-- local diagnostic_signs = {}
595+
-- for type, icon in pairs(signs) do
596+
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
597+
-- end
598+
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
599+
-- end
600+
591601
-- LSP servers and clients are able to communicate to each other what features they support.
592602
-- By default, Neovim doesn't support everything that is in the LSP specification.
593603
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
@@ -614,8 +624,8 @@ require('lazy').setup({
614624
-- Some languages (like typescript) have entire language plugins that can be useful:
615625
-- https://github.com/pmizio/typescript-tools.nvim
616626
--
617-
-- But for many setups, the LSP (`tsserver`) will work just fine
618-
-- tsserver = {},
627+
-- But for many setups, the LSP (`ts_ls`) will work just fine
628+
-- ts_ls = {},
619629
--
620630

621631
lua_ls = {
@@ -656,7 +666,7 @@ require('lazy').setup({
656666
local server = servers[server_name] or {}
657667
-- This handles overriding only values explicitly passed
658668
-- by the server configuration above. Useful when disabling
659-
-- certain features of an LSP (for example, turning off formatting for tsserver)
669+
-- certain features of an LSP (for example, turning off formatting for ts_ls)
660670
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
661671
require('lspconfig')[server_name].setup(server)
662672
end,
@@ -908,7 +918,7 @@ require('lazy').setup({
908918
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
909919
},
910920

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

lua/kickstart/plugins/debug.lua

Lines changed: 65 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'
@@ -89,6 +120,18 @@ return {
89120
},
90121
}
91122

123+
-- Change breakpoint icons
124+
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
125+
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
126+
-- local breakpoint_icons = vim.g.have_nerd_font
127+
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
128+
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
129+
-- for type, icon in pairs(breakpoint_icons) do
130+
-- local tp = 'Dap' .. type
131+
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
132+
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
133+
-- end
134+
92135
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
93136
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
94137
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,

0 commit comments

Comments
 (0)