From 3598b7048da2d6a1357d90bd2d3799a32882c4b9 Mon Sep 17 00:00:00 2001 From: Luke Else Date: Thu, 16 Mar 2023 21:58:05 +0000 Subject: [PATCH] Swapped out rust-tools for lsp extensions as rt took over lsp keybinds --- nvim/after/plugin/inlay.lua | 7 ++++++ nvim/after/plugin/rt.lua | 45 ----------------------------------- nvim/lua/luke-else/packer.lua | 4 ++-- 3 files changed, 9 insertions(+), 47 deletions(-) create mode 100644 nvim/after/plugin/inlay.lua delete mode 100644 nvim/after/plugin/rt.lua diff --git a/nvim/after/plugin/inlay.lua b/nvim/after/plugin/inlay.lua new file mode 100644 index 0000000..d4d2b6e --- /dev/null +++ b/nvim/after/plugin/inlay.lua @@ -0,0 +1,7 @@ +require'lsp_extensions'.inlay_hints{ + highlight = "Comment", + prefix = " > ", + aligned = false, + only_current_line = false, + enabled = { "ChainingHint" } +} \ No newline at end of file diff --git a/nvim/after/plugin/rt.lua b/nvim/after/plugin/rt.lua deleted file mode 100644 index d13b47b..0000000 --- a/nvim/after/plugin/rt.lua +++ /dev/null @@ -1,45 +0,0 @@ -local opts = { - tools = { -- rust-tools options - -- automatically call RustReloadWorkspace when writing to a Cargo.toml file. - reload_workspace_from_cargo_toml = true, - - -- These apply to the default RustSetInlayHints command - inlay_hints = { - -- automatically set inlay hints (type hints) - -- default: true - auto = true, - - -- Only show inlay hints for the current line - only_current_line = false, - - -- whether to show parameter hints with the inlay hints or not - -- default: true - show_parameter_hints = true, - - -- prefix for parameter hints - -- default: "<-" - parameter_hints_prefix = "<- ", - - -- prefix for all the other hints (type, chaining) - -- default: "=>" - other_hints_prefix = "=> ", - - -- whether to align to the length of the longest line in the file - max_len_align = false, - - -- padding from the left if max_len_align is true - max_len_align_padding = 1, - - -- whether to align to the extreme right or not - right_align = false, - - -- padding from the right if right_align is true - right_align_padding = 7, - - -- The color of the hints - highlight = "Comment", - }, - }, - } - - require('rust-tools').setup(opts) \ No newline at end of file diff --git a/nvim/lua/luke-else/packer.lua b/nvim/lua/luke-else/packer.lua index 201efab..9a18ccd 100644 --- a/nvim/lua/luke-else/packer.lua +++ b/nvim/lua/luke-else/packer.lua @@ -57,8 +57,8 @@ return require('packer').startup(function(use) } } - -- Rust tools - use 'simrat39/rust-tools.nvim' + -- Type Inlay + use('nvim-lua/lsp_extensions.nvim') -- Debugger use 'nvim-lua/plenary.nvim'