Skip to content

Commit

Permalink
feat(lsp): add lsp-inlayhints plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed May 24, 2023
1 parent e4915db commit b6e8f12
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/lsp/lsp-inlayhints-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# lsp-inlayhints.nvim

**Repository:** https://github.com/lvimuser/lsp-inlayhints.nvim

Partial implementation of LSP inlay hint.
14 changes: 14 additions & 0 deletions lua/astrocommunity/lsp/lsp-inlayhints-nvim/lsp-inlayhints.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
"lvimuser/lsp-inlayhints.nvim",
init = function()
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("LspAttach_inlayhints", {}),
callback = function(args)
if not (args.data and args.data.client_id) then return end
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client.server_capabilities.inlayHintProvider then require("lsp-inlayhints").on_attach(client, args.buf) end
end,
})
end,
opts = {},
}

0 comments on commit b6e8f12

Please sign in to comment.