style: fmt
This commit is contained in:
parent
ca84d264c3
commit
274c74b03a
105
rust.lua
105
rust.lua
@ -132,15 +132,12 @@ vim.g.rustaceanvim = {
|
|||||||
vim.cmd.RustLsp {'hover', 'actions'}
|
vim.cmd.RustLsp {'hover', 'actions'}
|
||||||
end, keymap_opts)
|
end, keymap_opts)
|
||||||
vim.keymap.set('n', '<leader>cc',
|
vim.keymap.set('n', '<leader>cc',
|
||||||
function()
|
function() vim.cmd.RustLsp('openCargo') end,
|
||||||
vim.cmd.RustLsp('openCargo')
|
keymap_opts)
|
||||||
end, keymap_opts)
|
vim.keymap.set('n', '<leader>cr', function()
|
||||||
vim.keymap.set('n', '<leader>cr',
|
|
||||||
function()
|
|
||||||
vim.cmd.RustLsp {'runnables', 'last' --[[ optional ]] }
|
vim.cmd.RustLsp {'runnables', 'last' --[[ optional ]] }
|
||||||
end, keymap_opts)
|
end, keymap_opts)
|
||||||
vim.keymap.set('n', '<leader>cd',
|
vim.keymap.set('n', '<leader>cd', function()
|
||||||
function()
|
|
||||||
vim.cmd.RustLsp {'debuggables', 'last' --[[ optional ]] }
|
vim.cmd.RustLsp {'debuggables', 'last' --[[ optional ]] }
|
||||||
end, keymap_opts)
|
end, keymap_opts)
|
||||||
-- vim.keymap.set("n", "g0", vim.lsp.buf.document_symbol, keymap_opts)
|
-- vim.keymap.set("n", "g0", vim.lsp.buf.document_symbol, keymap_opts)
|
||||||
@ -171,8 +168,7 @@ vim.g.rustaceanvim = {
|
|||||||
local rt = require("rust-tools")
|
local rt = require("rust-tools")
|
||||||
local deps = require("nvim-deps")
|
local deps = require("nvim-deps")
|
||||||
|
|
||||||
rt.setup(
|
rt.setup({
|
||||||
{
|
|
||||||
tools = { -- rust-tools options
|
tools = { -- rust-tools options
|
||||||
|
|
||||||
-- how to execute terminal commands
|
-- how to execute terminal commands
|
||||||
@ -220,7 +216,7 @@ rt.setup(
|
|||||||
right_align_padding = 7,
|
right_align_padding = 7,
|
||||||
|
|
||||||
-- The color of the hints
|
-- The color of the hints
|
||||||
highlight = "Comment",
|
highlight = "Comment"
|
||||||
},
|
},
|
||||||
|
|
||||||
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
||||||
@ -229,14 +225,10 @@ rt.setup(
|
|||||||
-- the border that is used for the hover window
|
-- the border that is used for the hover window
|
||||||
-- see vim.api.nvim_open_win()
|
-- see vim.api.nvim_open_win()
|
||||||
border = {
|
border = {
|
||||||
{ "╭", "FloatBorder" },
|
{"╭", "FloatBorder"}, {"─", "FloatBorder"},
|
||||||
{ "─", "FloatBorder" },
|
{"╮", "FloatBorder"}, {"│", "FloatBorder"},
|
||||||
{ "╮", "FloatBorder" },
|
{"╯", "FloatBorder"}, {"─", "FloatBorder"},
|
||||||
{ "│", "FloatBorder" },
|
{"╰", "FloatBorder"}, {"│", "FloatBorder"}
|
||||||
{ "╯", "FloatBorder" },
|
|
||||||
{ "─", "FloatBorder" },
|
|
||||||
{ "╰", "FloatBorder" },
|
|
||||||
{ "│", "FloatBorder" },
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Maximal width of the hover window. Nil means no max.
|
-- Maximal width of the hover window. Nil means no max.
|
||||||
@ -247,7 +239,7 @@ rt.setup(
|
|||||||
|
|
||||||
-- whether the hover action window gets automatically focused
|
-- whether the hover action window gets automatically focused
|
||||||
-- default: false
|
-- default: false
|
||||||
auto_focus = false,
|
auto_focus = false
|
||||||
},
|
},
|
||||||
|
|
||||||
-- settings for showing the crate graph based on graphviz and the dot
|
-- settings for showing the crate graph based on graphviz and the dot
|
||||||
@ -270,62 +262,16 @@ rt.setup(
|
|||||||
-- Is used for input validation and autocompletion
|
-- Is used for input validation and autocompletion
|
||||||
-- Last updated: 2021-08-26
|
-- Last updated: 2021-08-26
|
||||||
enabled_graphviz_backends = {
|
enabled_graphviz_backends = {
|
||||||
"bmp",
|
"bmp", "cgimage", "canon", "dot", "gv", "xdot", "xdot1.2",
|
||||||
"cgimage",
|
"xdot1.4", "eps", "exr", "fig", "gd", "gd2", "gif", "gtk",
|
||||||
"canon",
|
"ico", "cmap", "ismap", "imap", "cmapx", "imap_np", "cmapx_np",
|
||||||
"dot",
|
"jpg", "jpeg", "jpe", "jp2", "json", "json0", "dot_json",
|
||||||
"gv",
|
"xdot_json", "pdf", "pic", "pct", "pict", "plain", "plain-ext",
|
||||||
"xdot",
|
"png", "pov", "ps", "ps2", "psd", "sgi", "svg", "svgz", "tga",
|
||||||
"xdot1.2",
|
"tiff", "tif", "tk", "vml", "vmlz", "wbmp", "webp", "xlib",
|
||||||
"xdot1.4",
|
"x11"
|
||||||
"eps",
|
}
|
||||||
"exr",
|
}
|
||||||
"fig",
|
|
||||||
"gd",
|
|
||||||
"gd2",
|
|
||||||
"gif",
|
|
||||||
"gtk",
|
|
||||||
"ico",
|
|
||||||
"cmap",
|
|
||||||
"ismap",
|
|
||||||
"imap",
|
|
||||||
"cmapx",
|
|
||||||
"imap_np",
|
|
||||||
"cmapx_np",
|
|
||||||
"jpg",
|
|
||||||
"jpeg",
|
|
||||||
"jpe",
|
|
||||||
"jp2",
|
|
||||||
"json",
|
|
||||||
"json0",
|
|
||||||
"dot_json",
|
|
||||||
"xdot_json",
|
|
||||||
"pdf",
|
|
||||||
"pic",
|
|
||||||
"pct",
|
|
||||||
"pict",
|
|
||||||
"plain",
|
|
||||||
"plain-ext",
|
|
||||||
"png",
|
|
||||||
"pov",
|
|
||||||
"ps",
|
|
||||||
"ps2",
|
|
||||||
"psd",
|
|
||||||
"sgi",
|
|
||||||
"svg",
|
|
||||||
"svgz",
|
|
||||||
"tga",
|
|
||||||
"tiff",
|
|
||||||
"tif",
|
|
||||||
"tk",
|
|
||||||
"vml",
|
|
||||||
"vmlz",
|
|
||||||
"wbmp",
|
|
||||||
"webp",
|
|
||||||
"xlib",
|
|
||||||
"x11",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- all the opts to send to nvim-lspconfig
|
-- all the opts to send to nvim-lspconfig
|
||||||
@ -335,7 +281,7 @@ rt.setup(
|
|||||||
-- standalone file support
|
-- standalone file support
|
||||||
-- setting it to false may improve startup time
|
-- setting it to false may improve startup time
|
||||||
standalone = true,
|
standalone = true,
|
||||||
cmd = { (deps.rust_analyzer_path .. "/bin/rust-analyzer") },
|
cmd = {(deps.rust_analyzer_path .. "/bin/rust-analyzer")}
|
||||||
}, -- rust-analyzer options
|
}, -- rust-analyzer options
|
||||||
|
|
||||||
-- debugging stuff
|
-- debugging stuff
|
||||||
@ -343,8 +289,7 @@ rt.setup(
|
|||||||
adapter = {
|
adapter = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = deps.lldb_path .. "lldb-vscode",
|
command = deps.lldb_path .. "lldb-vscode",
|
||||||
name = "rt_lldb",
|
name = "rt_lldb"
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user