|
1 | 1 | --[[
|
2 |
| -
|
| 2 | +fff |
3 | 3 | What is Kickstart?
|
4 | 4 |
|
5 | 5 | Kickstart.nvim is *not* a distribution.
|
@@ -551,6 +551,23 @@ require('lazy').setup({
|
551 | 551 | vim.keymap.set('n', '<leader>bb', builtin.buffers, { desc = '[B]earch [B]uffers' })
|
552 | 552 | vim.keymap.set('n', '<leader>*', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
553 | 553 |
|
| 554 | + -- TODO: This is scuffed really, I'm not sure if it works well. |
| 555 | + vim.keymap.set('n', '<leader>br', function() |
| 556 | + if vim.bo.modified then |
| 557 | + vim.cmd 'echohl WarningMsg' |
| 558 | + vim.cmd 'echo "Discard changes and reload buffer? (y/n)"' |
| 559 | + vim.cmd 'echohl None' |
| 560 | + local choice = vim.fn.nr2char(vim.fn.getchar()) |
| 561 | + if choice:lower() == 'y' then |
| 562 | + vim.cmd 'e!' |
| 563 | + else |
| 564 | + print 'Cancelled.' |
| 565 | + end |
| 566 | + else |
| 567 | + print 'Buffer is already up to date.' |
| 568 | + end |
| 569 | + end) |
| 570 | + |
554 | 571 | -- Slightly advanced example of overriding default behavior and theme
|
555 | 572 | vim.keymap.set('n', '<leader>/', function()
|
556 | 573 | -- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
@@ -752,8 +769,7 @@ require('lazy').setup({
|
752 | 769 | rust_analyzer = {},
|
753 | 770 | -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
754 | 771 | lua_ls = {},
|
755 |
| - }, |
756 |
| - |
| 772 | + } |
757 | 773 |
|
758 | 774 | -- Ensure the servers and tools above are installed
|
759 | 775 | --
|
|
0 commit comments