diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/Snippets/tex/environments.lua | 1 | ||||
| -rw-r--r-- | lua/Snippets/tex/general.lua | 70 | ||||
| -rw-r--r-- | lua/Snippets/tex/german.lua | 13 | ||||
| -rw-r--r-- | lua/Snippets/tex/math.lua | 11 | ||||
| -rw-r--r-- | lua/Snippets/tex/postfix.lua | 33 | ||||
| -rw-r--r-- | lua/Snippets/tex/praeamble.lua | 4 | ||||
| -rw-r--r-- | lua/Snippets/tex/tables.lua | 12 | ||||
| -rw-r--r-- | lua/Snippets/tex/text.lua | 51 | ||||
| -rw-r--r-- | lua/lualine/theme-monokai.lua | 34 | ||||
| -rw-r--r-- | lua/lualine/theme-newpaper.lua | 47 |
10 files changed, 202 insertions, 74 deletions
diff --git a/lua/Snippets/tex/environments.lua b/lua/Snippets/tex/environments.lua index 1fa0301..89db7bc 100644 --- a/lua/Snippets/tex/environments.lua +++ b/lua/Snippets/tex/environments.lua @@ -1,5 +1,4 @@ local helper = require('Snippets.luasniphelpers') -local helper = require('Snippets.luasniphelpers') return { diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua index f50e4c2..39025f4 100644 --- a/lua/Snippets/tex/general.lua +++ b/lua/Snippets/tex/general.lua @@ -3,22 +3,11 @@ local helper = require('Snippets.luasniphelpers') return { - s({ trig = 'vsp', snippetType = 'autosnippet' }, - fmta( - '\\vspace{<>}', - { - i(1), - } - ) - ), - - s({ trig = 'hsp', snippetType = 'autosnippet' }, - fmta( - '\\hspace{<>}', - { - i(1), - } - ) + s({ trig = 'tbc', snippetType = 'autosnippet' }, + { + t('\\tableofcontents'), + }, + { condition = helper.line_begin } ), s({ trig = 'nwp', snippetType = 'autosnippet' }, @@ -35,76 +24,57 @@ return { { condition = helper.line_begin } ), - s({ trig = 'qnt', snippetType = 'autosnippet' }, - fmta( - '\\qty{<>}{<>}', - { - i(1), - i(2), - } - ) - ), - - s({ trig = 'qrt', snippetType = 'autosnippet' }, - fmta( - '\\qtyrange{<>}{<>}{<>}', - { - i(1), - i(2), - i(3), - } - ) - ), - - s({ trig = 'snr', snippetType = 'autosnippet' }, + s({ trig = 'vsp', snippetType = 'autosnippet' }, fmta( - '\\num{<>}', + '\\vspace{<>}', { i(1), } ) ), - s({ trig = 'snt', snippetType = 'autosnippet' }, + s({ trig = 'hsp', snippetType = 'autosnippet' }, fmta( - '\\unit{<>}', + '\\hspace{<>}', { i(1), } ) ), - s({ trig = 'tbf', snippetType = 'autosnippet' }, + s({ trig = 'qnt', snippetType = 'autosnippet' }, fmta( - '\\textbf{<>}', + '\\qty{<>}{<>}', { i(1), + i(2), } ) ), - s({ trig = 'tlc', snippetType = 'autosnippet' }, + s({ trig = 'qrt', snippetType = 'autosnippet' }, fmta( - '\\textit{<>}', + '\\qtyrange{<>}{<>}{<>}', { i(1), + i(2), + i(3), } ) ), - s({ trig = 'tsp', snippetType = 'autosnippet' }, + s({ trig = 'snr', snippetType = 'autosnippet' }, fmta( - '\\textsuperscript{<>}', + '\\num{<>}', { i(1), } ) ), - - s({ trig = 'tsb', snippetType = 'autosnippet' }, + s({ trig = 'snt', snippetType = 'autosnippet' }, fmta( - '\\textsubscript{<>}', + '\\unit{<>}', { i(1), } diff --git a/lua/Snippets/tex/german.lua b/lua/Snippets/tex/german.lua deleted file mode 100644 index 70b12bf..0000000 --- a/lua/Snippets/tex/german.lua +++ /dev/null @@ -1,13 +0,0 @@ -local tex = require('Snippets.luasniphelperslatex') -local helper = require('Snippets.luasniphelpers') - -return { - s({ trig = 'enq', snippetType = 'autosnippet' }, - fmta( - '\\enquote{<>}', - { - i(1), - } - ) - ), -} diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index 25a7db9..ddaf2a2 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -174,6 +174,13 @@ return { { condition = tex.in_mathzone } ), + s({ trig = 'str', snippetType = 'autosnippet' }, + { + t('\\star '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'df', snippetType = 'autosnippet' }, { t('\\,d ') }, { condition = tex.in_mathzone } @@ -181,14 +188,14 @@ return { s({ trig = 'bgg', snippetType = 'autosnippet' }, { - t('\\bigg'), + t('\\bigg '), }, { condition = tex.in_mathzone } ), s({ trig = 'rvr', snippetType = 'autosnippet' }, { - t('\\rvert'), + t('\\rvert '), }, { condition = tex.in_mathzone } ), diff --git a/lua/Snippets/tex/postfix.lua b/lua/Snippets/tex/postfix.lua new file mode 100644 index 0000000..6cc071e --- /dev/null +++ b/lua/Snippets/tex/postfix.lua @@ -0,0 +1,33 @@ +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'bgn', snippetType = 'autosnippet' }, + fmta( + [[ +\lstinputlisting[ + language = <>, + firstline = <>, + caption = { + <> + }, +]{<>} +]], + { + i(1), + i(2), + i(3), + i(4), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'pbl', snippetType = 'autosnippet' }, + { + t('\\printbibliography[heading=none]') + }, + { condition = helper.line_begin } + ), + +} diff --git a/lua/Snippets/tex/praeamble.lua b/lua/Snippets/tex/praeamble.lua index e0daa28..d1f8c79 100644 --- a/lua/Snippets/tex/praeamble.lua +++ b/lua/Snippets/tex/praeamble.lua @@ -3,7 +3,7 @@ local helper = require('Snippets.luasniphelpers') return { - s({ trig = 'upa', snippetType = 'autosnippet' }, + s({ trig = 'pkg', snippetType = 'autosnippet' }, fmta( '\\usepackage{<>}', { @@ -13,7 +13,7 @@ return { { condition = helper.line_begin } ), - s({ trig = 'opa', snippetType = 'autosnippet' }, + s({ trig = 'pks', snippetType = 'autosnippet' }, fmta( '\\usepackage[<>]{<>}', { diff --git a/lua/Snippets/tex/tables.lua b/lua/Snippets/tex/tables.lua index b2f39b3..fb768f7 100644 --- a/lua/Snippets/tex/tables.lua +++ b/lua/Snippets/tex/tables.lua @@ -6,13 +6,13 @@ return { fmta( [[ \begin{table}[!h] + \caption{<> + } + \label{tbl:<>} \centering \begin{tabular}{ <> } <> \end{tabular} - \caption{<> - } - \label{tbl:<>} \end{table} ]], { @@ -29,13 +29,13 @@ return { fmta( [[ \begin{table}[!h] + \caption{<> + } + \label{tbl:<>} \centering \begin{tabularx}{\textwidth}{ <> } <> \end{tabularx} - \caption{<> - } - \label{tbl:<>} \end{table} ]], { diff --git a/lua/Snippets/tex/text.lua b/lua/Snippets/tex/text.lua new file mode 100644 index 0000000..e933f7f --- /dev/null +++ b/lua/Snippets/tex/text.lua @@ -0,0 +1,51 @@ +local tex = require('Snippets.luasniphelperslatex') +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'enq', snippetType = 'autosnippet' }, + fmta( + '\\enquote{<>}', + { + i(1), + } + ) + ), + + s({ trig = 'tbf', snippetType = 'autosnippet' }, + fmta( + '\\textbf{<>}', + { + i(1), + } + ) + ), + + s({ trig = 'tlc', snippetType = 'autosnippet' }, + fmta( + '\\textit{<>}', + { + i(1), + } + ) + ), + + s({ trig = 'tsp', snippetType = 'autosnippet' }, + fmta( + '\\textsuperscript{<>}', + { + i(1), + } + ) + ), + + + s({ trig = 'tsb', snippetType = 'autosnippet' }, + fmta( + '\\textsubscript{<>}', + { + i(1), + } + ) + ), +} diff --git a/lua/lualine/theme-monokai.lua b/lua/lualine/theme-monokai.lua new file mode 100644 index 0000000..91c58a4 --- /dev/null +++ b/lua/lualine/theme-monokai.lua @@ -0,0 +1,34 @@ +local colors = require('monokai-pro.colorscheme') + +local monokai_pro = {} + +monokai_pro.normal = { + a = { bg = colors.base.green, fg = colors.base.black, gui = 'bold' }, + b = { bg = colors.editor.background, fg = colors.base.green }, + c = { bg = colors.editor.background, fg = colors.editor.background }, + x = { bg = colors.editor.background, fg = colors.editor.background }, + y = { bg = colors.editor.background, fg = colors.editor.background }, + z = { bg = colors.base.red, fg = colors.base.black, gui = 'bold' }, +} + +monokai_pro.insert = { + a = { bg = colors.base.cyan, fg = colors.base.black, gui = 'bold' }, + b = { bg = colors.editor.background, fg = colors.base.cyan }, +} + +monokai_pro.visual = { + a = { bg = colors.base.magenta, fg = colors.base.black, gui = 'bold' }, + b = { bg = colors.editor.background, fg = colors.base.magenta }, +} + +monokai_pro.replace = { + a = { bg = colors.base.yellow, fg = colors.base.black, gui = 'bold' }, + b = { bg = colors.editor.background, fg = colors.base.yellow }, +} + +monokai_pro.inactive = { + c = { bg = colors.editor.background, fg = colors.base.white }, + z = { bg = colors.editor.background, fg = colors.base.red }, +} + +return monokai_pro diff --git a/lua/lualine/theme-newpaper.lua b/lua/lualine/theme-newpaper.lua new file mode 100644 index 0000000..8824d52 --- /dev/null +++ b/lua/lualine/theme-newpaper.lua @@ -0,0 +1,47 @@ +local configModule = require("newpaper.config") +local lualine_style +local theme = {} + +if vim.g.newpaper_lualine_style == nil then + lualine_style = vim.o.background +else + lualine_style = vim.g.newpaper_lualine_style +end + +configModule.config.colors = vim.g.newpaper_colors +configModule.config.style = lualine_style +theme.colors = require("newpaper.colors").setup(configModule.config) +local colors = theme.colors + +local newpaper = {} + +newpaper.normal = { + a = { bg = colors.green, fg = colors.bg, gui = 'bold' }, + b = { bg = colors.bg, fg = colors.green }, + c = { bg = colors.bg, fg = colors.bg }, + x = { bg = colors.bg, fg = colors.bg }, + y = { bg = colors.bg, fg = colors.bg }, + z = { bg = colors.red, fg = colors.bg, gui = 'bold' }, +} + +newpaper.insert = { + a = { bg = colors.teal, fg = colors.bg, gui = 'bold' }, + b = { bg = colors.bg, fg = colors.teal}, +} + +newpaper.visual = { + a = { bg = colors.purple, fg = colors.bg, gui = 'bold' }, + b = { bg = colors.bg, fg = colors.purple }, +} + +newpaper.replace = { + a = { bg = colors.lightorange, fg = colors.bg, gui = 'bold' }, + b = { bg = colors.bg, fg = colors.lightorange }, +} + +newpaper.inactive = { + c = { bg = colors.bg, fg = colors.fg }, + z = { bg = colors.bg, fg = colors.red }, +} + +return newpaper |
