Skip to content

Commit

Permalink
setting filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Badragan committed May 10, 2024
1 parent 02a9581 commit f2471d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ be visible in the buffers list if you need to toggle to them. When you are done,
to close the buffer with the configured keybinding (see Configuration section above) or just `:bd`
in order to save on resources as some search results can be quite beefy in size.

Note that *grug-far.nvim* buffers will have `filetype=grug-far` if you need filter/exclude them in
any situations.

## 📦 Similar Plugins / Inspiration

- [nvim-spectre][spectre]: the OG find and replace in a buffer plugin, great inspiration!
Expand Down
2 changes: 2 additions & 0 deletions lua/grug-far/farBuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ end

function M.createBuffer(win, context)
local buf = vim.api.nvim_create_buf(true, true)
vim.api.nvim_buf_set_option(buf, 'filetype', 'grug-far')
bufCount = bufCount

setupKeymap(buf, context)
setupRenderer(buf, context)
vim.schedule(function()
Expand Down

0 comments on commit f2471d6

Please sign in to comment.