diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-08 20:17:26 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-08 20:17:26 +0200 |
commit | 88616bde7c7b5b25f505997aa2171245f7341453 (patch) | |
tree | 7232fff70899952e2f91cb8b5d39c496840105db /.config/nvim/ftplugin/rust.lua | |
parent | 8c0ace95e67f76b900cacd8daa38faa1444cb3b9 (diff) |
Updates to lang stuff
Diffstat (limited to '.config/nvim/ftplugin/rust.lua')
-rw-r--r-- | .config/nvim/ftplugin/rust.lua | 10 |
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"), } |