Update: 2024-10-15

This commit is contained in:
Kristofers Solo 2024-10-15 20:59:39 +03:00
parent 89989c222f
commit 814425e4b7
41 changed files with 1044 additions and 546 deletions

3
after/ftplugin/bru.lua Normal file
View File

@ -0,0 +1,3 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2

View File

@ -1,3 +1,3 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4

View File

@ -11,18 +11,89 @@ local c = ls.choice_node
ls.add_snippets("python", {
s(
"main",
"logger",
fmt(
[[
def main() -> None:
{}
if __name__ == "__main__":
main()
import logging
logger = logging.getLogger(__name__)
]],
{}
)
),
s(
"dbg",
fmt(
[[
logger.debug({})
]],
{
i(1, "pass"),
i(0),
}
)
),
s(
"info",
fmt(
[[
logger.info({})
]],
{
i(0),
}
)
),
s(
"warn",
fmt(
[[
logger.warning({})
]],
{
i(0),
}
)
),
s(
"err",
fmt(
[[
logger.error({})
]],
{
i(0),
}
)
),
s(
"exc",
fmt(
[[
logger.exception({})
]],
{
i(0),
}
)
),
s(
"crit",
fmt(
[[
logger.critical({})
]],
{
i(0),
}
)
),
s(
"fatal",
fmt(
[[
logger.fatal({})
]],
{
i(0),
}
)
),

View File

@ -37,7 +37,6 @@ ls.add_snippets("rust", {
{}
)
),
s("pd", fmt([[println!("{}: {{:?}}", {});]], { same(1), i(1) })),
s(
"dead",
fmt(
@ -48,17 +47,98 @@ ls.add_snippets("rust", {
)
),
s(
"some",
"component",
fmt(
[[
if let Some({}) = torrent.{}{{
torrent_fields.push({}.to_string());
}}
#[derive(Debug, Reflect, Component)]
#[reflect(Component)]
struct {}
]],
{
i(1),
}
)
),
s(
"event",
fmt(
[[
#[derive(Debug, Event)]
struct {}
]],
{
i(1),
}
)
),
s(
"resource",
fmt(
[[
#[derive(Debug, Default, Reflect, Resource)]
#[reflect(Resource)]
struct {}
]],
{
i(1),
}
)
),
s(
"schedule",
fmt(
[[
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, ScheduleLabel)]
struct {}
]],
{
i(1),
}
)
),
s(
"states",
fmt(
[[
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default, States)]
enum {} {{
#[default]
{}
}}
]],
{
i(1),
i(2),
}
)
),
s(
"systemset",
fmt(
[[
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, SystemSet)]
enum {} {{
{}
}}
]],
{
i(1),
i(2),
}
)
),
s(
"plugin",
fmt(
[[
use bevy::prelude::*;
pub(super) fn plugin(app: &mut App) {{
{}
}}
]],
{
same(1),
i(1),
same(1),
}
)
),

View File

@ -0,0 +1,101 @@
local run_formatter = function(text)
local split = vim.split(text, "\n")
local result = table.concat(vim.list_slice(split, 2, #split - 1), "\n")
local j = require("plenary.job"):new({
command = "pg_format",
writer = { result },
})
return j:sync()
end
local literals = {
rust = { "string_literal", "raw_string_literal" },
python = { "string_content" },
}
local function generate_query(lang, nodes)
local node_string = table.concat(nodes, ")\n\t\t(")
local query = string.format(
[[
([
(%s)
] @sql
(#match? @sql "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @sql 1 0 -1 0))
]],
node_string
)
return lang, query
end
local queries = {}
for lang, nodes in pairs(literals) do
local language, query_string = generate_query(lang, nodes)
queries[lang] = {
language = language,
query = query_string,
}
end
local get_root = function(bufnr, lang)
local parser = vim.treesitter.get_parser(bufnr, lang, {})
local tree = parser:parse()[1]
return tree:root()
end
local format_dat_sql = function(bufnr)
bufnr = bufnr or vim.api.nvim_get_current_buf()
local changes = {}
for _, query in pairs(queries) do
local root = get_root(bufnr, query.language)
-- if vim.bo[bufnr].filetype ~= query.language then
-- vim.notify("can only be used in {}", query.language)
-- return
-- end
local embedded_sql = vim.treesitter.query.parse(query.language, query.query)
for id, node in embedded_sql:iter_captures(root, bufnr, 0, -1) do
local name = embedded_sql.captures[id]
if name == "sql" then
-- { start row, start col, end row, end col }
local range = { node:range() }
local indentation = string.rep(" ", range[2])
-- Run the formatter, based on the node text
local formatted = run_formatter(vim.treesitter.get_node_text(node, bufnr))
-- Add some indentation (can be anything you like!)
for idx, line in ipairs(formatted) do
formatted[idx] = indentation .. line
end
-- Keep track of changes
-- But insert them in reverse order of the file,
-- so that when we make modifications, we don't have
-- any out of date line numbers
table.insert(changes, 1, {
start = range[1] + 1,
final = range[3],
formatted = formatted,
})
end
end
end
for _, change in ipairs(changes) do
vim.api.nvim_buf_set_lines(bufnr, change.start, change.final, false, change.formatted)
end
end
vim.api.nvim_create_user_command("SqlMagic", function()
format_dat_sql()
end, {})
local group = vim.api.nvim_create_augroup("rust-sql-magic", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
group = group,
pattern = "*.rs",
callback = function()
format_dat_sql()
end,
})

View File

@ -1,88 +0,0 @@
local run_formatter = function(text)
local split = vim.split(text, "\n")
local result = table.concat(vim.list_slice(split, 2, #split - 1), "\n")
-- Finds sql-format-via-python somewhere in your nvim config path
local bin = vim.api.nvim_get_runtime_file("bin/sql-format-via-python.py", false)[1]
local j = require("plenary.job"):new({
command = "python",
args = { bin },
writer = { result },
})
return j:sync()
end
local embedded_sql = vim.treesitter.query.parse(
"rust",
[[
([
(string_literal)
(raw_string_literal)
] @sql
(#match? @sql "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @sql 0 1 0 -1))
]]
)
local get_root = function(bufnr)
local parser = vim.treesitter.get_parser(bufnr, "rust", {})
local tree = parser:parse()[1]
return tree:root()
end
local format_dat_sql = function(bufnr)
bufnr = bufnr or vim.api.nvim_get_current_buf()
if vim.bo[bufnr].filetype ~= "rust" then
vim.notify("can only be used in rust")
return
end
local root = get_root(bufnr)
local changes = {}
for id, node in embedded_sql:iter_captures(root, bufnr, 0, -1) do
local name = embedded_sql.captures[id]
if name == "sql" then
-- { start row, start col, end row, end col }
local range = { node:range() }
local indentation = string.rep(" ", range[2])
-- Run the formatter, based on the node text
local formatted = run_formatter(vim.treesitter.get_node_text(node, bufnr))
-- Add some indentation (can be anything you like!)
for idx, line in ipairs(formatted) do
formatted[idx] = indentation .. line
end
-- Keep track of changes
-- But insert them in reverse order of the file,
-- so that when we make modifications, we don't have
-- any out of date line numbers
table.insert(changes, 1, {
start = range[1] + 1,
final = range[3],
formatted = formatted,
})
end
end
for _, change in ipairs(changes) do
vim.api.nvim_buf_set_lines(bufnr, change.start, change.final, false, change.formatted)
end
end
vim.api.nvim_create_user_command("SqlMagic", function()
format_dat_sql()
end, {})
local group = vim.api.nvim_create_augroup("rust-sql-magic", { clear = true })
vim.api.nvim_create_autocmd("BufWritePre", {
group = group,
pattern = "*.rs",
callback = function()
format_dat_sql()
end,
})

View File

@ -0,0 +1,7 @@
;extends
([
(string_content)
] @injection.content
(#match? @injection.content "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "sql"))

View File

@ -0,0 +1,9 @@
;extends
;; Inject into sqlx::query!(r#"..."#, ...) as sql
([
(string_literal)
(raw_string_literal)
] @injection.content
(#match? @injection.content "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "sql"))

View File

@ -1,30 +0,0 @@
import sys
import sqlparse
# TODO: Decide what to do about $/?
# contents = contents.replace(f"${identifier}", f"__id_{identifier}")
contents = sys.stdin.read()
for identifier in range(10):
contents = contents.replace(f"?{identifier}", f"__id_{identifier}")
# for nightshadedude
comma_first = False
result = sqlparse.format(
contents,
indent_columns=True,
keyword_case="upper",
identifier_case="lower",
reindent=True,
output_format="sql",
indent_after_first=True,
wrap_after=80,
comma_first=comma_first,
)
for identifier in range(10):
result = result.replace(f"__id_{identifier}", f"?{identifier}")
print(result.strip())

View File

@ -3,12 +3,12 @@
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
"catppuccin.nvim": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
"ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" },
"catppuccin.nvim": { "branch": "main", "commit": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9" },
"ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" },
"cellular-automaton.nvim": { "branch": "main", "commit": "11aea08aa084f9d523b0142c2cd9441b8ede09ed" },
"cheatsheet.nvim": { "branch": "master", "commit": "8ee4d76b6f902c4017dc28eddd79d925dfc55066" },
"cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" },
"cmake-tools.nvim": { "branch": "master", "commit": "4be3c229fe932043fd83ad52fdf0ba9af7297789" },
"cmake-tools.nvim": { "branch": "master", "commit": "f1f917b584127b673c25138233cebf1d61a19f35" },
"cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
@ -21,128 +21,140 @@
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-pypi": { "branch": "main", "commit": "a73411e5935caa23c6feab34980bb435deadd482" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"code-playground.nvim": { "branch": "main", "commit": "7b257911268ecf7ee11d6fe806193bda2c889e86" },
"codeium.nvim": { "branch": "main", "commit": "d3b88eb3aa1de6da33d325c196b8a41da2bcc825" },
"conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" },
"conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" },
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
"crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" },
"curl.nvim": { "branch": "main", "commit": "4576324dc6d1b86744459031d2dc44fa3e40c7d3" },
"cratesearch.nvim": { "branch": "master", "commit": "9d09625d017f6b2e116503f935bc6862961313fa" },
"curl.nvim": { "branch": "main", "commit": "e3e70d8b2cce6b45291a25156fbb50921e3ae941" },
"darkplus.nvim": { "branch": "master", "commit": "c7fff5ce62406121fc6c9e4746f118b2b2499c4c" },
"darkvoid.nvim": { "branch": "master", "commit": "8c637ccf504f6ea8efd181bdb278f36b77086f94" },
"decisive.nvim": { "branch": "main", "commit": "74f74436d9db014e63d3cb60629bce7aeb6a38ee" },
"demicolon.nvim": { "branch": "main", "commit": "d3237e1691276fa6f538b18f7a85d49b6362ccdf" },
"darkvoid.nvim": { "branch": "master", "commit": "5a002864757b6778a8bf0ece18a7003ed0b39cdc" },
"decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
"demicolon.nvim": { "branch": "main", "commit": "d5738af20d231bc7b10a0e03c4f9cf306300f516" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dracula.nvim": { "branch": "main", "commit": "fdf503e52ec1c8aae07353604d891fe5a3ed5201" },
"flow.nvim": { "branch": "main", "commit": "3af4d4d1b8a99c34e060de6fdaa5babc596a50c1" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"garbage-day.nvim": { "branch": "main", "commit": "4a1160bfffb2f499fb55a54333f29d160ab3c8a1" },
"flow.nvim": { "branch": "main", "commit": "c8f467af401de5356e2ca98388499489e8ad282f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"garbage-day.nvim": { "branch": "main", "commit": "750ef08ae6031ee3683014c5349144340c08ead6" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"gitignore.nvim": { "branch": "master", "commit": "2455191ec94da8ed222806a4fe3aa358eac1e558" },
"gitpad.nvim": { "branch": "main", "commit": "1e0f6fa335c72c05d1d3635120c572e198e5ae0d" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
"gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"harpoon-lualine": { "branch": "master", "commit": "d1b873c19b701fd80d60a67d086dbb3bcc4eb00e" },
"harpoon-lualine": { "branch": "master", "commit": "eae10bc6bddddbc73daa0956ba4ee5cc29cf9a49" },
"hot-reload.nvim": { "branch": "main", "commit": "9094182138635747158da64490a838ba46cf2d6c" },
"http-codes.nvim": { "branch": "main", "commit": "a610788dff2fb5df05b230d73a926c8dc3173c16" },
"hypersonic.nvim": { "branch": "main", "commit": "734dfbfbe51952f102a9b439d53d4267bb0024cd" },
"in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
"indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
"inlay-hint.nvim": { "branch": "main", "commit": "c31047c9b3943b29bd4839c7fe5b08dc12730469" },
"inlay-hints.nvim": { "branch": "master", "commit": "e81444416eea7fe5f19a6bc8336a7aed628f3663" },
"kanagawa.nvim": { "branch": "master", "commit": "e5f7b8a804360f0a48e40d0083a97193ee4fcc87" },
"lackluster.nvim": { "branch": "main", "commit": "2fcf09e7492ff50067ac9c0ca4bd81563499c410" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
"inlay-hint.nvim": { "branch": "main", "commit": "eb5f0579537db271dfedd7f38460cdacb238176f" },
"inlay-hints.nvim": { "branch": "master", "commit": "af84dee42cd118af6d592b06c1c0e45d6432a6c0" },
"jq.nvim": { "branch": "main", "commit": "85ec70f4676363d4ce27403420b798ad5c182077" },
"kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" },
"lackluster.nvim": { "branch": "main", "commit": "59d03c9e92cb03351af2904a26e16b6627d2d5db" },
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
"lualine-lsp-status": { "branch": "main", "commit": "1218d51d4d0b8881a598a77e5d9f334ac31c6cc7" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" },
"markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
"markdown-togglecheck": { "branch": "main", "commit": "5e9ee3184109a102952c01ef816babe8835b299a" },
"markdown.nvim": { "branch": "master", "commit": "dfa0d2def6dbf77e9206b16dc90cad4dd23d55d2" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"melange.nvim": { "branch": "master", "commit": "e84f8bc2abc5d6edaa7bd48a16c3078504ecb713" },
"neoconf.nvim": { "branch": "main", "commit": "59b5aa97496b074ebee43b97cfd9beb57ea1a312" },
"melange.nvim": { "branch": "master", "commit": "706a33f0a883fae9ec00ad648586792248a0575e" },
"neoconf.nvim": { "branch": "main", "commit": "edeae20b6811e361d3a6b2967879612a4a11ece2" },
"neocord": { "branch": "main", "commit": "aa7a58023166533da83ca7b11c0d2569e45d7381" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" },
"neogit": { "branch": "master", "commit": "16ee9ae957db2142fb189f5f2556123e24c5b7fb" },
"neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" },
"neorg-telescope": { "branch": "main", "commit": "ddb2556644cae922699a239bbb0fe16e25b084b7" },
"neotest": { "branch": "master", "commit": "32ff2ac21135a372a42b38ae131e531e64833bd3" },
"neotest-gtest": { "branch": "main", "commit": "b44c8afc26cea75ffc80617ce07b4e745a56e589" },
"neotest-python": { "branch": "master", "commit": "72603dfdbaad5695160268cb10531a14cc37236e" },
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
"neotest-gtest": { "branch": "main", "commit": "16989561a6356878ec4ecd6afed4f0d7a471d1db" },
"neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" },
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
"nightfly.nvim": { "branch": "master", "commit": "19efaf31cbe15a429cb3ca6ac9c9fce13275045b" },
"nightfox.nvim": { "branch": "main", "commit": "d3e8b1acc095baf57af81bb5e89fe7c4359eb619" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" },
"nightfly.nvim": { "branch": "master", "commit": "f4f932d3129fee10a0e944445fe6be5abf76465c" },
"nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" },
"nui-components.nvim": { "branch": "main", "commit": "caecfe2089e5ffbe99c2b0e0468da91990263a90" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-cmp-lsp-rs": { "branch": "main", "commit": "d9ebeca9ea07ba2fd57f997b2d6a8bc7da51abed" },
"nvim-colorizer.lua": { "branch": "master", "commit": "194ec600488f7c7229668d0e80bd197f3a2b84ff" },
"nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
"nvim-dap-python": { "branch": "master", "commit": "7c427e2bbc72d46ea3c9602bede6465ef61b8c19" },
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "484995d573c0f0563f6a66ebdd6c67b649489615" },
"nvim-cmp-lsp-rs": { "branch": "main", "commit": "d6a5249948b0334be361788fe88a81e476e7a7ee" },
"nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" },
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
"nvim-dap-python": { "branch": "master", "commit": "03fe9592409236b9121c03b66a682dfca15a5cac" },
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "52638640ae309cacdaff785fdbb854437bd1ee5c" },
"nvim-dbee": { "branch": "master", "commit": "21d2cc0844a16262bb6ea93ab3d0a0f20bd87853" },
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
"nvim-lspconfig": { "branch": "master", "commit": "b21c166bbf337734f2a39734a905c1c3e298205c" },
"nvim-lint": { "branch": "master", "commit": "f707b3ae50417067fa63fdfe179b0bff6b380da1" },
"nvim-lspconfig": { "branch": "master", "commit": "c38af37e4ee71d70b7d60267d96b0a83e5d346f5" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-silicon": { "branch": "main", "commit": "feb882f04c992b797daa118101a239fb3bedfc04" },
"nvim-silicon": { "branch": "main", "commit": "9fe6001dc8cad4d9c53bcfc8649e3dc76ffa169c" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "0b8b78f9d08dc338a146eb4cd4bcbed8dd36a783" },
"nvim-treesitter-context": { "branch": "master", "commit": "0f3332788e0bd37716fbd25f39120dcfd557c90f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "375c2d86cee6674afd75b4f727ce3a80065552f7" },
"nvim-ufo": { "branch": "main", "commit": "7dcb8fea3e7b3ccdb50f2c3ae7c248cdf6fe1ae1" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"nvim-treesitter": { "branch": "master", "commit": "84bdd59c0365944e8914697e508d1c087977ee33" },
"nvim-treesitter-context": { "branch": "master", "commit": "78a81c7494e7d1a08dd1200b556933e513fd9f29" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b91c98afa6c42819aea6cbc1ba38272f5456a5cf" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },
"nvim-ufo": { "branch": "main", "commit": "203c9f434feec57909ab4b1e028abeb3349b7847" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"ohne-accidents": { "branch": "main", "commit": "832b942a928e74b537a2526eacc6285e26af9589" },
"oil.nvim": { "branch": "master", "commit": "a632c898fbe0e363ef89b9577f1a7714ab67d682" },
"oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" },
"onedark.nvim": { "branch": "master", "commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37" },
"otter.nvim": { "branch": "main", "commit": "3b4fa74f0a385207fa9c29b61b07178345a3dab2" },
"pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" },
"otter.nvim": { "branch": "main", "commit": "ca9ce67d0399380b659923381b58d174344c9ee7" },
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "9f3d10e66a79e8975926f8cb930856e4930d9da4" },
"py-requirements.nvim": { "branch": "main", "commit": "ab86e8832635b0e74a4ce2ed5a023ff99e651951" },
"pymple.nvim": { "branch": "main", "commit": "eff337420a294e68180c5ee87f03994c0b176dd4" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" },
"rainbow_csv.nvim": { "branch": "main", "commit": "7f3fddfe813641035fac2cdf94c2ff69bb0bf0b9" },
"rose-pine.nvim": { "branch": "main", "commit": "256d086c218a282ae5de79d2c091b1e592a65367" },
"rest.nvim": { "branch": "main", "commit": "113dce7749eb22b84cbde052d1cdc1f70702ed58" },
"rose-pine.nvim": { "branch": "main", "commit": "d396005db5bbd1d4ec7772a7c96c96f4c4802328" },
"runner.nvim": { "branch": "main", "commit": "9ae6f56b73471174c6c4d47581007c6781fb6b6e" },
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
"rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" },
"spellwarn.nvim": { "branch": "main", "commit": "2f4dbc58bb90bc63b295461216b91ccf4e7f782d" },
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
"tagbar": { "branch": "master", "commit": "d55d454bd3d5b027ebf0e8c75b8f88e4eddad8d8" },
"tailwind-fold.nvim": { "branch": "main", "commit": "28a4190a97af3c5cc4885c228ec61e331d1296ea" },
"tailwind-fold.nvim": { "branch": "main", "commit": "5544fa59307e4ce5ad3e07ef3ddb231775dc5cda" },
"telescope-bibtex.nvim": { "branch": "master", "commit": "289a6f86ebec06e8ae1590533b732b9981d84900" },
"telescope-frecency.nvim": { "branch": "master", "commit": "f67baca08423a6fd00167801a54db38e0b878063" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-git-diffs.nvim": { "branch": "main", "commit": "366df26227e6d478d5c55e04771d61875c4f22ac" },
"telescope-heading.nvim": { "branch": "main", "commit": "e85c0f69cb64048f56e76548dcb2f10277576df9" },
"telescope-import.nvim": { "branch": "main", "commit": "e60ca0fea71432ed578e17d8f1b153da3fa4555d" },
"telescope-lazy.nvim": { "branch": "main", "commit": "7b87a3bc80443849e29bd871f00d41dfd8d90e41" },
"telescope-import.nvim": { "branch": "main", "commit": "abce03c71791bd27fc9043b62b5483467875b758" },
"telescope-lazy.nvim": { "branch": "main", "commit": "32d007e0728ccf77c8b9fd7bbd612a2c9040d13b" },
"telescope-luasnip.nvim": { "branch": "master", "commit": "11668478677de360dea45cf2b090d34f21b8ae07" },
"telescope-media-files.nvim": { "branch": "master", "commit": "0826c7a730bc4d36068f7c85cf4c5b3fd9fb570a" },
"telescope-software-licenses.nvim": { "branch": "master", "commit": "fb5fc33b6afc994756e2f372423c365bf66f2256" },
"telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
"tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" },
"tree-sitter-hyprlang": { "branch": "master", "commit": "6858695eba0e63b9e0fceef081d291eb352abce8" },
"treesitter-utils": { "branch": "main", "commit": "df621499e4227f0476f6f4bdb75a9d8dd18d16f2" },
"trouble.nvim": { "branch": "main", "commit": "40c5317a6e90fe3393f07b0fee580d9e93a216b4" },
"trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
"typecheck.nvim": { "branch": "main", "commit": "38f3c135572a287f468bae269f956f4ba53dbddf" },
"typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" },
"typst-preview.nvim": { "branch": "master", "commit": "15eaaffc0a2d8cd871f485f399d1d67ed3322a0b" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"typst-preview.nvim": { "branch": "master", "commit": "0354cc1a7a5174a2e69cdc21c4db9a3ee18bb20a" },
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
"vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"vim-log-highlighting": { "branch": "master", "commit": "1037e26f3120e6a6a2c0c33b14a84336dee2a78f" },
"vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" },
"vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" },
"vimtex": { "branch": "master", "commit": "76ef99f73a5ff10be59836a4af4f928eaa8ad284" },
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
"vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" },
"vimtex": { "branch": "master", "commit": "f2168870455800451b38eb8ea19d565a8aa2da3d" },
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" },
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
}

View File

@ -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

View File

@ -0,0 +1,7 @@
return {
"GustavEikaas/code-playground.nvim",
cmd = { "Code" },
config = function()
require("code-playground").setup()
end,
}

View File

@ -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,

View File

@ -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" },

View File

@ -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,
},
}

View File

@ -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

View 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
View 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
View 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

View File

@ -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,

View File

@ -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" },

View File

@ -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,
},
}

View File

@ -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.
},
}

View File

@ -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
},
},
},
},
}

View 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
View 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
View File

@ -0,0 +1,4 @@
return {
"rest-nvim/rest.nvim",
cmd = { "Rest" },
}

9
lua/plugins/rittli.lua Normal file
View File

@ -0,0 +1,9 @@
return {
-- https://github.com/miroshQa/rittli.nvim
"miroshQa/rittli.nvim",
enabled = false,
lazy = true,
dependencies = {
"nvim-telescope/telescope.nvim",
},
}

View File

@ -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,
},
},
},

View 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.
},
}

View File

@ -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,
}

View File

@ -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,
}

View File

@ -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
},
},
}

View File

@ -1,7 +1,7 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
-- version = "*",
cmd = "Trouble",
keys = {
{

View File

@ -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,
},
}

View File

@ -1,6 +1,18 @@
-- Use 'q' to quit from common pluginscmd
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir", "git", "dap-float", "fugitive", "gitcommit" },
pattern = {
"qf",
"help",
"man",
"lspinfo",
"spectre_panel",
"lir",
"git",
"dap-float",
"fugitive",
"gitcommit",
"startuptime",
},
callback = function()
vim.cmd([[ nnoremap <silent> <buffer> q :close<cr>
set nobuflisted
@ -39,7 +51,7 @@ vim.api.nvim_create_autocmd({ "InsertEnter" }, {
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
pattern = "**/Codnity/**",
callback = function()
vim.opt.colorcolumn = "92"
vim.opt.colorcolumn = "79"
end,
})
@ -50,12 +62,12 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
end,
})
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
--[[ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
pattern = "**/Codnity/**/*.html",
callback = function()
vim.cmd("setf htmldjango")
end,
})
}) ]]
-- Autocommand that sources neovim files on save
--[[ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
@ -76,6 +88,12 @@ vim.filetype.add({
},
})
vim.filetype.add({
pattern = {
["*.bru"] = "js",
},
})
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
if vim.env.TMUX_PLUGIN_MANAGER_PATH then

View File

@ -1,7 +0,0 @@
; Inject into sqlx::query!(r#"..."#, ...) as sql
([
(string_literal)
(raw_string_literal)
] @sql
(#match? @sql "(SELECT|select|INSERT|insert|UPDATE|update|DELETE|delete).+(FROM|from|INTO|into|VALUES|values|SET|set).*(WHERE|where|GROUP BY|group by)?")
(#offset! @sql 1 0 0 0))

View File

@ -20,3 +20,5 @@ province
province
province
province
retargeting
remarketing

Binary file not shown.

View File

@ -170,3 +170,7 @@ Datorikas
Abus
Būla
programminžinierijā
ģeokodēšanas
sākās
lietotnēm
Cagulis

Binary file not shown.