Skip to content
New issue

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

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

Already on GitHub? # to your account

nvim-treesitter-context not working #828

Closed
2 tasks done
Saafo opened this issue Jun 28, 2023 · 3 comments · Fixed by #830
Closed
2 tasks done

nvim-treesitter-context not working #828

Saafo opened this issue Jun 28, 2023 · 3 comments · Fixed by #830
Labels
bug Something isn't working has:repro This issue contains reproducing steps treesitter Treesitter related issues

Comments

@Saafo
Copy link
Contributor

Saafo commented Jun 28, 2023

Version confirmation

  • Confirm

Following prerequisites

  • Confirm

Neovim version

0.9.1

Operating system/version

macOS 13.4

Terminal name/version

Warp

$TERM environment variable

xterm-256color

Branch info

main (Default/Latest)

Fetch Preferences

SSH (use_ssh = true)

How to reproduce the issue

open a code file

Expected behavior

show sticky header

Actual behavior

no sticky header

Additional information

Maybe we should call setup to make it works:

@@ -112,7 +112,12 @@ editor["nvim-treesitter/nvim-treesitter"] = {
 	config = require("editor.treesitter"),
 	dependencies = {
 		{ "nvim-treesitter/nvim-treesitter-textobjects" },
-		{ "nvim-treesitter/nvim-treesitter-context" },
+		{
+			"nvim-treesitter/nvim-treesitter-context",
+			config = function()
+				require("treesitter-context").setup()
+			end,
+		},
 		{ "mrjones2014/nvim-ts-rainbow" },
 		{ "JoosepAlviste/nvim-ts-context-commentstring" },
 		{ "mfussenegger/nvim-treehopper" },
@Saafo Saafo added the bug Something isn't working label Jun 28, 2023
@Jint-lzxy
Copy link
Collaborator

Can't reproduce this:
截圖

@Jint-lzxy Jint-lzxy added needs:repro We need more details to reproduce this problem treesitter Treesitter related issues labels Jun 28, 2023
@Saafo
Copy link
Contributor Author

Saafo commented Jun 29, 2023

Can't reproduce this

Can reproduce on the latest commit in lua and swift files. Would you mind sync in Lazy and try again?

image

@ayamir
Copy link
Owner

ayamir commented Jun 29, 2023

@Jint-lzxy Has repro, and add setup function will solve it 👍
@Saafo You can write a pr for it.

Saafo added a commit to Saafo/nvimdots that referenced this issue Jun 29, 2023
Change-Id: I7942ac85bf3791f7487eb15fae9cb6c0aa3c6b71
@Jint-lzxy Jint-lzxy added has:repro This issue contains reproducing steps and removed needs:repro We need more details to reproduce this problem labels Jun 29, 2023
Jint-lzxy added a commit that referenced this issue Jun 29, 2023
* fix(nvim-treesitter-context): setup to enable (#828)

Change-Id: I7942ac85bf3791f7487eb15fae9cb6c0aa3c6b71

* fixup! fix(nvim-treesitter-context): setup to enable (#828)

* fixup! fixup! fix(nvim-treesitter-context): setup to enable (#828)

---------

Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com>
singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this issue Jun 30, 2023
* fix(nvim-treesitter-context): setup to enable (ayamir#828)

Change-Id: I7942ac85bf3791f7487eb15fae9cb6c0aa3c6b71

* fixup! fix(nvim-treesitter-context): setup to enable (ayamir#828)

* fixup! fixup! fix(nvim-treesitter-context): setup to enable (ayamir#828)

---------

Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working has:repro This issue contains reproducing steps treesitter Treesitter related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants