Many changes
This commit is contained in:
parent
104ae1ec42
commit
7c61e64fa8
|
@ -25,7 +25,7 @@ local abbreviations = {
|
||||||
{ "nuls", "\\varnothing" },
|
{ "nuls", "\\varnothing" },
|
||||||
|
|
||||||
-- Other fancy symvols
|
-- Other fancy symvols
|
||||||
{ "ints", "\\mathbb{I}" },
|
{ "ints", "\\mathbb{Z}" },
|
||||||
{ "nats", "\\mathbb{N}" },
|
{ "nats", "\\mathbb{N}" },
|
||||||
{ "rats", "\\mathbb{Q}" },
|
{ "rats", "\\mathbb{Q}" },
|
||||||
{ "rrea", "\\mathbb{R}" },
|
{ "rrea", "\\mathbb{R}" },
|
||||||
|
@ -44,6 +44,7 @@ local abbreviations = {
|
||||||
{ "etn", "^{-}" },
|
{ "etn", "^{-}" },
|
||||||
{ "ett", "^{t}" },
|
{ "ett", "^{t}" },
|
||||||
{ "tmat", "^{T}" }, -- Tranpose of a matrix
|
{ "tmat", "^{T}" }, -- Tranpose of a matrix
|
||||||
|
{ "cmat", "^{*}" }, -- Conjugate of a matrix
|
||||||
{ "etp", "^{+}" },
|
{ "etp", "^{+}" },
|
||||||
|
|
||||||
-- Subscripts
|
-- Subscripts
|
||||||
|
@ -108,19 +109,21 @@ local abbreviations = {
|
||||||
{ "div", "\\|" },
|
{ "div", "\\|" },
|
||||||
{ "ndiv", "\\not\\|\\:" },
|
{ "ndiv", "\\not\\|\\:" },
|
||||||
|
|
||||||
|
|
||||||
-- words
|
-- words
|
||||||
{ "rref", "reduced row echalon form" },
|
{ "rref", "reduced row echalon form" },
|
||||||
{ "thrf", "therefore" }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local abolishAbbreviations = {
|
local abolishAbbreviations = {
|
||||||
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
|
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
|
||||||
{ "ib{p,s}", "integration by {parts,substitution}" },
|
{ "ib{p,s}", "integration by {parts,substitution}" },
|
||||||
{ "mx{,s}", "matri{x,ces}" }
|
{ "mx{,s}", "matri{x,ces}" },
|
||||||
|
{ "thrf", "therefore" }
|
||||||
}
|
}
|
||||||
|
|
||||||
A.manyLocalAbbr(abbreviations)
|
A.manyLocalAbbr(abbreviations)
|
||||||
AB.abolishMany(abolishAbbreviations)
|
AB.abolishMany(abolishAbbreviations)
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>lc", "<cmd>VimtexCompile<cr>", { desc = "Compile current buffer using vimtex" })
|
vim.keymap.set("n", "<leader>lc", "<cmd>VimtexCompile<cr>", {
|
||||||
|
desc = "Compile current buffer using vimtex",
|
||||||
|
buffer = true
|
||||||
|
})
|
||||||
|
|
|
@ -7,7 +7,6 @@ function M.setup()
|
||||||
require("my.theme").setup()
|
require("my.theme").setup()
|
||||||
require("my.options").setup()
|
require("my.options").setup()
|
||||||
require('my.keymaps').setup()
|
require('my.keymaps').setup()
|
||||||
require('my.snippets').setup()
|
|
||||||
require('my.plugins').setup()
|
require('my.plugins').setup()
|
||||||
require("telescope.extensions.unicode").setupAbbreviations()
|
require("telescope.extensions.unicode").setupAbbreviations()
|
||||||
end
|
end
|
||||||
|
|
|
@ -77,7 +77,7 @@ function M.setup()
|
||||||
name = "Go to"
|
name = "Go to"
|
||||||
},
|
},
|
||||||
r = {
|
r = {
|
||||||
name = "Rename / Replace"
|
name = "Rename / Replace / Reload"
|
||||||
},
|
},
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
name = "Easymotion"
|
name = "Easymotion"
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
local bindings = {
|
|
||||||
-- Open files with control + P
|
|
||||||
files = "<c-P>",
|
|
||||||
-- See diagnostics with space + d
|
|
||||||
lsp_document_diagnostics = "<space>d",
|
|
||||||
lsp_workspace_diagnostics = "<space>D"
|
|
||||||
}
|
|
||||||
|
|
||||||
function M.setup()
|
|
||||||
for action, keybind in pairs(bindings) do
|
|
||||||
-- Maps the keybind to the action
|
|
||||||
vim.keymap.set('n', keybind, require('fzf-lua')[action])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -6,6 +6,11 @@ function M.setup()
|
||||||
require('fidget').setup()
|
require('fidget').setup()
|
||||||
require('dressing').setup()
|
require('dressing').setup()
|
||||||
|
|
||||||
|
require("my.plugins.easymotion").setup()
|
||||||
|
require("my.plugins.autopairs").setup()
|
||||||
|
require("my.plugins.telescope").setup()
|
||||||
|
require("my.plugins.surround").setup()
|
||||||
|
|
||||||
env.vscode.unless(function()
|
env.vscode.unless(function()
|
||||||
env.firevim.unless(function()
|
env.firevim.unless(function()
|
||||||
require("presence"):setup({})
|
require("presence"):setup({})
|
||||||
|
@ -35,10 +40,6 @@ function M.setup()
|
||||||
require("my.plugins.paperplanes").setup()
|
require("my.plugins.paperplanes").setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
require("my.plugins.easymotion").setup()
|
|
||||||
require("my.plugins.autopairs").setup()
|
|
||||||
require("my.plugins.telescope").setup()
|
|
||||||
require("my.plugins.surround").setup()
|
|
||||||
|
|
||||||
require("my.plugins.hydra").setup()
|
require("my.plugins.hydra").setup()
|
||||||
require("my.plugins.clipboard-image").setup()
|
require("my.plugins.clipboard-image").setup()
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
|
|
||||||
|
local function reload()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
vim.keymap.set("i", "<Tab>", function()
|
vim.keymap.set("i", "<Tab>", function()
|
||||||
if luasnip.jumpable(1) then
|
if luasnip.jumpable(1) then
|
||||||
|
@ -12,6 +16,12 @@ function M.setup()
|
||||||
vim.keymap.set("i", "<S-Tab>", function()
|
vim.keymap.set("i", "<S-Tab>", function()
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>rs", reload, {
|
||||||
|
desc = "Reload luasnip snippets"
|
||||||
|
})
|
||||||
|
|
||||||
|
reload()
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
local global = require("my.helpers").global
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
-- Viewer method
|
-- Viewer method
|
||||||
vim.g.vimtex_view_method = "zathura"
|
vim.g.vimtex_view_method = "zathura"
|
||||||
vim.g.Tex_DefaultTargetFormat = "pdf"
|
vim.g.Tex_DefaultTargetFormat = "pdf"
|
||||||
vim.g.vimtex_fold_enabled = 1
|
vim.g.vimtex_fold_enabled = 0
|
||||||
vim.g.vimtex_compiler_latexmk = {
|
vim.g.vimtex_compiler_latexmk = {
|
||||||
options = {
|
options = {
|
||||||
"-pdf", "-shell-escape", "-verbose", "-file-line-error", "-synctex=1", "-interaction=nonstopmode"
|
"-pdf", "-shell-escape", "-verbose", "-file-line-error", "-synctex=1", "-interaction=nonstopmode"
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.setup()
|
|
||||||
-- require("luasnip").config.setup({ enable_autosnippets = false })
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -32,6 +32,12 @@
|
||||||
],
|
],
|
||||||
"path": "./snippets/latex/core.json"
|
"path": "./snippets/latex/core.json"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"language": [
|
||||||
|
"tex"
|
||||||
|
],
|
||||||
|
"path": "./snippets/latex/explain.json"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"language": [
|
"language": [
|
||||||
"lua"
|
"lua"
|
||||||
|
|
|
@ -12,10 +12,7 @@
|
||||||
"Absolute value": {
|
"Absolute value": {
|
||||||
"prefix": "abs",
|
"prefix": "abs",
|
||||||
"description": "Absolute values",
|
"description": "Absolute values",
|
||||||
"body": "|$1|$0",
|
"body": "|$1|$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Lemma": {
|
"Lemma": {
|
||||||
"prefix": "lemma",
|
"prefix": "lemma",
|
||||||
|
@ -59,26 +56,27 @@
|
||||||
"Subscript": {
|
"Subscript": {
|
||||||
"prefix": "ss",
|
"prefix": "ss",
|
||||||
"description": "Subscript",
|
"description": "Subscript",
|
||||||
"body": "_{$1}$0",
|
"body": "_{$1}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Exponent": {
|
"Exponent": {
|
||||||
"prefix": "ee",
|
"prefix": "ee",
|
||||||
"description": "Exponent",
|
"description": "Exponent",
|
||||||
"body": "^{$1}$0",
|
"body": "^{$1}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Nth derivative": {
|
"Nth derivative": {
|
||||||
"prefix": "dd",
|
"prefix": "dd",
|
||||||
"description": "Nth derivative",
|
"description": "Nth derivative",
|
||||||
"body": "^{($1)}$0",
|
"body": "^{($1)}$0"
|
||||||
"luasnip": {
|
},
|
||||||
"autotrigger": true
|
"Overline": {
|
||||||
}
|
"prefix": "ol",
|
||||||
|
"description": "Overline",
|
||||||
|
"body": "\\overline{$1}$0"
|
||||||
|
},
|
||||||
|
"Z Mod": {
|
||||||
|
"prefix": "zmod",
|
||||||
|
"description": "The set of Z/nZ",
|
||||||
|
"body": "\\mathbb{Z}/$1\\mathbb{Z}$0"
|
||||||
},
|
},
|
||||||
"Section": {
|
"Section": {
|
||||||
"prefix": "section",
|
"prefix": "section",
|
||||||
|
@ -133,74 +131,47 @@
|
||||||
"Sigma sum": {
|
"Sigma sum": {
|
||||||
"prefix": "bsum",
|
"prefix": "bsum",
|
||||||
"description": "Create a sum using sigma notation",
|
"description": "Create a sum using sigma notation",
|
||||||
"body": "\\sum_{$1 = $2}^{$3}$0",
|
"body": "\\sum_{$1 = $2}^{$3}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Pi product": {
|
"Pi product": {
|
||||||
"prefix": "bproduct",
|
"prefix": "bproduct",
|
||||||
"description": "Create a produt using pi notation",
|
"description": "Create a produt using pi notation",
|
||||||
"body": "\\prod_{$1 = $2}^{$3}$0",
|
"body": "\\prod_{$1 = $2}^{$3}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Fraction": {
|
"Fraction": {
|
||||||
"prefix": "frac",
|
"prefix": "frac",
|
||||||
"description": "Create a fraction",
|
"description": "Create a fraction",
|
||||||
"body": "\\frac{$1}{$2}$0",
|
"body": "\\frac{$1}{$2}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Choose": {
|
"Choose": {
|
||||||
"prefix": "binom",
|
"prefix": "binom",
|
||||||
"description": "Create a (n choose k) thingy",
|
"description": "Create a (n choose k) thingy",
|
||||||
"body": "\\binom{$1}{$2}$0",
|
"body": "\\binom{$1}{$2}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Limit": {
|
"Limit": {
|
||||||
"prefix": "lim",
|
"prefix": "lim",
|
||||||
"description": "Create a limit",
|
"description": "Create a limit",
|
||||||
"body": "\\lim _{$1 \\to $2}$0",
|
"body": "\\lim _{$1 \\to $2}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Limit to infinity": {
|
"Limit to infinity": {
|
||||||
"prefix": "ilim",
|
"prefix": "ilim",
|
||||||
"description": "Create a limit as a variable goes to infinity",
|
"description": "Create a limit as a variable goes to infinity",
|
||||||
"body": "\\lim _{$1 \\to \\infty}$0",
|
"body": "\\lim _{$1 \\to \\infty}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Limit to negative infinity": {
|
"Limit to negative infinity": {
|
||||||
"prefix": "nlim",
|
"prefix": "nlim",
|
||||||
"description": "Create a limit as a variable goes to negative infinity",
|
"description": "Create a limit as a variable goes to negative infinity",
|
||||||
"body": "\\lim _{$1 \\to -\\infty}$0",
|
"body": "\\lim _{$1 \\to -\\infty}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Limit to zero": {
|
"Limit to zero": {
|
||||||
"prefix": "zlim",
|
"prefix": "zlim",
|
||||||
"description": "Create a limit as a variable goes to 0",
|
"description": "Create a limit as a variable goes to 0",
|
||||||
"body": "\\lim _{$1 \\to 0}$0",
|
"body": "\\lim _{$1 \\to 0}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Sqrt": {
|
"Sqrt": {
|
||||||
"prefix": "sqrt",
|
"prefix": "sqrt",
|
||||||
"description": "Create a sqrt",
|
"description": "Create a sqrt",
|
||||||
"body": "\\sqrt[$1]{$2}$0",
|
"body": "\\sqrt[$1]{$2}$0"
|
||||||
"luasnip": {
|
|
||||||
"autotrigger": true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Sin": {
|
"Sin": {
|
||||||
"prefix": "sin",
|
"prefix": "sin",
|
||||||
|
|
77
dotfiles/vscode-snippets/snippets/latex/explain.json
Normal file
77
dotfiles/vscode-snippets/snippets/latex/explain.json
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
{
|
||||||
|
"Text explanation in math mode": {
|
||||||
|
"prefix": "texpl",
|
||||||
|
"description": "Explain a step using text in math mode",
|
||||||
|
"body": "&& \\text{($1)}$0"
|
||||||
|
},
|
||||||
|
"Explanation in math mode": {
|
||||||
|
"prefix": "expl",
|
||||||
|
"description": "Explain a step in math mode",
|
||||||
|
"body": "&& ($1) $0"
|
||||||
|
},
|
||||||
|
"Explain division": {
|
||||||
|
"prefix": "exdiv",
|
||||||
|
"description": "Explain a division inside an equation",
|
||||||
|
"body": "&& \\left(\\frac{\\square}{$1}\\right)$0"
|
||||||
|
},
|
||||||
|
"Explain fraction": {
|
||||||
|
"prefix": "exfract",
|
||||||
|
"description": "Explain a step which wraps both sides of an equation by a fraction",
|
||||||
|
"body": "&& \\left(\\frac{$1}{$2} \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain right multiplication": {
|
||||||
|
"prefix": "exmul",
|
||||||
|
"description": "Explain a right multiplication inside an equation",
|
||||||
|
"body": "&& \\left(\\square \\cdot $1 \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain left multiplication": {
|
||||||
|
"prefix": "exlmul",
|
||||||
|
"description": "Explain a left multiplication inside an equation",
|
||||||
|
"body": "&& \\left($1 \\cdot \\square\\right)$0"
|
||||||
|
},
|
||||||
|
"Explain differentiation": {
|
||||||
|
"prefix": "exdiff",
|
||||||
|
"description": "Explain a step which differentiates both sides of an equation",
|
||||||
|
"body": "&& \\left( \\frac{d \\square} {d $1} \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain integration": {
|
||||||
|
"prefix": "exint",
|
||||||
|
"description": "Explain a step which integrates both sides of an equation",
|
||||||
|
"body": "&& \\left(\\int \\square d$1 \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain definite integration": {
|
||||||
|
"prefix": "exdint",
|
||||||
|
"description": "Explain a step which applies a definite integral to both sides of an equation",
|
||||||
|
"body": "&& \\left(\\int _{$1} ^{$2} \\square d$3 \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain addition": {
|
||||||
|
"prefix": "exadd",
|
||||||
|
"description": "Explain a step which adds to both sides of an equation",
|
||||||
|
"body": "&& \\left( \\square + $1 \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain subtraction": {
|
||||||
|
"prefix": "exsub",
|
||||||
|
"description": "Explain a step which subtracts from both sides of an equation",
|
||||||
|
"body": "&& \\left( \\square - $1 \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain negation": {
|
||||||
|
"prefix": "exneg",
|
||||||
|
"description": "Explain a step which negates both sides of an equation",
|
||||||
|
"body": "&& (- \\square )$0"
|
||||||
|
},
|
||||||
|
"Explain power": {
|
||||||
|
"prefix": "expow",
|
||||||
|
"description": "Explain a step which raises both sides of an equation to a given power",
|
||||||
|
"body": "&& \\left( \\square ^{$1} \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain exponentiation": {
|
||||||
|
"prefix": "exexp",
|
||||||
|
"description": "Explain a step which raises a given value to both sides of an equation",
|
||||||
|
"body": "&& \\left( $1 ^{\\square} \\right)$0"
|
||||||
|
},
|
||||||
|
"Explain natural logarithm": {
|
||||||
|
"prefix": "exln",
|
||||||
|
"description": "Explain a step which applies the ln function to both sides of an equation",
|
||||||
|
"body": "&& \\left( \\ln $1 \\right)$0"
|
||||||
|
}
|
||||||
|
}
|
BIN
img/22-10-19-16-13-24.png
Normal file
BIN
img/22-10-19-16-13-24.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
|
@ -25,6 +25,7 @@
|
||||||
# ./chromium.nix
|
# ./chromium.nix
|
||||||
./vieb.nix
|
./vieb.nix
|
||||||
./polybar.nix
|
./polybar.nix
|
||||||
|
./hamachi.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
modules/applications/hamachi.nix
Normal file
7
modules/applications/hamachi.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.logmein-hamachi.enable = true;
|
||||||
|
home-manager.users.adrielus.home.packages = [
|
||||||
|
pkgs.logmein-hamachi
|
||||||
|
pkgs.unstable.haguichi
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue