Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot set syntax region on typescript tagged templates assigned to variables #12008

Closed
andykais opened this issue Mar 12, 2020 · 1 comment
Closed
Labels
bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first syntax regex syntax or non-regex parsing, lpeg, grammars
Milestone

Comments

@andykais
Copy link

  • nvim --version:
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
  • vim -u DEFAULTS (version: ) behaves differently? no
  • Operating system/version: arch linux
  • Terminal name/version: urxvt v9.22
  • $TERM: rxvt-unicode-256color

Steps to reproduce using nvim -u NORC

add the following snippet to ~/.config/nvim/after/syntax/typescript.vim

unlet b:current_syntax
syn include @SQL syntax/sql.vim
syn region sqlTemplate start=+sql`+
        \ end=+`+
        \ contains=@SQL

create a file called test.ts like this:

// highlights template as SQL
sql`SELECT * FROM x`

// does not highlight template as SQL
const x = sql`SELECT * FROM x
nvim -u NORC test.ts

Actual behaviour

screenshot(220)

Expected behaviour

both the string templates should be highlighted as sql.

This is only an issue with typescript, javascript behaves as expected. Prior issues:

@andykais andykais added the bug issues reporting wrong behavior label Mar 12, 2020
@andykais
Copy link
Author

is there any way to get help on this issue? Is there a way to increase visibility? I feel like this has gotten buried...

@zeertzjq zeertzjq added the syntax regex syntax or non-regex parsing, lpeg, grammars label Jan 17, 2022
@justinmk justinmk added bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first labels Mar 21, 2023
@justinmk justinmk added this to the unplanned milestone Mar 21, 2023
@lewis6991 lewis6991 removed the bug issues reporting wrong behavior label Mar 21, 2023
@lewis6991 lewis6991 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-vim wrong behavior inherited from vim needs:vim-patch upstream issue that needs to be fixed in vim first syntax regex syntax or non-regex parsing, lpeg, grammars
Projects
None yet
Development

No branches or pull requests

4 participants