I often use vim.lsp.buf.references()
, but rarely do I need the references in test files (e.g. *_test.go
for Go).
Is there a way to use this command with an ignore pattern so I could have something like this in my on_attach
method:
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references(<ignore *_test.go>)<CR>', opts)
buf_set_keymap('n', 'gR, '<cmd>lua vim.lsp.buf.references()<CR>', opts)