diff options
author | Christian Chiarulli <[email protected]> | 2021-07-13 21:13:55 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-13 21:13:55 -0400 |
commit | a097fa4c04e6db34bb409e0dea302c20629da8ec (patch) | |
tree | fb1c5bdd14cac82a363ea6c25b03a475050305f2 /ftplugin/rust.lua | |
parent | 04f9f53914a7dd999117ed73c5fa0ab3b0dc95e4 (diff) |
LunarVim 0.4.8 (#919)0.4.8
Diffstat (limited to 'ftplugin/rust.lua')
-rw-r--r-- | ftplugin/rust.lua | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ftplugin/rust.lua b/ftplugin/rust.lua index 4fb47582..dd34483e 100644 --- a/ftplugin/rust.lua +++ b/ftplugin/rust.lua @@ -1,3 +1,17 @@ +O.formatters.filetype["rust"] = { + function() + return { + exe = O.lang.rust.formatter.exe, + args = O.lang.rust.formatter.args, + stdin = not (O.lang.rust.formatter.stdin ~= nil), + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} if require("lv-utils").check_lsp_client_active "rust_analyzer" then return end @@ -81,11 +95,11 @@ else cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" }, on_attach = require("lsp").common_on_attach, filetypes = { "rust" }, - root_dir = require("lspconfig.util").root_pattern("Cargo.toml", "rust-project.json"), + root_dir = require("lspconfig.util").root_pattern("Carrust.toml", "rust-project.json"), } end --- TODO fix these mappings +-- TODO: fix these mappings vim.api.nvim_exec( [[ autocmd Filetype rust nnoremap <leader>lm <Cmd>RustExpandMacro<CR> |