From 44d39aa4eec121f1a215663d236d071bfb54639f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sun, 19 Feb 2023 23:01:47 +0100 Subject: [PATCH] feat: initial setup --- .gitignore | 5 ++ .stylua.toml | 6 ++ LICENSE.md | 19 +++++ README.md | 3 + init.lua | 29 ++++++++ lua/autocmd.lua | 10 +++ lua/keymaps.lua | 49 +++++++++++++ lua/options.lua | 47 ++++++++++++ lua/plugins/cmp.lua | 70 ++++++++++++++++++ lua/plugins/common.lua | 119 ++++++++++++++++++++++++++++++ lua/plugins/lsp.lua | 144 +++++++++++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 76 ++++++++++++++++++++ lua/plugins/treesitter.lua | 85 ++++++++++++++++++++++ 13 files changed, 662 insertions(+) create mode 100644 .gitignore create mode 100644 .stylua.toml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 init.lua create mode 100644 lua/autocmd.lua create mode 100644 lua/keymaps.lua create mode 100644 lua/options.lua create mode 100644 lua/plugins/cmp.lua create mode 100644 lua/plugins/common.lua create mode 100644 lua/plugins/lsp.lua create mode 100644 lua/plugins/telescope.lua create mode 100644 lua/plugins/treesitter.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea93eda --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +tags +test.sh +.luarc.json +nvim +lazy-lock.json diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..5d12dbd --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,6 @@ +column_width = 160 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +no_call_parentheses = true diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9cf1062 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..279dff3 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# init.lua + +created from the fantastic [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim) diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..1e82dd9 --- /dev/null +++ b/init.lua @@ -0,0 +1,29 @@ +-- Set as the leader key +-- WARN: Must happen before plugins are required (otherwise wrong leader will be used) +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +-- Install package manager +-- https://github.com/folke/lazy.nvim +-- `:help lazy.nvim.txt` for more info +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) + +require('lazy').setup({ + { import = 'options' }, + { import = 'keymaps' }, + { import = 'plugins' }, +}, {}) + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/lua/autocmd.lua b/lua/autocmd.lua new file mode 100644 index 0000000..fcc9711 --- /dev/null +++ b/lua/autocmd.lua @@ -0,0 +1,10 @@ +vim.api.nvim_create_autocmd({ "BufEnter, BufWinEnter" }, + { command = "set colorcolumn=120,80,88", pattern = { "*.py", "*.pyi" } }) +vim.api.nvim_create_autocmd({ "BufEnter, BufWinEnter" }, + { command = "set colorcolumn=80,100", pattern = { "*.rs" } }) +vim.api.nvim_create_autocmd({ "BufEnter, BufWinEnter" }, + { command = "set splitright", pattern = { "*" } }) +vim.api.nvim_create_autocmd({ "BufEnter, BufWinEnter" }, + { command = "set splitbelow", pattern = { "*" } }) + +return {} diff --git a/lua/keymaps.lua b/lua/keymaps.lua new file mode 100644 index 0000000..565ccd7 --- /dev/null +++ b/lua/keymaps.lua @@ -0,0 +1,49 @@ +-- [[ Basic Keymaps ]] + +-- Keymaps for better default experience +-- See `:help vim.keymap.set()` +vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) + +-- Remap for dealing with word wrap +vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + +-- Remap for vertical navigation +vim.keymap.set('n', '', 'zz', { noremap = true, silent = true }) +vim.keymap.set('n', '', 'zz', { noremap = true, silent = true }) +vim.keymap.set('n', 'n', 'nzzzv', { noremap = true, silent = true }) +vim.keymap.set('n', 'N', 'Nzzzv', { noremap = true, silent = true }) + +-- [[ Highlight on yank ]] +-- See `:help vim.highlight.on_yank()` +local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) +vim.api.nvim_create_autocmd('TextYankPost', { + callback = function() + vim.highlight.on_yank() + end, + group = highlight_group, + pattern = '*', +}) + +-- Diagnostic keymaps +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next) +vim.keymap.set('n', 'e', vim.diagnostic.open_float) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist) + +-- terminal keymaps +function _G.set_terminal_keymaps() + local opts = { buffer = 0 } + vim.keymap.set('t', '', [[]], opts) + vim.keymap.set('t', '', [[wincmd h]], opts) + vim.keymap.set('t', '', [[wincmd j]], opts) + vim.keymap.set('t', '', [[wincmd k]], opts) + vim.keymap.set('t', '', [[wincmd l]], opts) +end + +-- +-- if you only want these mappings for toggle term use term://*toggleterm#* instead +vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') + + +return {} diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 0000000..2bc537f --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,47 @@ +-- [[ Setting options ]] +-- See `:help vim.o` + +-- Set highlight on search +vim.o.hlsearch = false + +-- Make line numbers default +vim.wo.number = true + +-- Make line numbers relative +vim.wo.relativenumber = true + +-- Enable mouse mode +vim.o.mouse = 'a' + +-- Sync clipboard between OS and Neovim. +-- Remove this option if you want your OS clipboard to remain independent. +-- See `:help 'clipboard'` +vim.o.clipboard = 'unnamedplus' + +-- Enable break indent +vim.o.breakindent = true + +-- Save undo history +vim.o.undofile = true + +-- Case insensitive searching UNLESS /C or capital in search +vim.o.ignorecase = true +vim.o.smartcase = true + +-- Keep signcolumn on by default +vim.wo.signcolumn = 'yes' + +-- Decrease update time +vim.o.updatetime = 250 +vim.o.timeout = true +vim.o.timeoutlen = 300 + +-- Set completeopt to have a better completion experience +vim.o.completeopt = 'menuone,noselect' + +vim.o.termguicolors = true + +-- set custom end of line character +vim.cmd [[set list listchars=eol:﬋]] + +return {} diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua new file mode 100644 index 0000000..8ef0b06 --- /dev/null +++ b/lua/plugins/cmp.lua @@ -0,0 +1,70 @@ +function leave_snippet() + if ((vim.v.event.old_mode == 's' and vim.v.event.new_mode == 'n') or vim.v.event.old_mode == 'i') + and require('luasnip').session.current_nodes[vim.api.nvim_get_current_buf()] + and not require('luasnip').session.jump_active + then + require('luasnip').unlink_current() + end +end + +vim.api.nvim_command([[ + autocmd ModeChanged * lua leave_snippet() +]]) + +return { + { + 'hrsh7th/nvim-cmp', + dependencies = { + 'hrsh7th/cmp-nvim-lsp', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip' + }, + + config = function () + -- nvim-cmp setup + local cmp = require 'cmp' + local luasnip = require 'luasnip' + + luasnip.config.setup {} + + cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, + } + end + }, +} diff --git a/lua/plugins/common.lua b/lua/plugins/common.lua new file mode 100644 index 0000000..07f365e --- /dev/null +++ b/lua/plugins/common.lua @@ -0,0 +1,119 @@ +return { + -- NOTE: First, some plugins that don't require any configuration + + -- Git related plugins + 'tpope/vim-fugitive', + 'tpope/vim-rhubarb', + + -- Detect tabstop and shiftwidth automatically + 'tpope/vim-sleuth', + + -- NOTE: Second, plugins that require setup call + + -- Useful plugin to show you pending keybinds. + { 'folke/which-key.nvim', opts = {} }, + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + + -- colorize in files + { "norcalli/nvim-colorizer.lua", opts = {} }, + + -- highlighting for comments + { "folke/todo-comments.nvim", dependencies = "nvim-lua/plenary.nvim", opts = {} }, + + -- NOTE: Third, plugins that require some setup, but not enugh for separate file + + { -- Adds git releated signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + -- See `:help gitsigns.txt` + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + }, + }, + + { -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'onedark', + component_separators = '|', + section_separators = '', + }, + }, + }, + + { -- Add indentation guides even on blank lines + 'lukas-reineke/indent-blankline.nvim', + -- Enable `lukas-reineke/indent-blankline.nvim` + -- See `:help indent_blankline.txt` + opts = { + char = '┊', + show_trailing_blankline_indent = false, + }, + }, + + { -- git blame annotations + 'f-person/git-blame.nvim', + config = function() + vim.api.nvim_set_keymap('n', 'gt', ':GitBlameToggle', { desc = '[G]it Blame [T]oggle', noremap = true }) + vim.api.nvim_set_keymap('n', 'gu', ':GitBlameOpenCommitURL', + { desc = '[G]it Blame Open Commit [U]rl', noremap = true }) + end + }, + + { -- a more adventurous wildmenu + 'gelguy/wilder.nvim', + + dependencies = { 'romgrk/fzy-lua-native' }, + + config = function() + local wilder = require('wilder') + wilder.setup({ modes = { ':', '/', '?' } }) + -- Disable Python remote plugin + wilder.set_option('use_python_remote_plugin', 0) + + wilder.set_option('pipeline', { + wilder.branch( + wilder.cmdline_pipeline({ + fuzzy = 1, + fuzzy_filter = wilder.lua_fzy_filter(), + }), + wilder.vim_search_pipeline() + ) + }) + + wilder.set_option('renderer', wilder.popupmenu_renderer( + wilder.popupmenu_border_theme({ + highlights = { + border = 'Normal', + }, + border = 'rounded', + highlighter = wilder.lua_fzy_highlighter(), + left = { ' ', wilder.popupmenu_devicons() }, + right = { ' ', wilder.popupmenu_scrollbar() }, + }) + )) + end, + }, + + -- NOTE: Finally, themes + -- FIX: figure out how to switch between themes more easily + + { -- Theme inspired by Atom + 'navarasu/onedark.nvim', + priority = 1000, + config = function() + vim.cmd.colorscheme 'onedark' + end, + }, + +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..2412dbe --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,144 @@ +-- LSP settings. +-- This function gets run when an LSP connects to a particular buffer. +local on_attach = function(_, bufnr) + -- NOTE: Remember that lua is a real programming language, and as such it is possible + -- to define small helper and utility functions so you don't have to repeat yourself + -- many times. + -- + -- In this case, we create a function that lets us more easily define mappings specific + -- for LSP related items. It sets the mode, buffer and description for us each time. + local nmap = function(keys, func, desc) + if desc then + desc = 'LSP: ' .. desc + end + + vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) + end + + local delayed_format = function() + vim.lsp.buf.format({ timeout_ms = 2000 }) + end + + nmap('rn', vim.lsp.buf.rename, '[R]e[n]ame') + nmap('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + nmap('ff', delayed_format, '[F]ormat') + + nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') + nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation') + nmap('D', vim.lsp.buf.type_definition, 'Type [D]efinition') + nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') + nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') + + -- See `:help K` for why this keymap + nmap('K', vim.lsp.buf.hover, 'Hover Documentation') + nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') + + -- Lesser used LSP functionality + nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + nmap('wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') + nmap('wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') + nmap('wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, '[W]orkspace [L]ist Folders') + + -- Create a command `:Format` local to the LSP buffer + vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) + vim.lsp.buf.format() + end, { desc = 'Format current buffer with LSP' }) +end + +return { + { -- LSP Configuration & Plugins + 'neovim/nvim-lspconfig', + dependencies = { + -- Automatically install LSPs to stdpath for neovim + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + + -- Useful status updates for LSP + { 'j-hui/fidget.nvim', opts = {} }, + + -- Additional lua configuration, makes nvim stuff amazing! + 'folke/neodev.nvim', + }, + + config = function () + local servers = { + -- clangd = {}, + -- gopls = {}, + marksman = {}, + pyright = {}, + rust_analyzer = { + checkOnSave = { + allFeatures = true, + overrideCommand = { + 'cargo', 'clippy', '--workspace', '--message-format=json', + '--all-targets', '--all-features' + } + } + }, + tsserver = {}, + + lua_ls = { + Lua = { + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, + }, + } + + -- Setup neovim lua configuration + require('neodev').setup() + + -- nvim-cmp supports additional completion capabilities, so broadcast that to servers + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + + -- Setup mason so it can manage external tooling + require('mason').setup() + + -- Ensure the servers above are installed + local mason_lspconfig = require 'mason-lspconfig' + + mason_lspconfig.setup { + ensure_installed = vim.tbl_keys(servers), + } + + mason_lspconfig.setup_handlers { + function(server_name) + require('lspconfig')[server_name].setup { + capabilities = capabilities, + on_attach = on_attach, + settings = servers[server_name], + } + end, + } + end + }, + + { -- inject lsp formatting, diagonstics etc + 'jose-elias-alvarez/null-ls.nvim', + + dependencies = { 'nvim-lua/plenary.nvim' }, + + config = function () + local null_ls = require("null-ls") + + null_ls.setup({ + sources = { + -- general + null_ls.builtins.code_actions.gitsigns, + -- python + -- null_ls.builtins.diagnostics.pylint, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.isort, + -- typescript + null_ls.builtins.formatting.prettier, + -- rust + -- null_ls.builtins.formatting.rustfmt, + }, + }) + end + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..a40ddba --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,76 @@ +return { + + { -- Fuzzy Finder (files, lsp, etc) + 'nvim-telescope/telescope.nvim', + + + version = '*', + dependencies = { + 'nvim-lua/plenary.nvim', + + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- NOTE: If you are having trouble with this installation, + -- refer to the README for telescope-fzf-native for more instructions. + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + }, + + config = function() + -- [[ Configure Telescope ]] + -- See `:help telescope` and `:help telescope.setup()` + require('telescope').setup { + defaults = { + mappings = { + i = { + [''] = false, + [''] = false, + }, + }, + }, + pickers = { + find_files = { + find_command = { "rg", "-S", "--no-ignore-vcs", "--hidden", "--files", "-g", "!.git", }, + } + }, + } + + -- Enable telescope fzf native, if installed + pcall(require('telescope').load_extension, 'fzf') + + -- See `:help telescope.builtin` + vim.keymap.set('n', '?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) + vim.keymap.set('n', '', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', '/', function() + -- You can pass additional configuration to telescope to change theme, layout, etc. + require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { + winblend = 10, + previewer = false, + }) + end, { desc = '[/] Fuzzily search in current buffer' }) + + vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) + vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) + vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) + vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) + vim.keymap.set('n', 'ss', require('telescope.builtin').spell_suggest, { desc = '[S]pell [S]suggest' }) + + vim.keymap.set('n', 'sc', function() + require('telescope.builtin').colorscheme({ enable_preview = true }) + end, { desc = '[S]earch [C]olorscheme' }) + + -- extensions + -- vim.keymap.set('n', 'fb', require('telescope').extensions.file_browser.file_browser, { desc = '[F]ile [B]rowser' }) + vim.api.nvim_set_keymap('n', 'tc', ':TodoTelescope', { desc = '[T]odo [C]omments', noremap = true }) + end + }, + + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + -- Only load if `make` is available. Make sure you have the system + -- requirements installed. + +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..85594b4 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,85 @@ +return { + + -- Highlight, edit, and navigate code + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + 'nvim-treesitter/nvim-treesitter-context', + 'nvim-treesitter/nvim-treesitter-refactor', + }, + config = function() + pcall(require('nvim-treesitter.install').update { with_sync = true }) + + -- [[ Configure Treesitter ]] + -- See `:help nvim-treesitter` + require('nvim-treesitter.configs').setup { + -- Add languages to be installed here that you want installed for treesitter + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'help', 'vim', 'markdown' }, + + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) + auto_install = true, + + highlight = { enable = true }, + indent = { enable = true, disable = { 'python' } }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = '', + node_incremental = '', + scope_incremental = '', + node_decremental = '', + }, + }, + -- refactor + refactor = { + highlight_definitions = { enable = true, clear_on_cursor_move = true }, + }, + -- textobjects + textobjects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['aa'] = '@parameter.outer', + ['ia'] = '@parameter.inner', + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + [']m'] = '@function.outer', + [']]'] = '@class.outer', + }, + goto_next_end = { + [']M'] = '@function.outer', + [']['] = '@class.outer', + }, + goto_previous_start = { + ['[m'] = '@function.outer', + ['[['] = '@class.outer', + }, + goto_previous_end = { + ['[M'] = '@function.outer', + ['[]'] = '@class.outer', + }, + }, + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, + }, + }, + } + + end, +}