Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 617 Bytes

README.md

File metadata and controls

40 lines (32 loc) · 617 Bytes

nvim-dansa

Guess the indent from lines of around.

usage

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,
    }
  }
})