Skip to content

Instantly share code, notes, and snippets.

@junio256
Last active April 3, 2023 22:45
Show Gist options
  • Save junio256/ed3b540fe8e705bc87fb9987099c757c to your computer and use it in GitHub Desktop.
Save junio256/ed3b540fe8e705bc87fb9987099c757c to your computer and use it in GitHub Desktop.
{
"Saecki/crates.nvim",
event = "BufReadPost Cargo.toml",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
smart_insert = true,
insert_closing_quote = true,
avoid_prerelease = true,
autoload = true,
autoupdate = true,
autoupdate_throttle = 250,
loading_indicator = true,
date_format = "%Y-%m-%d",
thousands_separator = ",",
notification_title = "Crates",
curl_args = { "-sL", "--retry", "1" },
disable_invalid_feature_diagnostic = false,
popup = {
autofocus = false,
hide_on_select = true,
copy_register = '"',
style = "minimal",
border = "rounded",
show_version_date = true,
show_dependency_version = true,
max_height = 30,
min_width = 20,
padding = 1,
},
src = {
insert_closing_quote = true,
},
}
}
{
"simrat39/rust-tools.nvim",
ft = 'rust',
dependencies = {
"nvim-lua/plenary.nvim"
},
opts = {
tools = {
inlay_hints = {
auto = true,
only_current_line = false,
show_parameter_hints = true,
parameter_hints_prefix = '<- ',
other_hints_prefix = '=> ',
max_len_align = false,
max_len_align_padding = 1,
right_align = false,
right_align_padding = 4,
highlight = 'Comment',
},
},
server = {
on_attach = on_attach,
capabilities = capabilities,
cmd = {
"rustup",
"run",
"stable",
"rust-analyzer"
},
settings = {
["rust-analyzer"] = {
procMacro = { enable = true },
cargo = {
features = { "exercises" },
allFeatures = true
},
checkOnSave = {
command = "clippy",
extraArgs = { "--no-deps" },
},
},
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment