LoginSignup
0
0

More than 3 years have passed since last update.

First exercise creating neovim plugin with Lua

Posted at

I'm very exited with neovim, it's possible the version 0.5 to be released this month.
and also I want to cooperate with a new feature on the vista plugin

today I was working recreating this exercise
https://dev.to/2nit/how-to-write-neovim-plugins-in-lua-5cca

My repo: https://github.com/roberbnd/nvim-git-files-commit

Resume

  • using require'VALUE'.gitFilesCommit(): VALUE has to be the same name as it has the file .lua
    • File plugin/nvim-git-files-commit.vim:10

Learned functions under vim.api
https://neovim.io/doc/user/api.html

  • nvim_call_function
  • nvim_command
  • nvim_create_buf
  • nvim_buf_add_highlight
  • nvim_buf_set_keymap
  • nvim_buf_set_lines
  • nvim_buf_set_option
  • nvim_get_current_line
  • nvim_get_option
  • nvim_open_win
  • nvim_win_close
  • nvim_win_get_cursor
  • nvim_win_get_width
  • nvim_win_set_cursor
  • nvim_win_set_option
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0