Files
nvim-hardline/lua/hardline/parts/treesitter-context.lua
2022-01-27 19:03:30 +01:00

18 lines
287 B
Lua

local ok, gps = pcall(require, 'nvim-gps')
if not ok then gps = nil end
local function get_context()
if not gps or not gps.is_available() then
return ''
end
return gps.get_location()
end
local function get_item()
return get_context()
end
return {
get_item = get_item,
}