diff --git a/.config/nvim b/.config/nvim new file mode 160000 index 0000000..d2309ca --- /dev/null +++ b/.config/nvim @@ -0,0 +1 @@ +Subproject commit d2309ca00ad0a6cc77ad2354547f6f81a1e0026e diff --git a/.config/nvim/after/ftplugin/cmake.lua b/.config/nvim/after/ftplugin/cmake.lua deleted file mode 100644 index cce7648..0000000 --- a/.config/nvim/after/ftplugin/cmake.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.opt.tabstop = 2 -vim.opt.softtabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.expandtab = true diff --git a/.config/nvim/after/ftplugin/cpp.lua b/.config/nvim/after/ftplugin/cpp.lua deleted file mode 100644 index adec580..0000000 --- a/.config/nvim/after/ftplugin/cpp.lua +++ /dev/null @@ -1 +0,0 @@ -vim.opt_local.shiftwidth = 2 diff --git a/.config/nvim/after/ftplugin/rst.lua b/.config/nvim/after/ftplugin/rst.lua deleted file mode 100644 index d2911eb..0000000 --- a/.config/nvim/after/ftplugin/rst.lua +++ /dev/null @@ -1,6 +0,0 @@ -vim.opt.wrap = true -- softwrap the text -vim.opt.linebreak = true -- do not break in the middle of words -vim.opt.tabstop = 3 -vim.opt.softtabstop = 3 -vim.opt.shiftwidth = 3 -vim.opt.expandtab = true diff --git a/.config/nvim/after/plugin/fugitive.lua b/.config/nvim/after/plugin/fugitive.lua deleted file mode 100644 index 73b78b8..0000000 --- a/.config/nvim/after/plugin/fugitive.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "gs", vim.cmd.Git); diff --git a/.config/nvim/after/plugin/gitsigns.lua b/.config/nvim/after/plugin/gitsigns.lua deleted file mode 100644 index d6905c9..0000000 --- a/.config/nvim/after/plugin/gitsigns.lua +++ /dev/null @@ -1,9 +0,0 @@ -require('gitsigns').setup { - signs = { - add = {text='+'}, - change = {text='~'}, - delete = {text='_'}, - topdelete = {text='‾'}, - changedelete = {text='~'}, - } -} diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua deleted file mode 100644 index efcab1d..0000000 --- a/.config/nvim/after/plugin/harpoon.lua +++ /dev/null @@ -1,16 +0,0 @@ -local mark = require('harpoon.mark') -local ui = require('harpoon.ui') -local cmd_ui = require('harpoon.cmd-ui') -local term = require('harpoon.term') - -vim.keymap.set('n', 'a', mark.add_file) -vim.keymap.set('n', '', ui.toggle_quick_menu) - -vim.keymap.set('n', '', function() ui.nav_file(1) end) -vim.keymap.set('n', '', function() ui.nav_file(2) end) -vim.keymap.set('n', '', function() ui.nav_file(3) end) -vim.keymap.set('n', '', function() ui.nav_file(4) end) - -vim.keymap.set('n', 'c', cmd_ui.toggle_quick_menu) -vim.keymap.set('n', 'gt1', function() term.gotoTerminal(1) end) -vim.keymap.set('n', 'br', function() term.sendCommand(1, 'build_ros') end) diff --git a/.config/nvim/after/plugin/lualsp.lua b/.config/nvim/after/plugin/lualsp.lua deleted file mode 100644 index 41d28aa..0000000 --- a/.config/nvim/after/plugin/lualsp.lua +++ /dev/null @@ -1,14 +0,0 @@ -local lspconfig = require('lspconfig') - -lspconfig.lua_ls.setup({ - settings = { - Lua = { - diagnostics = { - globals = { - 'vim', - 'require', - }, - }, - }, - }, -}) diff --git a/.config/nvim/after/plugin/luasnip.lua b/.config/nvim/after/plugin/luasnip.lua deleted file mode 100644 index 61579e6..0000000 --- a/.config/nvim/after/plugin/luasnip.lua +++ /dev/null @@ -1,46 +0,0 @@ -local ls = require('luasnip') -local ll = require('luasnip.loaders.from_lua') -local types = require('luasnip.util.types') - -ls.config.set_config({ - enable_autosnippets = true, - store_selection_keys = '', - history = true, - updateevents = 'TextChanged,TextChangedI', - delete_check_events = 'TextChanged', - ext_opts = { - [types.insertNode] = { - active = {}, - unvisited = { - virt_text = { { '<- insert', 'DiagnosticVirtualTextHint' } } - }, - visited = {}, - passive = {}, - snippet_passive = {}, - }, - [types.choiceNode] = { - active = { - virt_text = { { '<- insert', 'DiagnosticVirtualTextError' } }, - }, - } - }, -}) - -ll.load({ paths = { vim.fn.stdpath('config') .. '/snippets' } }) - -vim.keymap.set({ 'i', 's' }, '', function() - if ls.expand_or_jumpable() then - ls.expand_or_jump() - end -end, { silent = true }) - -vim.keymap.set({ 'i', 's' }, '', function() - if ls.jumpable(-1) then - ls.jump(-1) - end -end, { silent = true }) - -vim.keymap.set('n', 's', function() - vim.cmd('source ' .. vim.fn.stdpath('config') .. '/after/plugin/luasnip.lua') - vim.notify('Sourced snippets', 'info', { title = 'LuaSnip' }) -end) diff --git a/.config/nvim/after/plugin/neotree.lua b/.config/nvim/after/plugin/neotree.lua deleted file mode 100644 index 28c5488..0000000 --- a/.config/nvim/after/plugin/neotree.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.keymap.set('n', 'nf', 'Neotree') -vim.keymap.set('n', 'nb', 'Neotree source=buffers') diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua deleted file mode 100644 index df65102..0000000 --- a/.config/nvim/after/plugin/telescope.lua +++ /dev/null @@ -1,6 +0,0 @@ -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'pf', builtin.find_files, {}) -vim.keymap.set('n', '', builtin.find_files, {}) -vim.keymap.set("n", '', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }); -end) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua deleted file mode 100644 index efbc8a8..0000000 --- a/.config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,35 +0,0 @@ -require('nvim-treesitter.configs').setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "cpp", "python", "yaml" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - -- List of parsers to ignore installing (for "all") - ignore_install = { "javascript" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - enable = true, - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index ac3820e..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,18 +0,0 @@ -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, - }) -end -vim.opt.rtp:prepend(lazypath) - -vim.g.mapleader = ' ' -- needs to be set before lazy im -require('lazy').setup('plugins') - -require('lennartalff') -require('plugins.lsp') diff --git a/.config/nvim/lua/lennartalff/init.lua b/.config/nvim/lua/lennartalff/init.lua deleted file mode 100644 index 10f1499..0000000 --- a/.config/nvim/lua/lennartalff/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('lennartalff.remap') -require('lennartalff.set') -vim.o.termguicolors = true -vim.cmd.colorscheme 'catppuccin-frappe' diff --git a/.config/nvim/lua/lennartalff/remap.lua b/.config/nvim/lua/lennartalff/remap.lua deleted file mode 100644 index fa05557..0000000 --- a/.config/nvim/lua/lennartalff/remap.lua +++ /dev/null @@ -1,53 +0,0 @@ -vim.g.mapleader = " " -vim.keymap.set("n", "pv", vim.cmd.Ex) - --- move selected text -vim.keymap.set('v', 'J', ":m '>+1gv=gv") -vim.keymap.set('v', 'K', ":m '<-2gv=gv") - -vim.keymap.set('n', 'J', 'mzJ`z') - -vim.keymap.set('n', '', 'zz') -vim.keymap.set('n', '', 'zz') - --- yank to clipboard -vim.keymap.set('n', 'y', '"+y') -vim.keymap.set('v', 'y', '"+y') - --- delete to void -vim.keymap.set('n', 'd', '"_d') -vim.keymap.set('v', 'd', '"_d') - -vim.keymap.set('i', '', '') - --- avoid accidentally closing everything! -vim.keymap.set('n', 'Q', '') - -vim.keymap.set('n', 'f', function() - vim.lsp.buf.format() -end) - --- quickfix navigation -vim.keymap.set('n', '', 'cnextzz') -vim.keymap.set('n', '', 'cprevzz') -vim.keymap.set('n', 'j', 'lnextzz') -vim.keymap.set('n', 'k', 'lprevzz') - -vim.keymap.set('n', 'dq', vim.diagnostic.setqflist) -local function quickfix() - vim.lsp.buf.code_action({ - filter = function(a) return a.isPreferred end, - apply = true - }) -end -vim.keymap.set('n', 'qf', quickfix) - -vim.keymap.set('v', 'dgh', "diffget LOCAL") -vim.keymap.set('v', 'dgl', "diffget REMOTE") - -vim.keymap.set('n', 'dgh', "diffget LOCAL") -vim.keymap.set('n', 'dgl', "diffget REMOTE") - --- stay in visual mode after indenting/dedenting -vim.keymap.set('v', '<', '', '>gv') diff --git a/.config/nvim/lua/lennartalff/set.lua b/.config/nvim/lua/lennartalff/set.lua deleted file mode 100644 index 0305972..0000000 --- a/.config/nvim/lua/lennartalff/set.lua +++ /dev/null @@ -1,44 +0,0 @@ --- vim.opt.guicursor = '' -vim.notify = require('notify') - --- line numbers -vim.opt.nu = true -vim.opt.relativenumber = true - --- highlight current line -vim.opt.cursorline = true - -vim.opt.breakindent = true - --- default indentation -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true - -vim.opt.smartindent = true - -vim.opt.wrap = false - -vim.api.nvim_create_autocmd('FileType', { - pattern = 'Makefile', - callback = function () - vim.opt_local.expandtab = false - end -}) - -vim.opt.scrolloff = 8 -vim.opt.signcolumn = 'yes' -vim.opt.updatetime = 500 -vim.opt.colorcolumn = '80' - -vim.api.nvim_create_autocmd('BufReadPost', { - callback = function(args) - local valid_line = vim.fn.line([['"]]) >= 1 and vim.fn.line([['"]]) < vim.fn.line('$') - local not_commit = vim.b[args.buf].filetype ~= 'commit' - - if valid_line and not_commit then - vim.cmd([[normal! g`"]]) - end - end, -}) diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua deleted file mode 100644 index c049da1..0000000 --- a/.config/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - 'catppuccin/nvim', - name = 'catppuccin', - priority = 1000, - config = function() - local catpuccin = require('catppuccin') - catpuccin.setup({ - flavour = 'frappe', - styles = { - }, - }) - end -} diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua deleted file mode 100644 index 533bc20..0000000 --- a/.config/nvim/lua/plugins/cmp.lua +++ /dev/null @@ -1,46 +0,0 @@ -return { - 'hrsh7th/nvim-cmp', - dependencies = { - {'hrsh7th/cmp-nvim-lsp'}, - {'hrsh7th/cmp-nvim-lua'}, - {'L3MON4D3/LuaSnip'}, - }, - config = function() - local cmp = require('cmp') - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'nvim_lua' }, - { name = 'luasnip' }, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.confirm({ select = false }), - }), - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - }) - end -} diff --git a/.config/nvim/lua/plugins/config-local.lua b/.config/nvim/lua/plugins/config-local.lua deleted file mode 100644 index 3e4622d..0000000 --- a/.config/nvim/lua/plugins/config-local.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'klen/nvim-config-local', - opts = { - config_files = { '.nvim.lua' }, - hasfile = vim.fn.stdpath('data') .. '/config-local', - autocommands_create = true, - commands_create = true, - lookup_parents = true, - silent = false, - }, -} diff --git a/.config/nvim/lua/plugins/ibl.lua b/.config/nvim/lua/plugins/ibl.lua deleted file mode 100644 index eae4033..0000000 --- a/.config/nvim/lua/plugins/ibl.lua +++ /dev/null @@ -1,2 +0,0 @@ -require('ibl').setup() -return {} diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua deleted file mode 100644 index a0c5279..0000000 --- a/.config/nvim/lua/plugins/init.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, - { - 'L3MON4D3/LuaSnip', - version = "v2.*", - build = 'make install_jsregexp', - }, - { 'saadparwaiz1/cmp_luasnip' }, - 'lewis6991/gitsigns.nvim', - { - 'nvim-telescope/telescope.nvim', - dependencies = { - { 'nvim-lua/plenary.nvim' } } - }, - { - 'tpope/vim-fugitive', - name = 'fugitive' - }, - { - 'ThePrimeagen/harpoon', - dependencies = { - { 'nvim-lua/plenary.nvim' }, - }, - }, - { - 'ray-x/lsp_signature.nvim', - event = 'VeryLazy', - opts = {}, - config = function(_, opts) require('lsp_signature').setup(opts) end - }, - 'rcarriga/nvim-notify', - { - 'danymat/neogen', - dependencies = 'nvim-treesitter/nvim-treesitter', - config = true, - }, - { - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', - opts = {}, - }, - { - 'jiangmiao/auto-pairs', - }, -} diff --git a/.config/nvim/lua/plugins/lsp/init.lua b/.config/nvim/lua/plugins/lsp/init.lua deleted file mode 100644 index 657ee5c..0000000 --- a/.config/nvim/lua/plugins/lsp/init.lua +++ /dev/null @@ -1,118 +0,0 @@ ---local lspconfig = require('lspconfig') ---local lsp_defaults = lspconfig.util.default_config --- ---lsp_defaults.capabilities = vim.tbl_deep_extend( --- 'force', --- lsp_defaults.capabilities, --- require('cmp_nvim_lsp').default_capabilities() ---) - ---vim.api.nvim_create_autocmd('FileType', { --- pattern = 'tex', --- callback = function() --- require('cmp').setup.buffer { sources = {{ name = 'omni' }} } --- end, ---}) - -vim.api.nvim_create_autocmd('LspAttach', { - desc = 'LSP actions', - callback = function(event) - local opts = { buffer = event.buf } - vim.keymap.set('n', 'i', 'lua vim.lsp.buf.hover()', opts) - vim.keymap.set('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - vim.keymap.set('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - vim.keymap.set('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - vim.keymap.set('n', 'go', 'lua vim.lsp.buf.type_definition()', opts) - vim.keymap.set('n', 'gr', 'lua vim.lsp.buf.references()', opts) - vim.keymap.set('n', 'gs', 'lua vim.lsp.buf.signature_help()', opts) - vim.keymap.set('n', 'r', 'lua vim.lsp.buf.rename()', opts) - vim.keymap.set('n', 'f', 'lua vim.lsp.buf.format({async=true})', opts) - vim.keymap.set('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - vim.keymap.set('n', 'gl', 'lua vim.diagnostic.open_float()', opts) - vim.keymap.set('n', '[d', 'lua vim.diagnostic.goto_prev({float = {border = "rounded"}})', opts) - vim.keymap.set('n', ']d', 'lua vim.diagnostic.goto_next({float = {border = "rounded"}})', opts) - vim.keymap.set('n', 'vd', 'lua vim.diagnostic.open_float({border = "rounded"})', opts) - end -}) - - -local handlers = { - function(server) - require('lspconfig')[server].setup({}) - end, - pylsp = function() - require('lspconfig').pylsp.setup({ - settings = { - pylsp = { - plugins = { - pyflakes = { enabled = false }, - mccabe = { enabled = false }, - pycodestyle = { enabled = false }, - flake8 = { enabled = false }, - pylint = { enabled = false }, - autopep8 = { enabled = false }, - yapf = { enabled = true }, - }, - }, - }, - }) - end, - ruff_lsp = function() - require('lspconfig').ruff_lsp.setup({ - on_attach = function(client, bufnr) - client.server_capabilities.hoverProvider = false - client.server_capabilities.documentFormattingProvider = false - end, - }) - end, - texlab = function() - require('lspconfig').texlab.setup({ - settings = { - texlab = { - build = { - onSave = false, - forwardSearchAfter = true, - }, - chktex = { - onOpenAndSave = true, - }, - forwardSearch = { - executable = 'zathura', - args = { - '--synctex-forward', - '%l:1:%f', - '%p', - }, - }, - }, - }, - }) - end, -} - -return { - { - 'williamboman/mason.nvim', - config = function() - require('mason').setup({ - ui = { - border = 'rounded' - } - }) - require('mason-registry'):on('package:install:success', require('plugins.lsp.python').mason_post_install) - end - }, - { - 'williamboman/mason-lspconfig.nvim', - dependencies = { - 'rcarriga/nvim-notify', - }, - opts = { - handlers = handlers, - ensure_installed = { - 'lua_ls', 'clangd', 'pylsp', 'yamlls', 'esbonio', 'ruff_lsp', 'lemminx', - }, - }, - }, - { 'neovim/nvim-lspconfig' }, -} diff --git a/.config/nvim/lua/plugins/lsp/python.lua b/.config/nvim/lua/plugins/lsp/python.lua deleted file mode 100644 index bf2086e..0000000 --- a/.config/nvim/lua/plugins/lsp/python.lua +++ /dev/null @@ -1,34 +0,0 @@ -local M = {} -local notify = require('notify') - -M.mason_post_install = function(pkg) - --if pkg.name ~= 'python-lsp-server' then - -- return - --end - --local venv = vim.fn.stdpath('data') .. '/mason/packages/python-lsp-server/venv' - --local job = require('plenary.job') - --job:new({ - -- command = venv .. '/bin/pip', - -- args = { - -- 'install', - -- '-U', - -- '--disable-pip-version-check', - -- 'pylsp-mypy', - -- }, - -- cwd = venv, - -- env = { VIRTUAL_ENV = venv }, - -- on_exit = function() - -- notify('Finished installing pylsp modules.') - -- end, - -- on_start = function() - -- notify('Installing pylsp modules...') - -- end, - --}):start() -end - -M.ruff = function() - local config = {} - return config -end - -return M diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua deleted file mode 100644 index ef91148..0000000 --- a/.config/nvim/lua/plugins/lualine.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'nvim-lualine/lualine.nvim', - dependencies = { - { 'nvim-tree/nvim-web-devicons' }, - }, - config = function() - require('lualine').setup({ - theme = 'catppuccin-frappe' - }) - end, -} diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim/lua/plugins/neotree.lua deleted file mode 100644 index 46adb5c..0000000 --- a/.config/nvim/lua/plugins/neotree.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - { - 'nvim-neo-tree/neo-tree.nvim', - branch = 'v3.x', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', - 'MunifTanjim/nui.nvim', - }, - opts = { - filesystem = { - follow_current_file = { - enabled = true, - }, - } - }, - }, -} diff --git a/.config/nvim/snippets/rst/snippets.lua b/.config/nvim/snippets/rst/snippets.lua deleted file mode 100644 index f522a7a..0000000 --- a/.config/nvim/snippets/rst/snippets.lua +++ /dev/null @@ -1,73 +0,0 @@ -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 { - s( - { - trig = 'console', - name = 'Console Code-Block', - dscr = 'Creates a console code block' - }, - fmta( - [[ - .. code-block:: console - - $ <> - - ]], - { - i(1), - } - ) - ), - s( - { - trig = 'shell', - name = 'Shell Code-Block', - dscr = 'Create a shell code block' - }, - fmta( - [[ - .. code-block:: sh - <> - - <> - - ]], - { - i(1), - i(2), - } - ) - ), - s( - { - trig = 'python', - name = 'Python Code-Block', - dscr = 'Create python code block', - }, - fmta( - [[ - .. code-block:: python - :linenos: - :caption: <> - :emphasize-lines: <> - - <> - ]], - { - i(1), - i(2), - i(3), - } - ) - ), -} diff --git a/.config/nvim/snippets/tex/environments.lua b/.config/nvim/snippets/tex/environments.lua deleted file mode 100644 index c610bd3..0000000 --- a/.config/nvim/snippets/tex/environments.lua +++ /dev/null @@ -1,88 +0,0 @@ -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 { - s( - { - trig = 'env', - name = 'Environment', - dscr = 'Creates generic \\begin{} \\end{} environment', - }, - fmta( - [[ - \begin{<>} - <> - \end{<>} - ]], - { - i(1), - i(2), - rep(1), - } - ) - ), - s( - { - trig = 'frame', - name = 'Beamer Frame', - dscr = 'Frame environment for beamer slides', - }, - fmta( - [[ - \begin{frame} - \frametitle{<>} - <> - \end{frame} - ]], - { - i(1), - i(2), - } - ) - ), - s( - { - trig = 'frame-fragile', - name = 'Frame Fragile', - dscr = 'Required for verbatim content like code listings.', - }, - fmta( - [[ - \begin{frame}[fragile] - \frametitle{<>} - <> - \end{frame} - ]], - { - i(1), - i(2), - } - ) - ), - s( - { - trig = 'noindent', - name = 'No Indent', - dscr = 'Add no indent instructin for latexindent. Useful for code-blocks.' - }, - fmta( - [[ - % \begin{noindent} - <> - % \end{noindent} - ]] - , - { - i(1), - } - ) - ), -} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2b3ceca --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".config/nvim"] + path = .config/nvim + url = ssh://git@git.lennartalff.net:6622/lennartalff/nvim.git