Skip to content

Commit

Permalink
refactor(configs): exclude 'help' filetype explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Jul 25, 2024
1 parent 6567d50 commit aa4c0ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -922,10 +922,8 @@ general behavior of the plugin:
and vim.api.nvim_win_is_valid(win)
and vim.wo[win].winbar == ''
and vim.fn.win_gettype(win) == ''
and (
(pcall(vim.treesitter.get_parser, buf, vim.bo[buf].ft)) and true
or false
)
and vim.bo[buf].ft ~= 'help'
and ((pcall(vim.treesitter.get_parser, buf)) and true or false)
end,
```
- `opts.general.attach_events`: `string[]`
Expand Down
10 changes: 4 additions & 6 deletions doc/dropbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,11 @@ behavior of the plugin:

function(buf, win, _)
return vim.api.nvim_buf_is_valid(buf)
and vim.api.nvim_win_is_valid(win)
and vim.wo[win].winbar == ''
and vim.api.nvim_win_is_valid(win)
and vim.wo[win].winbar == ''
and vim.fn.win_gettype(win) == ''
and (
(pcall(vim.treesitter.get_parser, buf, vim.bo[buf].ft)) and true
or false
)
and vim.bo[buf].ft ~= 'help'
and ((pcall(vim.treesitter.get_parser, buf)) and true or false)
end,
<
- `opts.general.attach_events`: `string[]`
Expand Down
6 changes: 2 additions & 4 deletions lua/dropbar/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ M.opts = {
and vim.api.nvim_win_is_valid(win)
and vim.wo[win].winbar == ''
and vim.fn.win_gettype(win) == ''
and (
(pcall(vim.treesitter.get_parser, buf, vim.bo[buf].ft)) and true
or false
)
and vim.bo[buf].ft ~= 'help'
and ((pcall(vim.treesitter.get_parser, buf)) and true or false)
end,
attach_events = {
'BufWinEnter',
Expand Down

0 comments on commit aa4c0ab

Please sign in to comment.