mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2026-02-04 06:42:05 +00:00
Update: 2024-10-15
This commit is contained in:
@@ -18,8 +18,10 @@ return {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-calc",
|
||||
"Exafunction/codeium.nvim",
|
||||
"zbirenbaum/copilot-cmp",
|
||||
"petertriho/cmp-git",
|
||||
"davidsierradz/cmp-conventionalcommits",
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
"zjp-CN/nvim-cmp-lsp-rs",
|
||||
{
|
||||
"MattiasMTS/cmp-dbee",
|
||||
@@ -64,6 +66,7 @@ return {
|
||||
TypeParameter = "",
|
||||
Copilot = "",
|
||||
Codeium = "",
|
||||
Supermaven = "",
|
||||
}
|
||||
opts = {
|
||||
mapping = {
|
||||
@@ -86,15 +89,17 @@ return {
|
||||
{ name = "crates" },
|
||||
{ name = "async_path" },
|
||||
{ name = "cmp-dbee" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer", keyword_length = 4 },
|
||||
{ name = "luasnip" },
|
||||
{ name = "neorg" },
|
||||
{ name = "pypi" },
|
||||
{ name = "env" },
|
||||
{ name = "dotenv" },
|
||||
{ name = "calc" },
|
||||
{ name = "codeium" },
|
||||
{ name = "git" },
|
||||
{ name = "conventionalcommits" },
|
||||
{ name = "supermaven" },
|
||||
-- { name = "copilot" },
|
||||
-- { name = "codeium" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
@@ -113,12 +118,14 @@ return {
|
||||
nvim_lua = "[lua]",
|
||||
async_path = "[path]",
|
||||
codeium = "[codeium]",
|
||||
copilot = "[copilot]",
|
||||
luasnip = "[snip]",
|
||||
neorg = "[neorg]",
|
||||
crates = "[crates]",
|
||||
pypi = "[pypi]",
|
||||
env = "[env]",
|
||||
dotenv = "[env]",
|
||||
buffer = "[buf]",
|
||||
supermaven = "[AI]",
|
||||
["cmp-dbee"] = "[DB]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
|
||||
7
lua/plugins/code-playground.lua
Normal file
7
lua/plugins/code-playground.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"GustavEikaas/code-playground.nvim",
|
||||
cmd = { "Code" },
|
||||
config = function()
|
||||
require("code-playground").setup()
|
||||
end,
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
return {
|
||||
"Exafunction/codeium.nvim",
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
commit = "d3b88eb3aa1de6da33d325c196b8a41da2bcc825",
|
||||
cmd = { "Codeium" },
|
||||
opts = {
|
||||
enable_chat = true,
|
||||
|
||||
@@ -25,7 +25,7 @@ return {
|
||||
vimwiki = { "cbfmt", "markdownlint", "markdown-toc" },
|
||||
json = { "jq" },
|
||||
c = { "clang-format" },
|
||||
-- toml = { "taplo" },
|
||||
toml = { "taplo" },
|
||||
cpp = { "clang-format" },
|
||||
cmake = { "cmake_format" },
|
||||
htmldjango = { "djlint", "rustywind" },
|
||||
|
||||
@@ -1,143 +1,155 @@
|
||||
return {
|
||||
"Saecki/crates.nvim",
|
||||
tag = "stable",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>ru",
|
||||
require("crates").upgrade_all_crates,
|
||||
desc = "[U]pgrade all crates",
|
||||
ft = { "rust", "toml" },
|
||||
{
|
||||
|
||||
"Saecki/crates.nvim",
|
||||
tag = "stable",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>ru",
|
||||
require("crates").upgrade_all_crates,
|
||||
desc = "[U]pgrade all crates",
|
||||
ft = { "rust", "toml" },
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
smart_insert = true,
|
||||
insert_closing_quote = true,
|
||||
autoload = true,
|
||||
autoupdate = true,
|
||||
loading_indicator = true,
|
||||
date_format = "%d-%m-%Y",
|
||||
thousands_separator = ".",
|
||||
notification_title = "Crates",
|
||||
-- disable_invalid_feature_diagnostic = false,
|
||||
text = {
|
||||
loading = " Loading",
|
||||
version = " %s",
|
||||
prerelease = " %s",
|
||||
yanked = " %s",
|
||||
nomatch = " No match",
|
||||
upgrade = " %s",
|
||||
error = " Error fetching crate",
|
||||
},
|
||||
highlight = {
|
||||
loading = "CratesNvimLoading",
|
||||
version = "CratesNvimVersion",
|
||||
prerelease = "CratesNvimPreRelease",
|
||||
yanked = "CratesNvimYanked",
|
||||
nomatch = "CratesNvimNoMatch",
|
||||
upgrade = "CratesNvimUpgrade",
|
||||
error = "CratesNvimError",
|
||||
},
|
||||
popup = {
|
||||
autofocus = false,
|
||||
copy_register = '"',
|
||||
style = "minimal",
|
||||
border = "none",
|
||||
show_version_date = false,
|
||||
show_dependency_version = true,
|
||||
max_height = 30,
|
||||
min_width = 20,
|
||||
padding = 1,
|
||||
opts = {
|
||||
smart_insert = true,
|
||||
insert_closing_quote = true,
|
||||
autoload = true,
|
||||
autoupdate = true,
|
||||
loading_indicator = true,
|
||||
date_format = "%d-%m-%Y",
|
||||
thousands_separator = ".",
|
||||
notification_title = "Crates",
|
||||
-- disable_invalid_feature_diagnostic = false,
|
||||
text = {
|
||||
title = " %s",
|
||||
pill_left = "",
|
||||
pill_right = "",
|
||||
description = "%s",
|
||||
created_label = " created ",
|
||||
created = "%s",
|
||||
updated_label = " updated ",
|
||||
updated = "%s",
|
||||
downloads_label = " downloads ",
|
||||
downloads = "%s",
|
||||
homepage_label = " homepage ",
|
||||
homepage = "%s",
|
||||
repository_label = " repository ",
|
||||
repository = "%s",
|
||||
documentation_label = " documentation ",
|
||||
documentation = "%s",
|
||||
crates_io_label = " crates.io ",
|
||||
crates_io = "%s",
|
||||
categories_label = " categories ",
|
||||
keywords_label = " keywords ",
|
||||
version = " %s",
|
||||
prerelease = " %s",
|
||||
yanked = " %s",
|
||||
version_date = " %s",
|
||||
feature = " %s",
|
||||
enabled = " %s",
|
||||
transitive = " %s",
|
||||
normal_dependencies_title = " Dependencies",
|
||||
build_dependencies_title = " Build dependencies",
|
||||
dev_dependencies_title = " Dev dependencies",
|
||||
dependency = " %s",
|
||||
optional = " %s",
|
||||
dependency_version = " %s",
|
||||
loading = " ",
|
||||
loading = " Loading",
|
||||
version = " %s",
|
||||
prerelease = " %s",
|
||||
yanked = " %s",
|
||||
nomatch = " No match",
|
||||
upgrade = " %s",
|
||||
error = " Error fetching crate",
|
||||
},
|
||||
highlight = {
|
||||
title = "CratesNvimPopupTitle",
|
||||
pill_text = "CratesNvimPopupPillText",
|
||||
pill_border = "CratesNvimPopupPillBorder",
|
||||
description = "CratesNvimPopupDescription",
|
||||
created_label = "CratesNvimPopupLabel",
|
||||
created = "CratesNvimPopupValue",
|
||||
updated_label = "CratesNvimPopupLabel",
|
||||
updated = "CratesNvimPopupValue",
|
||||
downloads_label = "CratesNvimPopupLabel",
|
||||
downloads = "CratesNvimPopupValue",
|
||||
homepage_label = "CratesNvimPopupLabel",
|
||||
homepage = "CratesNvimPopupUrl",
|
||||
repository_label = "CratesNvimPopupLabel",
|
||||
repository = "CratesNvimPopupUrl",
|
||||
documentation_label = "CratesNvimPopupLabel",
|
||||
documentation = "CratesNvimPopupUrl",
|
||||
crates_io_label = "CratesNvimPopupLabel",
|
||||
crates_io = "CratesNvimPopupUrl",
|
||||
categories_label = "CratesNvimPopupLabel",
|
||||
keywords_label = "CratesNvimPopupLabel",
|
||||
version = "CratesNvimPopupVersion",
|
||||
prerelease = "CratesNvimPopupPreRelease",
|
||||
yanked = "CratesNvimPopupYanked",
|
||||
version_date = "CratesNvimPopupVersionDate",
|
||||
feature = "CratesNvimPopupFeature",
|
||||
enabled = "CratesNvimPopupEnabled",
|
||||
transitive = "CratesNvimPopupTransitive",
|
||||
normal_dependencies_title = "CratesNvimPopupNormalDependenciesTitle",
|
||||
build_dependencies_title = "CratesNvimPopupBuildDependenciesTitle",
|
||||
dev_dependencies_title = "CratesNvimPopupDevDependenciesTitle",
|
||||
dependency = "CratesNvimPopupDependency",
|
||||
optional = "CratesNvimPopupOptional",
|
||||
dependency_version = "CratesNvimPopupDependencyVersion",
|
||||
loading = "CratesNvimPopupLoading",
|
||||
loading = "CratesNvimLoading",
|
||||
version = "CratesNvimVersion",
|
||||
prerelease = "CratesNvimPreRelease",
|
||||
yanked = "CratesNvimYanked",
|
||||
nomatch = "CratesNvimNoMatch",
|
||||
upgrade = "CratesNvimUpgrade",
|
||||
error = "CratesNvimError",
|
||||
},
|
||||
keys = {
|
||||
hide = { "q", "<esc>" },
|
||||
open_url = { "<cr>" },
|
||||
select = { "<cr>" },
|
||||
select_alt = { "s" },
|
||||
toggle_feature = { "<cr>" },
|
||||
copy_value = { "yy" },
|
||||
goto_item = { "gd", "K", "<C-LeftMouse>" },
|
||||
jump_forward = { "<c-i>" },
|
||||
jump_back = { "<c-o>", "<C-RightMouse>" },
|
||||
popup = {
|
||||
autofocus = false,
|
||||
copy_register = '"',
|
||||
style = "minimal",
|
||||
border = "none",
|
||||
show_version_date = false,
|
||||
show_dependency_version = true,
|
||||
max_height = 30,
|
||||
min_width = 20,
|
||||
padding = 1,
|
||||
text = {
|
||||
title = " %s",
|
||||
pill_left = "",
|
||||
pill_right = "",
|
||||
description = "%s",
|
||||
created_label = " created ",
|
||||
created = "%s",
|
||||
updated_label = " updated ",
|
||||
updated = "%s",
|
||||
downloads_label = " downloads ",
|
||||
downloads = "%s",
|
||||
homepage_label = " homepage ",
|
||||
homepage = "%s",
|
||||
repository_label = " repository ",
|
||||
repository = "%s",
|
||||
documentation_label = " documentation ",
|
||||
documentation = "%s",
|
||||
crates_io_label = " crates.io ",
|
||||
crates_io = "%s",
|
||||
categories_label = " categories ",
|
||||
keywords_label = " keywords ",
|
||||
version = " %s",
|
||||
prerelease = " %s",
|
||||
yanked = " %s",
|
||||
version_date = " %s",
|
||||
feature = " %s",
|
||||
enabled = " %s",
|
||||
transitive = " %s",
|
||||
normal_dependencies_title = " Dependencies",
|
||||
build_dependencies_title = " Build dependencies",
|
||||
dev_dependencies_title = " Dev dependencies",
|
||||
dependency = " %s",
|
||||
optional = " %s",
|
||||
dependency_version = " %s",
|
||||
loading = " ",
|
||||
},
|
||||
highlight = {
|
||||
title = "CratesNvimPopupTitle",
|
||||
pill_text = "CratesNvimPopupPillText",
|
||||
pill_border = "CratesNvimPopupPillBorder",
|
||||
description = "CratesNvimPopupDescription",
|
||||
created_label = "CratesNvimPopupLabel",
|
||||
created = "CratesNvimPopupValue",
|
||||
updated_label = "CratesNvimPopupLabel",
|
||||
updated = "CratesNvimPopupValue",
|
||||
downloads_label = "CratesNvimPopupLabel",
|
||||
downloads = "CratesNvimPopupValue",
|
||||
homepage_label = "CratesNvimPopupLabel",
|
||||
homepage = "CratesNvimPopupUrl",
|
||||
repository_label = "CratesNvimPopupLabel",
|
||||
repository = "CratesNvimPopupUrl",
|
||||
documentation_label = "CratesNvimPopupLabel",
|
||||
documentation = "CratesNvimPopupUrl",
|
||||
crates_io_label = "CratesNvimPopupLabel",
|
||||
crates_io = "CratesNvimPopupUrl",
|
||||
categories_label = "CratesNvimPopupLabel",
|
||||
keywords_label = "CratesNvimPopupLabel",
|
||||
version = "CratesNvimPopupVersion",
|
||||
prerelease = "CratesNvimPopupPreRelease",
|
||||
yanked = "CratesNvimPopupYanked",
|
||||
version_date = "CratesNvimPopupVersionDate",
|
||||
feature = "CratesNvimPopupFeature",
|
||||
enabled = "CratesNvimPopupEnabled",
|
||||
transitive = "CratesNvimPopupTransitive",
|
||||
normal_dependencies_title = "CratesNvimPopupNormalDependenciesTitle",
|
||||
build_dependencies_title = "CratesNvimPopupBuildDependenciesTitle",
|
||||
dev_dependencies_title = "CratesNvimPopupDevDependenciesTitle",
|
||||
dependency = "CratesNvimPopupDependency",
|
||||
optional = "CratesNvimPopupOptional",
|
||||
dependency_version = "CratesNvimPopupDependencyVersion",
|
||||
loading = "CratesNvimPopupLoading",
|
||||
},
|
||||
keys = {
|
||||
hide = { "q", "<esc>" },
|
||||
open_url = { "<cr>" },
|
||||
select = { "<cr>" },
|
||||
select_alt = { "s" },
|
||||
toggle_feature = { "<cr>" },
|
||||
copy_value = { "yy" },
|
||||
goto_item = { "gd", "K", "<C-LeftMouse>" },
|
||||
jump_forward = { "<c-i>" },
|
||||
jump_back = { "<c-o>", "<C-RightMouse>" },
|
||||
},
|
||||
},
|
||||
},
|
||||
--[[ src = {
|
||||
--[[ src = {
|
||||
insert_closing_quote = true,
|
||||
text = {
|
||||
prerelease = " pre-release ",
|
||||
yanked = " yanked ",
|
||||
},
|
||||
}, ]]
|
||||
},
|
||||
},
|
||||
{
|
||||
"Aityz/cratesearch.nvim",
|
||||
event = { "BufRead Cargo.toml" },
|
||||
ft = { "rust" },
|
||||
cmd = { "CrateSearch" },
|
||||
config = function()
|
||||
require("cratesearch").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,12 +3,20 @@ return {
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
|
||||
"<leader>od",
|
||||
function()
|
||||
require("dbee").toggle()
|
||||
end,
|
||||
desc = "Toggle Dbee",
|
||||
},
|
||||
},
|
||||
cmd = "Dbee",
|
||||
build = function()
|
||||
-- Install tries to automatically detect the install method.
|
||||
-- if it fails, try calling it with one of these parameters:
|
||||
-- "curl", "wget", "bitsadmin", "go"
|
||||
require("dbee").install("curl")
|
||||
-- go install github.com/kndndrj/nvim-dbee/dbee@latest
|
||||
require("dbee").install("go")
|
||||
end,
|
||||
opts = {
|
||||
--- https://github.com/kndndrj/nvim-dbee/blob/master/lua/dbee/config.lua
|
||||
|
||||
6
lua/plugins/hot-reload.lua
Normal file
6
lua/plugins/hot-reload.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"Zeioth/hot-reload.nvim",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
event = "BufEnter",
|
||||
opts = {},
|
||||
}
|
||||
45
lua/plugins/jq.lua
Normal file
45
lua/plugins/jq.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
return {
|
||||
"cenk1cenk2/jq.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"grapp-dev/nui-components.nvim",
|
||||
},
|
||||
opts = {
|
||||
keymap = {
|
||||
close = "<Esc>",
|
||||
focus_next = "<Tab>",
|
||||
focus_prev = "<S-Tab>",
|
||||
focus_left = "<C-h>",
|
||||
focus_right = "<C-l>",
|
||||
focus_up = "<C-k>",
|
||||
focus_down = "<C-j>",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("jq").setup(opts)
|
||||
vim.api.nvim_create_user_command("JQ", function()
|
||||
require("jq").run({
|
||||
--- you can pass additional options to configure the current instance
|
||||
-- if you want to toggle from the memory
|
||||
toggle = true,
|
||||
-- commands for the instance else it will use the default
|
||||
-- the default command would be the first one in the table
|
||||
commands = {
|
||||
{
|
||||
-- command to be run
|
||||
command = "jq",
|
||||
-- filetype of the output
|
||||
filetype = "json",
|
||||
-- hidden arguments that will not be shown in the ui
|
||||
arguments = "-r",
|
||||
},
|
||||
},
|
||||
-- arguments to start with in the ui
|
||||
arguments = "",
|
||||
-- query to start with, if not provided it will use the default
|
||||
query = ".",
|
||||
})
|
||||
end, {})
|
||||
end,
|
||||
}
|
||||
13
lua/plugins/lsp/typst.lua
Normal file
13
lua/plugins/lsp/typst.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local M = {}
|
||||
|
||||
M.setup = function(lsp, capabilities)
|
||||
lsp.tinymist.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
exportPdf = "onType",
|
||||
outputPath = "$root/target/$dir/$name",
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -9,6 +9,7 @@ return {
|
||||
"folke/trouble.nvim",
|
||||
"folke/neoconf.nvim",
|
||||
"piersolenski/telescope-import.nvim",
|
||||
"mrcjkb/rustaceanvim",
|
||||
},
|
||||
|
||||
config = function()
|
||||
@@ -106,7 +107,7 @@ return {
|
||||
focusable = true,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
source = true,
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
@@ -169,6 +170,9 @@ return {
|
||||
html = function()
|
||||
require("plugins.lsp.html").setup(lsp, lsp_capabilities)
|
||||
end,
|
||||
tinymist = function()
|
||||
require("plugins.lsp.typst").setup(lsp, lsp_capabilities)
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
||||
@@ -2,6 +2,7 @@ return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"pnx/lualine-lsp-status",
|
||||
"arkav/lualine-lsp-progress",
|
||||
{ "letieu/harpoon-lualine", dependencies = {
|
||||
"ThePrimeagen/harpoon",
|
||||
@@ -47,7 +48,7 @@ return {
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = { "filename", "diff", "harpoon2", "lsp_progress" },
|
||||
lualine_c = { "filename", "diff", "harpoon2", "lsp-status", "lsp_progress" },
|
||||
lualine_x = { "diagnostics", "encoding", "filetype", "filesize" },
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
|
||||
@@ -2,12 +2,13 @@ return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
version = "v2.*",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets", -- a bunch of snippets to use
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
config = function()
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
local ls = require("luasnip")
|
||||
|
||||
local s = ls.snippet
|
||||
@@ -60,7 +61,7 @@ return {
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
ls.config.set_config({
|
||||
opts = {
|
||||
-- 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,
|
||||
@@ -76,8 +77,14 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
}
|
||||
|
||||
ls.config.setup(opts)
|
||||
|
||||
-- require("luasnip.loaders.from_vscode").load({ exclude = { "python" } })
|
||||
vim.tbl_map(function(type)
|
||||
require("luasnip.loaders.from_" .. type).lazy_load()
|
||||
end, { "vscode", "snipmate", "lua" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
return {
|
||||
"andweeb/presence.nvim",
|
||||
"IogaMaster/neocord",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- General options
|
||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
||||
main_image = "neovim", -- Main image display (either "neovim" or "file")
|
||||
-- client_id = "", -- Use your own Discord application client id (not recommended)
|
||||
logo = "auto", -- "auto" or url
|
||||
logo_tooltip = nil, -- nil or string
|
||||
main_image = "language", -- "language" or "logo"
|
||||
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||
enable_line_number = false, -- Displays the current line number instead of the current project
|
||||
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
|
||||
blacklist = { "**/Codnity/*" }, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
|
||||
show_time = true, -- Show the timer
|
||||
global_timer = true, -- if set true, timer won't update when any event are triggered
|
||||
enable_line_number = true,
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
@@ -22,5 +22,6 @@ return {
|
||||
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,27 @@
|
||||
return {
|
||||
"danymat/neogen",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
config = true,
|
||||
version = "*",
|
||||
cmd = { "Neogen" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>ss",
|
||||
function()
|
||||
require("neogen").generate()
|
||||
end,
|
||||
desc = "Generate docstings",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
enabled = true,
|
||||
input_after_comment = true, -- (default: true) automatic jump (with insert mode) on inserted annotation
|
||||
snippet_engine = "luasnip",
|
||||
languages = {
|
||||
python = {
|
||||
template = {
|
||||
annotation_convention = "google_docstrings", -- google_docstrings, numpydoc, reST
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
42
lua/plugins/py-requirements.lua
Normal file
42
lua/plugins/py-requirements.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
return {
|
||||
"MeanderingProgrammer/py-requirements.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
|
||||
opts = {
|
||||
-- Enabled by default if you do not use `nvim-cmp` set to false
|
||||
enable_cmp = false,
|
||||
-- Endpoint used for getting package versions
|
||||
index_url = "https://pypi.org/simple/",
|
||||
-- Fallback endpoint in case 'index_url' fails to find a package
|
||||
extra_index_url = nil,
|
||||
-- Specify which file patterns plugin is active on
|
||||
-- For info on patterns, see :h pattern
|
||||
file_patterns = {
|
||||
"requirements.txt",
|
||||
"requirements.lock",
|
||||
"requirements-dev.txt",
|
||||
"requirements-dev.lock",
|
||||
"requirements_dev.txt",
|
||||
},
|
||||
-- For available options, see :h vim.lsp.util.open_floating_preview
|
||||
float_opts = { border = "rounded" },
|
||||
filter = {
|
||||
-- If set to true pull only final release versions, this will ignore alpha,
|
||||
-- beta, release candidate, post release, and developmental release versions
|
||||
final_release = false,
|
||||
-- If set to true (default value) filter out yanked package versions
|
||||
yanked = true,
|
||||
},
|
||||
-- Query to get each module present in a file
|
||||
requirement_query = "(requirement) @requirement",
|
||||
-- Query to get information out of each module
|
||||
module_query = [[
|
||||
(requirement (package) @name)
|
||||
(version_spec (version_cmp) @cmp)
|
||||
(version_spec (version) @version)
|
||||
]],
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("py-requirements").setup(opts)
|
||||
end,
|
||||
}
|
||||
25
lua/plugins/pymple.lua
Normal file
25
lua/plugins/pymple.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"alexpasmantier/pymple.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "stevearc/dressing.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
build = ":PympleBuild",
|
||||
config = function()
|
||||
require("pymple").setup()
|
||||
end,
|
||||
opts = {
|
||||
-- automatically register the following keymaps on plugin setup
|
||||
keymaps = {
|
||||
-- Resolves import for symbol under cursor.
|
||||
-- This will automatically find and add the corresponding import to
|
||||
-- the top of the file (below any existing doctsring)
|
||||
resolve_import_under_cursor = {
|
||||
desc = "Resolve import under cursor",
|
||||
keys = "<leader>li", -- feel free to change this to whatever you like
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
4
lua/plugins/rest.lua
Normal file
4
lua/plugins/rest.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"rest-nvim/rest.nvim",
|
||||
cmd = { "Rest" },
|
||||
}
|
||||
9
lua/plugins/rittli.lua
Normal file
9
lua/plugins/rittli.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
-- https://github.com/miroshQa/rittli.nvim
|
||||
"miroshQa/rittli.nvim",
|
||||
enabled = false,
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
return {
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^4",
|
||||
version = "^5",
|
||||
lazy = false,
|
||||
ft = { "rust" },
|
||||
opts = {
|
||||
tools = {},
|
||||
server = {
|
||||
@@ -26,21 +25,21 @@ return {
|
||||
enable = true,
|
||||
},
|
||||
lifetimeElisionHints = {
|
||||
enable = true,
|
||||
useParameterNames = true,
|
||||
enable = "never",
|
||||
useParameterNames = false,
|
||||
},
|
||||
maxLength = 25,
|
||||
parameterHints = {
|
||||
enable = true,
|
||||
},
|
||||
reborrowHints = {
|
||||
enable = true,
|
||||
enable = "never",
|
||||
},
|
||||
renderColons = true,
|
||||
typeHints = {
|
||||
enable = true,
|
||||
hideClosureInitialization = true,
|
||||
hideNamedConstructor = true,
|
||||
hideClosureInitialization = false,
|
||||
hideNamedConstructor = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
22
lua/plugins/supermaven.lua
Normal file
22
lua/plugins/supermaven.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
enabled = false,
|
||||
opts = {
|
||||
keymaps = {
|
||||
accept_suggestion = "<Tab>",
|
||||
clear_suggestion = "<C-]>",
|
||||
accept_word = "<C-j>",
|
||||
},
|
||||
ignore_filetypes = {}, -- or { "cpp", }
|
||||
color = {
|
||||
suggestion_color = "#ffffff",
|
||||
cterm = 244,
|
||||
},
|
||||
log_level = "info", -- set to "off" to disable logging completely
|
||||
disable_inline_completion = true, -- disables inline completion for use with cmp
|
||||
disable_keymaps = true, -- disables built in keymaps for more manual control
|
||||
condition = function()
|
||||
return false
|
||||
end, -- condition to check for stopping supermaven, `true` means to stop supermaven when the condition is true.
|
||||
},
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
local ft = { "typescript", "typescriptreact", "javascript", "react", "python", "lua" }
|
||||
return {
|
||||
"piersolenski/telescope-import.nvim",
|
||||
dependencies = "nvim-telescope/telescope.nvim",
|
||||
commit = "e60ca0fea71432ed578e17d8f1b153da3fa4555d",
|
||||
ft = ft,
|
||||
keys = {
|
||||
{
|
||||
"<leader>li",
|
||||
function()
|
||||
vim.cmd.Telescope("import")
|
||||
end,
|
||||
desc = "[I]mport",
|
||||
ft = ft,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
import = {
|
||||
insert_at_top = true,
|
||||
custom_languages = {
|
||||
{
|
||||
regex = [[^(?:import(?:[\"'\s]*([\w*{}\n, ]+)from\s*)?[\"'\s](.*?)[\"'\s].*)]],
|
||||
filetypes = ft,
|
||||
extensions = { "js", "ts", "py", "lua" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("telescope").load_extension("import", opts)
|
||||
end,
|
||||
}
|
||||
@@ -16,6 +16,7 @@ return {
|
||||
{ "ThePrimeagen/harpoon", branch = "harpoon2" },
|
||||
{ "ThePrimeagen/git-worktree.nvim" },
|
||||
{ "piersolenski/telescope-import.nvim" },
|
||||
{ "nvim-telescope/telescope-frecency.nvim" },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
@@ -122,149 +123,159 @@ return {
|
||||
desc = "Telescope [B]ibtex",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local open_with_trouble = require("trouble.sources.telescope").open
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
opts = {
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
path_display = { "smart" },
|
||||
file_ignore_patterns = { ".git/", ".spl", "target/", "*.pdf" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<Down>"] = require("telescope.actions").cycle_history_next,
|
||||
["<Up>"] = require("telescope.actions").cycle_history_prev,
|
||||
["<C-j>"] = require("telescope.actions").move_selection_next,
|
||||
["<C-k>"] = require("telescope.actions").move_selection_previous,
|
||||
["<C-D>"] = require("telescope.actions").delete_buffer + require("telescope.actions").move_to_top,
|
||||
["<C-t>"] = require("trouble.sources.telescope").open,
|
||||
-- ["<C-Y>"] = require("telescope.actions").remove_selection
|
||||
},
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
path_display = { "smart" },
|
||||
file_ignore_patterns = { ".git/", ".spl", "target/", "*.pdf" },
|
||||
n = { ["<C-t>"] = require("trouble.sources.telescope").open },
|
||||
},
|
||||
history = {
|
||||
path = "~/.local/share/nvim/databases/telescope_history.sqlite3",
|
||||
limit = 100,
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
},
|
||||
media_files = {
|
||||
-- filetypes whitelist
|
||||
filetypes = { "png", "webp", "jpg", "jpeg", "mp4", "webm" },
|
||||
find_cmd = "rg",
|
||||
},
|
||||
emoji = {
|
||||
action = function(emoji)
|
||||
-- argument emoji is a table.
|
||||
-- {name="", value="", cagegory="", description=""}
|
||||
|
||||
vim.fn.setreg("*", emoji.value)
|
||||
print([[Press p or "*p to paste this emoji]] .. emoji.value)
|
||||
|
||||
-- insert emoji when picked
|
||||
-- vim.api.nvim_put({ emoji.value }, 'c', false, true)
|
||||
end,
|
||||
},
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
-- even more opts
|
||||
}),
|
||||
|
||||
-- pseudo code / specification for writing custom displays, like the one
|
||||
-- for "codeactions"
|
||||
-- specific_opts = {
|
||||
-- [kind] = {
|
||||
-- make_indexed = function(items) -> indexed_items, width,
|
||||
-- make_displayer = function(widths) -> displayer
|
||||
-- make_display = function(displayer) -> function(e)
|
||||
-- make_ordinal = function(e) -> string
|
||||
-- },
|
||||
-- -- for example to disable the custom builtin "codeactions" display
|
||||
-- do the following
|
||||
-- codeactions = false,
|
||||
-- }
|
||||
},
|
||||
lazy = {
|
||||
-- Optional theme (the extension doesn't set a default theme)
|
||||
theme = "dropdown",
|
||||
previewer = false,
|
||||
-- Whether or not to show the icon in the first column
|
||||
show_icon = true,
|
||||
-- Mappings for the actions
|
||||
mappings = {
|
||||
i = {
|
||||
["<Down>"] = require("telescope.actions").cycle_history_next,
|
||||
["<Up>"] = require("telescope.actions").cycle_history_prev,
|
||||
["<C-j>"] = require("telescope.actions").move_selection_next,
|
||||
["<C-k>"] = require("telescope.actions").move_selection_previous,
|
||||
["<C-D>"] = require("telescope.actions").delete_buffer
|
||||
+ require("telescope.actions").move_to_top,
|
||||
["<C-t>"] = open_with_trouble,
|
||||
-- ["<C-Y>"] = require("telescope.actions").remove_selection
|
||||
},
|
||||
n = { ["<C-t>"] = open_with_trouble },
|
||||
open_in_browser = "<C-o>",
|
||||
open_in_file_browser = "<M-b>",
|
||||
open_in_find_files = "<C-f>",
|
||||
open_in_live_grep = "<C-g>",
|
||||
open_plugins_picker = "<C-b>", -- Works only after having called first another action
|
||||
open_lazy_root_find_files = "<C-r>f",
|
||||
open_lazy_root_live_grep = "<C-r>g",
|
||||
},
|
||||
-- Other telescope configuration options
|
||||
},
|
||||
http = {
|
||||
-- How the mozilla url is opened. By default will be configured based on OS:
|
||||
open_url = "xdg-open %s", -- UNIX
|
||||
-- open_url = 'open %s' -- OSX
|
||||
-- open_url = 'start %s' -- Windows
|
||||
},
|
||||
heading = {
|
||||
treesitter = true,
|
||||
picker_opts = {
|
||||
layout_config = { width = 0.8, preview_width = 0.5 },
|
||||
layout_strategy = "horizontal",
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
follow = true,
|
||||
},
|
||||
bibtex = {
|
||||
-- Depth for the *.bib file
|
||||
depth = 1,
|
||||
-- Custom format for citation label
|
||||
custom_formats = {},
|
||||
-- Format to use for citation label.
|
||||
-- Try to match the filetype by default, or use 'plain'
|
||||
format = "",
|
||||
-- Path to global bibliographies (placed outside of the project)
|
||||
global_files = {},
|
||||
-- Define the search keys to use in the picker
|
||||
search_keys = { "author", "year", "title" },
|
||||
-- Template for the formatted citation
|
||||
citation_format = "{{author}} ({{year}}), {{title}}.",
|
||||
-- Only use initials for the authors first name
|
||||
citation_trim_firstname = true,
|
||||
-- Max number of authors to write in the formatted citation
|
||||
-- following authors will be replaced by "et al."
|
||||
citation_max_auth = 2,
|
||||
-- Context awareness disabled by default
|
||||
context = false,
|
||||
-- Fallback to global/directory .bib files if context not found
|
||||
-- This setting has no effect if context = false
|
||||
context_fallback = true,
|
||||
-- Wrapping in the preview window is disabled by default
|
||||
wrap = false,
|
||||
},
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
},
|
||||
media_files = {
|
||||
-- filetypes whitelist
|
||||
filetypes = { "png", "webp", "jpg", "jpeg", "mp4", "webm" },
|
||||
find_cmd = "rg",
|
||||
},
|
||||
emoji = {
|
||||
action = function(emoji)
|
||||
-- argument emoji is a table.
|
||||
-- {name="", value="", cagegory="", description=""}
|
||||
|
||||
vim.fn.setreg("*", emoji.value)
|
||||
print([[Press p or "*p to paste this emoji]] .. emoji.value)
|
||||
|
||||
-- insert emoji when picked
|
||||
-- vim.api.nvim_put({ emoji.value }, 'c', false, true)
|
||||
end,
|
||||
},
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({
|
||||
-- even more opts
|
||||
}),
|
||||
|
||||
-- pseudo code / specification for writing custom displays, like the one
|
||||
-- for "codeactions"
|
||||
-- specific_opts = {
|
||||
-- [kind] = {
|
||||
-- make_indexed = function(items) -> indexed_items, width,
|
||||
-- make_displayer = function(widths) -> displayer
|
||||
-- make_display = function(displayer) -> function(e)
|
||||
-- make_ordinal = function(e) -> string
|
||||
-- },
|
||||
-- -- for example to disable the custom builtin "codeactions" display
|
||||
-- do the following
|
||||
-- codeactions = false,
|
||||
-- }
|
||||
},
|
||||
lazy = {
|
||||
-- Optional theme (the extension doesn't set a default theme)
|
||||
theme = "dropdown",
|
||||
previewer = false,
|
||||
-- Whether or not to show the icon in the first column
|
||||
show_icon = true,
|
||||
-- Mappings for the actions
|
||||
mappings = {
|
||||
open_in_browser = "<C-o>",
|
||||
open_in_file_browser = "<M-b>",
|
||||
open_in_find_files = "<C-f>",
|
||||
open_in_live_grep = "<C-g>",
|
||||
open_plugins_picker = "<C-b>", -- Works only after having called first another action
|
||||
open_lazy_root_find_files = "<C-r>f",
|
||||
open_lazy_root_live_grep = "<C-r>g",
|
||||
},
|
||||
-- Other telescope configuration options
|
||||
},
|
||||
http = {
|
||||
-- How the mozilla url is opened. By default will be configured based on OS:
|
||||
open_url = "xdg-open %s", -- UNIX
|
||||
-- open_url = 'open %s' -- OSX
|
||||
-- open_url = 'start %s' -- Windows
|
||||
},
|
||||
heading = {
|
||||
treesitter = true,
|
||||
picker_opts = {
|
||||
layout_config = { width = 0.8, preview_width = 0.5 },
|
||||
layout_strategy = "horizontal",
|
||||
},
|
||||
},
|
||||
bibtex = {
|
||||
-- Depth for the *.bib file
|
||||
depth = 1,
|
||||
-- Custom format for citation label
|
||||
custom_formats = {},
|
||||
-- Format to use for citation label.
|
||||
-- Try to match the filetype by default, or use 'plain'
|
||||
format = "",
|
||||
-- Path to global bibliographies (placed outside of the project)
|
||||
global_files = {},
|
||||
-- Define the search keys to use in the picker
|
||||
search_keys = { "author", "year", "title" },
|
||||
-- Template for the formatted citation
|
||||
citation_format = "{{author}} ({{year}}), {{title}}.",
|
||||
-- Only use initials for the authors first name
|
||||
citation_trim_firstname = true,
|
||||
-- Max number of authors to write in the formatted citation
|
||||
-- following authors will be replaced by "et al."
|
||||
citation_max_auth = 2,
|
||||
-- Context awareness disabled by default
|
||||
context = false,
|
||||
-- Fallback to global/directory .bib files if context not found
|
||||
-- This setting has no effect if context = false
|
||||
context_fallback = true,
|
||||
-- Wrapping in the preview window is disabled by default
|
||||
wrap = false,
|
||||
},
|
||||
frecency = {
|
||||
path_display = { "short" },
|
||||
ignore_patterns = { "*/.git/*", "*/.DS_Store/*", "*/.venv/*", "*/tmp/*", "*/bruno/*" },
|
||||
default_workspace = "CWD",
|
||||
hide_current_buffer = true,
|
||||
show_scores = true,
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup(opts)
|
||||
|
||||
pcall(telescope.load_extension, "fzf")
|
||||
pcall(telescope.load_extension, "media_files") -- Telescope media_files
|
||||
@@ -276,5 +287,6 @@ return {
|
||||
pcall(telescope.load_extension, "git_diffs") -- Telescope git_diffs diff_commits
|
||||
pcall(telescope.load_extension, "bibtex") -- Telescope bibtex
|
||||
pcall(telescope.load_extension, "harpoon")
|
||||
pcall(telescope.load_extension, "frecency")
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1 +1,68 @@
|
||||
return { "folke/todo-comments.nvim", opts = true }
|
||||
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" } },
|
||||
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
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
version = "*",
|
||||
-- version = "*",
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
|
||||
@@ -5,4 +5,42 @@ return {
|
||||
build = function()
|
||||
require("typst-preview").update()
|
||||
end,
|
||||
opts = {
|
||||
-- Setting this true will enable printing debug information with print()
|
||||
debug = true,
|
||||
|
||||
-- Custom format string to open the output link provided with %s
|
||||
-- Example: open_cmd = 'firefox %s -P typst-preview --class typst-preview'
|
||||
open_cmd = nil,
|
||||
|
||||
-- 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 = "never",
|
||||
-- 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"] = "tinymist",
|
||||
["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,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user