Skip to content

Commit

Permalink
fix: check if ts is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
qvalentin committed Nov 16, 2024
1 parent c6d1a49 commit 790ccb4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lua/helm-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ M.setup = function(args)
end

if not conceal and not indent_hints then
-- create no autocommand
-- create no autocommand as the features are disabled
return
end

local parsers = require("nvim-treesitter.parsers")
if not parsers.has_parser("helm") then
local hasparsers, parsers = pcall(require, "nvim-treesitter.parsers")
if not hasparsers or not parsers.has_parser("helm") then
vim.notify(
"Helm-ls.nvim: tree-sitter parser for helm not installed, some features will not work. Make sure you have nvim-treesitter and then install it with :TSInstall helm",
vim.log.levels.WARN
)
return
end

Expand Down

0 comments on commit 790ccb4

Please sign in to comment.