Skip to content

Commit

Permalink
feat: Add .is_enabled to check current status
Browse files Browse the repository at this point in the history
This allows configurations to do things such as my use case of
notifying the new state when using .toggle()
  • Loading branch information
aarondill committed Oct 13, 2023
1 parent 4cf6426 commit b3d566c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/treesitter-context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ function M.toggle()
end
end

function M.is_enabled()
return enabled
end

local function init()
command('TSContextEnable', M.enable, {})
command('TSContextDisable', M.disable, {})
Expand Down

0 comments on commit b3d566c

Please sign in to comment.