-
Notifications
You must be signed in to change notification settings - Fork 54
Experimental options
Shawon edited this page Jan 14, 2025
·
3 revisions
Options that are still under development or don't affect core functionalities of markview
.
-- [ Markview | Experimental options ] ----------------------------------------------------
--- Configuration for experimental options.
---@class config.experimental
---
--- Command used to open files inside Neovim.
---@field file_open_command? string
--- Number of `bytes` to check before opening a link. Used for detecting when to open files inside Neovim.
---@field read_chunk_size? integer
---
--- Maximum number of empty lines that can stay between text of a list item.
---@field list_empty_line_tolerance? integer
---
--- String formats for detecting date in YAML.
---@field date_formats? string[]
--- String formats for detecting date & time in YAML.
---@field date_time_formats? string[]
experimental = {
read_chunk_size = 1024,
file_open_command = "tabnew",
list_empty_line_tolerance = 3,
date_formats = {
"^%d%d%d%d%-%d%d%-%d%d$", --- YYYY-MM-DD
"^%d%d%-%d%d%-%d%d%d%d$", --- DD-MM-YYYY, MM-DD-YYYY
"^%d%d%-%d%d%-%d%d$", --- DD-MM-YY, MM-DD-YY, YY-MM-DD
"^%d%d%d%d%/%d%d%/%d%d$", --- YYYY/MM/DD
"^%d%d%/%d%d%/%d%d%d%d$", --- DD/MM/YYYY, MM/DD/YYYY
"^%d%d%d%d%.%d%d%.%d%d$", --- YYYY.MM.DD
"^%d%d%.%d%d%.%d%d%d%d$", --- DD.MM.YYYY, MM.DD.YYYY
"^%d%d %a+ %d%d%d%d$", --- DD Month YYYY
"^%a+ %d%d %d%d%d%d$", --- Month DD, YYYY
"^%d%d%d%d %a+ %d%d$", --- YYYY Month DD
"^%a+%, %a+ %d%d%, %d%d%d%d$", --- Day, Month DD, YYYY
},
date_time_formats = {
"^%a%a%a %a%a%a %d%d %d%d%:%d%d%:%d%d ... %d%d%d%d$", --- UNIX date time
"^%d%d%d%d%-%d%d%-%d%dT%d%d%:%d%d%:%d%dZ$", --- ISO 8601
}
};
- Type:
string
- Dynamic: true
- Default: "tabnew"
Command used for opening links inside Neovim.
- Type:
integer
- Dynamic: true
- Default: 1000
Important
This isn't used if text_filetypes
is set.
Number of bytes to check to determine if a file is a text file or not when opening links.
If the file is a text file, it will be opened inside Neovim
.
- Type:
integer
- Dynamic: true
- Default: 3
Number of empty lines a list item can have between it's lines. Useful when adding text directly under a list.
TSNode β Indentation β List β
range β range β Item β
β β - This is a list item.
β β It has some text inside it.
β β
β β
β β This line will be considered
β β part of the list.
β
β
β
β This line won't be considered
β part of the list.
- Type:
string[]
- Dynamic: false
List of lua patterns
for detecting dates in YAML.
- Type:
string[]
- Dynamic: false
List of lua patterns
for detecting date & time in YAML.
Also available in vimdoc, :h markview.nvim-experimental
.