fixed broken rust-tools
This commit is contained in:
parent
ad766da79f
commit
08071ec95a
|
@ -58,12 +58,12 @@ return require('packer').startup(function(use)
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
after = "mason-lspconfig.nvim",
|
after = "mason-lspconfig.nvim",
|
||||||
|
after = "rust-tools.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require('LSPconfig')
|
require('LSPconfig')
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{'simrat39/rust-tools.nvim',
|
{'simrat39/rust-tools.nvim',
|
||||||
after = "nvim-lspconfig",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,78 +1,79 @@
|
||||||
local nvim_lsp = require'lspconfig'
|
local nvim_lsp = require'lspconfig'
|
||||||
local opts = {
|
local opts = {
|
||||||
tools = {
|
tools = {
|
||||||
autoSetHints = true,
|
autoSetHints = true,
|
||||||
RustHoverActions = true,
|
RustHoverActions = true,
|
||||||
|
|
||||||
-- how to execute terminal commands
|
-- how to execute terminal commands
|
||||||
executor = require("rust-tools/executors").termopen,
|
executor = require("rust-tools/executors").termopen,
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
-- Only show inlay hints for the current line
|
auto=true,
|
||||||
only_current_line = false,
|
-- Only show inlay hints for the current line
|
||||||
-- Event which triggers a refersh of the inlay hints.
|
only_current_line = false,
|
||||||
only_current_line_autocmd = "CursorHold",
|
-- Event which triggers a refersh of the inlay hints.
|
||||||
-- whether to show parameter hints with the inlay hints or not
|
only_current_line_autocmd = "CursorHold",
|
||||||
show_parameter_hints = true,
|
-- whether to show parameter hints with the inlay hints or not
|
||||||
-- whether to show variable name before type hints with the inlay hints or not
|
show_parameter_hints = true,
|
||||||
show_variable_name = false,
|
-- whether to show variable name before type hints with the inlay hints or not
|
||||||
-- prefix for parameter hints
|
show_variable_name = false,
|
||||||
parameter_hints_prefix = "<- ",
|
-- prefix for parameter hints
|
||||||
-- prefix for all the other hints (type, chaining)
|
parameter_hints_prefix = "<- ",
|
||||||
other_hints_prefix = "=> ",
|
-- prefix for all the other hints (type, chaining)
|
||||||
-- whether to align to the lenght of the longest line in the file
|
other_hints_prefix = "=> ",
|
||||||
max_len_align = false,
|
-- whether to align to the lenght of the longest line in the file
|
||||||
-- padding from the left if max_len_align is true
|
max_len_align = false,
|
||||||
max_len_align_padding = 1,
|
-- padding from the left if max_len_align is true
|
||||||
-- whether to align to the extreme right or not
|
max_len_align_padding = 1,
|
||||||
right_align = true,
|
-- whether to align to the extreme right or not
|
||||||
-- padding from the right if right_align is true
|
right_align = true,
|
||||||
right_align_padding = 7,
|
-- padding from the right if right_align is true
|
||||||
-- The color of the hints
|
right_align_padding = 7,
|
||||||
highlight = "Comment",
|
-- The color of the hints
|
||||||
},
|
highlight = "Comment",
|
||||||
hover_actions = {
|
|
||||||
-- the border that is used for the hover window
|
|
||||||
border = {
|
|
||||||
{ "╭", "FloatBorder" },
|
|
||||||
{ "─", "FloatBorder" },
|
|
||||||
{ "╮", "FloatBorder" },
|
|
||||||
{ "│", "FloatBorder" },
|
|
||||||
{ "╯", "FloatBorder" },
|
|
||||||
{ "─", "FloatBorder" },
|
|
||||||
{ "╰", "FloatBorder" },
|
|
||||||
{ "│", "FloatBorder" },
|
|
||||||
},
|
},
|
||||||
-- whether the hover action window gets automatically focused
|
hover_actions = {
|
||||||
auto_focus = false,
|
-- the border that is used for the hover window
|
||||||
},
|
border = {
|
||||||
-- settings for showing the crate graph based on graphviz and the dot
|
{ "╭", "FloatBorder" },
|
||||||
-- command
|
{ "─", "FloatBorder" },
|
||||||
crate_graph = {
|
{ "╮", "FloatBorder" },
|
||||||
-- Backend used for displaying the graph
|
{ "│", "FloatBorder" },
|
||||||
backend = "x11",
|
{ "╯", "FloatBorder" },
|
||||||
-- where to store the output, nil for no output stored (relative
|
{ "─", "FloatBorder" },
|
||||||
-- path from pwd)
|
{ "╰", "FloatBorder" },
|
||||||
output = nil,
|
{ "│", "FloatBorder" },
|
||||||
-- true for all crates.io and external crates, false only the local
|
|
||||||
-- crates
|
|
||||||
full = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- all the opts to send to nvim-lspconfig
|
|
||||||
server = {
|
|
||||||
-- standalone file support
|
|
||||||
-- setting it to false may improve startup time
|
|
||||||
standalone = true,
|
|
||||||
settings = {
|
|
||||||
-- rust-analyer options
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
-- enable clippy on save
|
|
||||||
checkOnSave = {
|
|
||||||
command = "clippy"
|
|
||||||
},
|
},
|
||||||
|
-- whether the hover action window gets automatically focused
|
||||||
|
auto_focus = false,
|
||||||
|
},
|
||||||
|
-- settings for showing the crate graph based on graphviz and the dot
|
||||||
|
-- command
|
||||||
|
crate_graph = {
|
||||||
|
-- Backend used for displaying the graph
|
||||||
|
backend = "x11",
|
||||||
|
-- where to store the output, nil for no output stored (relative
|
||||||
|
-- path from pwd)
|
||||||
|
output = nil,
|
||||||
|
-- true for all crates.io and external crates, false only the local
|
||||||
|
-- crates
|
||||||
|
full = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- all the opts to send to nvim-lspconfig
|
||||||
|
server = {
|
||||||
|
-- standalone file support
|
||||||
|
-- setting it to false may improve startup time
|
||||||
|
standalone = true,
|
||||||
|
settings = {
|
||||||
|
-- rust-analyer options
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
-- enable clippy on save
|
||||||
|
checkOnSave = {
|
||||||
|
command = "clippy"
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
|
||||||
-- debugging stuff
|
-- debugging stuff
|
||||||
dap = {
|
dap = {
|
||||||
adapter = {
|
adapter = {
|
||||||
|
|
Loading…
Reference in a new issue