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

feat(move on empty function signature) #406

Closed
wants to merge 5 commits into from
Closed

feat(move on empty function signature) #406

wants to merge 5 commits into from

Conversation

Sam-programs
Copy link
Contributor

made the feature requested in #387

@windwp
Copy link
Owner

windwp commented Oct 15, 2023

can you add a prefix enable_move_on_empty_functions.
there are some options don't have that prefix because it come from old version and i don't want to break user config.

@Sam-programs
Copy link
Contributor Author

done

@Sam-programs
Copy link
Contributor Author

hmm i am actually a bit scared i might have broken some custom pairs
because i am not using key_map anymore

                local pairs = utils.esc(rule.start_pair .. rule.end_pair)
                local move_text = ''
                if  autopairs.config.move_on_empty_functions == false or 
                    functionsig:sub(#functionsig - 1,#functionsig) ~= pairs
                    then
                    move_text = utils.esc(utils.repeat_key('<left>',#rule.end_pair))
                end
                vim.api.nvim_feedkeys(pairs .. move_text, "i", false)

should i hardcore () as the function signature pair ?

@Sam-programs
Copy link
Contributor Author

Sam-programs commented Oct 15, 2023

i am sure this is safe to add now

Copy link

stale bot commented Dec 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 16, 2023
@Sam-programs Sam-programs closed this by deleting the head repository Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants