summaryrefslogtreecommitdiff
path: root/.config/nvim_old/lua/plugins/rust_analyzer.lua
diff options
context:
space:
mode:
authorcryxtalix <fgx8p9t@protonmail.com>2026-05-09 00:15:07 +0800
committercryxtalix <fgx8p9t@protonmail.com>2026-05-09 00:15:07 +0800
commit8fbf7c2a9ce92b97941bff2c8b52c1d52d9834d2 (patch)
treeaa4cb6f169758fb9abdcf5b378a1a8ccc6902344 /.config/nvim_old/lua/plugins/rust_analyzer.lua
parent1302056eddd9a69ea2d0ffdf8bedd8582fb5a907 (diff)
Update
Diffstat (limited to '.config/nvim_old/lua/plugins/rust_analyzer.lua')
-rw-r--r--.config/nvim_old/lua/plugins/rust_analyzer.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/.config/nvim_old/lua/plugins/rust_analyzer.lua b/.config/nvim_old/lua/plugins/rust_analyzer.lua
new file mode 100644
index 0000000..914befe
--- /dev/null
+++ b/.config/nvim_old/lua/plugins/rust_analyzer.lua
@@ -0,0 +1,56 @@
+-- https://github.com/mrcjkb/rustaceanvim
+
+return {
+ {
+ 'mrcjkb/rustaceanvim',
+ version = '^6', -- Recommended
+ lazy = false, -- This plugin is already lazy
+ config = function ()
+ vim.g.rustaceanvim = {
+ -- Plugin configuration
+ tools = {
+ },
+ -- LSP configuration
+ server = {
+ default_settings = {
+ -- rust-analyzer language server configuration
+ -- https://rust-analyzer.github.io/book/configuration.html
+ ['rust-analyzer'] = {
+ checkOnSave = true,
+ check = {
+ enable = true,
+ command = "clippy",
+ features = "all",
+ },
+ completion = {
+ autoimport = {
+ enable = false;
+ }
+ },
+ files = {
+ exclude = {
+ "build-dir/",
+ ".flatpak-builder",
+ }
+ }
+ --settings = {
+ -- cargo = { allFeatures = true },
+ -- imports = { group = { enable = false } },
+ -- completion = { postfix = { enable = false } },
+ -- -- https://www.reddit.com/r/rust/comments/1e978l7/comment/led7ibp/
+ -- -- checkOnSave = { command = "clippy" },
+ -- checkOnSave = { command = false },
+
+ -- diagnostics = { enable = true },
+ -- rustfmt = { enable = true },
+ --}
+ },
+ },
+ },
+ -- DAP configuration
+ dap = {
+ },
+ }
+ end
+ },
+}