goldsmith.nvim icon indicating copy to clipboard operation
goldsmith.nvim copied to clipboard

investigate 0.8's LspAttach event

Open WhoIsSethDaniel opened this issue 3 years ago • 0 comments

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,
})

WhoIsSethDaniel avatar Aug 09 '22 18:08 WhoIsSethDaniel