diff --git a/after/ftplugin/markdown.lua b/after/ftplugin/markdown.lua new file mode 100644 index 0000000..784505b --- /dev/null +++ b/after/ftplugin/markdown.lua @@ -0,0 +1,2 @@ +vim.opt_local.spell = true +vim.opt_local.spelllang = { 'en_us', 'pt_PT' } diff --git a/init.lua b/init.lua index 38738cd..80c24d1 100644 --- a/init.lua +++ b/init.lua @@ -738,22 +738,10 @@ require('lazy').setup({ }, opts = { notify_on_error = false, - format_on_save = function(bufnr) - -- Disable "format_on_save lsp_fallback" for languages that don't - -- have a well standardized coding style. You can add additional - -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = false, cpp = false, tex = true } - local lsp_format_opt - if disable_filetypes[vim.bo[bufnr].filetype] then - lsp_format_opt = 'never' - else - lsp_format_opt = 'fallback' - end - return { - timeout_ms = 500, - lsp_format = lsp_format_opt, - } - end, + format_on_save = { + timeout_ms = 5000, + lsp_format = true, + }, formatters_by_ft = { lua = { 'stylua' }, markdown = { 'markdownlint' }, @@ -761,7 +749,7 @@ require('lazy').setup({ c = { 'clang-format' }, cpp = { 'clang-format' }, -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, + python = { 'isort', 'black' }, -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true },