|
|
|
@ -266,6 +266,11 @@ vim.opt.cursorline = true
|
|
|
|
|
-- Minimal number of screen lines to keep above and below the cursor.
|
|
|
|
|
vim.opt.scrolloff = 10
|
|
|
|
|
|
|
|
|
|
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
|
|
|
|
-- instead raise a dialog asking if you wish to save the current file(s)
|
|
|
|
|
-- See `:help 'confirm'`
|
|
|
|
|
vim.opt.confirm = true
|
|
|
|
|
|
|
|
|
|
-- [[ Basic Keymaps ]]
|
|
|
|
|
-- See `:help vim.keymap.set()`
|
|
|
|
|
|
|
|
|
@ -299,6 +304,12 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
|
|
|
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
|
|
|
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
|
|
|
|
|
|
|
|
|
-- NOTE: Some terminals have coliding keymaps or are not able to send distinct keycodes
|
|
|
|
|
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
|
|
|
|
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
|
|
|
|
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
|
|
|
|
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
|
|
|
|
|
|
|
|
|
-- [[ Basic Autocommands ]]
|
|
|
|
|
-- See `:help lua-guide-autocommands`
|
|
|
|
|
|
|
|
|
@ -887,16 +898,14 @@ require('lazy').setup({
|
|
|
|
|
-- have a well standardized coding style. You can add additional
|
|
|
|
|
-- languages here or re-enable it for the disabled ones.
|
|
|
|
|
local disable_filetypes = { c = true, cpp = true }
|
|
|
|
|
local lsp_format_opt
|
|
|
|
|
if disable_filetypes[vim.bo[bufnr].filetype] then
|
|
|
|
|
lsp_format_opt = 'never'
|
|
|
|
|
return nil
|
|
|
|
|
else
|
|
|
|
|
lsp_format_opt = 'fallback'
|
|
|
|
|
end
|
|
|
|
|
return {
|
|
|
|
|
timeout_ms = 500,
|
|
|
|
|
lsp_format = lsp_format_opt,
|
|
|
|
|
lsp_format = 'fallback',
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
formatters_by_ft = {
|
|
|
|
|
lua = { 'stylua' },
|
|
|
|
|