Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

advanced guide: content #43

@matu3ba

Description

@matu3ba

The one and only luajit wiki and luajit not yet implemented.

  1. Performance tips: wiki + wait for status information, computing performance guide recommended by scilua author

  2. Debugging: one step for vimkind

  3. luarocks => [wbthomason/packer.nvim] has now support luarocks packages => add firejail profile for luarocks done, but I want to test it further before upstreaming. Currently I have weird folder quirks.

  4. :checkhealth integration => check core and treesitter implementation

  5. Explaining what is most performant and why (vim.api) and what happens under the hood ie for vim.call,vim.fn etc. (blocked by missing documentation upstream) see Mention vim.api.nvim_call_function #6
    https://www.reddit.com/r/neovim/comments/oeevcy/what_is_the_difference_between_vimapi_and_vimfn/h45ujiz?utm_source=share&utm_medium=web2x&context=3
    "What is the difference between vim.api and vim.fn functions?"
    "you can no longer use api functions from vim.fn which used to be the case
    vim.api is nvim specific functions and it goes from lua -> C while vim.fn is viml functions which goes from lua -> viml -> C
    there's more overhead for using vim.fn than vim.api"

  6. Some internal functions (categories?) and how to find more etc

Plugin guidelines:

  1. dont autostart lua stuff from vimscript: let the user handle it (for example using plugin folder makes profiling annoying/kinda breaks it): A Lua-aware startup time profiler nvim-lua/wishlist#15 (comment)
  2. "Note that underscore-prefixed functions (e.g. "_os_proc_children") are internal/private and must not be used by plugins"
    => dont use underscopre-prefixed functions
  3. Guidelines how to name functions. local function a = bla() vs local a = function(). Related function M.bla() for a table.

I copied some content to the plugin template project and will delete this issue, once the stuff is documented there properly.

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