refactor: format with stylua

This commit is contained in:
Price Hiller 2024-04-19 05:37:38 -05:00
parent e2d177b480
commit 440acf7900
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB
2 changed files with 6 additions and 6 deletions

View File

@ -7,7 +7,7 @@
---@field private _tree_utils table<string, function> Treesitter utilities for the given filetype
---@field private _fallback_pattern string Pattern to search for if treesitter parser fails
local VirtualIndent = {
_ns_id = vim.api.nvim_create_namespace "VirtIndent",
_ns_id = vim.api.nvim_create_namespace("VirtIndent"),
_bufnrs = {},
}
VirtualIndent.__index = VirtualIndent
@ -20,11 +20,11 @@ function VirtualIndent:new(bufnr)
-- TODO: Improve organization of this, ideally should be a separate module that returns these.
local ft_settings = {
markdown = {
utils = require "vindent.treesitter.markdown",
utils = require("vindent.treesitter.markdown"),
fallback_pattern = "^%#+",
},
org = {
utils = require "vindent.treesitter.org",
utils = require("vindent.treesitter.org"),
fallback_pattern = "^%*+",
},
}
@ -84,7 +84,7 @@ function VirtualIndent:_get_indent_size(line, ts_has_errors, ts_fallback_pat)
end
end
local headline = self._tree_utils.closest_headline_node { line + 1, 1 }
local headline = self._tree_utils.closest_headline_node({ line + 1, 1 })
if headline then
local headline_line = headline:start()
@ -102,7 +102,7 @@ end
---@param ignore_ts? boolean whether or not to skip the treesitter start & end lookup
function VirtualIndent:set_indent(start_line, end_line, ignore_ts)
ignore_ts = ignore_ts or false
local headline = self._tree_utils.closest_headline_node { start_line + 1, 1 }
local headline = self._tree_utils.closest_headline_node({ start_line + 1, 1 })
if headline and not ignore_ts then
local parent = headline:parent()
if parent then

View File

@ -1,4 +1,4 @@
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
no_call_parentheses = true
no_call_parentheses = false