chg: Switch to in-built inlay hints

This commit is contained in:
Sayantan Santra 2024-05-19 17:30:00 -05:00
parent c4f2a54062
commit f89a9107a1
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
3 changed files with 3 additions and 13 deletions

View file

@ -56,7 +56,6 @@ require("lazy").setup(
"mrcjkb/rustaceanvim", "mrcjkb/rustaceanvim",
version = "^4", version = "^4",
ft = { "rust" }, ft = { "rust" },
dependencies = { "lvimuser/lsp-inlayhints.nvim" },
}, },
-- Automatically add bracket pairs -- Automatically add bracket pairs
"windwp/nvim-autopairs", "windwp/nvim-autopairs",

View file

@ -20,7 +20,6 @@ lspconfig.lua_ls.setup({
}) })
lspconfig.ocamllsp.setup {} lspconfig.ocamllsp.setup {}
lspconfig.hls.setup {} lspconfig.hls.setup {}
-- Set ;k to hover and ;a to show code actions -- Set ;k to hover and ;a to show code actions
@ -32,15 +31,10 @@ vim.api.nvim_create_autocmd("LspAttach", {
end, end,
}) })
-- Enable inlay hints (needs rework after nvim>=0.10) -- Enable inlay hints for Rust
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
pattern = "*.rs", pattern = "*.rs",
callback = function(args) callback = function()
if not (args.data and args.data.client_id) then vim.lsp.inlay_hint.enable(true)
return
end
local bufnr = args.buf
local client = vim.lsp.get_client_by_id(args.data.client_id)
require("lsp-inlayhints").on_attach(client, bufnr)
end, end,
}) })

View file

@ -11,6 +11,3 @@ require("log-highlight").setup()
-- Load UltiSnips snippets from custom-snippets directory -- Load UltiSnips snippets from custom-snippets directory
vim.g.UltiSnipsSnippetDirectories = { "my-snippets", "UltiSnips" } vim.g.UltiSnipsSnippetDirectories = { "my-snippets", "UltiSnips" }
-- Load default settings for inlay hints plugin (won't need it for nvim>=0.10)
require("lsp-inlayhints").setup()