aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-05-01 10:37:30 +0200
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit75ee7ff2f06628d161c621539b97277f8fd9a1a0 (patch)
tree2993bcbe6e4b15540cd0ab3e722f3c619899952e
parentfeat(vim): update parser and queries (diff)
downloadnvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar.gz
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar.bz2
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar.lz
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar.xz
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.tar.zst
nvim-treesitter-75ee7ff2f06628d161c621539b97277f8fd9a1a0.zip
tests(gleam): fix assert tests that no longer parse correctly
-rw-r--r--lua/nvim-treesitter/indent.lua3
-rw-r--r--tests/indent/gleam/assert.gleam2
-rw-r--r--tests/indent/java_spec.lua2
-rw-r--r--tests/indent/python_spec.lua4
-rw-r--r--tests/query/highlights/gleam/assert.gleam10
5 files changed, 11 insertions, 10 deletions
diff --git a/lua/nvim-treesitter/indent.lua b/lua/nvim-treesitter/indent.lua
index 5d9e86f66..dda632df3 100644
--- a/lua/nvim-treesitter/indent.lua
+++ b/lua/nvim-treesitter/indent.lua
@@ -4,6 +4,8 @@ local M = {}
M.comment_parsers = {
comment = true,
+ luadoc = true,
+ javadoc = true,
jsdoc = true,
phpdoc = true,
}
@@ -121,7 +123,6 @@ function M.get_indent(lnum)
return -1
end
- -- Reparse in case we got triggered by ":h indentkeys"
parser:parse({ vim.fn.line('w0') - 1, vim.fn.line('w$') })
-- Get language tree with smallest range around node that's not a comment parser
diff --git a/tests/indent/gleam/assert.gleam b/tests/indent/gleam/assert.gleam
index 2b2114628..71b94b1f8 100644
--- a/tests/indent/gleam/assert.gleam
+++ b/tests/indent/gleam/assert.gleam
@@ -1,4 +1,4 @@
pub fn main() {
- assert Ok(i) =
+ assert Ok(i) ==
parse_int("123")
}
diff --git a/tests/indent/java_spec.lua b/tests/indent/java_spec.lua
index 97354dbc7..cbbc16092 100644
--- a/tests/indent/java_spec.lua
+++ b/tests/indent/java_spec.lua
@@ -26,7 +26,7 @@ describe('indent Java:', function()
run:new_line(
'issue_2583.java',
{ on_line = 3, text = 'int x = 1;', indent = 4 },
- 'fails because tree is in a broken state',
+ 'broken tree',
XFAIL
)
run:new_line('issue_2583.java', { on_line = 4, text = 'int x = 1;', indent = 4 })
diff --git a/tests/indent/python_spec.lua b/tests/indent/python_spec.lua
index 65be126fa..d0a86e540 100644
--- a/tests/indent/python_spec.lua
+++ b/tests/indent/python_spec.lua
@@ -56,13 +56,13 @@ describe('indent Python:', function()
run:new_line(
'join_lines.py',
{ on_line = 1, text = '+ 1 \\', indent = 4 },
- 'fails due two not working query at python/indent.scm:30',
+ 'expected failure',
XFAIL
)
run:new_line(
'join_lines.py',
{ on_line = 4, text = '+ 1 \\', indent = 4 },
- 'fails due two not working query at python/indent.scm:30',
+ 'expected failure',
XFAIL
)
run:new_line('join_lines.py', { on_line = 7, text = '+ 1 \\', indent = 4 })
diff --git a/tests/query/highlights/gleam/assert.gleam b/tests/query/highlights/gleam/assert.gleam
index 8be39923d..fd95304ac 100644
--- a/tests/query/highlights/gleam/assert.gleam
+++ b/tests/query/highlights/gleam/assert.gleam
@@ -1,13 +1,13 @@
pub fn main() {
- assert Ok(i) = parse_int("123")
+ assert Ok(i) == parse_int("123")
// <- @keyword.exception
// ^^ @constructor
// ^ @punctuation.bracket
// ^ @variable
// ^ @punctuation.bracket
// ^ @operator
- // ^^^^^^^^^ @function.call
- // ^ @punctuation.bracket
- // ^^^^^ @string
- // ^ @punctuation.bracket
+ // ^^^^^^^^^ @function.call
+ // ^ @punctuation.bracket
+ // ^^^^^ @string
+ // ^ @punctuation.bracket
}