Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrsh7th/nvim-dansa
Guess the indent from lines of around.
https://github.com/hrsh7th/nvim-dansa
neovim neovim-plugins
Last synced: 9 days ago
JSON representation
Guess the indent from lines of around.
- Host: GitHub
- URL: https://github.com/hrsh7th/nvim-dansa
- Owner: hrsh7th
- Created: 2023-01-14T09:09:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T13:36:34.000Z (6 months ago)
- Last Synced: 2024-08-07T18:35:30.650Z (3 months ago)
- Topics: neovim, neovim-plugins
- Language: Lua
- Homepage:
- Size: 63.5 KB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nvim-dansa
Guess the indent from lines of around.
# usage
```lua
local dansa = require('dansa')-- global settings.
dansa.setup({
-- The offset to specify how much lines to use.
scan_offset = 100,-- The count for cut-off the indent candidate.
cutoff_count = 5,-- The settings for tab-indentation or when it cannot be guessed.
default = {
expandtab = true,
space = {
shiftwidth = 2,
},
tab = {
shiftwidth = 4,
}
}
})-- per filetype settings.
dansa.setup.filetype('go', {
default = {
expandtab = false,
tab = {
shiftwidth = 4,
}
}
})
```