summaryrefslogtreecommitdiff
path: root/.config/nvim/ftplugin/rust.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/ftplugin/rust.lua')
-rw-r--r--.config/nvim/ftplugin/rust.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/.config/nvim/ftplugin/rust.lua b/.config/nvim/ftplugin/rust.lua
index 349e7ce..9a6e8a3 100644
--- a/.config/nvim/ftplugin/rust.lua
+++ b/.config/nvim/ftplugin/rust.lua
@@ -1,3 +1,7 @@
+if require("cfg.utils").check_lsp_client_active "rust_analyzer" then
+ return
+end
+
if O.lang.rust.rust_tools.active then
local opts = {
tools = { -- rust-tools options
@@ -28,11 +32,11 @@ if O.lang.rust.rust_tools.active then
-- prefix for parameter hints
-- default: "<-"
- parameter_hints_prefix = "<-",
+ parameter_hints_prefix = O.lang.rust.rust_tools.parameter_hints_prefix,
-- prefix for all the other hints (type, chaining)
-- default: "=>"
- other_hints_prefix = "=>",
+ other_hints_prefix = O.lang.rust.rust_tools.other_hints_prefix,
-- whether to align to the lenght of the longest line in the file
max_len_align = false,
@@ -75,7 +79,7 @@ if O.lang.rust.rust_tools.active then
else
require("lspconfig").rust_analyzer.setup {
cmd = { DATA_PATH .. "/lspinstall/rust/rust-analyzer" },
- on_attach = require("lsp").common_on_attach,
+ on_attach = require("cfg.lsp").common_on_attach,
filetypes = { "rust" },
root_dir = require("lspconfig.util").root_pattern("Cargo.toml", "rust-project.json"),
}