@@ -156,6 +156,11 @@ vim.opt.cursorline = true
156156-- Minimal number of screen lines to keep above and below the cursor.
157157vim .opt .scrolloff = 10
158158
159+ -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
160+ -- instead raise a dialog asking if you wish to save the current file(s)
161+ -- See `:help 'confirm'`
162+ vim .opt .confirm = true
163+
159164-- [[ Basic Keymaps ]]
160165-- See `:help vim.keymap.set()`
161166
@@ -189,6 +194,12 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
189194vim .keymap .set (' n' , ' <C-j>' , ' <C-w><C-j>' , { desc = ' Move focus to the lower window' })
190195vim .keymap .set (' n' , ' <C-k>' , ' <C-w><C-k>' , { desc = ' Move focus to the upper window' })
191196
197+ -- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
198+ -- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
199+ -- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
200+ -- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
201+ -- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
202+
192203-- [[ Basic Autocommands ]]
193204-- See `:help lua-guide-autocommands`
194205
@@ -789,16 +800,14 @@ require('lazy').setup({
789800 -- have a well standardized coding style. You can add additional
790801 -- languages here or re-enable it for the disabled ones.
791802 local disable_filetypes = { c = true , cpp = true }
792- local lsp_format_opt
793803 if disable_filetypes [vim .bo [bufnr ].filetype ] then
794- lsp_format_opt = ' never '
804+ return nil
795805 else
796- lsp_format_opt = ' fallback'
806+ return {
807+ timeout_ms = 500 ,
808+ lsp_format = ' fallback' ,
809+ }
797810 end
798- return {
799- timeout_ms = 500 ,
800- lsp_format = lsp_format_opt ,
801- }
802811 end ,
803812 formatters_by_ft = {
804813 lua = { ' stylua' },
0 commit comments