clippy in rust-analyzer

This commit is contained in:
elkowar 2023-01-15 18:04:32 +01:00
parent 18dc1563b2
commit b3aaf691a0
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 16 additions and 1 deletions

View file

@ -121,7 +121,8 @@
:settings {:rust-analyzer {:cargo {:loadOutDirsFromCheck true}
:procMacro {:enable true}
:diagnostics {:enable false ;; native rust analyzer diagnostics
:experimental {:enable false}}}}}}))
:experimental {:enable false}}
:checkOnSave {:overrideCommand ["cargo" "clippy" "--workspace" "--message-format=json" "--all-targets" "--all-features"]}}}}}))
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))

View file

@ -7,6 +7,20 @@ local vim_config_root = vim.fn.expand("<sfile>:p:h")
local pack_path = vim.fn.stdpath("data") .. "/site/pack"
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
function ensure(user, repo, branch, commit)
-- Ensures a given github.com/USER/REPO is cloned in the pack/packer/start directory.
local install_path = pack_path .. "/packer/start/" .. repo