rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

Inlay hints don't work correctly

Open alloc33 opened this issue 3 years ago • 1 comments

I have an issue with inlay hints - it it works unpredictable. If I open neovim and non-rust file first - inlay hints don't work when I open rust file afterwards. Also sometimes it just stops to display inlay hints while opening new rust files and other buffers.

Here is my config:

local executors = require "rust-tools.executors"
require("rust-tools").setup {
	tools = {
		executor = executors.toggleterm,
		runnables = {
			use_telescope = true,
		},
		autosethints = true,
		inlay_hints = { show_parameter_hints = true },
		hover_actions = { auto_focus = true }
	},
	server = {
		on_attach = function(client, bufnr)
			require("lvim.lsp").common_on_attach(client, bufnr)
			local rt = require "rust-tools"
			vim.keymap.set("n", "<leader>la", rt.code_action_group.code_action_group, { buffer = bufnr })
		end,
		on_init = require("lvim.lsp").common_on_init,
		settings = {
			["rust-analyzer"] = {
				lens = {
					enable = true,
				},
				checkonsave = {
					command = "clippy",
				},
			},
		},
	},
}

alloc33 avatar Oct 08 '22 08:10 alloc33

i removed the rust-analyzer from lvim.lsp.installer.setup.ensure_installed = { ... } then hints showed up.

ehsanonline avatar Oct 26 '22 01:10 ehsanonline