chg: Switch to in-built inlay hints
This commit is contained in:
parent
c4f2a54062
commit
f89a9107a1
3 changed files with 3 additions and 13 deletions
|
@ -56,7 +56,6 @@ require("lazy").setup(
|
|||
"mrcjkb/rustaceanvim",
|
||||
version = "^4",
|
||||
ft = { "rust" },
|
||||
dependencies = { "lvimuser/lsp-inlayhints.nvim" },
|
||||
},
|
||||
-- Automatically add bracket pairs
|
||||
"windwp/nvim-autopairs",
|
||||
|
|
|
@ -20,7 +20,6 @@ lspconfig.lua_ls.setup({
|
|||
})
|
||||
|
||||
lspconfig.ocamllsp.setup {}
|
||||
|
||||
lspconfig.hls.setup {}
|
||||
|
||||
-- Set ;k to hover and ;a to show code actions
|
||||
|
@ -32,15 +31,10 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
|||
end,
|
||||
})
|
||||
|
||||
-- Enable inlay hints (needs rework after nvim>=0.10)
|
||||
-- Enable inlay hints for Rust
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
pattern = "*.rs",
|
||||
callback = function(args)
|
||||
if not (args.data and args.data.client_id) then
|
||||
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)
|
||||
callback = function()
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -11,6 +11,3 @@ require("log-highlight").setup()
|
|||
|
||||
-- Load UltiSnips snippets from custom-snippets directory
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue