Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

consider move setup to lua and make user setup commands #63

Closed
matu3ba opened this issue Apr 8, 2021 · 1 comment
Closed

consider move setup to lua and make user setup commands #63

matu3ba opened this issue Apr 8, 2021 · 1 comment

Comments

@matu3ba
Copy link

matu3ba commented Apr 8, 2021

Reasons to do:

  1. A pure lua profile would decrease startup time.
  2. The lua startup profiler would be more correct or simpler to get correct with this change. Otherwise one gets more wrong results.
  3. Try to be consistent as to use functionality of lua, if possible.
  4. Having a function to initialize makes separating things for user-specific settings while getting updates much easier (user may implement a different function or commands to customize plugin).

Another related reason (bad practice/historical reasons): nvim-treesitter/module-template#1

Relevant content for change (ideally as users should configure this):
https://github.com/nanotee/nvim-lua-guide#caveats-5
https://github.com/nanotee/nvim-lua-guide#vimapinvim_command

if vim.fn.has('nvim') == 1 then
    -- not exactly sure about those commands
end
vim.api.nvim_exec([[
command! HopWord lua require'hop'.hint_words() -- The jump-to-word command.
command! HopPattern lua require'hop'.hint_patterns() -- The jump-to-pattern command.
command! HopChar1 lua require'hop'.hint_char1() -- The jump-to-char-1 command.
command! HopChar2 lua require'hop'.hint_char2() -- The jump-to-char-2 command.
command! HopLine lua require'hop'.hint_lines() -- The jump-to-line command.
]], false)
@hadronized
Copy link
Owner

I honestly don’t understand your issue. The current setup is done via Lua, via require'hop'.setup { … }.

yehuohan pushed a commit to yehuohan/hop.nvim that referenced this issue Apr 22, 2024
jhgarner pushed a commit to jhgarner/hop.nvim that referenced this issue Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants