Skip to content

Commit 2aa942c

Browse files
authored
Merge branch 'nvim-lua:master' into master
2 parents ea8391b + e947649 commit 2aa942c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

init.lua

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
194194
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
195195
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
196196

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+
197203
-- [[ Basic Autocommands ]]
198204
-- See `:help lua-guide-autocommands`
199205

@@ -749,16 +755,14 @@ require('lazy').setup({
749755
-- have a well standardized coding style. You can add additional
750756
-- languages here or re-enable it for the disabled ones.
751757
local disable_filetypes = { c = true, cpp = true }
752-
local lsp_format_opt
753758
if disable_filetypes[vim.bo[bufnr].filetype] then
754-
lsp_format_opt = 'never'
759+
return nil
755760
else
756-
lsp_format_opt = 'fallback'
761+
return {
762+
timeout_ms = 500,
763+
lsp_format = 'fallback',
764+
}
757765
end
758-
return {
759-
timeout_ms = 500,
760-
lsp_format = lsp_format_opt,
761-
}
762766
end,
763767
formatters_by_ft = {
764768
lua = { 'stylua' },

0 commit comments

Comments
 (0)