A 39-year-old man has pleaded not guilty by reason of insanity to murdering his grandfather in the Donegal Gaeltacht over two years ago.