Skip to content

Commit

Permalink
feat: Support user defined scope languages
Browse files Browse the repository at this point in the history
Node types for languages defined in `:help ibl.config.scope.include.node_type`
will work, even if the language does not have support out of the box.

fix #926
  • Loading branch information
lukas-reineke committed Oct 4, 2024
1 parent db92699 commit 1f7c38a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This plugin requires the latest stable version of Neovim.

## Install

Use your favourite plugin manager to install.
Use your favorite plugin manager to install.

For [lazy.nvim](https://github.com/folke/lazy.nvim):

Expand Down
2 changes: 1 addition & 1 deletion lua/ibl/hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ local count = 0
--- Each hook type takes a callback a different function, and a configuration table
---@param type ibl.hooks.type
---@param cb function
---@param opts ibl.hooks.options
---@param opts ibl.hooks.options?
---@overload fun(type: 'ACTIVE', cb: ibl.hooks.cb.active, opts: ibl.hooks.options?): string
---@overload fun(type: 'SCOPE_ACTIVE', cb: ibl.hooks.cb.scope_active, opts: ibl.hooks.options?): string
---@overload fun(type: 'SKIP_LINE', cb: ibl.hooks.cb.skip_line, opts: ibl.hooks.options?): string
Expand Down
2 changes: 1 addition & 1 deletion lua/ibl/scope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ M.get = function(bufnr, config)
end

local lang = lang_tree:lang()
if not scope_lang[lang] then
if not scope_lang[lang] and not config.scope.include.node_type[lang] then
return nil
end

Expand Down

0 comments on commit 1f7c38a

Please sign in to comment.