Skip to content

Highlight Error with Nix code.  #11

@aldoborrero

Description

@aldoborrero

Mirrored from nix-community#126 by @usmcamp0811 (opened 2025-01-16T02:21:22Z).

This issue is tracked here so the fork can work on it; upstream may not respond. Please add new context in this issue.


I hope this is the correct place to report this.. but I have what I think is a bug with the highlighter when it sees things like this:

            in entry == "regular" && builtins.match ".*default\\.nix$" name != null)

I get this error:

Error in decoration provider treesitter/highlighter.win:                                                                                                                         
Error executing lua: ...d-0.10.3/share/nvim/runtime/lua/vim/treesitter/query.lua:252: Query error at 9:4. Invalid node type "<":                                                 
  "<"                                                                                                                                                                            
   ^                                                                                                                                                                             
                                                                                                                                                                                 
stack traceback:                                                                                                                                                                 
        [C]: in function '_ts_parse_query'                                                                                                                                       
        ...d-0.10.3/share/nvim/runtime/lua/vim/treesitter/query.lua:252: in function 'fn'                                                                                        
        ...pped-0.10.3/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'fn'                                                                                         
        ...pped-0.10.3/share/nvim/runtime/lua/vim/func/_memoize.lua:58: in function 'get'                                                                                        
        ....3/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:28: in function 'new'                                                                                        
        ....3/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:243: in function 'get_query'                                                                                 
        ....3/share/nvim/runtime/lua/vim/treesitter/highlighter.lua:191: in function 'fn'                                                                                        
        ...3/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:491: in function 'for_each_tree'                                                                             
        ...3/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:495: in function 'for_each_tree'                                                                             
        ...3/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:495: in function 'fo                                                                                         
Press ENTER or type command to continue   

My vim config can be run with nix run gitlab:usmcamp0811/campground-nvim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions