Skip to content

Definition highlight not right on cpp. #5

Open
@fgheng

Description

@fgheng

Describe the bug
Hello, look at this code, if cursor on ::reused, the global value reused should be highlight, but the local value reused highlight.

  #include <iostream>
  
  int reused = 42;
  
  int main(int argc, char *argv[]) {
    int unique = 0;
    std::cout << reused << " " << unique << std::endl;
    int reused = 0;
    std::cout << reused << " " << unique << std::endl;
    std::cout << ::reused << " " << unique << std::endl;
  
    return 0;
  }

image
image

Expected behavior
the global value reused should be highlight.

Output of :checkhealth nvim_treesitter

health#nvim_treesitter#check

Installation

  • OK: git executable found.
  • OK: cc executable found.

elm parser healthcheck

c parser healthcheck

teal parser healthcheck

java parser healthcheck

python parser healthcheck

dart parser healthcheck

lua parser healthcheck

  • OK: lua parser found.
  • OK: highlights.scm found.
  • OK: locals.scm found.
  • OK: folds.scm found.
  • OK: indents.scm found.

ocaml parser healthcheck

go parser healthcheck

nix parser healthcheck

yaml parser healthcheck

json parser healthcheck

jsdoc parser healthcheck

php parser healthcheck

julia parser healthcheck

html parser healthcheck

typescript parser healthcheck

fennel parser healthcheck

swift parser healthcheck

query parser healthcheck

cpp parser healthcheck

regex parser healthcheck

verilog parser healthcheck

ruby parser healthcheck

vue parser healthcheck

ocamllex parser healthcheck

scala parser healthcheck

ql parser healthcheck

rust parser healthcheck

toml parser healthcheck

bash parser healthcheck

rst parser healthcheck

css parser healthcheck

ocaml_interface parser healthcheck

javascript parser healthcheck

c_sharp parser healthcheck

haskell parser healthcheck

tsx parser healthcheck

Output of nvim --version

NVIM v0.5.0-781-ga22fe09b9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-cf8f8ff3-8560-4d24-8cbb-fea1921bfd23

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions