Merge branch 'main' of https://git.snaile.de/luca/dotfiles
This commit is contained in:
commit
10f0027b36
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"diagnostics.globals": [
|
||||
"vim"
|
||||
]
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
return {
|
||||
h = '/home/luca',
|
||||
ch = '/home/luca/.cache',
|
||||
cf = '/home/luca/.config',
|
||||
dt = '/home/luca/.local/share',
|
||||
sr = '/home/luca/.local/src',
|
||||
it = '/home/luca/.local/src/git',
|
||||
sc = '/home/luca/.local/bin',
|
||||
mn = '/mnt',
|
||||
dl = '/home/luca/Downloads',
|
||||
dm = '/home/luca/Documents',
|
||||
ms = '/home/luca/Music',
|
||||
pc = '/home/luca/Pictures',
|
||||
vd = '/home/luca/Videos',
|
||||
dot = '/home/luca/.local/share/stow/dots',
|
||||
}
|
|
@ -68,7 +68,7 @@ return {
|
|||
Package = "",
|
||||
Property = "",
|
||||
Reference = "",
|
||||
Snippet = "",
|
||||
Snippet = "",
|
||||
String = "",
|
||||
Struct = "",
|
||||
Text = "",
|
||||
|
|
|
@ -9,8 +9,8 @@ g.vim_json_conceal = 0
|
|||
g.git_worktrees = {
|
||||
{ toplevel = vim.env.HOME, gitdir = vim.env.XDG_DATA_HOME .. "/dots" },
|
||||
}
|
||||
g.max_lines = 1000
|
||||
g.max_size = 1024 * 100
|
||||
g.max_lines = 1000
|
||||
g.max_size = 1024 * 100
|
||||
|
||||
o.undodir = vim.fn.stdpath "cache" .. "/undo"
|
||||
o.clipboard = "unnamedplus"
|
||||
|
|
|
@ -132,7 +132,6 @@ end
|
|||
|
||||
function M.file_worktree(file, worktrees)
|
||||
worktrees = worktrees or vim.g.git_worktrees
|
||||
if not worktrees then return end
|
||||
file = file or vim.fn.expand "%"
|
||||
for _, worktree in ipairs(worktrees) do
|
||||
if
|
||||
|
|
|
@ -5,9 +5,9 @@ if not vim.loop.fs_stat(lazypath) then
|
|||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup('plugins', require('plugins.lazy').opts)
|
||||
require("lazy").setup("plugins", require("plugins.lazy").opts)
|
||||
|
|
|
@ -2,13 +2,13 @@ local M = { "folke/lazy.nvim" }
|
|||
local icons = require('config.icons')
|
||||
|
||||
M.opts = {
|
||||
dev = {
|
||||
path = (os.getenv("XDG_DOCUMENTS_DIR") or "~/Documents") .. "/code/nvim-plugins",
|
||||
},
|
||||
install = {
|
||||
missing = true,
|
||||
colorscheme = { "tokyonight" },
|
||||
},
|
||||
dev = {
|
||||
path = os.getenv("XDG_DOCUMENTS_DIR") .. "/code/nvim-plugins"
|
||||
},
|
||||
ui = {
|
||||
border = "single",
|
||||
icons = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
local M = { "neovim/nvim-lspconfig" }
|
||||
|
||||
M.dependencies = { "mason-lspconfig.nvim" }
|
||||
M.dependencies = { "mason-lspconfig.nvim", "neoconf.nvim", "neodev.nvim" }
|
||||
|
||||
M.event = { "BufReadPost", "BufNewFile" }
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ return {
|
|||
require('plugins.misc.comment'),
|
||||
require('plugins.misc.gitsigns'),
|
||||
require('plugins.misc.indent-blankline'),
|
||||
require('plugins.misc.lf'),
|
||||
require('plugins.misc.taolf'),
|
||||
require('plugins.misc.lspkind'),
|
||||
require('plugins.misc.lualine'),
|
||||
require('plugins.misc.rustacean'),
|
||||
|
|
|
@ -1,331 +0,0 @@
|
|||
---@diagnostic disable: undefined-global
|
||||
return {
|
||||
s({ trig = "sst", name = "Standard Template" }, fmt([[
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]) {{
|
||||
{}
|
||||
return EXIT_SUCCESS;
|
||||
}}
|
||||
]], { i(0) })),
|
||||
s({ trig = "sstp", name = "Preprocessor Template" }, fmt([[
|
||||
// #define NDEBUG // disables assert()
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
]], {})),
|
||||
s({ trig = "main", name = "main(int argc, char *argv[])" }, fmt([[
|
||||
int main(int argc, char *argv[]) {{
|
||||
{}
|
||||
return EXIT_SUCCESS;
|
||||
}}
|
||||
]], { i(0) })),
|
||||
s({ trig = "mainn", name = "main(void)" }, fmt([[
|
||||
int main(void) {{
|
||||
{}
|
||||
return EXIT_SUCCESS;
|
||||
}}
|
||||
]], { i(0) })),
|
||||
s({ trig = "#inc", name = "#include <...>" }, fmt([[
|
||||
#include <{}>
|
||||
]], { i(1) })),
|
||||
s({ trig = "#inc", name = "#include \"...\"" }, fmt([[
|
||||
#include "{}"
|
||||
]], { i(1) })),
|
||||
s({ trig = "#def", name = "#define macro" }, fmt([[
|
||||
#define {}
|
||||
]], { i(0) })),
|
||||
s({ trig = "#deff", name = "#define macro()" }, fmt([[
|
||||
#define {}({}) ({})
|
||||
]], { i(1), i(2), i(3) })),
|
||||
s({ trig = "#if", name = "#if" }, fmt([[
|
||||
#if {}
|
||||
{}
|
||||
#endif /* if {} */
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "#ifdef", name = "#ifdef" }, fmt([[
|
||||
#ifdef {}
|
||||
{}
|
||||
#endif /* ifdef {} */
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "#ifndef", name = "#ifndef" }, fmt([[
|
||||
#ifndef {}
|
||||
{}
|
||||
#endif /* ifndef {} */
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "once", name = "Header Include Guard" }, fmt([[
|
||||
#ifndef {}_H
|
||||
#define {}_H
|
||||
{}
|
||||
#endif /* end of include guard: {} */
|
||||
]], { i(1), reference(1), i(0), reference(1) })),
|
||||
s({ trig = "nocpp", name = "extern C", dscr = "Disable C++ name mangling in C headers" }, fmt([[
|
||||
#ifdef __cplusplus
|
||||
extern "C" {{
|
||||
#endif
|
||||
{}
|
||||
#ifdef __cplusplus
|
||||
}} /* extern "C" */
|
||||
#endif
|
||||
]], { i(0) })),
|
||||
s({ trig = "#err", name = "#error" }, fmt([[
|
||||
#error "{}"
|
||||
]], { i(1) })),
|
||||
s({ trig = "#warn", name = "#warning" }, fmt([[
|
||||
#warning "{}"
|
||||
]], { i(1) })),
|
||||
s({ trig = "if", name = "if" }, fmt([[
|
||||
if ({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "ife", name = "if else" }, fmt([[
|
||||
if ({}) {{
|
||||
{}
|
||||
}} else {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(2), i(0) })),
|
||||
s({ trig = "el", name = "else" }, fmt([[
|
||||
else {{
|
||||
{}
|
||||
}}
|
||||
]], { i(0) })),
|
||||
s({ trig = "elif", name = "else if" }, fmt([[
|
||||
else if ({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "t", name = "Ternary" }, fmt([[
|
||||
{} ? {} : {}
|
||||
]], { i(1), i(2), i(0) })),
|
||||
s({ trig = "switch", name = "Switch" }, fmt([[
|
||||
switch ({}) {{
|
||||
{}
|
||||
default:
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0), i(2) })),
|
||||
s({ trig = "switchn", name = "Switch Without Default" }, fmt([[
|
||||
switch ({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "case", name = "Case" }, fmt([[
|
||||
case {}:
|
||||
{}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "while", name = "While" }, fmt([[
|
||||
while ({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "do", name = "Do While" }, fmt([[
|
||||
do {{
|
||||
{}
|
||||
}} while({});
|
||||
]], { i(0), i(1) })),
|
||||
s({ trig = "for", name = "For" }, fmt([[
|
||||
for ({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "ret", name = "return" }, fmt([[
|
||||
return {};
|
||||
]], { i(1) })),
|
||||
s({ trig = "ex", name = "exit()" }, fmt([[
|
||||
exit({});
|
||||
]], { i(1) })),
|
||||
s({ trig = "fund", name = "Function Declaration" }, fmt([[
|
||||
{}({});
|
||||
]], { i(1), i(2) })),
|
||||
s({ trig = "fun", name = "Function Definition" }, fmt([[
|
||||
{}({}) {{
|
||||
{}
|
||||
}}
|
||||
]], { i(1), i(2), i(0) })),
|
||||
s({ trig = "td", name = "typedef" }, fmt([[
|
||||
typedef {};
|
||||
]], { i(1) })),
|
||||
s({ trig = "tdst", name = "typedef struct" }, fmt([[
|
||||
typedef struct {} {};
|
||||
]], { reference(1), i(1) })),
|
||||
s({ trig = "tduo", name = "typedef union" }, fmt([[
|
||||
typedef union {} {};
|
||||
]], { reference(1), i(1) })),
|
||||
s({ trig = "tden", name = "typedef enum" }, fmt([[
|
||||
typedef enum {} {};
|
||||
]], { reference(1), i(1) })),
|
||||
s({ trig = "st", name = "Struct" }, fmt([[
|
||||
struct {} {{
|
||||
{}
|
||||
}};
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "stt", name = "Struct Type" }, fmt([[
|
||||
typedef struct {} {{
|
||||
{}
|
||||
}} {};
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "uo", name = "Union" }, fmt([[
|
||||
union {} {{
|
||||
{}
|
||||
}};
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "uot", name = "Union Type" }, fmt([[
|
||||
typedef union {} {{
|
||||
{}
|
||||
}} {};
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "enum", name = "Enum" }, fmt([[
|
||||
enum {} {{
|
||||
{}
|
||||
}};
|
||||
]], { i(1), i(0) })),
|
||||
s({ trig = "enumt", name = "Enum Type" }, fmt([[
|
||||
typedef enum {} {{
|
||||
{}
|
||||
}} {};
|
||||
]], { i(1), i(0), reference(1) })),
|
||||
s({ trig = "pri", name = "printf()" }, fmt([[
|
||||
printf("{}\n", {});
|
||||
]], { i(1, "%s"), i(2) })),
|
||||
s({ trig = "fpri", name = "fprintf()" }, fmt([[
|
||||
fprintf({}, "{}\n", {});
|
||||
]], { i(1, "stderr"), i(2, "%s"), i(3) })),
|
||||
s({ trig = "spri", name = "sprintf()" }, fmt([[
|
||||
sprintf({}, "{}\n", {});
|
||||
]], { i(1, "buf"), i(2, "%s"), i(3) })),
|
||||
s({ trig = "snpri", name = "snprintf()" }, fmt([[
|
||||
snprintf({}, {}, "{}\n", {});
|
||||
]], { i(1, "buf"), i(2, "max"), i(3, "%s"), i(4) })),
|
||||
s({ trig = "sca", name = "scanf()" }, fmt([[
|
||||
scanf("{}", {});
|
||||
]], { i(1, "%i"), i(2) })),
|
||||
s({ trig = "fsca", name = "fscanf()" }, fmt([[
|
||||
fscanf({}, "{}", {});
|
||||
]], { i(1, "stdin"), i(2, "%i"), i(3) })),
|
||||
s({ trig = "ssca", name = "sscanf()" }, fmt([[
|
||||
sscanf({}, "{}", {});
|
||||
]], { i(1, "buf"), i(2, "%i"), i(3) })),
|
||||
s({ trig = "priv", name = "Print Variable" }, fmt([[
|
||||
printf("{} = {}\n", {});
|
||||
]], { reference(2), i(1, "%i"), i(2) })),
|
||||
s({ trig = "warn", name = "warn()" }, fmt([[
|
||||
warn("{}"{});
|
||||
]], { i(1, "%s"), i(2) })),
|
||||
s({ trig = "warnx", name = "warnx()" }, fmt([[
|
||||
warnx("{}"{});
|
||||
]], { i(1, "%s"), i(2) })),
|
||||
s({ trig = "err", name = "err()" }, fmt([[
|
||||
err("{}"{});
|
||||
]], { i(1, "%s"), i(2) })),
|
||||
s({ trig = "errx", name = "errx()" }, fmt([[
|
||||
errx("{}"{});
|
||||
]], { i(1, "%s"), i(2) })),
|
||||
s({ trig = "asr", name = "assert()" }, fmt([[
|
||||
assert({});
|
||||
]], { i(1) })),
|
||||
s({ trig = "stasr", name = "static_assert()" }, fmt([[
|
||||
static_assert({}, "{}");
|
||||
]], { i(1), i(2, "Fuck!") })),
|
||||
s({ trig = "Stasr", name = "static_assert() 1 Parameter" }, fmt([[
|
||||
static_assert({});
|
||||
]], { i(1) })),
|
||||
s({ trig = "mlc", name = "malloc()" }, fmt([[
|
||||
{} = malloc(sizeof({}[{}]){});
|
||||
]], { i(1, "ptr"), i(2, "int"), i(3), i(4) })),
|
||||
s({ trig = "clc", name = "calloc()" }, fmt([[
|
||||
{} = calloc({}, sizeof({}){});
|
||||
]], { i(1, "ptr"), i(2), i(3, "int"), i(4) })),
|
||||
s({ trig = "rlc", name = "realloc()" }, fmt([[
|
||||
{} = realloc({}, sizeof({}[{}]){});
|
||||
]], { i(1, "ptr"), i(2), i(3, "int"), i(4), i(5) })),
|
||||
s({ trig = "fre", name = "free()" }, fmt([[
|
||||
free({});
|
||||
]], { i(1, "ptr") })),
|
||||
s({ trig = "mlcd", name = "Malloc Declaration" }, fmt([[
|
||||
{} *{} = malloc(sizeof({}[{}]){});
|
||||
]], { i(1, "int"), i(2, "ptr"), reference(1), i(3), i(4) })),
|
||||
s({ trig = "clcd", name = "Calloc Declaration" }, fmt([[
|
||||
{} *{} = calloc({}, sizeof({}){});
|
||||
]], { i(1, "int"), i(2, "ptr"), i(3), reference(1), i(4) })),
|
||||
s({ trig = "mlct", name = "Malloc Template" }, fmt([[
|
||||
{} *{} = malloc(sizeof({}[{}]));
|
||||
if (!{}) {{
|
||||
printf(stderr, "{}\n"{});
|
||||
{}
|
||||
}}
|
||||
{}
|
||||
free({});
|
||||
]], { i(1, "int"), i(2, "ptr"), reference(1), i(3), reference(2), i(4, "Failed to malloc!"), i(5),
|
||||
i(6, "exit(EXIT_FAILURE);"), i(0), reference(2) })),
|
||||
s({ trig = "clct", name = "Calloc Template" }, fmt([[
|
||||
{} *{} = calloc({}, sizeof({}));
|
||||
if (!{}) {{
|
||||
printf(stderr, "{}\n"{});
|
||||
{}
|
||||
}}
|
||||
{}
|
||||
free({});
|
||||
]], { i(1, "int"), i(2, "ptr"), i(3), reference(1), reference(2), i(4, "Failed to calloc!"), i(5),
|
||||
i(6, "exit(EXIT_FAILURE);"), i(0), reference(2) })),
|
||||
s({ trig = "/", name = "Comment" }, fmt([[
|
||||
/* {} */
|
||||
]], { i(1) })),
|
||||
s({ trig = "//", name = "Multiline Comment" }, fmt([[
|
||||
/*
|
||||
* {}
|
||||
*/
|
||||
]], { i(1) })),
|
||||
s({ trig = "///", name = "Multiline Double-Star Comment" }, fmt([[
|
||||
/**
|
||||
** {}
|
||||
**/
|
||||
]], { i(1) })),
|
||||
s({ trig = "dox", name = "Doxygen Template" }, fmt([[
|
||||
/*! {}
|
||||
* @brief {}
|
||||
*
|
||||
* {}
|
||||
*/
|
||||
]], { i(1), i(2, "This is something undocumented."), i(3, "Nothing to say here...") })),
|
||||
s({ trig = "dfun", name = "Doxygen Function" }, fmt([[
|
||||
/*!
|
||||
* @brief {}
|
||||
*
|
||||
* {}
|
||||
*
|
||||
* @return {}
|
||||
*/
|
||||
{}({});
|
||||
]], { i(3, "This function is undocumented."), i(4, "Nothing to say here..."), i(5, "Nothing."), i(1), i(2) })),
|
||||
s({ trig = "todo", name = "Doxygen Todo" }, fmt([[
|
||||
/*! TODO: {}
|
||||
*
|
||||
* @todo {}
|
||||
*/
|
||||
]], { i(1), i(2) })),
|
||||
s({ trig = "dgr", name = "Doxygen Group" }, fmt([[
|
||||
/*! @name {}
|
||||
* {}
|
||||
* @{{
|
||||
*/
|
||||
{}
|
||||
/*! @}}
|
||||
*/
|
||||
]], { i(1, "Undocumented Group"), i(2, "This group is undocumented."), i(0) })),
|
||||
s({ trig = "alen", name = "Array Length" }, fmt([[
|
||||
(sizeof {} / sizeof {}[0])
|
||||
]], { i(1), reference(1) })),
|
||||
s({ trig = "lls", name = "Linked List" }, fmt([[
|
||||
struct {} {{
|
||||
{}
|
||||
{} *{};
|
||||
}} {};
|
||||
]], { i(1, "Node"), i(0), reference(1), i(2, "Next"), reference(1) })),
|
||||
}
|
|
@ -14,3 +14,4 @@
|
|||
.config/nvim/spell/en.utf-8.add.spl
|
||||
.local/share/xkb/compiled/keymap
|
||||
.config/git/host-setup
|
||||
.config/nvim/dev
|
||||
|
|
Loading…
Reference in New Issue