Skip to content

Commit 2f0c3d4

Browse files
committed
added <leader>pv
1 parent 7201dc4 commit 2f0c3d4

File tree

4 files changed

+35
-13
lines changed

4 files changed

+35
-13
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: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ P.S. You can delete this when you're done too. It's your config now! :)
8989
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
9090
vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
92-
9392
-- Set to true if you have a Nerd Font installed and selected in the terminal
9493
vim.g.have_nerd_font = false
9594

@@ -163,18 +162,11 @@ vim.opt.scrolloff = 10
163162
-- Clear highlights on search when pressing <Esc> in normal mode
164163
-- See `:help hlsearch`
165164
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
165+
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex)
166166

167167
-- Diagnostic keymaps
168168
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
169169

170-
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
171-
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
172-
-- is not what someone will guess without a bit more experience.
173-
--
174-
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
175-
-- or just use <C-\><C-n> to exit terminal mode
176-
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
177-
178170
-- TIP: Disable arrow keys in normal mode
179171
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
180172
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
@@ -588,6 +580,15 @@ require('lazy').setup({
588580
end,
589581
})
590582

583+
-- Change diagnostic symbols in the sign column (gutter)
584+
-- if vim.g.have_nerd_font then
585+
-- local signs = { Error = '', Warn = '', Hint = '', Info = '' }
586+
-- for type, icon in pairs(signs) do
587+
-- local hl = 'DiagnosticSign' .. type
588+
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
589+
-- end
590+
-- end
591+
591592
-- LSP servers and clients are able to communicate to each other what features they support.
592593
-- By default, Neovim doesn't support everything that is in the LSP specification.
593594
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
@@ -908,7 +909,7 @@ require('lazy').setup({
908909
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
909910
},
910911

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

@@ -928,8 +929,12 @@ require('lazy').setup({
928929
-- This is the easiest way to modularize your config.
929930
--
930931
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
931-
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
932932
-- { import = 'custom.plugins' },
933+
--
934+
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
935+
-- Or use telescope!
936+
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
937+
-- you can continue same window with `<space>sr` which resumes last telescope search
933938
}, {
934939
ui = {
935940
-- If you are using a Nerd Font: set icons to an empty table which will use the

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,

0 commit comments

Comments
 (0)