null-ls.nvim
StyLua
null-ls.nvim | StyLua | |
---|---|---|
164 | 11 | |
3,554 | 1,433 | |
- | - | |
0.0 | 8.4 | |
10 months ago | 4 days ago | |
Lua | Rust | |
GNU General Public License v3.0 or later | Mozilla Public License 2.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.
null-ls.nvim
- cpp setting problem
-
Being a bash developer in the 21st century
you can use nvim then, it has shellcheck for diagnostics and formatting, like in vscode :)
here the link to the config: https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main...
-
Linting/formatting and LSP
I use a lot of different languages generally and I'm running into issues around formatting. Is there any standard way to use LSP formatting by default and otherwise fallback to specific linter/formatting programs? I believe null-ls is the normal way of dealing with this, but since it's been archived, I'd rather not rely on it.
-
How to setup efm-langserver for pint formatter?
I've been using pint for formatting php files with null-ls.nvim. Few days ago null-ls.nvim has announced that the plugin will be archived in few months so I started migrating all my formatters and linter from null-ls to efm-langserver. I got other things such as prettier, black, isort, mypy, etc. working but can't get pint to work with php files: If I run pint via efm-langserver, everything is deleted from the buffer, and the saved file is formatted separately. How do I setup efm-langserver correctly to work with pint? Below is my config.yml for pint currently. yaml tools: pint: &pint format-command: "pint --no-interaction --quiet ${INPUT}" format-stdin: false languages: php: - <<: *pint Thank you.
- Archiving Null-Ls
- null-ls will be archived
-
Why is nobody using CoC anymore?
Because null-ls.nvim & mason.nvim together do everything I wanted CoC for
- Your favourite Neovim plugins?
-
How can I get yapf, black, and other formatters working with pylsp?
There is a good answer. I think you know lua and neovim config enough to pick things that you need. If you need a short answer, null-ls is the way.
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.
What are some alternatives?
formatter.nvim
LuaFormatter - Code formatter for Lua
nvim-lspconfig - Quickstart configs for Nvim LSP
vscode-lua-format - Reformats your Lua source code
neoformat - :sparkles: A (Neo)vim plugin for formatting code.
selene - A blazing-fast modern Lua linter written in Rust
nvim-lint - An asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
luacheck - A tool for linting and static analysis of Lua code.
efm-langserver - General purpose Language Server
lua-style-guide - Lua Style Guide, as used by LuaRocks
lsp-zero.nvim - A starting point to setup some lsp related features in neovim.
lua-json5 - A json5 parser for luajit