summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins
diff options
context:
space:
mode:
authorYigit Sever2024-09-02 10:33:23 +0200
committerYigit Sever2024-09-02 10:33:42 +0200
commit6fcb0c16a7f8f5e723f7a739014e45da4a104156 (patch)
treeed97f7c6544cf8226da028a857efb5b6da5a7bfd /.config/nvim/lua/plugins
parent2dcf48357da7309f357eda0b3d3daea135b42865 (diff)
downloaddotfiles-6fcb0c16a7f8f5e723f7a739014e45da4a104156.tar.gz
dotfiles-6fcb0c16a7f8f5e723f7a739014e45da4a104156.tar.bz2
dotfiles-6fcb0c16a7f8f5e723f7a739014e45da4a104156.zip
nvim: migrate to rustaceanvim
Diffstat (limited to '.config/nvim/lua/plugins')
-rw-r--r--.config/nvim/lua/plugins/lsp.lua40
1 files changed, 13 insertions, 27 deletions
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",