diff --git a/README.md b/README.md index 575e119..3b1c759 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,23 @@ EOF ``` If you prefer to bind manually, the function is exposed as: + ```lua require('nvim-biscuits').toggle_biscuits() ``` +## Configuration (Cursor Line Only) + +You can configure the biscuits to only show on the line that has your cursor. This can be useful if you find that default config makes the text too cluttered + +```lua +lua < :lua require("nvim-biscuits").decorate_nodes(%s, "%s") augroup END ]], on_events, bufnr, bufnr, lang), false) + elseif final_config.cursor_line_only == true then + vim.api.nvim_exec(string.format([[ + augroup Biscuits + au! + au %s :lua require("nvim-biscuits").decorate_nodes(%s, "%s") + augroup END + ]], "CursorMoved,CursorMovedI", bufnr, bufnr, lang), false) else vim.api.nvim_buf_attach(bufnr, false, {