Closed Zeioth closed 1 year ago
This is why I exposed the get_auto_pin
function in the config options. You can put whatever logic you want in there. For example
require("stickybuf").setup({
get_auto_pin = function(bufnr)
if vim.bo[bufnr].buftype == "terminal" then
return "bufnr"
elseif vim.bo[bufnr].filetype == "nix" then
return "filetype"
else
return require("stickybuf").should_auto_pin(bufnr)
end
end,
})
In most cases creating an autocmd shouldn't be necessary.