.config
vim-sleuth
.config | vim-sleuth | |
---|---|---|
13 | 27 | |
19 | 1,807 | |
- | - | |
9.3 | 0.0 | |
13 days ago | 2 months ago | |
Lua | Vim Script | |
The Unlicense | - |
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.
.config
-
Can anyone recommend a good github dotfiles repos for neovim that uses LazyVim as it's plugin manager?
I've done my best to keep my config simple and sane: https://github.com/heygarrett/.config/tree/main/nvim
-
"set noet" ignored in python files
One option the docs don't list is using an autocommand, which is what I do because I overrule the indentation options for all file types.
-
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.
-
nvim: coq vs cmp
I even wrote my own autocmd for auto-completion, which was a lot of fun and helped me learn a lot about Neovim. Together with nvim-snippy it meets all of my needs (so far).
-
Show me your statusline! Big plus if you wrote it yourself :)
I'm late to the party, but I did configure my statusline without a plugin: - Screenshot - Config
-
What completion method should i try first
I added an autocmd to make it automatic.
-
It’s worth it to learn how a feature works before installing a plugin claiming to make that feature better.
I learned a lot, and I created my own automated workflow for sessions that I’m quite happy about. I think the best part is it may not cover every use case I encounter, which means I get to keep learning and I get to become more familiar with a tool I use daily.
-
Here’s a function to grab the name of the current git branch with Lua
I use this in my custom statusline config, which you can see here.
-
Is there an equivalent to :setlocal {option}< using Lua?
This is how I currently configure my indentation. The autocmd overrides anything set by the ftplugin files during startup, and that's the easiest method I've found keep my preferences across every file type.
-
Tab in vim always shifts by 2 spaces for c and c++ files.
I think the built-in filetype plugin files are sourced after your vimrc. I got around this by adding an autocmd to re-set my indentation preferences after the ftplugins are loaded.
vim-sleuth
-
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?
mini.nvim - Library of 35+ independent Lua modules improving overall Neovim (version 0.7 and higher) experience with minimal effort
vim-polyglot - A solid language pack for Vim.
nvim-lazyman - Neovim configuration manager and Lazy/Lua/Mason based Neovim config. Manage multiple Neovim configurations with the lazyman command. ☕
nvim-autopairs - autopairs for neovim written in lua
nvim - Neovim configuration
limelight.vim - :flashlight: All the world's indeed a stage and we are merely players
nvim-config - Generalized and Personalized
vim-vinegar - vinegar.vim: Combine with netrw to create a delicious salad dressing
wiirdle - Wordle clone for the Wii, powered by WiiLÖVE
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