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

add missing key_indexer shorthand: Update default_config.lua #1119

Closed
wants to merge 3 commits into from

Conversation

rathod-sahaab
Copy link
Contributor

This fixes bug #1118 where k is nil, in case of lua load from folder as it's not declared explicitly by the user.

rathod-sahaab and others added 2 commits January 28, 2024 05:42
This fixes bug where k is nil, in case of lua load from folder as it's not declared explicitly by the user.
@rathod-sahaab rathod-sahaab changed the title add missing key_indexer, shorthand: Update default_config.lua add missing key_indexer shorthand: Update default_config.lua Jan 28, 2024
@L3MON4D3
Copy link
Owner

Hey!
In case you're not aware, there is snip_env, a config-option which customizes the variables exposed in files loaded by the lua-loader (it's described here).
By setting it to {k = require("luasnip.nodes.key_indexer").new_key}, you can also get this variable :)

But since key-indexer is such a nice tool, you're probably right in wanting it in the default-env too, so TY for this PR :D

@L3MON4D3
Copy link
Owner

(Merged via cherry-pick in 04266a9)

@L3MON4D3 L3MON4D3 closed this Feb 14, 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

Successfully merging this pull request may close these issues.

2 participants