@@ -162,6 +162,11 @@ vim.opt.shiftwidth = 4
162162vim .opt .softtabstop = 4
163163vim .opt .cindent = true
164164
165+ -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
166+ -- instead raise a dialog asking if you wish to save the current file(s)
167+ -- See `:help 'confirm'`
168+ vim .opt .confirm = true
169+
165170-- [[ Basic Keymaps ]]
166171-- See `:help vim.keymap.set()`
167172
@@ -195,12 +200,6 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
195200vim .keymap .set (' n' , ' <C-j>' , ' <C-w><C-j>' , { desc = ' Move focus to the lower window' })
196201vim .keymap .set (' n' , ' <C-k>' , ' <C-w><C-k>' , { desc = ' Move focus to the upper window' })
197202
198- -- ELB: Keybinds
199-
200- -- ELB: Keybinds to make tabbing sane
201- vim .keymap .set (' n' , ' gn' , ' <Cmd>tabnext<CR>' , { desc = ' Move to the previous tab' })
202- vim .keymap .set (' n' , ' gp' , ' <Cmd>tabprevious<CR>' , { desc = ' Move to the next tab' })
203-
204203-- [[ Basic Autocommands ]]
205204-- See `:help lua-guide-autocommands`
206205
@@ -756,16 +755,14 @@ require('lazy').setup({
756755 -- have a well standardized coding style. You can add additional
757756 -- languages here or re-enable it for the disabled ones.
758757 local disable_filetypes = { c = true , cpp = true }
759- local lsp_format_opt
760758 if disable_filetypes [vim .bo [bufnr ].filetype ] then
761- lsp_format_opt = ' never '
759+ return nil
762760 else
763- lsp_format_opt = ' fallback'
761+ return {
762+ timeout_ms = 500 ,
763+ lsp_format = ' fallback' ,
764+ }
764765 end
765- return {
766- timeout_ms = 500 ,
767- lsp_format = lsp_format_opt ,
768- }
769766 end ,
770767 formatters_by_ft = {
771768 lua = { ' stylua' },
@@ -997,7 +994,7 @@ require('lazy').setup({
997994 -- place them in the correct locations.
998995
999996 -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
1000- ' github/copilot.vim' , -- ELB: Adding copilot
997+ -- 'github/copilot.vim', -- ELB: Adding copilot
1001998
1002999 --
10031000 -- Here are some example plugins that I've included in the Kickstart repository.
0 commit comments