RetroFed Forum
Your home away from modern life.
How to find functions in documentation
Post Reply
AuthorMessage
Agility0971 lemmy.world Agility0971@lemmy.world
Joined: 2023-06-11
Quote

I'm using NvChad and in ~/.config/nvim/lua/core/mappings.lua there is a keybinding for LSP code action:

  ["<leader>ca"] = {
    function()
      vim.lsp.buf.code_action()
      -- TODO: write buffer to file
    end,
    "LSP code action",
},

this keybinding applies the code action, but does not write to file. I want to write changes to file as soon as I've applied the code action.

How can I use the documentation at https://neovim.io/doc/ to find the correct function? I've tried looking for a write() function but I could not find anything I can call from lua.

1   Original
Post Reply
Back to top