Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

investigate 0.8's LspAttach event #58

Open
WhoIsSethDaniel opened this issue Aug 9, 2022 · 0 comments
Open

investigate 0.8's LspAttach event #58

WhoIsSethDaniel opened this issue Aug 9, 2022 · 0 comments

Comments

@WhoIsSethDaniel
Copy link
Owner

WhoIsSethDaniel commented Aug 9, 2022

An example setting up lsp-inlayhints:

vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
vim.api.nvim_create_autocmd("LspAttach", {
  group = "LspAttach_inlayhints",
  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(bufnr, client)
  end,
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant