summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/after/ftplugin/rust.vim3
-rw-r--r--.config/nvim/lua/plugins/lsp.lua40
2 files changed, 13 insertions, 30 deletions
diff --git a/.config/nvim/after/ftplugin/rust.vim b/.config/nvim/after/ftplugin/rust.vim
deleted file mode 100644
index fb601d1..0000000
--- a/.config/nvim/after/ftplugin/rust.vim
+++ /dev/null
@@ -1,3 +0,0 @@
1setlocal tags=./rusty-tags.vi;/
2
3autocmd BufWritePost *.rs :silent! exec "!rusty-tags vi --quiet --start-dir=" . expand('%:p:h') . "&" | redraw!
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index e80223a..e9e8be8 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -149,39 +149,24 @@ return {
149 } 149 }
150 }) 150 })
151 151
152 -- rust-tools 152 vim.g.rustaceanvim = {
153 local rust_opts = { 153 -- Plugin configuration
154 tools = { 154 tools = {
155 runnables = {
156 use_telescope = true,
157 },
158 inlay_hints = {
159 auto = true,
160 show_parameter_hints = true,
161 parameter_hints_prefix = "↸ ",
162 other_hints_prefix = "❱ ",
163 },
164 }, 155 },
165 156 -- LSP configuration
166 -- all the opts to send to nvim-lspconfig
167 -- these override the defaults set by rust-tools.nvim
168 -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
169 server = { 157 server = {
170 on_attach = on_attach, 158 on_attach = on_attach,
171 settings = { 159 vim.lsp.inlay_hint.enable(true),
172 -- to enable rust-analyzer settings visit: 160 default_settings = {
173 -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc 161 -- rust-analyzer language server configuration
174 ["rust-analyzer"] = { 162 ['rust-analyzer'] = {
175 -- enable clippy on save
176 checkOnSave = {
177 command = "clippy",
178 },
179 }, 163 },
180 }, 164 },
181 }, 165 },
166 -- DAP configuration
167 dap = {
168 },
182 } 169 }
183
184 require('rust-tools').setup(rust_opts)
185 end, 170 end,
186 }, 171 },
187 { 172 {
@@ -206,8 +191,9 @@ return {
206 }, 191 },
207 }, 192 },
208 { 193 {
209 "simrat39/rust-tools.nvim", 194 'mrcjkb/rustaceanvim',
210 event = "LspAttach", 195 version = '^5', -- Recommended
196 lazy = false, -- This plugin is already lazy
211 }, 197 },
212 { 198 {
213 "folke/lazydev.nvim", 199 "folke/lazydev.nvim",