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

Bad custom textobjects snippet example for select keymaps in the README #517

Open
den-is opened this issue Oct 31, 2024 · 0 comments
Open

Comments

@den-is
Copy link

den-is commented Oct 31, 2024

Here:

go.nvim/README.md

Lines 986 to 992 in 3ea80d7

["iF"] = {
python = "(function_definition) @function",
cpp = "(function_definition) @function",
c = "(function_definition) @function",
java = "(method_declaration) @function",
go = "(method_declaration) @function"
}

Example shows outdated configuration snippet for select keymaps.
This is not allowed anymore, you can't set per language custom textobjects like this.

Exact issue describing old snippet in the README: nvim-treesitter/nvim-treesitter-textobjects#65

Doc: https://github.com/nvim-treesitter/nvim-treesitter-textobjects?tab=readme-ov-file#overriding-or-extending-textobjects

Personally, I did not know anything about textobjects and stuff, just wanted to follow go.nvim guide and add a little bit of fancy-schmancy features. Occurred that I broke my nvim setup, and had to learn new ... stuff. :)

@den-is den-is changed the title Bad custom textobjects example in the README Bad custom textobjects snippet example for select keymaps in the README Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant