rust auto format on save

This commit is contained in:
geremia 2024-02-02 00:17:20 +01:00
parent 92a3580b73
commit 858ee9b7d3
2 changed files with 12 additions and 2 deletions

View File

@ -261,7 +261,7 @@ require('lazy').setup({
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- --
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
}, {}) }, {})
-- [[ Setting options ]] -- [[ Setting options ]]
@ -563,9 +563,11 @@ require('mason-lspconfig').setup()
-- If you want to override the default filetypes that your language server will attach to you can -- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question. -- define the property 'filetypes' to the map in question.
local servers = { local servers = {
--[[ removed because of rust-tools
rust_analyzer = { rust_analyzer = {
filetypes = { 'rust' }, filetypes = { 'rust' },
}, },
]]--
lua_ls = { lua_ls = {
Lua = { Lua = {

View File

@ -2,4 +2,12 @@
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {} return {
{
"rust-lang/rust.vim",
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
end
},
}