mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 14:52:04 +00:00
Update 2025-10-08
update 2025-10-08
This commit is contained in:
@@ -33,7 +33,13 @@ return {
|
||||
javascript = js,
|
||||
javascriptreact = js,
|
||||
json = { "jq" },
|
||||
lua = { "stylua" },
|
||||
lua = function()
|
||||
local config_file = vim.fn.getcwd() .. "/*stylua.toml"
|
||||
if vim.fn.exists(config_file) then
|
||||
return { "stylua" }
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
markdown = makrdown,
|
||||
python = { "ruff_format", "ruff_fix", "ruff_organize_imports", "docformatter" },
|
||||
rest = { "kulala" },
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
return {
|
||||
{
|
||||
|
||||
"Saecki/crates.nvim",
|
||||
tag = "stable",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
return {
|
||||
"barrett-ruth/http-codes.nvim",
|
||||
dependencies = { "folke/snacks.nvim" },
|
||||
"kristoferssolo/http-codes.nvim",
|
||||
branch = "feature/snacks",
|
||||
dependencies = "folke/snacks.nvim",
|
||||
cmd = "HTTPCodes",
|
||||
keys = { { "<leader>pdh", vim.cmd.HTTPCodes, desc = "HTTP" } },
|
||||
config = true,
|
||||
keys = { { "<leader>pH", vim.cmd.HTTPCodes, desc = "HTTP" } },
|
||||
opts = {
|
||||
use = "snacks",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,52 +2,84 @@ local function is_typst()
|
||||
return vim.bo.filetype == "typst"
|
||||
end
|
||||
return {
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>v", vim.cmd.PasteImage, desc = "Paste image from system clipboard" },
|
||||
},
|
||||
opts = {
|
||||
default = {
|
||||
dir_path = "assets/img",
|
||||
extension = function()
|
||||
if is_typst() then
|
||||
return "png"
|
||||
else
|
||||
return "webp"
|
||||
end
|
||||
end,
|
||||
process_cmd = function()
|
||||
if is_typst() then
|
||||
return ""
|
||||
else
|
||||
return "convert - -quality 75 webp:-"
|
||||
end
|
||||
end,
|
||||
file_name = "%Y-%m-%d_%H-%M-%S",
|
||||
relative_to_current_file = false,
|
||||
prompt_for_file_name = function()
|
||||
return is_typst()
|
||||
end,
|
||||
embed_image_as_base64 = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
opts = {
|
||||
backend = "ueberzug",
|
||||
processor = "magick_rock",
|
||||
scale_factor = 0.5,
|
||||
integrations = {
|
||||
neorg = {
|
||||
clear_in_insert_mode = true,
|
||||
only_render_image_at_cursor = true,
|
||||
only_render_image_at_cursor_mode = "popup",
|
||||
},
|
||||
typst = {
|
||||
clear_in_insert_mode = true,
|
||||
only_render_image_at_cursor = true,
|
||||
only_render_image_at_cursor_mode = "popup",
|
||||
},
|
||||
markdown = {
|
||||
clear_in_insert_mode = true,
|
||||
only_render_image_at_cursor = true,
|
||||
only_render_image_at_cursor_mode = "popup",
|
||||
resolve_image_path = function(document_path, image_path, fallback)
|
||||
local working_dir = vim.fn.getcwd()
|
||||
if working_dir:find("Obsidian") then
|
||||
return working_dir .. "/assets/img/" .. image_path
|
||||
end
|
||||
return fallback(document_path, image_path)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
markdown = {
|
||||
template = "![[$FILE_PATH]]",
|
||||
},
|
||||
{
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>v", vim.cmd.PasteImage, desc = "Paste image from system clipboard" },
|
||||
},
|
||||
opts = {
|
||||
default = {
|
||||
dir_path = "assets/img",
|
||||
extension = function()
|
||||
if is_typst() then
|
||||
return "png"
|
||||
else
|
||||
return "webp"
|
||||
end
|
||||
end,
|
||||
process_cmd = function()
|
||||
if is_typst() then
|
||||
return ""
|
||||
else
|
||||
return "convert - -quality 75 webp:-"
|
||||
end
|
||||
end,
|
||||
file_name = "%Y-%m-%d_%H-%M-%S",
|
||||
relative_to_current_file = false,
|
||||
prompt_for_file_name = is_typst,
|
||||
embed_image_as_base64 = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
},
|
||||
},
|
||||
vimwiki = {
|
||||
template = "![[$FILE_PATH]]",
|
||||
},
|
||||
typst = {
|
||||
template = [[
|
||||
filetypes = {
|
||||
markdown = {
|
||||
template = "![[$FILE_PATH]]",
|
||||
},
|
||||
vimwiki = {
|
||||
template = "![[$FILE_PATH]]",
|
||||
},
|
||||
typst = {
|
||||
template = [[
|
||||
#figure(
|
||||
image("$FILE_PATH", width: 80%),
|
||||
caption: [$CURSOR],
|
||||
) <$LABEL>
|
||||
]],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -66,7 +66,7 @@ return {
|
||||
vim.lsp.buf.hover({ border = "rounded" })
|
||||
end, "Hover Documentation")
|
||||
nmap("gi", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
|
||||
vim.keymap.set("i", "<C-h>", function()
|
||||
vim.keymap.set("i", "<C-H>", function()
|
||||
vim.lsp.buf.signature_help({ border = "rounded" })
|
||||
end, { buffer = event.buf, desc = "LSP: Signature Documentation" })
|
||||
nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
|
||||
@@ -85,7 +85,7 @@ return {
|
||||
vim.diagnostic.jump({ count = -1, float = true })
|
||||
end, "Diagnostic Prev")
|
||||
nmap("]d", function()
|
||||
trouble:next({ mode = "diagnostics", skip_groups = true, jump = true })
|
||||
trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
|
||||
end, "LSP: Trouble Next")
|
||||
nmap("[d", function()
|
||||
trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
|
||||
@@ -99,7 +99,9 @@ return {
|
||||
nmap("gr", function()
|
||||
trouble.toggle("lsp_references")
|
||||
end, "[G]oto [R]eferences")
|
||||
nmap("gR", function() Snacks.picker.lsp_references() end, "[G]oto [R]eferences")
|
||||
nmap("gR", function()
|
||||
Snacks.picker.lsp_references()
|
||||
end, "[G]oto [R]eferences")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -194,38 +196,42 @@ return {
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { "vim", "awesome", "client", "ya" },
|
||||
},
|
||||
-- workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
-- library = vim.api.nvim_get_runtime_file("", true),
|
||||
-- },
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
root_pattern = {
|
||||
".stylua.toml",
|
||||
".luarc.json",
|
||||
".luarc.jsonc",
|
||||
".luacheckrc",
|
||||
"stylua.toml",
|
||||
"selene.toml",
|
||||
"selene.yml",
|
||||
".git",
|
||||
},
|
||||
format = {
|
||||
enable = false,
|
||||
},
|
||||
hint = {
|
||||
enable = true,
|
||||
globals = {
|
||||
"vim",
|
||||
"awesome",
|
||||
"client",
|
||||
"s",
|
||||
"sn",
|
||||
"isn",
|
||||
"t",
|
||||
"i",
|
||||
"f",
|
||||
"c",
|
||||
"d",
|
||||
"r",
|
||||
"events",
|
||||
"k",
|
||||
"ai",
|
||||
"extras",
|
||||
"l",
|
||||
"rep",
|
||||
"p",
|
||||
"m",
|
||||
"n",
|
||||
"dl",
|
||||
"fmt",
|
||||
"fmta",
|
||||
"conds",
|
||||
"postfix",
|
||||
"types",
|
||||
"parse",
|
||||
"ms",
|
||||
},
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
format = { enable = true },
|
||||
hint = { enable = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,20 +3,13 @@ return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
version = "v2.*",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets", -- a bunch of snippets to use
|
||||
},
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
opts = function()
|
||||
local types = require("luasnip.util.types")
|
||||
return {
|
||||
-- This tells LuaSnip to remember to keep around the last snippet.
|
||||
-- You can jump back into it even if you move outside of the selection
|
||||
history = true,
|
||||
-- This one is cool cause if you have dynamic snippets, it updates as you type!
|
||||
updateevents = "TextChanged,TextChangedI",
|
||||
-- Autosnippets:
|
||||
enable_autosnippets = true,
|
||||
-- Crazy highlights!!
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
active = {
|
||||
@@ -29,32 +22,6 @@ return {
|
||||
config = function(_, opts)
|
||||
local ls = require("luasnip")
|
||||
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local events = require("luasnip.util.events")
|
||||
local ai = require("luasnip.nodes.absolute_indexer")
|
||||
local extras = require("luasnip.extras")
|
||||
local l = extras.lambda
|
||||
local rep = extras.rep
|
||||
local p = extras.partial
|
||||
local m = extras.match
|
||||
local n = extras.nonempty
|
||||
local dl = extras.dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local conds = require("luasnip.extras.expand_conditions")
|
||||
local postfix = require("luasnip.extras.postfix").postfix
|
||||
local types = require("luasnip.util.types")
|
||||
local parse = require("luasnip.util.parser").parse_snippet
|
||||
local ms = ls.multi_snippet
|
||||
|
||||
vim.keymap.set({ "i", "s" }, "<C-j>", function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
@@ -83,15 +50,11 @@ return {
|
||||
|
||||
require("luasnip.loaders.from_vscode").load({
|
||||
exclude = {
|
||||
"rust",
|
||||
rust = {
|
||||
"modtest",
|
||||
},
|
||||
rust = { "modtest" },
|
||||
},
|
||||
})
|
||||
vim.tbl_map(function(type)
|
||||
require("luasnip.loaders.from_" .. type).lazy_load()
|
||||
end, { "vscode", "snipmate", "lua" })
|
||||
|
||||
require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/snippets/" })
|
||||
|
||||
ls.filetype_extend("typescript", { "tsdoc" })
|
||||
ls.filetype_extend("javascript", { "jsdoc" })
|
||||
|
||||
@@ -31,7 +31,6 @@ return {
|
||||
desc = "Extract the visually selected text into a new note and link to it.",
|
||||
},
|
||||
{ "<leader>Ow", vim.cmd.ObsidianWorkspace, desc = "Switch to another workspace." },
|
||||
-- { "<leader>Op", vim.cmd.ObsidianPasteImg, desc = "Paste an image from the clipboard into the note." },
|
||||
{
|
||||
"<leader>Or",
|
||||
vim.cmd.ObsidianRename,
|
||||
|
||||
@@ -18,7 +18,7 @@ return {
|
||||
bufdelete = { enabled = true },
|
||||
dashboard = { enabled = false },
|
||||
debug = { enabled = true },
|
||||
dim = { enabled = true },
|
||||
dim = { enabled = false },
|
||||
explorer = { enabled = false },
|
||||
git = { enabled = true },
|
||||
gitbrowse = { enabled = true },
|
||||
@@ -44,7 +44,7 @@ return {
|
||||
enabled = true,
|
||||
format = "file",
|
||||
layout = {
|
||||
preset = "telescope"
|
||||
preset = "telescope",
|
||||
},
|
||||
matcher = {
|
||||
frecency = true,
|
||||
@@ -57,10 +57,10 @@ return {
|
||||
keys = {
|
||||
["<C-t>"] = {
|
||||
"trouble_open",
|
||||
mode = { "n", "i" }
|
||||
}
|
||||
}
|
||||
}
|
||||
mode = { "n", "i" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
profiler = { enabled = false },
|
||||
@@ -116,20 +116,111 @@ return {
|
||||
desc = "Git Blame",
|
||||
},
|
||||
{
|
||||
"<C-n>", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>pf", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>ps", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>pb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>pw", function() Snacks.picker.grep_word() end, desc = "Visual selection of word", mode = { "n", "x" } },
|
||||
{ "<leader>pi", function() Snacks.picker.icons() end, desc = "Icons", },
|
||||
{ "<leader>ph", function() Snacks.picker.help() end, desc = "Help Pages", },
|
||||
{ "<leader>pr", function() Snacks.picker.recent() end, desc = "Recent", },
|
||||
{ "<leader>pR", function() Snacks.picker.registers() end, desc = "Registers", },
|
||||
{ "<leader>pg", function() Snacks.picker.git_files() end, desc = "Find Git Fiels", },
|
||||
{ "<leader>pk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||
{ "<leader>pt", function() Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
|
||||
{ "<leader>pc", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||
{ "<leader>pl", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||
"<C-n>",
|
||||
function()
|
||||
Snacks.picker.files()
|
||||
end,
|
||||
desc = "Find Files",
|
||||
},
|
||||
{
|
||||
"<leader>pf",
|
||||
function()
|
||||
Snacks.picker.files()
|
||||
end,
|
||||
desc = "Find Files",
|
||||
},
|
||||
{
|
||||
"<leader>ps",
|
||||
function()
|
||||
Snacks.picker.grep()
|
||||
end,
|
||||
desc = "Grep",
|
||||
},
|
||||
{
|
||||
"<leader>pb",
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
{
|
||||
"<leader>pw",
|
||||
function()
|
||||
Snacks.picker.grep_word()
|
||||
end,
|
||||
desc = "Visual selection of word",
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>pi",
|
||||
function()
|
||||
Snacks.picker.icons()
|
||||
end,
|
||||
desc = "Icons",
|
||||
},
|
||||
{
|
||||
"<leader>ph",
|
||||
function()
|
||||
Snacks.picker.help()
|
||||
end,
|
||||
desc = "Help Pages",
|
||||
},
|
||||
{
|
||||
"<leader>pr",
|
||||
function()
|
||||
Snacks.picker.recent()
|
||||
end,
|
||||
desc = "Recent",
|
||||
},
|
||||
{
|
||||
"<leader>pR",
|
||||
function()
|
||||
Snacks.picker.registers()
|
||||
end,
|
||||
desc = "Registers",
|
||||
},
|
||||
{
|
||||
"<leader>pg",
|
||||
function()
|
||||
Snacks.picker.git_files()
|
||||
end,
|
||||
desc = "Find Git Fiels",
|
||||
},
|
||||
{
|
||||
"<leader>pk",
|
||||
function()
|
||||
Snacks.picker.keymaps()
|
||||
end,
|
||||
desc = "Keymaps",
|
||||
},
|
||||
{
|
||||
"<leader>pt",
|
||||
function()
|
||||
Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } })
|
||||
end,
|
||||
desc = "Todo/Fix/Fixme",
|
||||
},
|
||||
{
|
||||
"<leader>pc",
|
||||
function()
|
||||
Snacks.picker.colorschemes()
|
||||
end,
|
||||
desc = "Colorschemes",
|
||||
},
|
||||
{
|
||||
"<leader>pl",
|
||||
function()
|
||||
Snacks.picker.lazy()
|
||||
end,
|
||||
desc = "Search for Plugin Spec",
|
||||
},
|
||||
{
|
||||
"<leader>pD",
|
||||
function()
|
||||
Snacks.picker.diagnostics()
|
||||
end,
|
||||
desc = "Diagnostics",
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
|
||||
@@ -1,69 +1,5 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
signs = true, -- show icons in the signs column
|
||||
sign_priority = 8, -- sign priority
|
||||
-- keywords recognized as todo comments
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
TODO = { icon = " ", color = "info" },
|
||||
HACK = { icon = " ", color = "warning" },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO", "HINT" } },
|
||||
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||
},
|
||||
gui_style = {
|
||||
fg = "NONE", -- The gui style to use for the fg highlight group.
|
||||
bg = "BOLD", -- The gui style to use for the bg highlight group.
|
||||
},
|
||||
|
||||
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
|
||||
-- highlighting of the line containing the todo comment
|
||||
-- * before: highlights before the keyword (typically comment characters)
|
||||
-- * keyword: highlights of the keyword
|
||||
-- * after: highlights after the keyword (todo text)
|
||||
highlight = {
|
||||
multiline = true, -- enable multine todo comments
|
||||
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
|
||||
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
|
||||
before = "", -- "fg" or "bg" or empty
|
||||
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
|
||||
after = "fg", -- "fg" or "bg" or empty
|
||||
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
|
||||
comments_only = true, -- uses treesitter to match keywords in comments only
|
||||
max_line_len = 400, -- ignore lines longer than this
|
||||
exclude = {}, -- list of file types to exclude highlighting
|
||||
},
|
||||
-- list of named colors where we try to extract the guifg from the
|
||||
-- list of highlight groups or use the hex color if hl not found as a fallback
|
||||
colors = {
|
||||
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
||||
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
|
||||
info = { "DiagnosticInfo", "#2563EB" },
|
||||
hint = { "DiagnosticHint", "#10B981" },
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
test = { "Identifier", "#FF00FF" },
|
||||
},
|
||||
search = {
|
||||
command = "rg",
|
||||
args = {
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
},
|
||||
-- regex that will be used to match keywords.
|
||||
-- don't replace the (KEYWORDS) placeholder
|
||||
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
|
||||
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local ft = { "javascriptreact", "typescriptreact", "javascript", "typescript" }
|
||||
return {
|
||||
{
|
||||
"pmizio/typescript-tools.nvim",
|
||||
@@ -5,7 +6,7 @@ return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
ft = { "javascriptreact", "typescriptreact", "javascript", "typescript" },
|
||||
ft = ft,
|
||||
opts = {
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
@@ -33,7 +34,7 @@ return {
|
||||
-- memory limit in megabytes or "auto"(basically no limit)
|
||||
tsserver_max_memory = "auto",
|
||||
-- described below
|
||||
tsserver_format_options = function(ft)
|
||||
tsserver_format_options = function(_)
|
||||
-- Return empty table to disable formatting
|
||||
return {}
|
||||
end,
|
||||
@@ -72,13 +73,13 @@ return {
|
||||
},
|
||||
{
|
||||
"dmmulroy/ts-error-translator.nvim",
|
||||
ft = { "javascriptreact", "typescriptreact", "javascript", "typescript" },
|
||||
ft = ft,
|
||||
},
|
||||
{
|
||||
"folke/ts-comments.nvim",
|
||||
opts = {},
|
||||
event = "VeryLazy",
|
||||
enabled = vim.fn.has("nvim-0.10.0") == 1,
|
||||
ft = { "javascriptreact", "typescriptreact", "javascript", "typescript" },
|
||||
ft = ft,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -18,43 +18,5 @@ return {
|
||||
build = function()
|
||||
require("typst-preview").update()
|
||||
end,
|
||||
opts = {
|
||||
-- Setting this true will enable printing debug information with print()
|
||||
debug = false,
|
||||
|
||||
-- Custom format string to open the output link provided with %s
|
||||
-- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview'
|
||||
open_cmd = "xdg-open %s",
|
||||
-- open_cmd = "floorp %s -P typst-preview --class typst-preview",
|
||||
|
||||
-- Setting this to 'always' will invert black and white in the preview
|
||||
-- Setting this to 'auto' will invert depending if the browser has enable
|
||||
-- dark mode
|
||||
invert_colors = nil,
|
||||
-- Whether the preview will follow the cursor in the source file
|
||||
follow_cursor = true,
|
||||
|
||||
-- Provide the path to binaries for dependencies.
|
||||
-- Setting this will skip the download of the binary by the plugin.
|
||||
-- Warning: Be aware that your version might be older than the one
|
||||
-- required.
|
||||
dependencies_bin = {
|
||||
-- if you are using tinymist, just set ['typst-preview'] = "tinymist".
|
||||
["typst-preview"] = nil,
|
||||
["websocat"] = nil,
|
||||
},
|
||||
-- A list of extra arguments (or nil) to be passed to previewer.
|
||||
-- For example, extra_args = { "--input=ver=draft", "--ignore-system-fonts" }
|
||||
extra_args = nil,
|
||||
-- This function will be called to determine the root of the typst project
|
||||
get_root = function(path_of_main_file)
|
||||
return vim.fn.fnamemodify(path_of_main_file, ":p:h")
|
||||
end,
|
||||
|
||||
-- This function will be called to determine the main file of the typst
|
||||
-- project.
|
||||
get_main_file = function(path_of_buffer)
|
||||
return path_of_buffer
|
||||
end,
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user