Plugins alternative in Lua

I am checking my plugins and I am looking to alternative in pure Lua (if exists and have the same feature, in case I can open tickets):

Also I don’t know if some of those are now replaced by internal neovim feature honestly.
My dotfiles in case: GitHub - Mte90/dotfiles: My dotfiles

For the statusline plugin I am evaluating an alternative as I want to keep some customization I have right now.

Reddit thread: https://www.reddit.com/r/neovim/comments/n11n33/plugins_alternative_in_lua/

6 Likes

andymass/vim-matchup

Can be replaced by textDocument/documentHighlight method for a lot of LSP servers. For example:

My cursor is on if and textDocument/documentHighlight returns the locations for if/then/else. This method has highlights LspReferenceText, LspReferenceRead, LspReferenceWrite and can be triggered by an autocmd like CursorMoved plugin which wraps it like RRethy/vim-illuminate.

RRethy/vim-hexokinase

Has a lua replacement norcalli/nvim-colorizer and a replacement by LSP servers with textDocument/documentColor (but no plugin implements this method afaik).

itchyny/vim-cursorword

RRethy/vim-illuminate if you use the LSP functionality from it mentioned above is in Lua.

pechorin/any-jump.vim

nvim.nnoremap('<c-]>', '<cmd>lua vim.lsp.buf.definition()<cr>')

luochen1990/rainbow

p00f/nvim-ts-rainbow

scrooloose/nerdcommenter

terrortyler/nvim-comment (I’ve never tried this tho)

4 Likes

Thanks for the hints!

Updated the first post with the latest changes (I hope that can be helpful to someone).
Also added the reddit link to the same discussion and updated by dotfiles.

2 Likes

how to write lazy loading of plugins in lua with any plugin manager ( not just with packer ) ?

GitHub - nathom/filetype.nvim: A faster version of filetype.vim just 175x faster than native vim filetype detection

This plugin is a replacement for the included filetype.vim that is sourced on startup. The purpose of that file is to create a series of autocommands that set the filetype variable depending on the filename. The issue is that creating autocommands have significant overhead, and creating 800+ of them as filetype.vim does is a very inefficient way to get the job done.

1 Like

vim-rooter => GitHub - ahmedkhalf/project.nvim: The superior project management solution for neovim.

1 Like

Is there any alternative for vim-wordmotion ?

I use GitHub - goolord/alpha-nvim: a lua powered greeter like vim-startify / dashboard-nvim as replacement for GitHub - mhinz/vim-startify: The fancy start screen for Vim.

Are there any alternatives to have Gbrowse like functionality to open files on github just like vim-fugitive+vim-rhubarb?

Perhaps you could use the gh wrap plugins.

I’m just summarizing here.

1 Like

Another alternative I recommend is substitute.nvim as alternative for vim-exchange.

These plugins, the neovim one and the vim one are intended mainly to exchange words and I use the substitute.nvim a lot.

(This post has been edited) Found something better as a replacement for vim-rooter: nvim-rooter