guess-indent.nvim
Automatic indentation style detection for Neovim (by NMAC427)
vim-sleuth
sleuth.vim: Heuristically set buffer options (by tpope)
guess-indent.nvim | vim-sleuth | |
---|---|---|
11 | 27 | |
333 | 1,797 | |
- | - | |
0.0 | 0.0 | |
12 days ago | about 2 months ago | |
Lua | Vim Script | |
MIT License | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
guess-indent.nvim
Posts with mentions or reviews of guess-indent.nvim.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-09.
- How to config indentation per project?
- Get indent width from the formatter
-
How do I enable ftplugins in NvChad?
Instead of setting setlocal tabstop=2 shiftwidth=2 softtabstop=2 in each file, I recommend using the following plugin: guess-indent.nvim. It provides automatic indentation style detection for Neovim, which can simplify the process.
-
A Minimal Neovim Configuration for TypeScript Development featuring Lazy.nvim, LSP, Tree-Sitter, Prettier, Guess-Indent
The fantastic nmac427/guess-indent.nvim package is used to automatically detect the indentation scheme when a file is opened.
-
How do you manage to insert both plain tabs and 4-space tabs?
In addition to editorconfig, which other comments have mentioned, there are also plugins that can set your indentation options based on the presence of tabs or spaces in the files you have open. I like guess-indent.nvim.
-
Trouble detecting shiftwidth correctly
I use a combination of guess-indent.nvim and :h listchars. Here's how I use them together in my config.
-
The way indentation and syntax highlighting is handled in nvim is frustrating me
If you want to have a different indentation based on the current file context, take a look at this plugin: https://github.com/NMAC427/guess-indent.nvim
-
Neovim for web development, mainly Frontend
I'd add guess-indent to that list as well, if you're working on a project that doesn't have a set standard on indentation.
-
Different tab sizes for each language
I use this plugin guess-indent.nvim
-
What unique Neovim plugins do you use?
NMAC427/guess-indent.nvim - Automatic indentation style detection for Neovim
vim-sleuth
Posts with mentions or reviews of vim-sleuth.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-29.
-
How can I set my TAB key to be 4 spaces indent?
In addition to setting tabstop and shiftwidth, you might also like this plugin: https://github.com/tpope/vim-sleuth
-
[HELP] File type specific plugin is ignored
vim-sleuth auto detects tab size so...
-
What did I do to deserve this kind of torture
Just add https://github.com/tpope/vim-sleuth and never worry about it again.
- HELP: save options in sessions
-
Learning Rust, I didn't expect such a backstab
At the end of the day I don't really care which a project goes with, I've always just used vim-sleuth to automatically set my tab key to input whatever the current file's indentation is.
-
Trouble detecting shiftwidth correctly
VsCode has an internal function from auto-detecting indentation, while my config uses vim-sleuth with indent-blankline.nvim.
-
Builtin EditorConfig support
If you work a lot on legacy codebases, https://github.com/tpope/vim-sleuth is probably more what you need than editorconfig, as it will work even when one is not present.
-
New plugin for handling soft/hard line wrapping - wrapping.nvim
The primary advantage of using it is that it has built in heuristics for detecting line wrapping when opening a file (with some Treesitter magic for Markdown to make it more accurate), and also allows for manual swapping between wrapping types. You can think of it as the wrapping equivalent to vim-sleuth.
-
How do I force Neovim to always give me two space indents (or the correct indent) everywhere.
I just found about Tim Pope's sleuth: https://github.com/tpope/vim-sleuth It supports editorconfig but it also seems to have just better heuristics when an editorconfig file isn't present, so I just decided to replace `editorconfig-vim` with it.
-
How to set indentation dynamically based on language?
Another solution is try sleuth.vim, that sets automatically your indentation based on the project, buffer and editorconfig
What are some alternatives?
When comparing guess-indent.nvim and vim-sleuth you can also consider the following projects:
lsp-inlayhints.nvim
vim-polyglot - A solid language pack for Vim.
indent-blankline.nvim - Indent guides for Neovim
nvim-autopairs - autopairs for neovim written in lua
marks.nvim - A better user experience for viewing and interacting with Vim marks.
limelight.vim - :flashlight: All the world's indeed a stage and we are merely players
rnoweb-nvim - A neovim plugin for rnoweb files
vim-vinegar - vinegar.vim: Combine with netrw to create a delicious salad dressing
telescope.nvim - Find, Filter, Preview, Pick. All lua, all the time.
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
indent-o-matic - Dumb automatic fast indentation detection for Neovim written in Lua
yapf - A formatter for Python files
guess-indent.nvim vs lsp-inlayhints.nvim
vim-sleuth vs vim-polyglot
guess-indent.nvim vs indent-blankline.nvim
vim-sleuth vs nvim-autopairs
guess-indent.nvim vs marks.nvim
vim-sleuth vs limelight.vim
guess-indent.nvim vs rnoweb-nvim
vim-sleuth vs vim-vinegar
guess-indent.nvim vs telescope.nvim
vim-sleuth vs nvim-treesitter
guess-indent.nvim vs indent-o-matic
vim-sleuth vs yapf