aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/rust-tools.lua
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2023-10-17 00:16:25 -0300
committerElvis Claros Castro <elvis@claros.ar>2023-10-17 00:16:25 -0300
commit5a0f64d67f1981dad243f6d328664139e49ce664 (patch)
treeb4c7a39855c1154298a26979e51c84d7391335e0 /lua/plugins/rust-tools.lua
parent9f7ef8669223eb7cdaf3f580dc8b6a7926807231 (diff)
downloadnvim-conf-5a0f64d67f1981dad243f6d328664139e49ce664.tar.gz
nvim-conf-5a0f64d67f1981dad243f6d328664139e49ce664.zip
commit initial epii
Diffstat (limited to 'lua/plugins/rust-tools.lua')
-rw-r--r--lua/plugins/rust-tools.lua66
1 files changed, 66 insertions, 0 deletions
diff --git a/lua/plugins/rust-tools.lua b/lua/plugins/rust-tools.lua
new file mode 100644
index 0000000..8e49c90
--- /dev/null
+++ b/lua/plugins/rust-tools.lua
@@ -0,0 +1,66 @@
+return
+{
+ "simrat39/rust-tools.nvim",
+ ft = "rust",
+ config = function()
+ require("rust-tools").setup({
+ tools = {
+ autoSetHints = true,
+ runnables = {
+ use_telescope = true
+ },
+ debugger = {
+ use_telescope = true
+ },
+ inlay_hints = {
+ -- automatically set inlay hints (type hints)
+ -- default: true
+ auto = false,
+ -- Only show inlay hints for the current line
+ only_current_line = false,
+ -- whether to show parameter hints with the inlay hints or not
+ -- default: true
+ show_parameter_hints = true,
+ -- prefix for parameter hints
+ -- default: "<-"
+ parameter_hints_prefix = "<- ",
+ -- prefix for all the other hints (type, chaining)
+ -- default: "=>"
+ other_hints_prefix = "=> ",
+ -- whether to align to the length of the longest line in the file
+ max_len_align = false,
+ -- padding from the left if max_len_align is true
+ max_len_align_padding = 1,
+ -- whether to align to the extreme right or not
+ right_align = false,
+ -- padding from the right if right_align is true
+ right_align_padding = 7,
+ -- The color of the hints
+ highlight = "Comment",
+ },
+ crate_graph = {
+ -- Backend used for displaying the graph
+ -- see: https://graphviz.org/docs/outputs/
+ -- default: x11
+ backend = "gtk",
+ -- where to store the output, nil for no output stored (relative
+ -- path from pwd)
+ -- default: nil
+ output = "/tmp/crate_graph",
+ -- true for all crates.io and external crates, false only the local
+ -- crates
+ -- default: true
+ full = true,
+ },
+ },
+ })
+ end,
+ dap = {
+ adapter = {
+ type = "executable",
+ command = "/bin/lldb-vscode",
+ name = "rt_lldb",
+ },
+ },
+
+}