From 6fcb0c16a7f8f5e723f7a739014e45da4a104156 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 2 Sep 2024 10:33:23 +0200 Subject: nvim: migrate to rustaceanvim --- .config/nvim/lua/plugins/lsp.lua | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to '.config/nvim/lua/plugins') 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 { } }) - -- rust-tools - local rust_opts = { + vim.g.rustaceanvim = { + -- Plugin configuration tools = { - runnables = { - use_telescope = true, - }, - inlay_hints = { - auto = true, - show_parameter_hints = true, - parameter_hints_prefix = "↸ ", - other_hints_prefix = "❱ ", - }, }, - - -- all the opts to send to nvim-lspconfig - -- these override the defaults set by rust-tools.nvim - -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer + -- LSP configuration server = { on_attach = on_attach, - settings = { - -- to enable rust-analyzer settings visit: - -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc - ["rust-analyzer"] = { - -- enable clippy on save - checkOnSave = { - command = "clippy", - }, + vim.lsp.inlay_hint.enable(true), + default_settings = { + -- rust-analyzer language server configuration + ['rust-analyzer'] = { }, }, }, + -- DAP configuration + dap = { + }, } - - require('rust-tools').setup(rust_opts) end, }, { @@ -206,8 +191,9 @@ return { }, }, { - "simrat39/rust-tools.nvim", - event = "LspAttach", + 'mrcjkb/rustaceanvim', + version = '^5', -- Recommended + lazy = false, -- This plugin is already lazy }, { "folke/lazydev.nvim", -- cgit v1.2.3-70-g09d2