From 0ec4e62a17aa1f6c23efbcd594f86df6f2adaee8 Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Mon, 4 Dec 2023 16:20:32 +0100 Subject: [PATCH] updae --- Dockerfile | 2 + entrypoint.sh | 1 + nvim/after/ftplugin/cmake.lua | 4 ++ nvim/after/ftplugin/cpp.lua | 1 + nvim/after/ftplugin/rst.lua | 6 ++ nvim/after/plugin/color.lua | 6 -- nvim/after/plugin/lualsp.lua | 14 +++++ nvim/after/plugin/luasnip.lua | 46 ++++++++++++++++ nvim/after/plugin/neotree.lua | 2 + nvim/after/plugin/telescope.lua | 4 +- nvim/after/plugin/treesitter.lua | 54 +++++++++--------- nvim/lua/lennartalff/init.lua | 1 - nvim/lua/lennartalff/packer.lua | 65 ---------------------- nvim/lua/lennartalff/remap.lua | 9 +++ nvim/lua/lennartalff/set.lua | 26 +++------ nvim/lua/plugins/cmp.lua | 1 + nvim/lua/plugins/config-local.lua | 11 ++++ nvim/lua/plugins/ibl.lua | 2 + nvim/lua/plugins/init.lua | 23 ++++++-- nvim/lua/plugins/lsp/init.lua | 32 ++++++++++- nvim/lua/plugins/lualine.lua | 11 ++++ nvim/lua/plugins/neotree.lua | 18 ++++++ nvim/snippets/rst/snippets.lua | 73 +++++++++++++++++++++++++ nvim/snippets/tex/environments.lua | 88 ++++++++++++++++++++++++++++++ 24 files changed, 376 insertions(+), 124 deletions(-) create mode 100644 nvim/after/ftplugin/cmake.lua create mode 100644 nvim/after/ftplugin/cpp.lua create mode 100644 nvim/after/ftplugin/rst.lua delete mode 100644 nvim/after/plugin/color.lua create mode 100644 nvim/after/plugin/lualsp.lua create mode 100644 nvim/after/plugin/luasnip.lua create mode 100644 nvim/after/plugin/neotree.lua delete mode 100644 nvim/lua/lennartalff/packer.lua create mode 100644 nvim/lua/plugins/config-local.lua create mode 100644 nvim/lua/plugins/ibl.lua create mode 100644 nvim/lua/plugins/lualine.lua create mode 100644 nvim/lua/plugins/neotree.lua create mode 100644 nvim/snippets/rst/snippets.lua create mode 100644 nvim/snippets/tex/environments.lua diff --git a/Dockerfile b/Dockerfile index 7d5c686..74e3425 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,6 +53,7 @@ RUN apt-get update \ ros-${ROS_DISTR}-rqt-tf-tree \ ros-${ROS_DISTR}-apriltag \ ros-${ROS_DISTR}-plotjuggler-ros \ + ros-${ROS_DISTR}-tf-transformations \ # && rosdep install --from-paths /ros2_underlay/src -y --ignore-src \ # && rosdep install --from paths /ros2/src -y --ignore-src \ && apt-get autoremove -y \ @@ -94,6 +95,7 @@ RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/ && pip3 install yapf pre-commit ruff \ && sudo wget https://hippocampusrobotics.github.io/docs/_downloads/6055b3168d4f0a8cd764ebc481280219/ros-iron-px4-msgs_2.0.1-0jammy_amd64.deb \ && sudo apt-get install ./ros-iron-px4-msgs_2.0.1-0jammy_amd64.deb \ + && sudo apt install asciinema \ && sudo apt-get autoremove -y \ && sudo apt-get clean -y \ && sudo rm -rf /var/lib/apt/lists/* diff --git a/entrypoint.sh b/entrypoint.sh index 14801e7..6f007aa 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,5 +12,6 @@ echo 'source $HOME/uuv/ros2/install/local_setup.zsh' >> ~/.zshrc echo 'export RCUTILS_COLORIZED_OUTPUT=1' >> ~/.zshrc echo 'eval "$(register-python-argcomplete3 ros2)"' >> ~/.zshrc echo 'eval "$(register-python-argcomplete3 colcon)"' >> ~/.zshrc +echo "bindkey '^ ' autosuggest-toggle" >> ~/.zshrc exec $@ diff --git a/nvim/after/ftplugin/cmake.lua b/nvim/after/ftplugin/cmake.lua new file mode 100644 index 0000000..cce7648 --- /dev/null +++ b/nvim/after/ftplugin/cmake.lua @@ -0,0 +1,4 @@ +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.expandtab = true diff --git a/nvim/after/ftplugin/cpp.lua b/nvim/after/ftplugin/cpp.lua new file mode 100644 index 0000000..adec580 --- /dev/null +++ b/nvim/after/ftplugin/cpp.lua @@ -0,0 +1 @@ +vim.opt_local.shiftwidth = 2 diff --git a/nvim/after/ftplugin/rst.lua b/nvim/after/ftplugin/rst.lua new file mode 100644 index 0000000..d2911eb --- /dev/null +++ b/nvim/after/ftplugin/rst.lua @@ -0,0 +1,6 @@ +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/nvim/after/plugin/color.lua b/nvim/after/plugin/color.lua deleted file mode 100644 index 6c3e1c5..0000000 --- a/nvim/after/plugin/color.lua +++ /dev/null @@ -1,6 +0,0 @@ -function ColorMyPencils(color) - color = color or "rose-pine" - vim.cmd.colorscheme(color) -end - -ColorMyPencils() diff --git a/nvim/after/plugin/lualsp.lua b/nvim/after/plugin/lualsp.lua new file mode 100644 index 0000000..41d28aa --- /dev/null +++ b/nvim/after/plugin/lualsp.lua @@ -0,0 +1,14 @@ +local lspconfig = require('lspconfig') + +lspconfig.lua_ls.setup({ + settings = { + Lua = { + diagnostics = { + globals = { + 'vim', + 'require', + }, + }, + }, + }, +}) diff --git a/nvim/after/plugin/luasnip.lua b/nvim/after/plugin/luasnip.lua new file mode 100644 index 0000000..61579e6 --- /dev/null +++ b/nvim/after/plugin/luasnip.lua @@ -0,0 +1,46 @@ +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/nvim/after/plugin/neotree.lua b/nvim/after/plugin/neotree.lua new file mode 100644 index 0000000..28c5488 --- /dev/null +++ b/nvim/after/plugin/neotree.lua @@ -0,0 +1,2 @@ +vim.keymap.set('n', 'nf', 'Neotree') +vim.keymap.set('n', 'nb', 'Neotree source=buffers') diff --git a/nvim/after/plugin/telescope.lua b/nvim/after/plugin/telescope.lua index 27cc97e..df65102 100644 --- a/nvim/after/plugin/telescope.lua +++ b/nvim/after/plugin/telescope.lua @@ -1,6 +1,6 @@ local builtin = require('telescope.builtin') vim.keymap.set('n', 'pf', builtin.find_files, {}) -vim.keymap.set("n", "C-p", builtin.git_files, {}) -vim.keymap.set("n", "ps", function() +vim.keymap.set('n', '', builtin.find_files, {}) +vim.keymap.set("n", '', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }); end) diff --git a/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua index 5a8068b..efbc8a8 100644 --- a/nvim/after/plugin/treesitter.lua +++ b/nvim/after/plugin/treesitter.lua @@ -1,35 +1,35 @@ 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" }, + -- 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, + -- 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, + -- 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" }, + -- 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")! + ---- 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, + 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, - }, + -- 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/nvim/lua/lennartalff/init.lua b/nvim/lua/lennartalff/init.lua index 5d8957e..10f1499 100644 --- a/nvim/lua/lennartalff/init.lua +++ b/nvim/lua/lennartalff/init.lua @@ -1,5 +1,4 @@ require('lennartalff.remap') require('lennartalff.set') --- vim.cmd('colorscheme rose-pine') vim.o.termguicolors = true vim.cmd.colorscheme 'catppuccin-frappe' diff --git a/nvim/lua/lennartalff/packer.lua b/nvim/lua/lennartalff/packer.lua deleted file mode 100644 index 70b9c01..0000000 --- a/nvim/lua/lennartalff/packer.lua +++ /dev/null @@ -1,65 +0,0 @@ --- packer bootstrapping -local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) - vim.cmd [[packadd packer.nvim]] - return true - end - return false -end - -local packer_bootstrap = ensure_packer() - -return require('packer').startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - use 'lewis6991/gitsigns.nvim' - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.1', - -- or , branch = '0.1.x', - requires = { { 'nvim-lua/plenary.nvim' } } - } - use({ 'rose-pine/neovim', as = 'rose-pine' }) - - use { - 'nvim-treesitter/nvim-treesitter', - run = function() - local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) - ts_update() - end, - } - use 'tpope/vim-fugitive' - use { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - requires = { - -- LSP Support - { 'neovim/nvim-lspconfig' }, -- Required - { -- Optional - 'williamboman/mason.nvim', - run = function() - pcall(vim.cmd, 'MasonUpdate') - end, - }, - { 'williamboman/mason-lspconfig.nvim' }, -- Optional - - -- Autocompletion - { 'hrsh7th/nvim-cmp' }, -- Required - { 'hrsh7th/cmp-nvim-lsp' }, -- Required - { 'L3MON4D3/LuaSnip' }, -- Required - { 'mhartington/formatter.nvim' }, - } - } - use { - "ThePrimeagen/refactoring.nvim", - requires = { - { "nvim-lua/plenary.nvim" }, - { "nvim-treesitter/nvim-treesitter" } - } - } - if packer_bootstrap then - require('packer').sync() - end -end) diff --git a/nvim/lua/lennartalff/remap.lua b/nvim/lua/lennartalff/remap.lua index dffd4b9..fa05557 100644 --- a/nvim/lua/lennartalff/remap.lua +++ b/nvim/lua/lennartalff/remap.lua @@ -42,3 +42,12 @@ local function quickfix() 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/nvim/lua/lennartalff/set.lua b/nvim/lua/lennartalff/set.lua index ca9047a..b57e57e 100644 --- a/nvim/lua/lennartalff/set.lua +++ b/nvim/lua/lennartalff/set.lua @@ -1,9 +1,13 @@ -- 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 @@ -16,11 +20,10 @@ vim.opt.smartindent = true vim.opt.wrap = false -vim.api.nvim_create_autocmd("FileType", { - pattern = "cpp", - callback = function() - vim.opt_local.shiftwidth = 2 - vim.opt_local.tabstop = 2 +vim.api.nvim_create_autocmd('FileType', { + pattern = 'Makefile', + callback = function () + vim.opt_local.expandtab = false end }) @@ -28,16 +31,3 @@ vim.opt.scrolloff = 8 vim.opt.signcolumn = 'yes' vim.opt.updatetime = 500 vim.opt.colorcolumn = '80' - -vim.api.nvim_create_autocmd('FileType', { - pattern = 'rst', - callback = function() - vim.opt.wrap = true -- softwrap the text - vim.opt.linebreak = true -- do not break in the middle of words - -- rst uses 3 space indents - vim.opt.tabstop = 3 - vim.opt.softtabstop = 3 - vim.opt.shiftwidth = 3 - vim.opt.expandtab = true - end -}) diff --git a/nvim/lua/plugins/cmp.lua b/nvim/lua/plugins/cmp.lua index 1b1a55c..533bc20 100644 --- a/nvim/lua/plugins/cmp.lua +++ b/nvim/lua/plugins/cmp.lua @@ -16,6 +16,7 @@ return { sources = { { name = 'nvim_lsp' }, { name = 'nvim_lua' }, + { name = 'luasnip' }, }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping(function(fallback) diff --git a/nvim/lua/plugins/config-local.lua b/nvim/lua/plugins/config-local.lua new file mode 100644 index 0000000..3e4622d --- /dev/null +++ b/nvim/lua/plugins/config-local.lua @@ -0,0 +1,11 @@ +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/nvim/lua/plugins/ibl.lua b/nvim/lua/plugins/ibl.lua new file mode 100644 index 0000000..eae4033 --- /dev/null +++ b/nvim/lua/plugins/ibl.lua @@ -0,0 +1,2 @@ +require('ibl').setup() +return {} diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 1a13eb4..9eca60a 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -2,18 +2,25 @@ return { { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, { 'L3MON4D3/LuaSnip', - tag = 'v2.*', + version = "v2.*", build = 'make install_jsregexp', }, + { 'saadparwaiz1/cmp_luasnip' }, 'lewis6991/gitsigns.nvim', { 'nvim-telescope/telescope.nvim', dependencies = { { 'nvim-lua/plenary.nvim' } } }, - { 'rose-pine/neovim', name = 'rose-pine' }, - { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }, - { 'tpope/vim-fugitive', name = 'fugitive' }, + { + 'catppuccin/nvim', + name = 'catppuccin', + priority = 1000 + }, + { + 'tpope/vim-fugitive', + name = 'fugitive' + }, { 'ThePrimeagen/harpoon', dependencies = { @@ -32,4 +39,12 @@ return { dependencies = 'nvim-treesitter/nvim-treesitter', config = true, }, + { + 'lukas-reineke/indent-blankline.nvim', + main = 'ibl', + opts = {}, + }, + { + 'jiangmiao/auto-pairs', + }, } diff --git a/nvim/lua/plugins/lsp/init.lua b/nvim/lua/plugins/lsp/init.lua index 721a826..183bf69 100644 --- a/nvim/lua/plugins/lsp/init.lua +++ b/nvim/lua/plugins/lsp/init.lua @@ -7,6 +7,13 @@ -- 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) @@ -58,6 +65,29 @@ local handlers = { 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 { @@ -80,7 +110,7 @@ return { opts = { handlers = handlers, ensure_installed = { - 'lua_ls', 'clangd', 'pylsp', 'yamlls', 'esbonio', 'ruff_lsp', + 'lua_ls', 'clangd', 'pylsp', 'yamlls', 'esbonio', 'ruff_lsp', 'lemminx', }, }, }, diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..ef91148 --- /dev/null +++ b/nvim/lua/plugins/lualine.lua @@ -0,0 +1,11 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { + { 'nvim-tree/nvim-web-devicons' }, + }, + config = function() + require('lualine').setup({ + theme = 'catppuccin-frappe' + }) + end, +} diff --git a/nvim/lua/plugins/neotree.lua b/nvim/lua/plugins/neotree.lua new file mode 100644 index 0000000..46adb5c --- /dev/null +++ b/nvim/lua/plugins/neotree.lua @@ -0,0 +1,18 @@ +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/nvim/snippets/rst/snippets.lua b/nvim/snippets/rst/snippets.lua new file mode 100644 index 0000000..f522a7a --- /dev/null +++ b/nvim/snippets/rst/snippets.lua @@ -0,0 +1,73 @@ +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/nvim/snippets/tex/environments.lua b/nvim/snippets/tex/environments.lua new file mode 100644 index 0000000..c610bd3 --- /dev/null +++ b/nvim/snippets/tex/environments.lua @@ -0,0 +1,88 @@ +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), + } + ) + ), +}