Skip to content

Commit 6ce2c22

Browse files
committed
chore!(tree-sitter): update query for tree-sitter-haskell rewrite
1 parent 89a4f68 commit 6ce2c22

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [2.0.0] - 2024-05-13
10+
11+
### BREAKING CHANGE
12+
13+
- Updated tree-sitter query to be compatible with the
14+
tree-sitter-haskell v0.21.0 rewrite.
15+
- If you are using nvim-treesitter to manage parser installations, run `:TSUpdate`
16+
to ensure you have the latest tree-sitter-haskell version.
17+
- If you are using Nix with an older version of the parser,
18+
you can either package tree-sitter-haskell,
19+
or pin an older version of this plugin.
20+
921
## [1.4.3] - 2023-12-15
1022

1123
### Fixed

lua/haskell-snippets/module.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
---@return string|nil
4242
local function treesitter_module_name(apply, content, query_string)
4343
assert(has_haskell_parser, 'No tree-sitter parser for Haskell found.')
44-
query_string = query_string or '(module) @mod'
44+
query_string = query_string or '(module_id) @mod'
4545
local module_query = vim.treesitter.query.parse(hs_lang, query_string)
4646
local lang_tree = vim.treesitter.get_string_parser(content, hs_lang, { injections = { [hs_lang] = '' } })
4747
local root = fast_parse(lang_tree):root()

0 commit comments

Comments
 (0)