commit
1015fc9e5e
17
init.lua
17
init.lua
|
|
@ -112,6 +112,9 @@ do
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
vim.o.relativenumber = true
|
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!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
|
@ -796,8 +799,13 @@ do
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
-- You can specify filetypes to autoformat on save here:
|
-- You can specify filetypes to autoformat on save here:
|
||||||
local enabled_filetypes = {
|
local enabled_filetypes = {
|
||||||
-- lua = true,
|
lua = true,
|
||||||
-- python = 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
|
if enabled_filetypes[vim.bo[bufnr].filetype] then
|
||||||
return { timeout_ms = 500 }
|
return { timeout_ms = 500 }
|
||||||
|
|
@ -816,6 +824,11 @@ do
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- 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 },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue