Skip to content

Commit

Permalink
feat: Add .is_enabled to check current status (#346)
Browse files Browse the repository at this point in the history
* feat: Add .enabled() to check current status

This allows configurations to do things such as my use case of
notifying the new state when using .toggle()

Co-authored-by: Lewis Russell <[email protected]>
  • Loading branch information
aarondill and lewis6991 authored Dec 8, 2023
1 parent bf4d15e commit cfa8ee1
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.enabled()
return enabled
end

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

0 comments on commit cfa8ee1

Please sign in to comment.