Add support for custom parser install locations #2959 (#3031)

This commit is contained in:
Duncan McDougall 2022-06-20 21:50:07 +01:00 committed by GitHub
parent 37b9a2971f
commit 901ffe1a36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 137 additions and 78 deletions

View file

@ -1,6 +1,6 @@
require "nvim-treesitter.highlight" -- yes, this is necessary to set the hlmap
local highlighter = require "vim.treesitter.highlighter"
local utils = require "nvim-treesitter.utils"
local configs = require "nvim-treesitter.configs"
local ts_utils = require "nvim-treesitter.ts_utils"
local parsers = require "nvim-treesitter.parsers"
@ -16,7 +16,7 @@ local function check_assertions(file)
)
local assertions = vim.fn.json_decode(
vim.fn.system(
"highlight-assertions -p '" .. utils.get_parser_install_dir() .. "/" .. lang .. ".so'" .. " -s '" .. file .. "'"
"highlight-assertions -p '" .. configs.get_parser_install_dir() .. "/" .. lang .. ".so'" .. " -s '" .. file .. "'"
)
)
local parser = parsers.get_parser(buf, lang)