formatter.nvim
lsp-format.nvim


formatter.nvim | lsp-format.nvim | |
---|---|---|
37 | 16 | |
1,392 | 585 | |
1.0% | 0.7% | |
7.6 | 5.1 | |
4 months ago | 6 months ago | |
Lua | Lua | |
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.
formatter.nvim
-
null-ls will be archived
Can anyone explain why someone would use null-ls if you're using the modern lsp setup (say, from kickstart.nvim). I see comments mentioning formatting. I see formatters mentioned several times. Why not just use https://github.com/mhartington/formatter.nvim?
-
How to setup formatter for Python ???
I use null-ls (https://github.com/jose-elias-alvarez/null-ls.nvim), I haven't tried it for python, but haven't had trouble with lua, js, ts or rust. You can also look into formatter.nvim (https://github.com/mhartington/formatter.nvim).
-
Scalafmt and neovim
I use formatter.nvim for formatting
-
Does a language server replace ALE, syntastic, and the language plugin?
For formatting, formatter.nvim is a good choice and has similar setup to nvim-lint.
-
lsp.vim.buf.format parameters make tab indent 4 spaces
I finally installed this formatter plugin and configured it to execute de clang-format command like this
-
A Minimal Neovim Configuration for TypeScript Development featuring Lazy.nvim, LSP, Tree-Sitter, Prettier, Guess-Indent
mhartington/formatter.nvim is used for automatic code formatting. Its configuration also shows how to use nvim_create_augroup and nvim_create_autocmd from Lua.
-
Editing the same file in a split causes vim to jump to the top of the file when saving with autoformatter
This might have something to do with extmarks being clobbered when the new text is written. For example, here is a GitHub issue describing the problem: https://github.com/mhartington/formatter.nvim/issues/22 This is for formatter.nvim, but this would likely apply to any process that rewrites the whole buffer.
-
autoformat with lsp-zero
i have always had trouble with lsp formatting and null-ls (may just be me, i'm not super clued in) so i use formatter.nvim https://github.com/mhartington/formatter.nvim/
-
Neovim not formatting code correctly like VSCode does (prettier)
Take a look at formatter.nvim
-
How does vim.lsp.buf.format() deal with multiple attached LSP clients?
I've had really good experience with formatter-nvim.
lsp-format.nvim
-
My Setup for Responsive (Immutable) Formatting
suffice it to say, I haven't needed to mess with it in a very long time, and it works very nicely and smoothly. I based it on https://github.com/lukas-reineke/lsp-format.nvim back before he extracted that plugin from his dotfiles, but over time I added a lot.
- Delay when formatting on save
-
Cursor moves on format
Ok guys I solved it by using this wonderful plugin https://github.com/lukas-reineke/lsp-format.nvim . Apparently it had something to do with setting up my autosave from null-ls but can't be sure. Anyways, solved.
-
Format on Save
My first reaction is to set a buffer-exclusive autocmd on lsp attach to call vim.lsp.buf.format(), that should work if you don't want depdenencies. Another way to go is https://github.com/lukas-reineke/lsp-format.nvim, it's a thin wrapper around nvim's format and can provide format on save.
-
How to turn off on-save formatting in null-ls and let Lsp prettier and Eslint format instead? [LazyVim]
Use lsp-format.nvim and put null-ls on the blacklist.
-
Scalafmt and neovim
If you already use metals as a language server, it looks like scalafmt support is already built in. If you're using metals in Neovim but not getting formatting, check your lsp configuration. Alternatively, use lsp-format.nvim to ensure formatting happens. That goes for using it with null-ls, too.
-
Am I interweaving lspconfig and lsp-zero correctly?
Thanks! One additional question, I'm using lsp-format. And to use it, I just
-
Slow formatters end up overwriting changes since last save, any ideas how to change this behavior?
My plugin lukas-reineke/lsp-format.nvim does that. It wraps around the built-in LSP formatting with a couple opinionated improvements.
-
Autoformatting on save with vim.lsp.buf.format() and BufWritePre
You can take a look at my plugin LSP-format.nvim for a bit more robust solution to async format on save. But it will also write the file twice. There is currently no other way to do this.
-
null-ls & terraformls format on save prompt
I recommend instead using lsp-format.nvim to manage multiple LSP clients trying to format.
What are some alternatives?
null-ls.nvim - Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
mason.nvim - Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
nvim-conf - ☄ Maddison's Neovim configuration!
neoformat - :sparkles: A (Neo)vim plugin for formatting code.
vim-python-pep8-indent - A nicer Python indentation style for vim.
vim-clang-format - Vim plugin for clang-format, a formatter for C, C++, Obj-C, Java, JavaScript, and so on.
nvoid - nvim with lua is cool
vim-autoformat - Provide easy code formatting in Vim by integrating existing code formatters.
vscode-langservers-extracted - vscode-langservers bin collection.
format.nvim - A wrapper around Neovims native LSP formatting. [Moved to: https://github.com/lukas-reineke/lsp-format.nvim]
packspec - ALPHA package dependencies spec

