stsewd / tree-sitter-comment

Tree-sitter grammar for comment tags like TODO, FIXME(user).
https://stsewd.dev/tree-sitter-comment/
MIT License
134 stars 9 forks source link

HTTP URI parsing not working for Python #26

Closed ColinKennedy closed 1 year ago

ColinKennedy commented 1 year ago

I saw the post on Reddit that URLs can now be parsed (and even queried / highlighted) so I tried to take it out for a spin. It's not working for me, it seems.

Screenshot from 2023-06-10 16-26-47

`:version` information :version NVIM v0.9.0 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/__w/neovim/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/build/src/nvim/auto -I/__w/neovim/neovim/build/include -I/__w/neovim/neovim/build/cmake.config -I/__w/neovim/neovim/src -I/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include -I/__w/neovim/neovim/.deps/usr/include system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/__w/neovim/neovim/build/nvim.AppDir/usr/share/nvim" Run :checkhealth for more info Press ENTER or type command to continue

Other details

stsewd commented 1 year ago

Hi, can you check that you are using the latest version of nvim-treesitter or that you don't have a custom query override?

You can get the query file with

echo nvim_get_runtime_file('queries/comment/*', v:true)

ColinKennedy commented 1 year ago

I double-checked and I was running an out of date nvim-treesitter. Now that I have this commit, https://github.com/nvim-treesitter/nvim-treesitter/commit/48f4f3ead16e59d886f2109dd796773c37dd713e, URIs show up as expected.

Screenshot from 2023-06-22 00-10-26

Thank you for the advice, this issue can be closed :)