From be8f65608796e50aa2e2da5452849c263558f0ed Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Sun, 4 Jul 2021 16:12:17 -0500 Subject: Use stylua for autoformat code (#1480) --- lua/nvim-treesitter/highlight.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lua/nvim-treesitter/highlight.lua') diff --git a/lua/nvim-treesitter/highlight.lua b/lua/nvim-treesitter/highlight.lua index a106c620..e082bd5e 100644 --- a/lua/nvim-treesitter/highlight.lua +++ b/lua/nvim-treesitter/highlight.lua @@ -1,11 +1,10 @@ local api = vim.api local ts = vim.treesitter -local parsers = require'nvim-treesitter.parsers' -local configs = require'nvim-treesitter.configs' +local parsers = require "nvim-treesitter.parsers" +local configs = require "nvim-treesitter.configs" -local M = { -} +local M = {} local hlmap = vim.treesitter.highlighter.hl_map @@ -104,7 +103,7 @@ hlmap["variable.builtin"] = "TSVariableBuiltin" function M.attach(bufnr, lang) local parser = parsers.get_parser(bufnr, lang) - local config = configs.get_module('highlight') + local config = configs.get_module "highlight" for k, v in pairs(config.custom_captures) do hlmap[k] = v @@ -112,9 +111,9 @@ function M.attach(bufnr, lang) ts.highlighter.new(parser, {}) - local is_table = type(config.additional_vim_regex_highlighting) == 'table' + local is_table = type(config.additional_vim_regex_highlighting) == "table" if config.additional_vim_regex_highlighting and (not is_table or config.additional_vim_regex_highlighting[lang]) then - api.nvim_buf_set_option(bufnr, 'syntax', 'ON') + api.nvim_buf_set_option(bufnr, "syntax", "ON") end end @@ -122,7 +121,7 @@ function M.detach(bufnr) if ts.highlighter.active[bufnr] then ts.highlighter.active[bufnr]:destroy() end - api.nvim_buf_set_option(bufnr, 'syntax', 'ON') + api.nvim_buf_set_option(bufnr, "syntax", "ON") end return M -- cgit v1.2.3