diff --git a/init.lua b/init.lua index a8d919bb..6ac17bb1 100644 --- a/init.lua +++ b/init.lua @@ -261,7 +261,7 @@ require('lazy').setup({ -- 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 - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- [[ 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 -- define the property 'filetypes' to the map in question. local servers = { + --[[ removed because of rust-tools rust_analyzer = { filetypes = { 'rust' }, }, + ]]-- lua_ls = { Lua = { diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/rust.lua similarity index 61% rename from lua/custom/plugins/init.lua rename to lua/custom/plugins/rust.lua index be0eb9d8..7827f114 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/rust.lua @@ -2,4 +2,12 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + "rust-lang/rust.vim", + ft = "rust", + init = function () + vim.g.rustfmt_autosave = 1 + end + }, +}