Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was 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

Description

@matu3ba

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions