summaryrefslogtreecommitdiff
path: root/lua/lv-treesitter
diff options
context:
space:
mode:
authorChris <[email protected]>2021-07-06 20:42:29 -0400
committerChris <[email protected]>2021-07-06 20:42:29 -0400
commit716f127e95b71bdc1f1ebb960b381ba50b10c1fe (patch)
tree0683b852e4f54cfeaf98c206f9049e4ee130ddbb /lua/lv-treesitter
parent0e2ad0c1fec50a24177129c89b3edb9007776caf (diff)
wrap requires in pcall
Diffstat (limited to 'lua/lv-treesitter')
-rw-r--r--lua/lv-treesitter/init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/lv-treesitter/init.lua b/lua/lv-treesitter/init.lua
index 27877f03..8ec9b08a 100644
--- a/lua/lv-treesitter/init.lua
+++ b/lua/lv-treesitter/init.lua
@@ -80,8 +80,12 @@ if status then
wk.register(textobj_move_keymaps["goto_previous_start"], normal)
wk.register(textobj_move_keymaps["goto_previous_end"], normal)
end
+local status_ok, treesitter_configs = pcall(require, "nvim-treesitter.configs")
+if not status_ok then
+ return
+end
-require("nvim-treesitter.configs").setup {
+treesitter_configs.setup {
ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
ignore_install = O.treesitter.ignore_install,
matchup = {