diff --git a/init.lua b/init.lua index ae53f036..18b1f11d 100644 --- a/init.lua +++ b/init.lua @@ -112,6 +112,9 @@ do -- Experiment for yourself to see if you like it! vim.o.relativenumber = true + -- Set to nowrap //TODO: can this be in a separate file than the init.lua to avoid conflicts with upstream? + vim.o.wrap = false + -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -796,8 +799,13 @@ do format_on_save = function(bufnr) -- You can specify filetypes to autoformat on save here: local enabled_filetypes = { - -- lua = true, - -- python = true, + lua = true, + javascript = true, + typescript = true, + typescriptreact = true, + cs = true, + --TODO: not getting any lsp completion for svelte files + svelte = true, } if enabled_filetypes[vim.bo[bufnr].filetype] then return { timeout_ms = 500 } @@ -816,6 +824,11 @@ do -- -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, + json = { 'prettierd', 'prettier', stop_after_first = true }, + javascript = { 'prettierd', 'prettier', stop_after_first = true }, + typescript = { 'prettierd', 'prettier', stop_after_first = true }, + typescriptreact = { 'prettierd', 'prettier', stop_after_first = true }, + svelte = { 'prettierd', 'prettier', stop_after_first = true }, }, }