Test disabling position if buffer has no parser
This commit is contained in:
parent
6bd20abc84
commit
8989bcd547
|
@ -306,6 +306,9 @@ function M.get()
|
||||||
-- treesitter position
|
-- treesitter position
|
||||||
components.active[1][14] = {
|
components.active[1][14] = {
|
||||||
provider = function()
|
provider = function()
|
||||||
|
if not require("nvim-treesitter.parsers").has_parser() then
|
||||||
|
return ""
|
||||||
|
end
|
||||||
local pos = require("nvim-treesitter").statusline()
|
local pos = require("nvim-treesitter").statusline()
|
||||||
if pos and pos ~= "" then
|
if pos and pos ~= "" then
|
||||||
return pos
|
return pos
|
||||||
|
|
Loading…
Reference in a new issue