From 6474868aa50361738fa3fdfda6ab010afc1ece63 Mon Sep 17 00:00:00 2001 From: Uttarayan Mondal Date: Tue, 10 Jan 2023 11:22:19 +0530 Subject: [PATCH] [feat] Push changes before lazy.nvim migration --- config/nvim/lua/plugins.lua | 6 +++--- config/nvim/lua/setup/rust-tools.lua | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 396677e8..f8835f11 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -1,8 +1,6 @@ local vim = vim local execute = vim.api.nvim_command local fn = vim.fn -local use = require('packer').use - local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then @@ -10,6 +8,7 @@ if fn.empty(fn.glob(install_path)) > 0 then execute 'packadd packer.nvim' end +local use = require('packer').use return require('packer').startup(function() -- Packer can manage itself @@ -79,6 +78,7 @@ return require('packer').startup(function() } + use { 'tpope/vim-commentary', 'tpope/vim-fugitive', @@ -133,7 +133,7 @@ return require('packer').startup(function() end } - use 'airblade/vim-rooter' + -- use 'airblade/vim-rooter' -- use({ -- "https://git.sr.ht/~whynothugo/lsp_lines.nvim", -- config = function() diff --git a/config/nvim/lua/setup/rust-tools.lua b/config/nvim/lua/setup/rust-tools.lua index 0b90c5d5..d9fb4597 100644 --- a/config/nvim/lua/setup/rust-tools.lua +++ b/config/nvim/lua/setup/rust-tools.lua @@ -180,7 +180,6 @@ local opts = { -- standalone file support -- setting it to false may improve startup time standalone = true, - settings = { ["rust-analyzer"] = { imports = { @@ -190,6 +189,17 @@ local opts = { group = "module", }, importPrefix = "self", + prefer = { + no = { + std = false + }, + } + }, + -- inlayHints.closureReturnTypeHints.enable + inlayHints = { + closureReturnTypeHints = { + enable = true, + } }, cargo = { loadOutDirsFromCheck = true, @@ -197,6 +207,11 @@ local opts = { procMacro = { enable = true, }, + completion = { + autoimport = { + enalbe = true, + } + }, checkOnSave = { command = "clippy", }, @@ -208,7 +223,6 @@ local opts = { vim.keymap.set("n", "", rt.hover_actions.hover_actions, { buffer = bufnr }) -- Code action groups vim.keymap.set("n", "a", rt.code_action_group.code_action_group, { buffer = bufnr }) - lspstatus.on_attach(client) end, capabilities = coq.lsp_ensure_capabilities(lspstatus.capabilities),