diff options
| author | Nanderty <psopka@sopka.ch> | 2023-04-22 12:10:01 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-04-22 12:10:01 +0200 |
| commit | d37f266e7719a67faa99b3ec62e9a51f0033cfc2 (patch) | |
| tree | 7e667b5462d88ae9a593378d3a919349c027153b | |
| parent | 9b3ab411798c36f4402ecb34eb77a0ee86a03447 (diff) | |
| download | neovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.tar.gz neovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.tar.bz2 neovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.zip | |
starter verbesserungen
| -rw-r--r-- | ftplugin/tex.lua | 2 | ||||
| -rw-r--r-- | init.lua | 53 | ||||
| -rw-r--r-- | lua/Snippets/tex/chemistry.lua | 13 | ||||
| -rw-r--r-- | lua/Snippets/tex/general.lua | 38 | ||||
| -rw-r--r-- | lua/Snippets/tex/german.lua | 13 | ||||
| -rw-r--r-- | lua/Snippets/tex/math.lua | 39 | ||||
| -rw-r--r-- | lua/Snippets/tex/symbols.lua | 30 | ||||
| -rw-r--r-- | lua/config/keymaps.lua | 1 | ||||
| -rw-r--r-- | lua/config/options.lua | 1 | ||||
| -rw-r--r-- | lua/plugins/colorscheme.lua | 5 | ||||
| -rw-r--r-- | lua/plugins/mini.lua | 54 | ||||
| -rw-r--r-- | lua/plugins/tex.lua | 1 |
12 files changed, 195 insertions, 55 deletions
diff --git a/ftplugin/tex.lua b/ftplugin/tex.lua index 7a1e5b3..6a49fff 100644 --- a/ftplugin/tex.lua +++ b/ftplugin/tex.lua @@ -1,2 +1,2 @@ vim.opt.conceallevel = 1 -vim.opt.spell = true
\ No newline at end of file +vim.opt.spell = true @@ -2,37 +2,36 @@ vim.g.mapleader = ' ' local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - 'https://github.com/folke/lazy.nvim.git', - '--branch=stable', -- latest stable release - lazypath, - }) + vim.fn.system({ + 'git', + 'clone', + '--filter=blob:none', + 'https://github.com/folke/lazy.nvim.git', + '--branch=stable', -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require('lazy').setup({ - spec = { - { import = 'plugins' }, - { import = 'config' }, - }, - defaults = { - lazy = true, - version = false, - - }, - performance = { - rtp = { - disabled_plugins = { - 'gzip', - 'netrwPlugin', - 'tarPlugin', - 'tohtml', - 'zipPlugin', - }, + spec = { + { import = 'plugins' }, + { import = 'config' }, + }, + defaults = { + lazy = true, + version = false, + }, + performance = { + rtp = { + disabled_plugins = { + 'gzip', + 'netrwPlugin', + 'tarPlugin', + 'tohtml', + 'zipPlugin', + }, + }, }, - }, }) diff --git a/lua/Snippets/tex/chemistry.lua b/lua/Snippets/tex/chemistry.lua index 5c4742c..ee73154 100644 --- a/lua/Snippets/tex/chemistry.lua +++ b/lua/Snippets/tex/chemistry.lua @@ -2,9 +2,9 @@ local tex = require('Snippets.luasniphelperslatex') local helper = require('Snippets.luasniphelpers') return { - s({ trig = ',,', snippetType = 'autosnippet' }, + s({ trig = 'chg', snippetType = 'autosnippet' }, fmta( - '\\ch{<>->>[<>][<>]<>}\\par', + '\\ch{ <> ->>[ <> ][ <> ] <> }\\par', { i(1), i(2), @@ -13,4 +13,13 @@ return { } ) ), + + s({ trig = 'chs', snippetType = 'autosnippet' }, + fmta( + '\\ch{ <> }', + { + i(1), + } + ) + ), } diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua index b0a7090..e5514ab 100644 --- a/lua/Snippets/tex/general.lua +++ b/lua/Snippets/tex/general.lua @@ -17,6 +17,24 @@ s({ trig = 'new', snippetType = 'autosnippet' }, ), { condition = helper.line_begin } ), + s({ trig = 'ssec', snippetType = 'autosnippet' }, + fmta( + '\\subsection*{<>}', + { + i(1), + } + ), + { condition = helper.line_begin } + ), + s({ trig = 'nsec', snippetType = 'autosnippet' }, + fmta( + '\\newpage\\section*{<>}', + { + i(1), + } + ), + { condition = helper.line_begin } + ), s({ trig = 'hh', snippetType = 'autosnippet' }, fmta( '\\SI{<>}{<>}', @@ -26,6 +44,26 @@ s({ trig = 'new', snippetType = 'autosnippet' }, } ) ), + s({ trig = 'bf', snippetType = 'autosnippet' }, + fmta( + '\\textbf{<>}', + { + i(1), + } + ) + ), + s({ trig = 'cite', snippetType = 'autosnippet' }, + fmta( + '\\supercite{<>}', + { + i(1), + } + ) + ), + s({ trig = 'ite', snippetType = 'autosnippet' }, + { t('\\item') }, + { condition = helper.line_begin } + ), s({ trig = 'upa', snippetType = 'autosnippet' }, fmta( '\\usepackage{<>}', diff --git a/lua/Snippets/tex/german.lua b/lua/Snippets/tex/german.lua new file mode 100644 index 0000000..70b12bf --- /dev/null +++ b/lua/Snippets/tex/german.lua @@ -0,0 +1,13 @@ +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 411ac7a..b6c5068 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -20,7 +20,17 @@ return { ), { condition = tex.in_mathzone } ), - s({ trig = "in", snippetType = "autosnippet" }, + s({ trig = "sum", snippetType = "autosnippet" }, + fmta( + '\\sum_{<>}^{<>}', + { + i(1), + i(2), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "int", snippetType = "autosnippet" }, fmta( '\\int_{<>}^{<>}', { @@ -30,6 +40,14 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = 'nn', snippetType = 'autosnippet' }, + fmta( + '\\num{<>}', + { + i(1), + } + ) + ), s({ trig = "tex", snippetType = "autosnippet" }, fmta( '\\text{<>}', @@ -57,6 +75,15 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = "ove", snippetType = "autosnippet" }, + fmta( + '\\overline{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' }, fmta( '^{<>}', @@ -66,6 +93,16 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = 'gg', snippetType = 'autosnippet' }, + fmta( + '\\sqrt[<>]{<>}', + { + i(1), + i(2), + } + ), + { condition = tex.in_mathzone } + ), s({ trig = 'll', snippetType = 'autosnippet' }, fmta( '_{<>}', diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua index c2ca1d0..ccce14e 100644 --- a/lua/Snippets/tex/symbols.lua +++ b/lua/Snippets/tex/symbols.lua @@ -2,6 +2,30 @@ local tex = require('Snippets.luasniphelperslatex') local helper = require('Snippets.luasniphelpers') return { + s({ trig = 'chi', snippetType = 'autosnippet' }, + { + t('\\chi'), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'sig', snippetType = 'autosnippet' }, + { + t('\\sigma'), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'nu', snippetType = 'autosnippet' }, + { + t('\\nu'), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'alp', snippetType = 'autosnippet' }, + { + t('\\alpha'), + }, + { condition = tex.in_mathzone } + ), s({ trig = 'del', snippetType = 'autosnippet' }, { t('\\delta '), @@ -92,4 +116,10 @@ return { }, { condition = tex.in_mathzone } ), + s({ trig = 'Ria', snippetType = 'autosnippet' }, + { + t('\\Rightarrow'), + }, + { condition = tex.in_mathzone } + ), } diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 64a9e34..1ecb70f 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -11,6 +11,7 @@ return { end) vim.keymap.set('n', '<leader>w', '<cmd>w<cr>') vim.keymap.set('n', '<leader>q', '<cmd>qa<cr>') + vim.keymap.set('n', '<leader>e', [[<C-w>]]) vim.keymap.set('n', '<leader>p', [["+p]]) vim.keymap.set({ 'n', 'v' }, '<leader>y', [['+y]]) end, diff --git a/lua/config/options.lua b/lua/config/options.lua index 1d56299..591bb96 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -20,6 +20,7 @@ return { vim.opt.cmdheight = 0 vim.opt.fillchars = 'eob: ' + vim.opt.relativenumber = true vim.opt.showmode = false vim.opt.smartindent = true diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 1261e27..5e226d6 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -6,7 +6,7 @@ return { priority = 1000, config = function() require('rose-pine').setup({ - variant = 'dawn', + variant = 'moon', highlight_groups = { TelescopePromptNormal = { fg = 'base', bg = 'rose' }, TelescopePromptBorder = { bg = 'rose' }, @@ -18,6 +18,9 @@ return { TelescopeResultsNormal = { bg = 'overlay' }, TelescopeResultsBorder = { bg = 'overlay' }, }, + groups = { + background = 'none', + }, }) vim.cmd('colorscheme rose-pine') end, diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua index 1cdca99..114e5bb 100644 --- a/lua/plugins/mini.lua +++ b/lua/plugins/mini.lua @@ -1,26 +1,34 @@ return { - { - 'echasnovski/mini.nvim', - event = 'VimEnter', - keys = { - { '<leader>ss', function () - MiniSessions.write(vim.fn.input('Create session > ')) - end, - desc = 'save session' - }, - { '<leader>sd', function () - MiniSessions.delete(vim.fn.input('Delete session > ')) - end, - desc = 'delete session' - }, + { + 'echasnovski/mini.nvim', + event = 'VimEnter', + keys = { + { + '<leader>ss', + function() + MiniSessions.write(vim.fn.input('Create session > ')) + end, + desc = 'save session' + }, + { + '<leader>sd', + function() + MiniSessions.delete(vim.fn.input('Delete session > ')) + end, + desc = 'delete session' + }, + }, + config = function() + require('mini.sessions').setup({ + force = { read = false, write = true, delete = true } + }) + require('mini.starter').setup({ + evaluate_single = true, + silent = true, + items = { + require('mini.starter').sections.sessions(10, true), + }, + }) + end, }, - config = function() - require('mini.sessions').setup({ - force = {read = false, write = true, delete = true} - }) - require('mini.starter').setup({ - evaluate_single = true - }) - end, - }, } diff --git a/lua/plugins/tex.lua b/lua/plugins/tex.lua index f8d4849..103d78f 100644 --- a/lua/plugins/tex.lua +++ b/lua/plugins/tex.lua @@ -5,6 +5,7 @@ return { config = function() vim.g.vimtex_quickfix_open_on_warning = 0 vim.keymap.set('n', '<leader>ll', '<Cmd>VimtexCompile<CR>') + vim.g.vimtex_view_method = 'zathura_simple' end, }, } |
