StyLua
dirbuf.nvim
StyLua | dirbuf.nvim | |
---|---|---|
11 | 23 | |
1,384 | 421 | |
- | - | |
8.6 | 0.0 | |
about 1 month ago | over 1 year ago | |
Rust | Lua | |
Mozilla Public License 2.0 | GNU Affero General Public License v3.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
StyLua
-
question about plugins
Use and enforce a style with StyLua) or LuaFormatte and neovim can autoformat for ya.
-
sumneko_lua not respecting project's stylua.toml
stylua.toml is the config file of Stylua not of sumneko-lua
-
StyLua now supports collapsing simple statements
Starting from version 0.14.0, StyLua (the Lua code formatter in Neovim world) implements option collapse_simple_statement. From release notes:
-
Writing a neovim plugin. Please send criticisms to make the code better
Check out StyLua if you want a code formatter.
-
luaCheck and class definition
Here is the instruction how to install and config.
-
Cannot run executables with Alpine and Busybox images
RUN wget -O stylua-0.11.0-linux.zip https://github.com/JohnnyMorganz/StyLua/releases/download/v0.11.0/stylua-0.11.0-linux.zip && \ unzip stylua-0.11.0-linux.zip && \ rm stylua-0.11.0-linux.zip && \ chmod +x stylua
-
Difference between require("foo") and require"foo"
If your function call has only one argument and it happens to be a literal string or a table, then you might want to eliminate the parenthesis. Use whatever style you prefer, the later is useful for some DSLs. Let stylua auto format it anyway.
-
Lua Indentation Woes
Have you tried any external programs to format your code instead? That's what I usually do. Just set 'formatprg', and use gq to format the code. With a quick search I found LuaFormatter, and StyLua, but I can't say if they format the code the way you want. In my experience, external code formaters will do a better job, and they have more options to tweak as well.
-
[question] Where can i find the formatter tool for lua ?
Have a look at https://github.com/JohnnyMorganz/StyLua together with https://github.com/jose-elias-alvarez/null-ls.nvim
-
lua-format : how to keep equals signs aligned (like EasyAlign)
I personally use https://github.com/JohnnyMorganz/StyLua and I am seeing it a lot in some popular projects like telescope.nvim, nvim-lspconfig and ther is also a PR to include it into neovim itself to format the lua files.
dirbuf.nvim
-
People who swear by Oil.nvim , why?
For me I think it’s the best at what it does (with mini.files coming in a close second. It would probably be my first, but I prefer the whole buffer approach over the floating popups.) I’ve tried dirbuf.nvim as well, but I didn’t like that I couldn’t copy/move files.
-
Workflow with nvim
Big fan of https://github.com/elihunter173/dirbuf.nvim
-
What are the plugins you consider necessary to have a great neovim experience?
Shout-out to dirbuf.nvim as it is one of my favorite plugins I cannot live without, but I see it rarely mentioned. It allows you to do file management by editing a file, so you can do anything you would do to edit any regular file. There are no new keymaps to learn, you just use any regular motion, :s, :g, or anything you can think of. Great for bulk renaming!
-
My thoughts about editors in 2022
While I do use file managers often (ranger and dolphin are pretty nice overall), within Neovim my file management is fairly reduced. I use dirbuf when I need to browse through files (for refactors or something), and since it's dired-like its a lot more built into the "vim-as-a-language" mindset. Not to say I do a whole lot in it, but it is quicker than having to do shell stuff within Neovim. I think file-tree plugins tend to just miss the concept for me, as I never found them to be anything more than just "look and see" due to disconnect from the aforementioned "vim-as-a-language"
-
What file explorer do you use?
https://github.com/elihunter173/dirbuf.nvim, it's basically netrw done right.
-
netwr like file explorer for neovim?
https://github.com/elihunter173/dirbuf.nvim might just be the thing. In terms of navigating it's as minimal as it can be:
-
What file manager do you use?
I use fish shell with z plugin to quickly jump to directories and nnn file manager mainly to select files for deletion. I also use dirbuf plugin for neovim when working inside this editor.
-
neovim plugins that have improved your workflow
dirbuf.nvim!
-
Which file browser do you use ?
dirbuf mostly. Anything really advanced and I'll just open a new ranger session
-
What is the coolest, unknown(-ish) plugin that you're using that other people could benefit from?
dirbuf doesn't get enough attention. It's a robust, simple, yet featureful replacement for the netrw plugin built into Vim/NeoVim. It allows directories to be treated somewhat like files - edit a directory, and you get a directory listing. That listing can be modified - add files, edit files, delete files, and the result ends up on disk. A much simpler and more-Vimy alternative to tree plugins like NeoTree, in my view.
What are some alternatives?
null-ls.nvim - Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
vimv - Batch-rename files using Vim
LuaFormatter - Code formatter for Lua
nvim-tree.lua - A file explorer tree for neovim written in lua
vscode-lua-format - Reformats your Lua source code
vim-filebeagle - A VINE-spired (Vim Is Not Emacs) file system explorer.
selene - A blazing-fast modern Lua linter written in Rust
vifm - Vifm is a file manager with curses interface, which provides Vim-like environment for managing objects within file systems, extended with some useful ideas from mutt.
luacheck - A tool for linting and static analysis of Lua code.
nnn.nvim - File manager for Neovim powered by nnn.
lua-style-guide - Lua Style Guide, as used by LuaRocks
lir.nvim - Neovim file explorer