Skip to content

Dynamically set `indentkeys` using tree-sitter for neovim.

Notifications You must be signed in to change notification settings

yioneko/nvim-dinkeys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

nvim-dinkeys

Dynamically set indentkeys using tree-sitter. Think of this as JoosepAlviste/nvim-ts-context-commentstring for indentkeys option. Useful for auto indent in injection tree like codeblock in markdown.

NOTE: This plugin assumes the indentkeys setting are the same for files with same filetype.

Setup

require('dinkeys').setup({
    -- filetypes to enable, can also be a funtion
    enable = { "markdown" },
    -- whether to disable indentkeys cache for the buffer, can also be a function
    disable_cache = false,
    -- events of detecting langauge change
    events = { "InsertEnter" },
    -- events of writing cache to file
    write_events = { "ExitPre" },
    debounce = 200,
})

About

Dynamically set `indentkeys` using tree-sitter for neovim.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages