docs: update README.md

main
Oli Morris 2024-09-13 10:25:26 +01:00
parent 46722016e0
commit 3006e641e2
2 changed files with 31 additions and 0 deletions

View File

@ -355,6 +355,21 @@ vim.api.nvim_create_autocmd("User", {
})
```
Or, to ensure that certain filetypes are removed from the session before it's saved:
```lua
vim.api.nvim_create_autocmd("User", {
pattern = "PersistedSavePre",
callback = function()
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
if vim.bo[buf].filetype == "codecompanion" then
vim.api.nvim_buf_delete(buf, { force = true })
end
end
end,
})
```
**Highlights**
The plugin also comes with pre-defined highlight groups for the Telescope implementation:

View File

@ -369,6 +369,22 @@ session, saving the current session before clearing all of the open buffers:
})
<
Or, to ensure that certain filetypes are removed from the session before its
saved:
>lua
vim.api.nvim_create_autocmd("User", {
pattern = "PersistedSavePre",
callback = function()
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
if vim.bo[buf].filetype == "codecompanion" then
vim.api.nvim_buf_delete(buf, { force = true })
end
end
end,
})
<
**Highlights**
The plugin also comes with pre-defined highlight groups for the Telescope