[nvim] feat: rust config file
format-on-save !
This commit is contained in:
parent
e87b863640
commit
17e5453287
13
.config/nvim/after/ftplugin/rust.lua
Normal file
13
.config/nvim/after/ftplugin/rust.lua
Normal file
@ -0,0 +1,13 @@
|
||||
-- Author : swytch
|
||||
-- Created : Thursday Dec. 01, 2022 11:41:26 CET
|
||||
-- License : GPLv3
|
||||
-- Description : rust settings file
|
||||
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("Format", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.rs",
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ timeout_ms = 200 })
|
||||
end,
|
||||
group = format_sync_grp,
|
||||
})
|
Reference in New Issue
Block a user