-
Notifications
You must be signed in to change notification settings - Fork 0
Reporting an error I receive anytime I try to open the query viewer. #3
Comments
Hi @MostHated, I can't seem to reproduce the issue. Also your screenshot / stack trace doesn't have any direct connection to |
Oh, interesting. I even read that and didn't think much of it. I didn't have TSPG opened or anything. I will try and play around with some settings and see if I can narrow something down. |
So, it looks like, in the tree-sitter settings, if I turn off the setting require'nvim-treesitter.configs'.setup {
...
query_linter = { enable = false, }
...
} Doing this, the error goes away, though, it is not really practical, to try and go in and swap out settings and what not each time I want to use it (which is quite frequently, at the moment). If it were just one message upon opening it, that would not be a huge issue, but unfortunately, the error pops up for ever single cursor move you try to do while the query-secretary window is opened as seen below: Once I turn it off, everything works as expected. It seems like whatever changes that are happening are making the CursorHold of the tree-sitters linter bug out. If you have any recommendations, I would greatly appreciate it. |
The return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
dependencies = {
"nvim-treesitter/playground",
"windwp/nvim-ts-autotag",
"p00f/nvim-ts-rainbow",
"nvim-treesitter/nvim-treesitter-textobjects",
},
event = "BufReadPost",
-- event = { "VeryLazy" },
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = "all",
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
rainbow = {
enable = true,
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
},
autotag = {
enable = true,
},
textobjects = {
select = {
enable = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["am"] = "@call.outer",
["im"] = "@call.inner",
["ab"] = "@block.outer",
["ib"] = "@block.inner",
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
["as"] = "@statement.outer",
},
},
},
playground = {
enable = true,
disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = true, -- Whether the query persists across vim sessions
keybindings = {
toggle_query_editor = "o",
toggle_hl_groups = "i",
toggle_injected_languages = "t",
toggle_anonymous_nodes = "a",
toggle_language_display = "I",
focus_language = "f",
unfocus_language = "F",
update = "R",
goto_node = "<cr>",
show_help = "?",
},
},
})
end,
},
} |
I understand. It looks like info on the query linter is on the actual playground page, not the tree-sitter page: https://github.com/nvim-treesitter/playground#query-linter I have the actual tree-sitter 'query language' language installed, as I am writing a tree-sitter grammar and parser for a language. My setup is probably a bit less common than other folks because of this, so not a lot of people may run into this issue. So not sure if it is worth your time to look into, which I can understand. I can just deal with the issue, and enable/disable the linter as needed. |
Since I don't have adequate knowledge to diagnose and resolve the issue, I'll keep it open for now. Thank you for understanding. |
Hey there, I installed this and went to give it a try (just opened it on the setup method of this plugin first) but I end up getting the error below whenever I try to open the query popup.
Just for reference, this is where my cursor was when I gave it a go.
The text was updated successfully, but these errors were encountered: