refactor: format with stylua
This commit is contained in:
parent
e2d177b480
commit
440acf7900
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
no_call_parentheses = true
|
||||
no_call_parentheses = false
|
||||
|
Loading…
Reference in New Issue
Block a user