aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/query.lua
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-09-27 18:08:05 -0700
committerChristian Clason <c.clason@uni-graz.at>2024-09-28 10:54:45 +0200
commit4349bdbd0bd0096b4f4bea0feda0961e3b03f3cc (patch)
tree6e5f3926f4ab2fe6b380f13bf5c951655653d708 /runtime/lua/vim/treesitter/query.lua
parent4f9311b759fff0371433fb5b5355fccb001d54e7 (diff)
downloadrneovim-4349bdbd0bd0096b4f4bea0feda0961e3b03f3cc.tar.gz
rneovim-4349bdbd0bd0096b4f4bea0feda0961e3b03f3cc.tar.bz2
rneovim-4349bdbd0bd0096b4f4bea0feda0961e3b03f3cc.zip
fix(treesitter): specify success status in edit_query return value
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r--runtime/lua/vim/treesitter/query.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua
index 758c8bb356..135250578e 100644
--- a/runtime/lua/vim/treesitter/query.lua
+++ b/runtime/lua/vim/treesitter/query.lua
@@ -1028,11 +1028,7 @@ end
---
--- @param lang? string language to open the query editor for. If omitted, inferred from the current buffer's filetype.
function M.edit(lang)
- -- TODO(ribru17): Make edit_query return true upon success so we can just assert here
- local _, err_msg = vim.treesitter.dev.edit_query(lang)
- if err_msg then
- error(err_msg)
- end
+ assert(vim.treesitter.dev.edit_query(lang))
end
return M