Skip to content

Commit 4dfcff0

Browse files
authored
Merge branch 'nvim-lua:master' into master
2 parents e854015 + e947649 commit 4dfcff0

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

@@ -753,16 +759,14 @@ require('lazy').setup({
753759
-- have a well standardized coding style. You can add additional
754760
-- languages here or re-enable it for the disabled ones.
755761
local disable_filetypes = { c = true, cpp = true }
756-
local lsp_format_opt
757762
if disable_filetypes[vim.bo[bufnr].filetype] then
758-
lsp_format_opt = 'never'
763+
return nil
759764
else
760-
lsp_format_opt = 'fallback'
765+
return {
766+
timeout_ms = 500,
767+
lsp_format = 'fallback',
768+
}
761769
end
762-
return {
763-
timeout_ms = 500,
764-
lsp_format = lsp_format_opt,
765-
}
766770
end,
767771
formatters_by_ft = {
768772
lua = { 'stylua' },

0 commit comments

Comments
 (0)