Changed snippets

This commit is contained in:
BogosBinted 2024-11-15 13:41:01 +01:00
parent 8d1ef972bc
commit 950ddeb557
12 changed files with 2739 additions and 23 deletions

7
.gitignore vendored
View File

@ -1,7 +0,0 @@
tags
test.sh
.luarc.json
nvim
spell/
lazy-lock.json

View File

@ -271,7 +271,7 @@ require('lazy').setup({
-- after the plugin has been loaded:
-- config = function() ... end
{ -- Useful plugin to show you pending keybinds.
{ -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
opts = {
@ -314,7 +314,7 @@ require('lazy').setup({
-- Document existing key chains
spec = {
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' },
@ -354,7 +354,7 @@ require('lazy').setup({
{ 'nvim-telescope/telescope-ui-select.nvim' },
-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
@ -450,7 +450,7 @@ require('lazy').setup({
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{ 'Bilal2453/luvit-meta', lazy = true },
{
-- Main LSP Configuration
'neovim/nvim-lspconfig',
@ -462,7 +462,7 @@ require('lazy').setup({
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
{ 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by nvim-cmp
'hrsh7th/cmp-nvim-lsp',
@ -738,12 +738,12 @@ require('lazy').setup({
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',
@ -758,7 +758,7 @@ require('lazy').setup({
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
luasnip.config.setup ({ enable_autosnippets = true })
cmp.setup {
snippet = {
@ -845,7 +845,7 @@ require('lazy').setup({
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'tokyonight'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
@ -903,10 +903,11 @@ require('lazy').setup({
auto_install = true,
highlight = {
enable = true,
disable = {"latex"},
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { 'ruby' },
additional_vim_regex_highlighting = { 'ruby', "latex","markdown" },
},
indent = { enable = true, disable = { 'ruby' } },
},
@ -938,7 +939,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
@ -968,3 +969,16 @@ require('lazy').setup({
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
--
require("luasnip.loaders.from_lua").load({paths = "/home/BogosBinted/.config/nvim-kickstart/lua/custom/plugins/Luasnip"})
-- Somewhere in your Neovim startup, e.g. init.lua
require("luasnip").config.set_config({ -- Setting LuaSnip config
-- Enable autotriggered snippets
enable_autosnippets = true,
-- Use Tab (or some other key if you prefer) to trigger visual selection
store_selection_keys = "<Tab>",
})

30
lazy-lock.json Normal file
View File

@ -0,0 +1,30 @@
{
"LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "9521fe8be39255b9abc6ec54e352bf04c410f5cf" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
"luasnip-latex-snippets.nvim": { "branch": "main", "commit": "4b91f28d91979f61a3e8aef1cee5b7c7f2c7beb8" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "7b4d5d48b6b5a75009d63f8f3e4ef4819b7e8139" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" },
"nvim-treesitter": { "branch": "master", "commit": "e1e3108cd23d7f967842261bd66126b6734d8907" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"vimtex": { "branch": "master", "commit": "6ee92c7ed2cdc876f499bd5561a65d04dee10d1f" },
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
}

View File

@ -0,0 +1,15 @@
-- Place this in ${HOME}/.config/nvim/LuaSnip/all.lua
return {
-- A snippet that expands the trigger "hi" into the string "Hello, world!".
require("luasnip").snippet(
{ trig = "hi" },
{ t("Hello, world!") }
),
-- To return multiple snippets, use one `return` statement per snippet file
-- and return a table of Lua snippets.
require("luasnip").snippet(
{ trig = "foo" },
{ t("Another snippet.") }
),
}

View File

@ -0,0 +1,16 @@
return {
-- Example: how to set snippet parameters
require("luasnip").snippet(
{ -- Table 1: snippet parameters
trig="saucisse",
dscr="An autotriggering snippet that expands 'hi' into 'Hello, world!'",
regTrig=false,
priority=100,
snippetType="autosnippet"
},
{ -- Table 2: snippet nodes (don't worry about this for now---we'll cover nodes shortly)
t("Hello, world!"), -- A single text node
}
-- Table 3, the advanced snippet options, is left blank.
),
}

View File

@ -0,0 +1,142 @@
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local fmt = require("luasnip.extras.fmt").fmt
-- Add LaTeX snippets
ls.add_snippets("tex", {
-- LaTeX Template
s("latex-template", fmt([[
\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
{}
\end{document}
]], { i(0) })),
-- Implies
s("=>", t("\\implies")),
-- Inline Math
s("mk", fmt("${}$", { i(1) })),
-- Fraction with auto-expansion for a/b pattern
s("////", fmt("\\frac{{{}}}{{{}}}", { i(1), i(2) })),
s({ trig = "(%w+)/(%w+)", regTrig = true, wordTrig = false }, {
f(function(_, snip) return "\\frac{" .. snip.captures[1] .. "}{" .. snip.captures[2] .. "}" end)
}),
-- Not Equals
s("!=", t("\\neq")),
-- Sum
s("sum", fmt("\\sum_{{n={}}}^{{{}}} {}", { i(1, "1"), i(2, "\\infty"), i(3, "a_n z^n") })),
-- Taylor Series
s("taylor", fmt("\\sum_{{{}={}}}^{{{}}} {} (x-a)^{}", { i(1, "k"), i(2, "0"), i(3, "\\infty"), i(4, "c_"), i(1) })),
-- Limit
s("lim", fmt("\\lim_{{{} \\to {}}}", { i(1, "n"), i(2, "\\infty") })),
-- Greek Letters
s("alpha", t("\\alpha")),
s("beta", t("\\beta")),
s("gamma", t("\\gamma")),
s("delta", t("\\delta")),
s("epsilon", t("\\epsilon")),
s("zeta", t("\\zeta")),
s("eta", t("\\eta")),
s("theta", t("\\theta")),
s("iota", t("\\iota")),
s("kappa", t("\\kappa")),
s("lambda", t("\\lambda")),
s("mu", t("\\mu")),
s("nu", t("\\nu")),
s("xi", t("\\xi")),
s("omicron", t("\\omicron")),
s("pi", t("\\pi")),
s("rho", t("\\rho")),
s("sigma", t("\\sigma")),
s("tau", t("\\tau")),
s("upsilon", t("\\upsilon")),
s("phi", t("\\phi")),
s("chi", t("\\chi")),
s("psi", t("\\psi")),
s("omega", t("\\omega")),
s("Alpha", t("\\Alpha")),
s("Beta", t("\\Beta")),
s("Gamma", t("\\Gamma")),
s("Delta", t("\\Delta")),
s("Epsilon", t("\\Epsilon")),
s("Zeta", t("\\Zeta")),
s("Eta", t("\\Eta")),
s("Theta", t("\\Theta")),
s("Iota", t("\\Iota")),
s("Kappa", t("\\Kappa")),
s("Lambda", t("\\Lambda")),
s("Mu", t("\\Mu")),
s("Nu", t("\\Nu")),
s("Xi", t("\\Xi")),
s("Omicron", t("\\Omicron")),
s("Pi", t("\\Pi")),
s("Rho", t("\\Rho")),
s("Sigma", t("\\Sigma")),
s("Tau", t("\\Tau")),
s("Upsilon", t("\\Upsilon")),
s("Phi", t("\\Phi")),
s("Chi", t("\\Chi")),
s("Psi", t("\\Psi")),
s("Omega", t("\\Omega")),
-- Other Symbols
s("ooo", t("\\infty")),
s("prod", t("\\prod")),
s("pm", t("\\pm")),
s("mp", t("\\mp")),
s("+-", t("\\pm")),
s("-+", t("\\mp")),
s("...", t("\\dots")),
s("<->", t("\\leftrightarrow")),
s("->", t("\\to")),
s("!>", t("\\mapsto")),
s("invs", t("^{-1}")),
s("\\\\\\", t("\\setminus")),
s("||", t("\\mid")),
s("and", t("\\cap")),
s("orr", t("\\cup")),
s("inn", t("\\in")),
s("notin", t("\\not\\in")),
s("\\subset eq", t("\\subseteq")),
s("eset", t("\\emptyset")),
s("set", fmt("\\{{}}", { i(1) })),
s("=>", t("\\implies")),
s("=<", t("\\impliedby")),
s("iff", t("\\iff")),
s("exists", t("\\exists")),
-- Special Formatting
s("mcal", fmt("\\mathcal{{{}}}", { i(1) })),
s("mbb", fmt("\\mathbb{{{}}}", { i(1) })),
s("ell", t("\\ell")),
s("lll", t("\\ell")),
s("LL", t("\\mathcal{L}")),
s("HH", t("\\mathcal{H}")),
s("CC", t("\\mathbb{C}")),
s("RR", t("\\mathbb{R}")),
s("ZZ", t("\\mathbb{Z}")),
s("NN", t("\\mathbb{N}")),
s("II", t("\\mathbb{1}")),
-- Miscellaneous Symbols
s("del", t("\\nabla")),
s("xx", t("\\times")),
s("avg", fmt("\\langle {} \\rangle", { i(1) })),
s("norm", fmt("\\lvert {} \\rvert", { i(1) })),
s("ceil", fmt("\\lceil {} \\rceil", { i(1) })),
s("floor", fmt("\\lfloor {} \\rfloor", { i(1) }))
})

View File

@ -0,0 +1,201 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local d = ls.dynamic_node
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local rep = require("luasnip.extras").rep
return {
-- Examples of Greek letter snippets, autotriggered for efficiency
s({trig="@a", snippetType="autosnippet"},
{
t("\\alpha"),
}
),
s({trig="@b", snippetType="autosnippet"},
{
t("\\beta"),
}
),
s({trig="@g", snippetType="autosnippet"},
{
t("\\gamma"),
}
),
s({trig="@G", snippetType="autosnippet"},
{
t("\\Gamma"),
}
),
s({trig="@g", snippetType="autosnippet"},
{
t("\\gamma"),
}
),
s({trig="@d", snippetType="autosnippet"},
{
t("\\delta"),
}
),
s({trig="@D", snippetType="autosnippet"},
{
t("\\Delta"),
}
),
s({trig="@e", snippetType="autosnippet"},
{
t("\\epsilon"),
}
),
s({trig="@ve", snippetType="autosnippet"},
{
t("\\varepsilon"),
}
),
s({trig="@z", snippetType="autosnippet"},
{
t("\\zeta"),
}
),
s({trig="@h", snippetType="autosnippet"},
{
t("\\eta"),
}
),
s({trig="@th", snippetType="autosnippet"},
{
t("\\theta"),
}
),
s({trig="@Th", snippetType="autosnippet"},
{
t("\\Theta"),
}
),
s({trig="@vth", snippetType="autosnippet"},
{
t("\\vartheta"),
}
),
s({trig="@i", snippetType="autosnippet"},
{
t("\\iota"),
}
),
s({trig="@k", snippetType="autosnippet"},
{
t("\\kappa"),
}
),
s({trig="@g", snippetType="autosnippet"},
{
t("\\gamma"),
}
),
s({trig="@l", snippetType="autosnippet"},
{
t("\\lambda"),
}
),
s({trig="@L", snippetType="autosnippet"},
{
t("\\Lambda"),
}
),
s({trig="@m", snippetType="autosnippet"},
{
t("\\mu"),
}
),
s({trig="@n", snippetType="autosnippet"},
{
t("\\nu"),
}
),
s({trig="@x", snippetType="autosnippet"},
{
t("\\xi"),
}
),
s({trig="@X", snippetType="autosnippet"},
{
t("\\Xi"),
}
),
s({trig="@pi", snippetType="autosnippet"},
{
t("\\pi"),
}
),
s({trig="@Pi", snippetType="autosnippet"},
{
t("\\Pi"),
}
),
s({trig="@r", snippetType="autosnippet"},
{
t("\\rho"),
}
),
s({trig="@s", snippetType="autosnippet"},
{
t("\\sigma"),
}
),
s({trig="@S", snippetType="autosnippet"},
{
t("\\Sigma"),
}
),
s({trig="@t", snippetType="autosnippet"},
{
t("\\tau"),
}
),
s({trig="@ph", snippetType="autosnippet"},
{
t("\\phi"),
}
),
s({trig="@Ph", snippetType="autosnippet"},
{
t("\\Phi"),
}
),
s({trig="@vph", snippetType="autosnippet"},
{
t("\\varphi"),
}
),
s({trig="@ch", snippetType="autosnippet"},
{
t("\\chi"),
}
),
s({trig="@ps", snippetType="autosnippet"},
{
t("\\psi"),
}
),
s({trig="@Ps", snippetType="autosnippet"},
{
t("\\Psi"),
}
),
s({trig="@o", snippetType="autosnippet"},
{
t("\\omega"),
}
),
s({trig="@O", snippetType="autosnippet"},
{
t("\\Omega"),
}
)
}

View File

@ -0,0 +1,83 @@
s({ trig = '@G', condition = in_mathzone }, t '\\Gamma', snippetType="autosnippet"),
s({ trig = '@d', condition = in_mathzone }, t '\\delta', snippetType="autosnippet"),
s({ trig = '@D', condition = in_mathzone }, t '\\Delta', snippetType="autosnippet"),
s({ trig = '@e', condition = in_mathzone }, t '\\epsilon', snippetType="autosnippet"),
s({ trig = '@ve', condition = in_mathzone }, t '\\varepsilon'),
s({ trig = '@z', condition = in_mathzone }, t '\\zeta'),
s({ trig = '@h', condition = in_mathzone }, t '\\eta'),
s({ trig = '@th', condition = in_mathzone }, t '\\theta'),
s({ trig = '@Th', condition = in_mathzone }, t '\\Theta'),
s({ trig = '@vth', condition = in_mathzone }, t '\\vartheta'),
s({ trig = '@i', condition = in_mathzone }, t '\\iota'),
s({ trig = '@k', condition = in_mathzone }, t '\\kappa'),
s({ trig = '@l', condition = in_mathzone }, t '\\lambda'),
s({ trig = '@L', condition = in_mathzone }, t '\\Lambda'),
s({ trig = '@m', condition = in_mathzone }, t '\\mu'),
s({ trig = '@n', condition = in_mathzone }, t '\\nu'),
s({ trig = '@x', condition = in_mathzone }, t '\\xi'),
s({ trig = '@X', condition = in_mathzone }, t '\\Xi'),
s({ trig = '@p', condition = in_mathzone }, t '\\pi'),
s({ trig = '@P', condition = in_mathzone }, t '\\Pi'),
s({ trig = '@r', condition = in_mathzone }, t '\\rho'),
s({ trig = '@s', condition = in_mathzone }, t '\\sigma'),
s({ trig = '@S', condition = in_mathzone }, t '\\Sigma'),
s({ trig = '@t', condition = in_mathzone }, t '\\tau'),
s({ trig = '@ph', condition = in_mathzone }, t '\\phi'),
s({ trig = '@Ph', condition = in_mathzone }, t '\\Phi'),
s({ trig = '@vph', condition = in_mathzone }, t '\\varphi'),
s({ trig = '@ch', condition = in_mathzone }, t '\\chi'),
s({ trig = '@ps', condition = in_mathzone }, t '\\psi'),
s({ trig = '@Ps', condition = in_mathzone }, t '\\Psi'),
s({ trig = '@o', condition = in_mathzone }, t '\\omega'),
s({ trig = '@O', condition = in_mathzone }, t '\\Omega'),
s({ trig = '@a', condition = in_mathzone , snippetType="autosnippet"},
t('\\alpha'),
),
s({ trig = '@b', condition = in_mathzone , snippetType="autosnippet"},
t('\\beta'),
),
s({ trig = '@g', condition = in_mathzone , snippetType="autosnippet"},
t('\\gamma'),
),
s({ trig = '@G', condition = in_mathzone, snippetType="autosnippet"},
t('\\Gamma'),
),
local function in_mathzone()
return vim.fn['vimtex#syntax#in_mathzone']() == 1
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,141 @@
local ls = require("luasnip")
local s = ls.snippet
local sn = ls.snippet_node
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node
local d = ls.dynamic_node
local fmt = require("luasnip.extras.fmt").fmt
local fmta = require("luasnip.extras.fmt").fmta
local rep = require("luasnip.extras").rep
return {
-- Common symbols
s({trig="ooo", snippetType="autosnippet"},
{
t("\\infty"),
}
),
s({trig="+-", snippetType="autosnippet"},
{
t("\\pm"),
}
),
s({trig="pm", snippetType="autosnippet"},
{
t("\\pm"),
}),
s({trig="-+", snippetType="autosnippet"},
{
t("\\mp"),
}),
s({trig="mp", snippetType="autosnippet"},
{
t("\\mp"),
}),
s({trig="->", snippetType="autosnippet"},
{
t("\\to"),
}),
s({trig="!>", snippetType="autosnippet"},
{
t("\\mapsto"),
}),
s({trig="invs", snippetType="autosnippet"},
{
t("^{-1}"),
}),
s({trig="and", snippetType="autosnippet"},
{
t("\\cap"),
}),
s({trig="orr", snippetType="autosnippet"},
{
t("\\cup"),
}),
s({trig="inn", snippetType="autosnippet"},
{
t("\\in"),
}),
s({trig="notin", snippetType="autosnippet"},
{
t("\\not\\in"),
}),
s({trig="eset", snippetType="autosnippet"},
{
t("\\emptyset"),
}),
s({trig="=>", snippetType="autosnippet"},
{
t("\\implies"),
}),
s({trig="=<", snippetType="autosnippet"},
{
t("\\impliedby"),
}),
s({trig="iff", snippetType="autosnippet"},
{
t("\\iff"),
}),
s({trig="exists", snippetType="autosnippet"},
{
t("\\exists"),
}),
-- Set notation
s({trig="NN", snippetType="autosnippet"},
{
t("\\mathbb{N}"),
}),
s({trig="ZZ", snippetType="autosnippet"},
{
t("\\mathbb{Z}"),
}),
s({trig="QQ", snippetType="autosnippet"},
{
t("\\mathbb{Q}"),
}),
s({trig="II1", snippetType="autosnippet"},
{
t("\\mathbb{1}"),
}),
s({trig="III", snippetType="autosnippet"},
{
t("\\mathcal{I}"),
}),
s({trig="RR", snippetType="autosnippet"},
{
t("\\mathbb{R}"),
}),
s({trig="QQ", snippetType="autosnippet"},
{
t("\\mathbb{Q}"),
}),
s({trig="MnnR", snippetType="autosnippet"},
{
t("\\mathcal{M}_{n}(\\mathbb{R})"),
}),
s({trig="Mn1R", snippetType="autosnippet"},
{
t("\\mathcal{M}_{n,1}(\\mathbb{R})"),
}),
s({trig="KK", snippetType="autosnippet"},
{
t("\\mathbb{K}"),
}),
s({trig="CC", snippetType="autosnippet"},
{
t("\\mathbb{C}"),
}),
-- Delimiters
s({trig="norm", snippetType="autosnippet"},
fmt("\\lvert {} \\rvert",{ i(1) })
),
s({trig="pentiere", snippetType="autosnippet"},
fmt("\\lfloor {} \\rfloor",{ i(1) })
),
}

View File

@ -2,4 +2,21 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {{
"lervag/vimtex",
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
init = function()
-- VimTeX configuration goes here, e.g.
vim.g.vimtex_view_method = "zathura"
end
},
--[[ {
"iurimateus/luasnip-latex-snippets.nvim",
config = function()
require'luasnip-latex-snippets'.setup({use_treesitter=false})
-- or setup({ use_treesitter = true })
require("luasnip").config.setup({ enable_autosnippets = true })
end,
} ]]}