nvim: treesitter: Make PureScript use Haskell parser and queries

Turns out that the Haskell treesitter implementation can be used
for PureScript as well.

This is exactly what Helix does.
https://github.com/helix-editor/helix/pull/4242/files
This commit is contained in:
Sanchayan Maity 2023-06-07 13:47:44 +05:30
parent d5a70895a5
commit 4468c8b0c1
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -17,5 +17,8 @@ require'nvim-treesitter.configs'.setup {
}, },
} }
-- Make PureScript use Haskell parser and queries.
vim.treesitter.language.register('haskell', 'purescript')
vim.keymap.set('o', '<Leader>m', ':<C-U>lua require(\'tsht\').nodes()<CR>', { noremap=false, unique=true, silent=true }) vim.keymap.set('o', '<Leader>m', ':<C-U>lua require(\'tsht\').nodes()<CR>', { noremap=false, unique=true, silent=true })
vim.keymap.set('x', '<Leader>m', ':lua require(\'tsht\').nodes()<CR>' , { noremap=true , unique=true, silent=true }) vim.keymap.set('x', '<Leader>m', ':lua require(\'tsht\').nodes()<CR>' , { noremap=true , unique=true, silent=true })