StyLua
cpeditor.nvim
StyLua | cpeditor.nvim | |
---|---|---|
11 | 2 | |
1,384 | 25 | |
- | - | |
8.6 | 8.7 | |
about 1 month ago | almost 2 years ago | |
Rust | Lua | |
Mozilla Public License 2.0 | MIT License |
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.
cpeditor.nvim
-
Been using vim for about 4 years. What would I gain if I switched to neovim?
back in 2021 I tried to write a plugin in vim and I need http server(vim readme use python for this), regrex stuff so ended up writing in python. I also needed a clickable tabline so I ended up switching to neovim in the end. I tried to add everything was so complex (For me) that I am glad nvim 0.5 adopt lua so I can actually finish the new plugin
-
Writing a neovim plugin. Please send criticisms to make the code better
This scenerio is what I was talking about, there is a local problem = problems.current_problem on every single line. Can I do something about it or it is what it is?
What are some alternatives?
null-ls.nvim - Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
cpeditor - The IDE for competitive programming :tada: | Fetch, Code, Compile, Run, Check, Submit :rocket:
LuaFormatter - Code formatter for Lua
cphelper.nvim - Neovim helper for competitive programming. Use https://sr.ht/~p00f/cphelper.nvim instead
vscode-lua-format - Reformats your Lua source code
CompetiTest.nvim - CompetiTest.nvim is a Neovim plugin for Competitive Programming: it can manage and check testcases, download problems and contests from online judges and much more
selene - A blazing-fast modern Lua linter written in Rust
luacheck - A tool for linting and static analysis of Lua code.
cp.vim
lua-style-guide - Lua Style Guide, as used by LuaRocks
nvim-cmp - A completion plugin for neovim coded in Lua.