From bd932cf5e1e6f60098d72a578378aeb7e2d1ed54 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sat, 26 Oct 2024 13:37:00 +0545 Subject: [PATCH] updates --- dotfyle.json | 3067 +++++++++++++++++++++++++++++- lua/core/keys.lua | 7 + lua/lock.json | 96 +- lua/plugins/coding.lua | 1 + lua/plugins/configs/alpha.lua | 94 + lua/plugins/configs/lsp.lua | 65 +- lua/plugins/configs/whichkey.lua | 7 +- lua/plugins/editor.lua | 4 + lua/plugins/extra.lua | 7 + lua/plugins/formater.lua | 24 +- lua/plugins/lint.lua | 1 + snippets/django.json | 1052 ++++++++++ snippets/htmldjango.json | 266 +++ snippets/javascript.json | 349 ++++ snippets/javascriptreact.json | 734 +++++++ snippets/lua.json | 98 + snippets/markdown.json | 404 ++++ snippets/package.json | 65 + snippets/python.json | 326 ++++ snippets/rust.json | 433 +++++ snippets/sql.json | 62 + 21 files changed, 7107 insertions(+), 55 deletions(-) create mode 100644 lua/plugins/configs/alpha.lua create mode 100644 snippets/django.json create mode 100644 snippets/htmldjango.json create mode 100644 snippets/javascript.json create mode 100644 snippets/javascriptreact.json create mode 100644 snippets/lua.json create mode 100644 snippets/markdown.json create mode 100644 snippets/package.json create mode 100644 snippets/python.json create mode 100644 snippets/rust.json create mode 100644 snippets/sql.json diff --git a/dotfyle.json b/dotfyle.json index c83ec2c..e97800b 100644 --- a/dotfyle.json +++ b/dotfyle.json @@ -1 +1,3066 @@ -{"distribution": "custom", "masonTools": ["basedpyright", "basedpyright-langserver", "bash-language-server", "black", "clang-format", "clangd", "codespell", "cspell", "emmet-ls", "eslint_d", "isort", "jdtls", "lua-language-server", "markdownlint", "mypy", "phpcs", "prettier", "pylint", "pyright", "pyright-langserver", "ruff", "shfmt", "stylua", "tailwindcss-language-server", "trivy", "typescript-language-server", "vscode-css-language-server", "vscode-json-language-server"], "keymaps": [{"desc": "Next Buffer", "noremap": true, "lhs": "", "mode": "n", "rhs": "bnext"}, {"desc": "Escape and clear hlsearch", "noremap": true, "lhs": "", "mode": "n", "rhs": "noh"}, {"desc": "Copy Git URL", "noremap": true, "lhs": "yg", "mode": "v", "rhs": "lua require\"gitlinker\".get_buf_range_url(\"v\")"}, {"desc": "Extract Variable", "noremap": true, "lhs": "rv", "mode": "v", "rhs": "lua require('refactoring').refactor('Extract Variable')"}, {"desc": "Refactor Commands", "noremap": true, "lhs": "rr", "mode": "v", "rhs": "lua require('telescope').extensions.refactoring.refactors()"}, {"desc": "Inline Variable", "noremap": true, "lhs": "ri", "mode": "v", "rhs": "lua require('refactoring').refactor('Inline Variable')"}, {"desc": "Extract To File", "noremap": true, "lhs": "rf", "mode": "v", "rhs": "lua require('refactoring').refactor('Extract Function To File')"}, {"desc": "Extract Function", "noremap": true, "lhs": "re", "mode": "v", "rhs": "lua require('refactoring').refactor('Extract Function')"}, {"desc": "Current Word", "noremap": true, "lhs": "jw", "mode": "v", "rhs": "lua require(\"flash\").jump({ pattern = vim.fn.expand(\"cword>\")})"}, {"desc": "Remote Treesitter", "noremap": true, "lhs": "jt", "mode": "v", "rhs": "lua require('flash').treesitter_search()"}, {"desc": "Search", "noremap": true, "lhs": "js", "mode": "v", "rhs": "lua require('flash').jump()"}, {"desc": "Previous Jump", "noremap": true, "lhs": "jp", "mode": "v", "rhs": "lua require('flash').jump({continue = true})"}, {"desc": "Search Forward", "noremap": true, "lhs": "jn", "mode": "v", "rhs": "lua require('flash').jump({search = { forward = true, wrap = false, multi_window = false },})"}, {"desc": "Treesitter", "noremap": true, "lhs": "jk", "mode": "v", "rhs": "lua require('flash').treesitter()"}, {"desc": "Remote", "noremap": true, "lhs": "jj", "mode": "v", "rhs": "lua require('flash').remote()"}, {"desc": "Diagnostics", "noremap": true, "lhs": "jd", "mode": "v", "rhs": "FlashDiagnostics"}, {"desc": "Search Backward", "noremap": true, "lhs": "jN", "mode": "v", "rhs": "lua require('flash').jump({search = { forward = false, wrap = false, multi_window = false },})"}, {"desc": "Delete Comment Style", "noremap": true, "lhs": "Cd", "mode": "v", "rhs": "CBd"}, {"desc": "Catalog", "noremap": true, "lhs": "Cc", "mode": "v", "rhs": "CBcatalog"}, {"desc": "Marked", "noremap": true, "lhs": "Cm", "mode": "v", "rhs": "CBllbox14"}, {"desc": "Line", "noremap": true, "lhs": "Cl", "mode": "v", "rhs": "CBline"}, {"desc": "Tiled line", "noremap": true, "lhs": "Ct", "mode": "v", "rhs": "CBllline"}, {"desc": "Comment Box", "noremap": true, "lhs": "Cb", "mode": "v", "rhs": "CBccbox"}, {"desc": "Run Code", "noremap": true, "lhs": "cx", "mode": "v", "rhs": "','>SnipRun"}, {"desc": "Unique", "noremap": true, "lhs": "cu", "mode": "v", "rhs": ":!uniq"}, {"desc": "Sort Asc", "noremap": true, "lhs": "cs", "mode": "v", "rhs": ":sort"}, {"desc": "Sort Case Insensitive", "noremap": true, "lhs": "ci", "mode": "v", "rhs": ":sort i"}, {"desc": "Sort Desc", "noremap": true, "lhs": "cS", "mode": "v", "rhs": ":sort!"}, {"desc": "Copy Git URL", "noremap": true, "lhs": "yg", "mode": "n", "rhs": "lua require\"gitlinker\".get_buf_range_url()"}, {"desc": "File Name", "noremap": true, "lhs": "yf", "mode": "n", "rhs": "CopyFileName"}, {"desc": "Copy Whole File", "noremap": true, "lhs": "ya", "mode": "n", "rhs": "%y+"}, {"desc": "Absolute Path", "noremap": true, "lhs": "yP", "mode": "n", "rhs": "CopyAbsolutePath"}, {"desc": "Relative Path", "noremap": true, "lhs": "yp", "mode": "n", "rhs": "CopyRelativePath"}, {"desc": "Quickfix List (Trouble)", "noremap": true, "lhs": "xQ", "mode": "n", "rhs": "Trouble qflist toggle"}, {"desc": "Location List (Trouble)", "noremap": true, "lhs": "xL", "mode": "n", "rhs": "Trouble loclist toggle"}, {"desc": "LSP references/definitions/... (Trouble)", "noremap": true, "lhs": "xS", "mode": "n", "rhs": "Trouble lsp toggle"}, {"desc": "Symbols (Trouble)", "noremap": true, "lhs": "xs", "mode": "n", "rhs": "Trouble symbols toggle"}, {"desc": "Buffer Diagnostics (Trouble)", "noremap": true, "lhs": "xX", "mode": "n", "rhs": "Trouble diagnostics toggle filter.buf=0"}, {"desc": "Diagnostics (Trouble)", "noremap": true, "lhs": "xx", "mode": "n", "rhs": "Trouble diagnostics toggle"}, {"desc": " Save and Quit", "noremap": true, "lhs": "x", "mode": "n", "rhs": "x"}, {"desc": "ZenMode", "noremap": true, "lhs": "wz", "mode": "n", "rhs": "ZenMode"}, {"desc": "Write and Quit", "noremap": true, "lhs": "ww", "mode": "n", "rhs": "w"}, {"desc": "Twilight", "noremap": true, "lhs": "wt", "mode": "n", "rhs": "Twilight"}, {"desc": "Suggestions", "noremap": true, "lhs": "ws", "mode": "n", "rhs": "Telescope spell_suggest"}, {"desc": "Write and Quit", "noremap": true, "lhs": "wq", "mode": "n", "rhs": "wq"}, {"desc": "Prev Misspell", "noremap": true, "lhs": "wk", "mode": "n", "rhs": "[s"}, {"desc": "Next Misspell", "noremap": true, "lhs": "wj", "mode": "n", "rhs": "]s"}, {"desc": "Force Write", "noremap": true, "lhs": "wf", "mode": "n", "rhs": "lua require'utils'.sudo_write()"}, {"desc": "Suda Write", "noremap": true, "lhs": "wF", "mode": "n", "rhs": ":SudaWrite"}, {"desc": "Spellcheck", "noremap": true, "lhs": "wc", "mode": "n", "rhs": "set spell!"}, {"desc": "Quote", "noremap": true, "lhs": "vq", "mode": "n", "rhs": "viq"}, {"desc": "Paragraph", "noremap": true, "lhs": "vp", "mode": "n", "rhs": "vip"}, {"desc": "Bracket", "noremap": true, "lhs": "vb", "mode": "n", "rhs": "vib"}, {"desc": "Around Quote", "noremap": true, "lhs": "vQ", "mode": "n", "rhs": "vaq"}, {"desc": "Around Para", "noremap": true, "lhs": "vP", "mode": "n", "rhs": "vap"}, {"desc": "Around Bracket", "noremap": true, "lhs": "vB", "mode": "n", "rhs": "vab"}, {"desc": "Toggle Output Panel", "noremap": true, "lhs": "uO", "mode": "n", "rhs": "lua require(\"neotest\").output_panel.toggle"}, {"desc": "Stop", "noremap": true, "lhs": "us", "mode": "n", "rhs": "lua require(\"neotest\").run.stop()"}, {"desc": "Run Nearest Test", "noremap": true, "lhs": "ur", "mode": "n", "rhs": "lua require(\"neotest\").run.run()"}, {"desc": "Toggle Summary", "noremap": true, "lhs": "uS", "mode": "n", "rhs": "lua require(\"neotest\").summary.toggle"}, {"desc": "Show Output", "noremap": true, "lhs": "uo", "mode": "n", "rhs": "lua require(\"neotest\").output.open({ enter = true, auto_close = true })"}, {"desc": "Run Test File", "noremap": true, "lhs": "uf", "mode": "n", "rhs": "lua require(\"neotest\").run.run(vim.fn.expand(\"%\"))"}, {"desc": "Run Current Test", "noremap": true, "lhs": "uc", "mode": "n", "rhs": "lua require(\"neotest\").run.run()"}, {"desc": "Vertical Terminal", "noremap": true, "lhs": "tv", "mode": "n", "rhs": "Vterm"}, {"desc": "Horizontal Terminal", "noremap": true, "lhs": "th", "mode": "n", "rhs": "Sterm"}, {"desc": "Toggle Terminal", "noremap": true, "lhs": "t2", "mode": "n", "rhs": "2ToggleTerm"}, {"desc": "Toggle Terminal", "noremap": true, "lhs": "t1", "mode": "n", "rhs": "1ToggleTerm"}, {"desc": "Vertical Split", "noremap": true, "lhs": "ss", "mode": "n", "rhs": "vsplit"}, {"desc": "Close Split", "noremap": true, "lhs": "sq", "mode": "n", "rhs": "c"}, {"desc": "Previous Pane", "noremap": true, "lhs": "sp", "mode": "n", "rhs": "NavigatorPrevious"}, {"desc": "Move Right", "noremap": true, "lhs": "sl", "mode": "n", "rhs": "l"}, {"desc": "Move Up", "noremap": true, "lhs": "sk", "mode": "n", "rhs": "k"}, {"desc": "Move Down", "noremap": true, "lhs": "sj", "mode": "n", "rhs": "j"}, {"desc": "Move Left", "noremap": true, "lhs": "sh", "mode": "n", "rhs": "h"}, {"desc": "First Tab", "noremap": true, "lhs": "sf", "mode": "n", "rhs": "tabfirst"}, {"desc": "Close Tab", "noremap": true, "lhs": "sc", "mode": "n", "rhs": "tabclose"}, {"desc": "Horizontal Split", "noremap": true, "lhs": "sa", "mode": "n", "rhs": "split"}, {"desc": "Previous Window", "noremap": true, "lhs": "s`", "mode": "n", "rhs": "p"}, {"desc": "Decrease window height", "noremap": true, "lhs": "s_", "mode": "n", "rhs": "resize -10"}, {"desc": "Split Right", "noremap": true, "lhs": "s\\", "mode": "n", "rhs": "v"}, {"desc": "Increase window width", "noremap": true, "lhs": "sL", "mode": "n", "rhs": "vertical resize +10"}, {"desc": "Increase window height", "noremap": true, "lhs": "sK", "mode": "n", "rhs": "resize +5"}, {"desc": "Decrease window height", "noremap": true, "lhs": "sJ", "mode": "n", "rhs": "resize -5"}, {"desc": "Decrease window width", "noremap": true, "lhs": "sH", "mode": "n", "rhs": "vertical resize -10"}, {"desc": "Increase window width", "noremap": true, "lhs": "s=", "mode": "n", "rhs": "vertical resize +20"}, {"desc": "Split Below", "noremap": true, "lhs": "s/", "mode": "n", "rhs": "s"}, {"desc": "Decrease window width", "noremap": true, "lhs": "s-", "mode": "n", "rhs": "vertical resize -20"}, {"desc": "Increase window height", "noremap": true, "lhs": "s+", "mode": "n", "rhs": "resize +10"}, {"desc": "Replace Word", "noremap": true, "lhs": "rw", "mode": "n", "rhs": "lua require('spectre').open_visual({select_word=true})"}, {"desc": "Extract Variable", "noremap": true, "lhs": "rv", "mode": "n", "rhs": "lua require('refactoring').refactor('Extract Variable')"}, {"desc": "Replace Word", "noremap": true, "lhs": "rs", "mode": "n", "rhs": ":%s/\\\\>//gI"}, {"desc": "Smart Rename", "noremap": true, "lhs": "rr", "mode": "n", "rhs": ""}, {"desc": "Swap Previous", "noremap": true, "lhs": "rp", "mode": "n", "rhs": ""}, {"desc": "Swap Next", "noremap": true, "lhs": "rn", "mode": "n", "rhs": ""}, {"desc": "List Definition", "noremap": true, "lhs": "rl", "mode": "n", "rhs": ""}, {"desc": "Previous Usage", "noremap": true, "lhs": "rk", "mode": "n", "rhs": ""}, {"desc": "Next Usage", "noremap": true, "lhs": "rj", "mode": "n", "rhs": ""}, {"desc": "Inline Variable", "noremap": true, "lhs": "ri", "mode": "n", "rhs": "lua require('refactoring').refactor('Inline Variable')"}, {"desc": "List Definition Head", "noremap": true, "lhs": "rh", "mode": "n", "rhs": ""}, {"desc": "Extract To File", "noremap": true, "lhs": "rf", "mode": "n", "rhs": "lua require('refactoring').refactor('Extract Block To File')"}, {"desc": "Extract Block", "noremap": true, "lhs": "re", "mode": "n", "rhs": "lua require('refactoring').refactor('Extract Block')"}, {"desc": "Go To Definition", "noremap": true, "lhs": "rd", "mode": "n", "rhs": ""}, {"desc": "Replace Buffer", "noremap": true, "lhs": "rb", "mode": "n", "rhs": "lua require('spectre').open_file_search()"}, {"desc": "Replace", "noremap": true, "lhs": "rS", "mode": "n", "rhs": "lua require('spectre').open()"}, {"desc": "Refactor Commands", "noremap": true, "lhs": "rR", "mode": "n", "rhs": "lua require('telescope').extensions.refactoring.refactors()"}, {"desc": "Code Runner", "noremap": true, "lhs": "rc", "mode": "n", "rhs": ""}, {"desc": "Write and Quit", "noremap": true, "lhs": "qw", "mode": "n", "rhs": "wq"}, {"desc": "Close Split", "noremap": true, "lhs": "qs", "mode": "n", "rhs": "c"}, {"desc": "Quit", "noremap": true, "lhs": "qq", "mode": "n", "rhs": "q"}, {"desc": "Close Others", "noremap": true, "lhs": "qo", "mode": "n", "rhs": ":%bdelete|b#|bdelete#"}, {"desc": "Force Quit", "noremap": true, "lhs": "qf", "mode": "n", "rhs": "qall!"}, {"desc": "Delete Buffer", "noremap": true, "lhs": "qd", "mode": "n", "rhs": "bdelete"}, {"desc": "Close Buffer", "noremap": true, "lhs": "qc", "mode": "n", "rhs": "bw"}, {"desc": "Quit All", "noremap": true, "lhs": "qa", "mode": "n", "rhs": "qall"}, {"desc": "Save ASCII code snapshot into clipboard", "noremap": true, "lhs": "pi", "mode": "x", "rhs": "CodeSnapASCII"}, {"desc": "Save selected code snapshot in ~/Pictures", "noremap": true, "lhs": "ps", "mode": "x", "rhs": "CodeSnapSave"}, {"desc": "Save selected code snapshot into clipboard", "noremap": true, "lhs": "py", "mode": "x", "rhs": "CodeSnap"}, {"desc": "All Options", "noremap": true, "lhs": "oo", "mode": "n", "rhs": "Telescope vim_options"}, {"desc": "Relative Numbers", "noremap": true, "lhs": "on", "mode": "n", "rhs": "set relativenumber!"}, {"desc": "Highlight Colors", "noremap": true, "lhs": "oh", "mode": "n", "rhs": "Telescope highlights"}, {"desc": "Colorscheme", "noremap": true, "lhs": "oc", "mode": "n", "rhs": "Telescope colorscheme"}, {"desc": "Don't Save Current Session", "noremap": true, "lhs": "md", "mode": "n", "rhs": ""}, {"desc": "Restore Last Session", "noremap": true, "lhs": "ml", "mode": "n", "rhs": ""}, {"desc": "Restore Session", "noremap": true, "lhs": "ms", "mode": "n", "rhs": ""}, {"desc": "Peek Type Definition", "noremap": true, "lhs": "lt", "mode": "n", "rhs": "Lspsaga peek_type_definition"}, {"desc": "Document Symbols", "noremap": true, "lhs": "ls", "mode": "n", "rhs": "Telescope lsp_document_symbols theme=get_ivy"}, {"desc": "Rename", "noremap": true, "lhs": "lr", "mode": "n", "rhs": "Lspsaga rename"}, {"desc": "Stop LSP", "noremap": true, "lhs": "lq", "mode": "n", "rhs": "LspStop"}, {"desc": "Incoming Calls", "noremap": true, "lhs": "lp", "mode": "n", "rhs": "Telescope lsp_incoming_calls"}, {"desc": "Outline", "noremap": true, "lhs": "lo", "mode": "n", "rhs": "Lspsaga outline"}, {"desc": "File Diagnostics", "noremap": true, "lhs": "ll", "mode": "n", "rhs": "Telescope diagnostics layout_strategy=vertical"}, {"desc": "Prev Diagnostic", "noremap": true, "lhs": "lk", "mode": "n", "rhs": "Lspsaga diagnostic_jump_prev"}, {"desc": "Next Diagnostic", "noremap": true, "lhs": "lj", "mode": "n", "rhs": "Lspsaga diagnostic_jump_next"}, {"desc": "LSP Info", "noremap": true, "lhs": "li", "mode": "n", "rhs": "LspInfo"}, {"desc": "Hover", "noremap": true, "lhs": "lh", "mode": "n", "rhs": "Lspsaga hover_doc"}, {"desc": "Goto Definition", "noremap": true, "lhs": "lg", "mode": "n", "rhs": "Lspsaga goto_definition"}, {"desc": "Finder", "noremap": true, "lhs": "lf", "mode": "n", "rhs": "Lspsaga finder"}, {"desc": "Peek Definition", "noremap": true, "lhs": "ld", "mode": "n", "rhs": "Lspsaga peek_definition"}, {"desc": "Code Action", "noremap": true, "lhs": "la", "mode": "n", "rhs": "Lspsaga code_action"}, {"desc": "Goto Type Definition", "noremap": true, "lhs": "lT", "mode": "n", "rhs": "Lspsaga goto_type_definition"}, {"desc": "Workspace Symbols", "noremap": true, "lhs": "lS", "mode": "n", "rhs": "Telescope lsp_dynamic_workspace_symbols"}, {"desc": "Replace", "noremap": true, "lhs": "lR", "mode": "n", "rhs": "Lspsaga project_replace"}, {"desc": "Restart LSP", "noremap": true, "lhs": "lQ", "mode": "n", "rhs": "LspRestart"}, {"desc": "Outgoing Calls", "noremap": true, "lhs": "lP", "mode": "n", "rhs": "Telescope lsp_outgoing_calls"}, {"desc": "Workspace Diagnostics", "noremap": true, "lhs": "lL", "mode": "n", "rhs": "Lspsaga show_workspace_diagnostics"}, {"desc": "References", "noremap": true, "lhs": "lF", "mode": "n", "rhs": "Telescope lsp_references layout_strategy=vertical"}, {"desc": "Toggle keys", "noremap": true, "lhs": "kt", "mode": "n", "rhs": "Screenkey"}, {"desc": "Current Word", "noremap": true, "lhs": "jw", "mode": "n", "rhs": "lua require(\"flash\").jump({ pattern = vim.fn.expand(\"cword>\")})"}, {"desc": "Remote Treesitter", "noremap": true, "lhs": "jt", "mode": "n", "rhs": "lua require('flash').treesitter_search()"}, {"desc": "Search", "noremap": true, "lhs": "js", "mode": "n", "rhs": "lua require('flash').jump()"}, {"desc": "Previous Jump", "noremap": true, "lhs": "jp", "mode": "n", "rhs": "lua require('flash').jump({continue = true})"}, {"desc": "Search Forward", "noremap": true, "lhs": "jn", "mode": "n", "rhs": "lua require('flash').jump({search = { forward = true, wrap = false, multi_window = false },})"}, {"desc": "Forward", "noremap": true, "lhs": "jl", "mode": "n", "rhs": ""}, {"desc": "Treesitter", "noremap": true, "lhs": "jk", "mode": "n", "rhs": "lua require('flash').treesitter()"}, {"desc": "Remote", "noremap": true, "lhs": "jj", "mode": "n", "rhs": "lua require('flash').remote()"}, {"desc": "Backward", "noremap": true, "lhs": "jh", "mode": "n", "rhs": ""}, {"desc": "Jumplist", "noremap": true, "lhs": "jf", "mode": "n", "rhs": "Telescope jumplist"}, {"desc": "Diagnostics", "noremap": true, "lhs": "jd", "mode": "n", "rhs": "FlashDiagnostics"}, {"desc": "Word", "noremap": true, "lhs": "jc", "mode": "n", "rhs": "*"}, {"desc": "Search Backward", "noremap": true, "lhs": "jN", "mode": "n", "rhs": "lua require('flash').jump({search = { forward = false, wrap = false, multi_window = false },})"}, {"desc": "Time", "noremap": true, "lhs": "it", "mode": "n", "rhs": "put =strftime('## %r')"}, {"desc": "Registers", "noremap": true, "lhs": "ir", "mode": "n", "rhs": "Telescope registers"}, {"desc": "Relative Path", "noremap": true, "lhs": "ip", "mode": "n", "rhs": "put %"}, {"desc": "Nerd Glyphs", "noremap": true, "lhs": "in", "mode": "n", "rhs": "Nerdy"}, {"desc": "File Name", "noremap": true, "lhs": "if", "mode": "n", "rhs": "put =expand('%:t')"}, {"desc": "Emojis", "noremap": true, "lhs": "ie", "mode": "n", "rhs": "Telescope symbols"}, {"desc": "Date", "noremap": true, "lhs": "id", "mode": "n", "rhs": "put =strftime('## %a, %d %b, %Y, %r')"}, {"desc": "Absolute Path", "noremap": true, "lhs": "iP", "mode": "n", "rhs": "put %:p"}, {"desc": "Man Pages", "noremap": true, "lhs": "hm", "mode": "n", "rhs": "Telescope man_pages"}, {"desc": "Hover Doc", "noremap": true, "lhs": "hk", "mode": "n", "rhs": "Lspsaga hover_doc"}, {"desc": "Inspect Position", "noremap": true, "lhs": "hi", "mode": "n", "rhs": "vim.show_pos"}, {"desc": "Help Pages", "noremap": true, "lhs": "hh", "mode": "n", "rhs": "Telescope help_tags"}, {"desc": "Fuzzy Find in File", "noremap": true, "lhs": "fs", "mode": "n", "rhs": "Telescope current_buffer_fuzzy_find"}, {"desc": "Quickfix", "noremap": true, "lhs": "fq", "mode": "n", "rhs": "Telescope quickfix"}, {"desc": "Undo History", "noremap": true, "lhs": "fu", "mode": "n", "rhs": "Telescope undo"}, {"desc": "Diagnostics", "noremap": true, "lhs": "fd", "mode": "n", "rhs": "Telescope diagnostics"}, {"desc": "Search History", "noremap": true, "lhs": "ks", "mode": "n", "rhs": "Telescope search_history"}, {"desc": "Command History", "noremap": true, "lhs": "kh", "mode": "n", "rhs": "Telescope command_history"}, {"desc": "Commands", "noremap": true, "lhs": "kc", "mode": "n", "rhs": "Telescope commands"}, {"desc": "Keymaps", "noremap": true, "lhs": "kk", "mode": "n", "rhs": "Telescope keymaps"}, {"desc": "Grep String", "noremap": true, "lhs": "fG", "mode": "n", "rhs": "Telescope grep_string"}, {"desc": "Find Highlight Groups", "noremap": true, "lhs": "fH", "mode": "n", "rhs": "Telescope highlights"}, {"desc": "Marks", "noremap": true, "lhs": "fm", "mode": "n", "rhs": "Telescope marks"}, {"desc": "Old Recent Files", "noremap": true, "lhs": "fo", "mode": "n", "rhs": "Telescope oldfiles"}, {"desc": "Find Help", "noremap": true, "lhs": "fh", "mode": "n", "rhs": "Telescope help_tags"}, {"desc": "Buffers", "noremap": true, "lhs": "fb", "mode": "n", "rhs": "Telescope buffers"}, {"desc": "Live Grep", "noremap": true, "lhs": "fg", "mode": "n", "rhs": "Telescope live_grep"}, {"desc": "Find Files (CWD)", "noremap": true, "lhs": "ff", "mode": "n", "rhs": "Telescope find_files"}, {"desc": "New File", "noremap": true, "lhs": "en", "mode": "n", "rhs": "new"}, {"desc": "Readme", "noremap": true, "lhs": "em", "mode": "n", "rhs": "e README.md"}, {"desc": "File Browser", "noremap": true, "lhs": "ef", "mode": "n", "rhs": "Telescope file_browser"}, {"desc": "Left File Explorer", "noremap": true, "lhs": "eE", "mode": "n", "rhs": ":Neotree toggle left"}, {"desc": "Float File Explorer", "noremap": true, "lhs": "ee", "mode": "n", "rhs": ":Neotree toggle float"}, {"desc": "Config Dir", "noremap": true, "lhs": "ed", "mode": "n", "rhs": "lua require(\"telescope.builtin\").find_files({cwd = vim.fn.stdpath(\"config\")})"}, {"desc": "Config", "noremap": true, "lhs": "ec", "mode": "n", "rhs": "e $MYVIMRC"}, {"desc": "Alternate File", "noremap": true, "lhs": "ea", "mode": "n", "rhs": "b#"}, {"desc": "DB Last query", "noremap": true, "lhs": "dl", "mode": "n", "rhs": "DBUILastQueryInfo"}, {"desc": "DB Rename buffer", "noremap": true, "lhs": "dr", "mode": "n", "rhs": "DBUIRenameBuffer"}, {"desc": "DB Find buffer", "noremap": true, "lhs": "db", "mode": "n", "rhs": "DBUIFindBuffer"}, {"desc": "Toggle DB UI", "noremap": true, "lhs": "du", "mode": "n", "rhs": "DBUIToggle"}, {"desc": "Delete Comment Style", "noremap": true, "lhs": "Cd", "mode": "n", "rhs": "CBd"}, {"desc": "Catalog", "noremap": true, "lhs": "Cc", "mode": "n", "rhs": "CBcatalog"}, {"desc": "Marked", "noremap": true, "lhs": "Cm", "mode": "n", "rhs": "CBllbox14"}, {"desc": "Line", "noremap": true, "lhs": "Cl", "mode": "n", "rhs": "CBline"}, {"desc": "Tiled line", "noremap": true, "lhs": "Ct", "mode": "n", "rhs": "CBllline"}, {"desc": "Comment Box", "noremap": true, "lhs": "Cb", "mode": "n", "rhs": "CBccbox"}, {"desc": "Reload Module", "noremap": true, "lhs": "cr", "mode": "n", "rhs": "Telescope reloader"}, {"desc": "Pick Color", "noremap": true, "lhs": "cp", "mode": "n", "rhs": "CccPick"}, {"desc": "Dashboard", "noremap": true, "lhs": "co", "mode": "n", "rhs": "Dashboard"}, {"desc": "Notifications", "noremap": true, "lhs": "cn", "mode": "n", "rhs": "Telescope notify"}, {"desc": "Markdown Preview", "noremap": true, "lhs": "cm", "mode": "n", "rhs": "MarkdownPreviewToggle"}, {"desc": "Clean Empty Lines", "noremap": true, "lhs": "cl", "mode": "n", "rhs": ":g/^\\s*$/d"}, {"desc": "Hardtime", "noremap": true, "lhs": "ch", "mode": "n", "rhs": "Hardtime toggle"}, {"desc": "Root Directory", "noremap": true, "lhs": "cd", "mode": "n", "rhs": "RootDir"}, {"desc": "Highlight Colors", "noremap": true, "lhs": "cc", "mode": "n", "rhs": "CccHighlighterToggle"}, {"desc": "Reload Configs", "noremap": true, "lhs": "cR", "mode": "n", "rhs": "ReloadConfig"}, {"desc": "Convert Color", "noremap": true, "lhs": "cP", "mode": "n", "rhs": "CccConvert"}, {"desc": "Fix Tabs", "noremap": true, "lhs": "cF", "mode": "n", "rhs": "retab"}, {"desc": "Toggle Alternate", "noremap": true, "lhs": "a", "mode": "n", "rhs": "Alternate"}, {"desc": "Exit", "noremap": true, "lhs": "bx", "mode": "n", "rhs": "DapTerminate"}, {"desc": "Debugger", "noremap": true, "lhs": "bt", "mode": "n", "rhs": "DapUIToggle"}, {"desc": "Repl", "noremap": true, "lhs": "br", "mode": "n", "rhs": "DapToggleRepl"}, {"desc": "Over", "noremap": true, "lhs": "bo", "mode": "n", "rhs": "DapStepOver"}, {"desc": "Last", "noremap": true, "lhs": "bl", "mode": "n", "rhs": "lua require'dap'.run_last()"}, {"desc": "Into", "noremap": true, "lhs": "bi", "mode": "n", "rhs": "DapStepInto"}, {"desc": "Continue", "noremap": true, "lhs": "bc", "mode": "n", "rhs": "DapContinue"}, {"desc": "Breakpoint", "noremap": true, "lhs": "bb", "mode": "n", "rhs": "DapToggleBreakpoint"}, {"desc": "Restart Frame", "noremap": true, "lhs": "bR", "mode": "n", "rhs": "DapRestartFrame"}, {"desc": "Out", "noremap": true, "lhs": "bO", "mode": "n", "rhs": "DapStepOut"}, {"desc": "Dismiss All Notifications", "noremap": true, "lhs": "mn", "mode": "n", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "mt", "mode": "n", "rhs": "lua require(\"onedark\").toggle()"}, {"desc": "", "noremap": false, "lhs": "/", "mode": "v", "rhs": "gcc"}, {"desc": "", "noremap": false, "lhs": "/", "mode": "n", "rhs": "gcc"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": ""}, {"desc": ":help v_#-default", "noremap": true, "lhs": "#", "mode": "x", "rhs": ""}, {"desc": "", "noremap": false, "lhs": "%", "mode": "x", "rhs": "(MatchitVisualForward)"}, {"desc": "", "noremap": false, "lhs": "%", "mode": "n", "rhs": "(MatchitNormalForward)"}, {"desc": ":help &-default", "noremap": true, "lhs": "&", "mode": "n", "rhs": ":&&"}, {"desc": ":help v_star-default", "noremap": true, "lhs": "*", "mode": "x", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "-", "mode": "x", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "-", "mode": "n", "rhs": ""}, {"desc": "Highlight and snapshot selected code into clipboard", "noremap": true, "lhs": "h", "mode": "x", "rhs": "CodeSnapHighlight"}, {"desc": "", "noremap": true, "lhs": "<", "mode": "v", "rhs": "gv"}, {"desc": "", "noremap": true, "lhs": "=", "mode": "x", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "=", "mode": "n", "rhs": ""}, {"desc": "", "noremap": true, "lhs": ">", "mode": "v", "rhs": ">gv"}, {"desc": ":help v_@-default", "noremap": true, "lhs": "@", "mode": "x", "rhs": "mode() ==# 'V' ? ':normal! @'.getcharstr().'' : '@'"}, {"desc": "Previous Buffer", "noremap": true, "lhs": "H", "mode": "n", "rhs": "bprevious"}, {"desc": "", "noremap": true, "lhs": "J", "mode": "x", "rhs": ":move '>+1gv-gv"}, {"desc": "", "noremap": true, "lhs": "J", "mode": "n", "rhs": "mzJ`z"}, {"desc": "LSP Hover", "noremap": true, "lhs": "K", "mode": "n", "rhs": "Lspsaga hover_doc"}, {"desc": "", "noremap": true, "lhs": "K", "mode": "x", "rhs": ":move '-2gv-gv"}, {"desc": "Next Buffer", "noremap": true, "lhs": "L", "mode": "n", "rhs": "bnext"}, {"desc": "Prev search result", "noremap": true, "lhs": "N", "mode": "x", "rhs": "'nN'[v:searchforward]"}, {"desc": "Prev search result", "noremap": true, "lhs": "N", "mode": "n", "rhs": "'nN'[v:searchforward]"}, {"desc": "Put yanked text before cursor", "noremap": true, "lhs": "P", "mode": "x", "rhs": "(YankyPutBefore)"}, {"desc": "Put yanked text before cursor", "noremap": true, "lhs": "P", "mode": "n", "rhs": "(YankyPutBefore)"}, {"desc": "Force Quit!", "noremap": true, "lhs": "Q", "mode": "n", "rhs": "qall!"}, {"desc": ":help v_Q-default", "noremap": true, "lhs": "Q", "mode": "x", "rhs": "mode() ==# 'V' ? ':normal! @=reg_recorded()' : 'Q'"}, {"desc": "Flash Treesitter", "noremap": true, "lhs": "S", "mode": "x", "rhs": ""}, {"desc": "Flash Treesitter", "noremap": true, "lhs": "S", "mode": "n", "rhs": ""}, {"desc": "Redo", "noremap": true, "lhs": "U", "mode": "n", "rhs": "redo"}, {"desc": ":help Y-default", "noremap": true, "lhs": "Y", "mode": "n", "rhs": "y$"}, {"desc": "Git Hunk", "noremap": true, "lhs": "[g", "mode": "n", "rhs": "Gitsigns prev_hunk"}, {"desc": "Edit", "noremap": true, "lhs": "[e", "mode": "n", "rhs": "g;"}, {"desc": "Undo backward", "noremap": true, "lhs": "[u", "mode": "n", "rhs": "lua MiniBracketed.undo('backward')"}, {"desc": "Undo first", "noremap": true, "lhs": "[U", "mode": "n", "rhs": "lua MiniBracketed.undo('first')"}, {"desc": "Treesitter backward", "noremap": true, "lhs": "[n", "mode": "x", "rhs": "lua MiniBracketed.treesitter('backward')"}, {"desc": "Treesitter backward", "noremap": true, "lhs": "[n", "mode": "n", "rhs": "lua MiniBracketed.treesitter('backward')"}, {"desc": "Treesitter first", "noremap": true, "lhs": "[N", "mode": "x", "rhs": "lua MiniBracketed.treesitter('first')"}, {"desc": "Treesitter first", "noremap": true, "lhs": "[N", "mode": "n", "rhs": "lua MiniBracketed.treesitter('first')"}, {"desc": "Location backward", "noremap": true, "lhs": "[l", "mode": "n", "rhs": "lua MiniBracketed.location('backward')"}, {"desc": "Location first", "noremap": true, "lhs": "[L", "mode": "n", "rhs": "lua MiniBracketed.location('first')"}, {"desc": "Oldfile backward", "noremap": true, "lhs": "[o", "mode": "n", "rhs": "lua MiniBracketed.oldfile('backward')"}, {"desc": "Oldfile first", "noremap": true, "lhs": "[O", "mode": "n", "rhs": "lua MiniBracketed.oldfile('first')"}, {"desc": "Jump", "noremap": true, "lhs": "[j", "mode": "n", "rhs": ""}, {"desc": "Jump first", "noremap": true, "lhs": "[J", "mode": "n", "rhs": "lua MiniBracketed.jump('first')"}, {"desc": "Indent backward", "noremap": true, "lhs": "[i", "mode": "x", "rhs": "lua MiniBracketed.indent('backward')"}, {"desc": "Indent backward", "noremap": true, "lhs": "[i", "mode": "n", "rhs": "lua MiniBracketed.indent('backward')"}, {"desc": "Indent first", "noremap": true, "lhs": "[I", "mode": "x", "rhs": "lua MiniBracketed.indent('first')"}, {"desc": "Indent first", "noremap": true, "lhs": "[I", "mode": "n", "rhs": "lua MiniBracketed.indent('first')"}, {"desc": "Diagnostic backward", "noremap": true, "lhs": "[d", "mode": "x", "rhs": "lua MiniBracketed.diagnostic('backward')"}, {"desc": "Diagnostic first", "noremap": true, "lhs": "[D", "mode": "x", "rhs": "lua MiniBracketed.diagnostic('first')"}, {"desc": "Diagnostic first", "noremap": true, "lhs": "[D", "mode": "n", "rhs": "lua MiniBracketed.diagnostic('first')"}, {"desc": "Conflict backward", "noremap": true, "lhs": "[x", "mode": "x", "rhs": "lua MiniBracketed.conflict('backward')"}, {"desc": "Conflict backward", "noremap": true, "lhs": "[x", "mode": "n", "rhs": "lua MiniBracketed.conflict('backward')"}, {"desc": "Conflict first", "noremap": true, "lhs": "[X", "mode": "x", "rhs": "lua MiniBracketed.conflict('first')"}, {"desc": "Conflict first", "noremap": true, "lhs": "[X", "mode": "n", "rhs": "lua MiniBracketed.conflict('first')"}, {"desc": "Comment backward", "noremap": true, "lhs": "[c", "mode": "x", "rhs": "lua MiniBracketed.comment('backward')"}, {"desc": "Comment backward", "noremap": true, "lhs": "[c", "mode": "n", "rhs": "lua MiniBracketed.comment('backward')"}, {"desc": "Comment first", "noremap": true, "lhs": "[C", "mode": "x", "rhs": "lua MiniBracketed.comment('first')"}, {"desc": "Comment first", "noremap": true, "lhs": "[C", "mode": "n", "rhs": "lua MiniBracketed.comment('first')"}, {"desc": "Buffer", "noremap": true, "lhs": "[b", "mode": "n", "rhs": "bprevious"}, {"desc": "First Buffer", "noremap": true, "lhs": "[B", "mode": "n", "rhs": "bfirst"}, {"desc": "", "noremap": false, "lhs": "[%", "mode": "x", "rhs": "(MatchitVisualMultiBackward)"}, {"desc": "", "noremap": false, "lhs": "[%", "mode": "n", "rhs": "(MatchitNormalMultiBackward)"}, {"desc": "Diagnostic", "noremap": true, "lhs": "[d", "mode": "n", "rhs": "Lspsaga diagnostic_jump_prev"}, {"desc": "Git Hunk", "noremap": true, "lhs": "]g", "mode": "n", "rhs": "Gitsigns next_hunk"}, {"desc": "Edit", "noremap": true, "lhs": "]e", "mode": "n", "rhs": "g,"}, {"desc": "Undo forward", "noremap": true, "lhs": "]u", "mode": "n", "rhs": "lua MiniBracketed.undo('forward')"}, {"desc": "Undo last", "noremap": true, "lhs": "]U", "mode": "n", "rhs": "lua MiniBracketed.undo('last')"}, {"desc": "Treesitter forward", "noremap": true, "lhs": "]n", "mode": "x", "rhs": "lua MiniBracketed.treesitter('forward')"}, {"desc": "Treesitter forward", "noremap": true, "lhs": "]n", "mode": "n", "rhs": "lua MiniBracketed.treesitter('forward')"}, {"desc": "Treesitter last", "noremap": true, "lhs": "]N", "mode": "x", "rhs": "lua MiniBracketed.treesitter('last')"}, {"desc": "Treesitter last", "noremap": true, "lhs": "]N", "mode": "n", "rhs": "lua MiniBracketed.treesitter('last')"}, {"desc": "Location forward", "noremap": true, "lhs": "]l", "mode": "n", "rhs": "lua MiniBracketed.location('forward')"}, {"desc": "Location last", "noremap": true, "lhs": "]L", "mode": "n", "rhs": "lua MiniBracketed.location('last')"}, {"desc": "Oldfile forward", "noremap": true, "lhs": "]o", "mode": "n", "rhs": "lua MiniBracketed.oldfile('forward')"}, {"desc": "Oldfile last", "noremap": true, "lhs": "]O", "mode": "n", "rhs": "lua MiniBracketed.oldfile('last')"}, {"desc": "Jump", "noremap": true, "lhs": "]j", "mode": "n", "rhs": ""}, {"desc": "Jump last", "noremap": true, "lhs": "]J", "mode": "n", "rhs": "lua MiniBracketed.jump('last')"}, {"desc": "Indent forward", "noremap": true, "lhs": "]i", "mode": "x", "rhs": "lua MiniBracketed.indent('forward')"}, {"desc": "Indent forward", "noremap": true, "lhs": "]i", "mode": "n", "rhs": "lua MiniBracketed.indent('forward')"}, {"desc": "Indent last", "noremap": true, "lhs": "]I", "mode": "x", "rhs": "lua MiniBracketed.indent('last')"}, {"desc": "Indent last", "noremap": true, "lhs": "]I", "mode": "n", "rhs": "lua MiniBracketed.indent('last')"}, {"desc": "Diagnostic forward", "noremap": true, "lhs": "]d", "mode": "x", "rhs": "lua MiniBracketed.diagnostic('forward')"}, {"desc": "Diagnostic last", "noremap": true, "lhs": "]D", "mode": "x", "rhs": "lua MiniBracketed.diagnostic('last')"}, {"desc": "Diagnostic last", "noremap": true, "lhs": "]D", "mode": "n", "rhs": "lua MiniBracketed.diagnostic('last')"}, {"desc": "Conflict forward", "noremap": true, "lhs": "]x", "mode": "x", "rhs": "lua MiniBracketed.conflict('forward')"}, {"desc": "Conflict forward", "noremap": true, "lhs": "]x", "mode": "n", "rhs": "lua MiniBracketed.conflict('forward')"}, {"desc": "Conflict last", "noremap": true, "lhs": "]X", "mode": "x", "rhs": "lua MiniBracketed.conflict('last')"}, {"desc": "Conflict last", "noremap": true, "lhs": "]X", "mode": "n", "rhs": "lua MiniBracketed.conflict('last')"}, {"desc": "Comment forward", "noremap": true, "lhs": "]c", "mode": "x", "rhs": "lua MiniBracketed.comment('forward')"}, {"desc": "Comment forward", "noremap": true, "lhs": "]c", "mode": "n", "rhs": "lua MiniBracketed.comment('forward')"}, {"desc": "Comment last", "noremap": true, "lhs": "]C", "mode": "x", "rhs": "lua MiniBracketed.comment('last')"}, {"desc": "Comment last", "noremap": true, "lhs": "]C", "mode": "n", "rhs": "lua MiniBracketed.comment('last')"}, {"desc": "Buffer", "noremap": true, "lhs": "]b", "mode": "n", "rhs": "bnext"}, {"desc": "Buffer", "noremap": true, "lhs": "]B", "mode": "n", "rhs": "blast"}, {"desc": "", "noremap": false, "lhs": "]%", "mode": "x", "rhs": "(MatchitVisualMultiForward)"}, {"desc": "", "noremap": false, "lhs": "]%", "mode": "n", "rhs": "(MatchitNormalMultiForward)"}, {"desc": "Diagnostic", "noremap": true, "lhs": "]d", "mode": "n", "rhs": "Lspsaga diagnostic_jump_next"}, {"desc": "Around last textobject", "noremap": false, "lhs": "al", "mode": "x", "rhs": ""}, {"desc": "Around next textobject", "noremap": false, "lhs": "an", "mode": "x", "rhs": ""}, {"desc": "Around textobject", "noremap": false, "lhs": "a", "mode": "x", "rhs": ""}, {"desc": "", "noremap": false, "lhs": "a%", "mode": "x", "rhs": "(MatchitVisualTextObject)"}, {"desc": "Change without replacing clipboad", "noremap": true, "lhs": "c", "mode": "n", "rhs": "\"_c"}, {"desc": "Delete without replacing clipboad", "noremap": true, "lhs": "d", "mode": "n", "rhs": "\"_d"}, {"desc": "Put yanked text before selection", "noremap": true, "lhs": "gP", "mode": "x", "rhs": "(YankyGPutBefore)"}, {"desc": "Put yanked text before selection", "noremap": true, "lhs": "gP", "mode": "n", "rhs": "(YankyGPutBefore)"}, {"desc": "Put yanked text after selection", "noremap": true, "lhs": "gp", "mode": "x", "rhs": "(YankyGPutAfter)"}, {"desc": "Put yanked text after selection", "noremap": true, "lhs": "gp", "mode": "n", "rhs": "(YankyGPutAfter)"}, {"desc": "Highlight next surrounding", "noremap": true, "lhs": "gshn", "mode": "n", "rhs": ""}, {"desc": "Find next left surrounding", "noremap": true, "lhs": "gsFn", "mode": "n", "rhs": ""}, {"desc": "Find next right surrounding", "noremap": true, "lhs": "gsfn", "mode": "n", "rhs": ""}, {"desc": "Replace next surrounding", "noremap": true, "lhs": "gsrn", "mode": "n", "rhs": ""}, {"desc": "Delete next surrounding", "noremap": true, "lhs": "gsdn", "mode": "n", "rhs": ""}, {"desc": "Highlight previous surrounding", "noremap": true, "lhs": "gshl", "mode": "n", "rhs": ""}, {"desc": "Find previous left surrounding", "noremap": true, "lhs": "gsFl", "mode": "n", "rhs": ""}, {"desc": "Find previous right surrounding", "noremap": true, "lhs": "gsfl", "mode": "n", "rhs": ""}, {"desc": "Replace previous surrounding", "noremap": true, "lhs": "gsrl", "mode": "n", "rhs": ""}, {"desc": "Delete previous surrounding", "noremap": true, "lhs": "gsdl", "mode": "n", "rhs": ""}, {"desc": "Add surrounding to selection", "noremap": true, "lhs": "gsa", "mode": "x", "rhs": ":lua MiniSurround.add('visual')"}, {"desc": "Update `MiniSurround.config.n_lines`", "noremap": true, "lhs": "gsn", "mode": "n", "rhs": ""}, {"desc": "Highlight surrounding", "noremap": true, "lhs": "gsh", "mode": "n", "rhs": ""}, {"desc": "Find left surrounding", "noremap": true, "lhs": "gsF", "mode": "n", "rhs": ""}, {"desc": "Find right surrounding", "noremap": true, "lhs": "gsf", "mode": "n", "rhs": ""}, {"desc": "Replace surrounding", "noremap": true, "lhs": "gsr", "mode": "n", "rhs": ""}, {"desc": "Delete surrounding", "noremap": true, "lhs": "gsd", "mode": "n", "rhs": ""}, {"desc": "Add surrounding", "noremap": true, "lhs": "gsa", "mode": "n", "rhs": ""}, {"desc": "Move to right \"around\"", "noremap": false, "lhs": "g]", "mode": "x", "rhs": ""}, {"desc": "Move to right \"around\"", "noremap": false, "lhs": "g]", "mode": "n", "rhs": ""}, {"desc": "Move to left \"around\"", "noremap": false, "lhs": "g[", "mode": "x", "rhs": ""}, {"desc": "Move to left \"around\"", "noremap": false, "lhs": "g[", "mode": "n", "rhs": ""}, {"desc": "", "noremap": false, "lhs": "g%", "mode": "x", "rhs": "(MatchitVisualBackward)"}, {"desc": "", "noremap": false, "lhs": "g%", "mode": "n", "rhs": "(MatchitNormalBackward)"}, {"desc": "Beginning of line", "noremap": true, "lhs": "gh", "mode": "x", "rhs": "^"}, {"desc": "Beginning of line", "noremap": true, "lhs": "gh", "mode": "n", "rhs": "^"}, {"desc": "End of line", "noremap": true, "lhs": "gl", "mode": "x", "rhs": "$"}, {"desc": "End of line", "noremap": true, "lhs": "gl", "mode": "n", "rhs": "$"}, {"desc": "Comment line", "noremap": true, "lhs": "gcc", "mode": "n", "rhs": ""}, {"desc": "Comment selection", "noremap": true, "lhs": "gc", "mode": "x", "rhs": ""}, {"desc": "Comment", "noremap": true, "lhs": "gc", "mode": "n", "rhs": ""}, {"desc": "Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)", "noremap": true, "lhs": "gx", "mode": "x", "rhs": ""}, {"desc": "Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)", "noremap": true, "lhs": "gx", "mode": "n", "rhs": ""}, {"desc": "Inside last textobject", "noremap": false, "lhs": "il", "mode": "x", "rhs": ""}, {"desc": "Inside next textobject", "noremap": false, "lhs": "in", "mode": "x", "rhs": ""}, {"desc": "Inside textobject", "noremap": false, "lhs": "i", "mode": "x", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "j", "mode": "n", "rhs": "v:count == 0 ? 'gj' : 'j'"}, {"desc": "", "noremap": true, "lhs": "k", "mode": "n", "rhs": "v:count == 0 ? 'gk' : 'k'"}, {"desc": "Next search result", "noremap": true, "lhs": "n", "mode": "x", "rhs": "'Nn'[v:searchforward]"}, {"desc": "Next search result", "noremap": true, "lhs": "n", "mode": "n", "rhs": "'Nn'[v:searchforward]"}, {"desc": "Put yanked text after cursor", "noremap": true, "lhs": "p", "mode": "x", "rhs": "(YankyPutAfter)"}, {"desc": "Put yanked text after cursor", "noremap": true, "lhs": "p", "mode": "n", "rhs": "(YankyPutAfter)"}, {"desc": "Flash", "noremap": true, "lhs": "s", "mode": "n", "rhs": ""}, {"desc": "Flash", "noremap": true, "lhs": "s", "mode": "x", "rhs": ""}, {"desc": "", "noremap": true, "lhs": "u", "mode": "n", "rhs": "ulua MiniBracketed.register_undo_state()"}, {"desc": "Cut without replacing clipboad", "noremap": true, "lhs": "x", "mode": "n", "rhs": "\"_x"}, {"desc": "", "noremap": true, "lhs": "x", "mode": "x", "rhs": "\"_x"}, {"desc": "Yank text", "noremap": true, "lhs": "y", "mode": "x", "rhs": "(YankyYank)"}, {"desc": "Yank text", "noremap": true, "lhs": "y", "mode": "n", "rhs": "(YankyYank)"}, {"desc": "Multi Edit Next", "noremap": true, "lhs": "", "mode": "n", "rhs": ":call vm#commands#ctrln(v:count1)"}, {"desc": "Add Cursor Down", "noremap": true, "lhs": "", "mode": "n", "rhs": ":call vm#commands#add_cursor_up(0, v:count1)"}, {"desc": "Add Cursor Down", "noremap": true, "lhs": "", "mode": "n", "rhs": ":call vm#commands#add_cursor_down(0, v:count1)"}, {"desc": "Add Cursor Up", "noremap": true, "lhs": "", "mode": "n", "rhs": ":call vm#commands#add_cursor_up(0, v:count1)"}, {"desc": "Add Cursor Down", "noremap": true, "lhs": "", "mode": "n", "rhs": ":call vm#commands#add_cursor_down(0, v:count1)"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "(YankyCycleBackward)"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "(YankyCycleForward)"}, {"desc": "Previous Buffer", "noremap": true, "lhs": "", "mode": "n", "rhs": "bprevious"}, {"desc": "Previous Pane", "noremap": true, "lhs": "", "mode": "n", "rhs": "p"}, {"desc": "Move Up", "noremap": true, "lhs": "", "mode": "n", "rhs": "k"}, {"desc": "Move Down", "noremap": true, "lhs": "", "mode": "n", "rhs": "j"}, {"desc": "Move Left", "noremap": true, "lhs": "", "mode": "n", "rhs": "h"}, {"desc": "Lazygit", "noremap": true, "lhs": "", "mode": "n", "rhs": "Fterm lazygit"}, {"desc": "Find Files", "noremap": true, "lhs": "", "mode": "n", "rhs": "Telescope find_files"}, {"desc": "Increase window height", "noremap": true, "lhs": "", "mode": "n", "rhs": "resize +10which_key.add(no_leader_mappings)"}, {"desc": "Increase window width", "noremap": true, "lhs": "", "mode": "n", "rhs": "vertical resize +10"}, {"desc": "Decrease window width", "noremap": true, "lhs": "", "mode": "n", "rhs": "vertical resize -10"}, {"desc": "Decrease window height", "noremap": true, "lhs": "", "mode": "n", "rhs": "resize -10"}, {"desc": "Move line up", "noremap": true, "lhs": "", "mode": "n", "rhs": "lua MiniMove.move_line('up')"}, {"desc": "Move line down", "noremap": true, "lhs": "", "mode": "n", "rhs": "lua MiniMove.move_line('down')"}, {"desc": "Move line right", "noremap": true, "lhs": "", "mode": "n", "rhs": "lua MiniMove.move_line('right')"}, {"desc": "Move line left", "noremap": true, "lhs": "", "mode": "n", "rhs": "lua MiniMove.move_line('left')"}, {"desc": "Move up", "noremap": true, "lhs": "", "mode": "x", "rhs": "lua MiniMove.move_selection('up')"}, {"desc": "Move down", "noremap": true, "lhs": "", "mode": "x", "rhs": "lua MiniMove.move_selection('down')"}, {"desc": "Move right", "noremap": true, "lhs": "", "mode": "x", "rhs": "lua MiniMove.move_selection('right')"}, {"desc": "Move left", "noremap": true, "lhs": "", "mode": "x", "rhs": "lua MiniMove.move_selection('left')"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "lua MiniBracketed.register_undo_state()"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "zz"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "zz"}, {"desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "ggVG"}, {"desc": "Show diagnostics under the cursor", "noremap": false, "lhs": "", "mode": "n", "rhs": "d"}, {"desc": "Show diagnostics under the cursor", "noremap": true, "lhs": "d", "mode": "n", "rhs": ""}, {"desc": "Move Right", "noremap": true, "lhs": "", "mode": "n", "rhs": "l"}], "plugins": ["2kabhishek/nerdy.nvim", "2kabhishek/termim.nvim", "Exafunction/codeium.vim", "HiPhish/rainbow-delimiters.nvim", "L3MON4D3/LuaSnip", "LudoPinelli/comment-box.nvim", "LunarVim/bigfile.nvim", "MunifTanjim/nui.nvim", "NStefan002/screenkey.nvim", "ThePrimeagen/refactoring.nvim", "akinsho/toggleterm.nvim", "altermo/ultimate-autopair.nvim", "antosha417/nvim-lsp-file-operations", "creativenull/dotfyle-metadata.nvim", "debugloop/telescope-undo.nvim", "echasnovski/mini.files", "echasnovski/mini.icons", "echasnovski/mini.nvim", "folke/flash.nvim", "folke/lazy.nvim", "folke/noice.nvim", "folke/persistence.nvim", "folke/trouble.nvim", "folke/twilight.nvim", "folke/which-key.nvim", "folke/zen-mode.nvim", "gbprod/yanky.nvim", "hrsh7th/cmp-buffer", "hrsh7th/cmp-cmdline", "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp-signature-help", "hrsh7th/cmp-nvim-lua", "hrsh7th/cmp-path", "hrsh7th/nvim-cmp", "iamcco/markdown-preview.nvim", "kristijanhusak/vim-dadbod-completion", "kristijanhusak/vim-dadbod-ui", "lukas-reineke/indent-blankline.nvim", "m-demare/hlargs.nvim", "m4xshen/hardtime.nvim", "max397574/better-escape.nvim", "mfussenegger/nvim-dap", "mfussenegger/nvim-lint", "mg979/vim-visual-multi", "michaelb/sniprun", "mistricky/codesnap.nvim", "mstuttgart/odoo-snippets", "mvllow/modes.nvim", "nacro90/numb.nvim", "navarasu/onedark.nvim", "neovim/nvim-lspconfig", "numToStr/Navigator.nvim", "nvim-lua/plenary.nvim", "nvim-lualine/lualine.nvim", "nvim-neo-tree/neo-tree.nvim", "nvim-neotest/neotest", "nvim-neotest/neotest-jest", "nvim-neotest/neotest-python", "nvim-neotest/nvim-nio", "nvim-pack/nvim-spectre", "nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-fzf-native.nvim", "nvim-telescope/telescope-symbols.nvim", "nvim-telescope/telescope-ui-select.nvim", "nvim-telescope/telescope.nvim", "nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-textobjects", "nvimdev/dashboard-nvim", "nvimdev/lspsaga.nvim", "olimorris/neotest-rspec", "onsails/lspkind.nvim", "rafamadriz/friendly-snippets", "rcarriga/nvim-dap-ui", "rcarriga/nvim-notify", "rshkarin/mason-nvim-lint", "saadparwaiz1/cmp_luasnip", "smjonas/inc-rename.nvim", "stevearc/conform.nvim", "stevearc/dressing.nvim", "ton/vim-alternate", "tpope/vim-dadbod", "uga-rosa/ccc.nvim", "wakatime/vim-wakatime", "williamboman/mason-lspconfig.nvim", "williamboman/mason.nvim", "willothy/flatten.nvim", "windwp/nvim-ts-autotag", "zapling/mason-conform.nvim", "zapling/mason-lock.nvim"], "pluginManager": "lazy.nvim", "treesitterParsers": ["bash", "c", "cpp", "css", "html", "java", "javascript", "json", "liquid", "lua", "markdown", "markdown_inline", "python", "scss", "toml", "tsx", "typescript", "vim", "vimdoc"], "lspServers": ["basedpyright", "bashls", "clangd", "cssls", "emmet_ls", "jdtls", "jsonls", "lua_ls", "pyright", "ruff", "tailwindcss", "tsserver"], "leaderKey": ""} \ No newline at end of file +{ + "distribution": "custom", + "masonTools": [ + "basedpyright", + "basedpyright-langserver", + "bash-language-server", + "black", + "clang-format", + "clangd", + "codespell", + "cspell", + "emmet-ls", + "eslint_d", + "isort", + "jdtls", + "lua-language-server", + "markdownlint", + "mypy", + "phpcs", + "prettier", + "pylint", + "pyright", + "pyright-langserver", + "ruff", + "shfmt", + "stylua", + "tailwindcss-language-server", + "trivy", + "typescript-language-server", + "vscode-css-language-server", + "vscode-json-language-server" + ], + "keymaps": [ + { + "desc": "Next Buffer", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "bnext" + }, + { + "desc": "Escape and clear hlsearch", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "noh" + }, + { + "desc": "Copy Git URL", + "noremap": true, + "lhs": "yg", + "mode": "v", + "rhs": "lua require\"gitlinker\".get_buf_range_url(\"v\")" + }, + { + "desc": "Extract Variable", + "noremap": true, + "lhs": "rv", + "mode": "v", + "rhs": "lua require('refactoring').refactor('Extract Variable')" + }, + { + "desc": "Refactor Commands", + "noremap": true, + "lhs": "rr", + "mode": "v", + "rhs": "lua require('telescope').extensions.refactoring.refactors()" + }, + { + "desc": "Inline Variable", + "noremap": true, + "lhs": "ri", + "mode": "v", + "rhs": "lua require('refactoring').refactor('Inline Variable')" + }, + { + "desc": "Extract To File", + "noremap": true, + "lhs": "rf", + "mode": "v", + "rhs": "lua require('refactoring').refactor('Extract Function To File')" + }, + { + "desc": "Extract Function", + "noremap": true, + "lhs": "re", + "mode": "v", + "rhs": "lua require('refactoring').refactor('Extract Function')" + }, + { + "desc": "Current Word", + "noremap": true, + "lhs": "jw", + "mode": "v", + "rhs": "lua require(\"flash\").jump({ pattern = vim.fn.expand(\"cword>\")})" + }, + { + "desc": "Remote Treesitter", + "noremap": true, + "lhs": "jt", + "mode": "v", + "rhs": "lua require('flash').treesitter_search()" + }, + { + "desc": "Search", + "noremap": true, + "lhs": "js", + "mode": "v", + "rhs": "lua require('flash').jump()" + }, + { + "desc": "Previous Jump", + "noremap": true, + "lhs": "jp", + "mode": "v", + "rhs": "lua require('flash').jump({continue = true})" + }, + { + "desc": "Search Forward", + "noremap": true, + "lhs": "jn", + "mode": "v", + "rhs": "lua require('flash').jump({search = { forward = true, wrap = false, multi_window = false },})" + }, + { + "desc": "Treesitter", + "noremap": true, + "lhs": "jk", + "mode": "v", + "rhs": "lua require('flash').treesitter()" + }, + { + "desc": "Remote", + "noremap": true, + "lhs": "jj", + "mode": "v", + "rhs": "lua require('flash').remote()" + }, + { + "desc": "Diagnostics", + "noremap": true, + "lhs": "jd", + "mode": "v", + "rhs": "FlashDiagnostics" + }, + { + "desc": "Search Backward", + "noremap": true, + "lhs": "jN", + "mode": "v", + "rhs": "lua require('flash').jump({search = { forward = false, wrap = false, multi_window = false },})" + }, + { + "desc": "Delete Comment Style", + "noremap": true, + "lhs": "Cd", + "mode": "v", + "rhs": "CBd" + }, + { + "desc": "Catalog", + "noremap": true, + "lhs": "Cc", + "mode": "v", + "rhs": "CBcatalog" + }, + { + "desc": "Marked", + "noremap": true, + "lhs": "Cm", + "mode": "v", + "rhs": "CBllbox14" + }, + { + "desc": "Line", + "noremap": true, + "lhs": "Cl", + "mode": "v", + "rhs": "CBline" + }, + { + "desc": "Tiled line", + "noremap": true, + "lhs": "Ct", + "mode": "v", + "rhs": "CBllline" + }, + { + "desc": "Comment Box", + "noremap": true, + "lhs": "Cb", + "mode": "v", + "rhs": "CBccbox" + }, + { + "desc": "Run Code", + "noremap": true, + "lhs": "cx", + "mode": "v", + "rhs": "','>SnipRun" + }, + { + "desc": "Unique", + "noremap": true, + "lhs": "cu", + "mode": "v", + "rhs": ":!uniq" + }, + { + "desc": "Sort Asc", + "noremap": true, + "lhs": "cs", + "mode": "v", + "rhs": ":sort" + }, + { + "desc": "Sort Case Insensitive", + "noremap": true, + "lhs": "ci", + "mode": "v", + "rhs": ":sort i" + }, + { + "desc": "Sort Desc", + "noremap": true, + "lhs": "cS", + "mode": "v", + "rhs": ":sort!" + }, + { + "desc": "Copy Git URL", + "noremap": true, + "lhs": "yg", + "mode": "n", + "rhs": "lua require\"gitlinker\".get_buf_range_url()" + }, + { + "desc": "File Name", + "noremap": true, + "lhs": "yf", + "mode": "n", + "rhs": "CopyFileName" + }, + { + "desc": "Copy Whole File", + "noremap": true, + "lhs": "ya", + "mode": "n", + "rhs": "%y+" + }, + { + "desc": "Absolute Path", + "noremap": true, + "lhs": "yP", + "mode": "n", + "rhs": "CopyAbsolutePath" + }, + { + "desc": "Relative Path", + "noremap": true, + "lhs": "yp", + "mode": "n", + "rhs": "CopyRelativePath" + }, + { + "desc": "Quickfix List (Trouble)", + "noremap": true, + "lhs": "xQ", + "mode": "n", + "rhs": "Trouble qflist toggle" + }, + { + "desc": "Location List (Trouble)", + "noremap": true, + "lhs": "xL", + "mode": "n", + "rhs": "Trouble loclist toggle" + }, + { + "desc": "LSP references/definitions/... (Trouble)", + "noremap": true, + "lhs": "xS", + "mode": "n", + "rhs": "Trouble lsp toggle" + }, + { + "desc": "Symbols (Trouble)", + "noremap": true, + "lhs": "xs", + "mode": "n", + "rhs": "Trouble symbols toggle" + }, + { + "desc": "Buffer Diagnostics (Trouble)", + "noremap": true, + "lhs": "xX", + "mode": "n", + "rhs": "Trouble diagnostics toggle filter.buf=0" + }, + { + "desc": "Diagnostics (Trouble)", + "noremap": true, + "lhs": "xx", + "mode": "n", + "rhs": "Trouble diagnostics toggle" + }, + { + "desc": " Save and Quit", + "noremap": true, + "lhs": "x", + "mode": "n", + "rhs": "x" + }, + { + "desc": "ZenMode", + "noremap": true, + "lhs": "wz", + "mode": "n", + "rhs": "ZenMode" + }, + { + "desc": "Write and Quit", + "noremap": true, + "lhs": "ww", + "mode": "n", + "rhs": "w" + }, + { + "desc": "Twilight", + "noremap": true, + "lhs": "wt", + "mode": "n", + "rhs": "Twilight" + }, + { + "desc": "Suggestions", + "noremap": true, + "lhs": "ws", + "mode": "n", + "rhs": "Telescope spell_suggest" + }, + { + "desc": "Write and Quit", + "noremap": true, + "lhs": "wq", + "mode": "n", + "rhs": "wq" + }, + { + "desc": "Prev Misspell", + "noremap": true, + "lhs": "wk", + "mode": "n", + "rhs": "[s" + }, + { + "desc": "Next Misspell", + "noremap": true, + "lhs": "wj", + "mode": "n", + "rhs": "]s" + }, + { + "desc": "Force Write", + "noremap": true, + "lhs": "wf", + "mode": "n", + "rhs": "lua require'utils'.sudo_write()" + }, + { + "desc": "Suda Write", + "noremap": true, + "lhs": "wF", + "mode": "n", + "rhs": ":SudaWrite" + }, + { + "desc": "Spellcheck", + "noremap": true, + "lhs": "wc", + "mode": "n", + "rhs": "set spell!" + }, + { + "desc": "Quote", + "noremap": true, + "lhs": "vq", + "mode": "n", + "rhs": "viq" + }, + { + "desc": "Paragraph", + "noremap": true, + "lhs": "vp", + "mode": "n", + "rhs": "vip" + }, + { + "desc": "Bracket", + "noremap": true, + "lhs": "vb", + "mode": "n", + "rhs": "vib" + }, + { + "desc": "Around Quote", + "noremap": true, + "lhs": "vQ", + "mode": "n", + "rhs": "vaq" + }, + { + "desc": "Around Para", + "noremap": true, + "lhs": "vP", + "mode": "n", + "rhs": "vap" + }, + { + "desc": "Around Bracket", + "noremap": true, + "lhs": "vB", + "mode": "n", + "rhs": "vab" + }, + { + "desc": "Toggle Output Panel", + "noremap": true, + "lhs": "uO", + "mode": "n", + "rhs": "lua require(\"neotest\").output_panel.toggle" + }, + { + "desc": "Stop", + "noremap": true, + "lhs": "us", + "mode": "n", + "rhs": "lua require(\"neotest\").run.stop()" + }, + { + "desc": "Run Nearest Test", + "noremap": true, + "lhs": "ur", + "mode": "n", + "rhs": "lua require(\"neotest\").run.run()" + }, + { + "desc": "Toggle Summary", + "noremap": true, + "lhs": "uS", + "mode": "n", + "rhs": "lua require(\"neotest\").summary.toggle" + }, + { + "desc": "Show Output", + "noremap": true, + "lhs": "uo", + "mode": "n", + "rhs": "lua require(\"neotest\").output.open({ enter = true, auto_close = true })" + }, + { + "desc": "Run Test File", + "noremap": true, + "lhs": "uf", + "mode": "n", + "rhs": "lua require(\"neotest\").run.run(vim.fn.expand(\"%\"))" + }, + { + "desc": "Run Current Test", + "noremap": true, + "lhs": "uc", + "mode": "n", + "rhs": "lua require(\"neotest\").run.run()" + }, + { + "desc": "Vertical Terminal", + "noremap": true, + "lhs": "tv", + "mode": "n", + "rhs": "Vterm" + }, + { + "desc": "Horizontal Terminal", + "noremap": true, + "lhs": "th", + "mode": "n", + "rhs": "Sterm" + }, + { + "desc": "Toggle Terminal", + "noremap": true, + "lhs": "t2", + "mode": "n", + "rhs": "2ToggleTerm" + }, + { + "desc": "Toggle Terminal", + "noremap": true, + "lhs": "t1", + "mode": "n", + "rhs": "1ToggleTerm" + }, + { + "desc": "Vertical Split", + "noremap": true, + "lhs": "ss", + "mode": "n", + "rhs": "vsplit" + }, + { + "desc": "Close Split", + "noremap": true, + "lhs": "sq", + "mode": "n", + "rhs": "c" + }, + { + "desc": "Previous Pane", + "noremap": true, + "lhs": "sp", + "mode": "n", + "rhs": "NavigatorPrevious" + }, + { + "desc": "Move Right", + "noremap": true, + "lhs": "sl", + "mode": "n", + "rhs": "l" + }, + { + "desc": "Move Up", + "noremap": true, + "lhs": "sk", + "mode": "n", + "rhs": "k" + }, + { + "desc": "Move Down", + "noremap": true, + "lhs": "sj", + "mode": "n", + "rhs": "j" + }, + { + "desc": "Move Left", + "noremap": true, + "lhs": "sh", + "mode": "n", + "rhs": "h" + }, + { + "desc": "First Tab", + "noremap": true, + "lhs": "sf", + "mode": "n", + "rhs": "tabfirst" + }, + { + "desc": "Close Tab", + "noremap": true, + "lhs": "sc", + "mode": "n", + "rhs": "tabclose" + }, + { + "desc": "Horizontal Split", + "noremap": true, + "lhs": "sa", + "mode": "n", + "rhs": "split" + }, + { + "desc": "Previous Window", + "noremap": true, + "lhs": "s`", + "mode": "n", + "rhs": "p" + }, + { + "desc": "Decrease window height", + "noremap": true, + "lhs": "s_", + "mode": "n", + "rhs": "resize -10" + }, + { + "desc": "Split Right", + "noremap": true, + "lhs": "s\\", + "mode": "n", + "rhs": "v" + }, + { + "desc": "Increase window width", + "noremap": true, + "lhs": "sL", + "mode": "n", + "rhs": "vertical resize +10" + }, + { + "desc": "Increase window height", + "noremap": true, + "lhs": "sK", + "mode": "n", + "rhs": "resize +5" + }, + { + "desc": "Decrease window height", + "noremap": true, + "lhs": "sJ", + "mode": "n", + "rhs": "resize -5" + }, + { + "desc": "Decrease window width", + "noremap": true, + "lhs": "sH", + "mode": "n", + "rhs": "vertical resize -10" + }, + { + "desc": "Increase window width", + "noremap": true, + "lhs": "s=", + "mode": "n", + "rhs": "vertical resize +20" + }, + { + "desc": "Split Below", + "noremap": true, + "lhs": "s/", + "mode": "n", + "rhs": "s" + }, + { + "desc": "Decrease window width", + "noremap": true, + "lhs": "s-", + "mode": "n", + "rhs": "vertical resize -20" + }, + { + "desc": "Increase window height", + "noremap": true, + "lhs": "s+", + "mode": "n", + "rhs": "resize +10" + }, + { + "desc": "Replace Word", + "noremap": true, + "lhs": "rw", + "mode": "n", + "rhs": "lua require('spectre').open_visual({select_word=true})" + }, + { + "desc": "Extract Variable", + "noremap": true, + "lhs": "rv", + "mode": "n", + "rhs": "lua require('refactoring').refactor('Extract Variable')" + }, + { + "desc": "Replace Word", + "noremap": true, + "lhs": "rs", + "mode": "n", + "rhs": ":%s/\\\\>//gI" + }, + { + "desc": "Smart Rename", + "noremap": true, + "lhs": "rr", + "mode": "n", + "rhs": "" + }, + { + "desc": "Swap Previous", + "noremap": true, + "lhs": "rp", + "mode": "n", + "rhs": "" + }, + { + "desc": "Swap Next", + "noremap": true, + "lhs": "rn", + "mode": "n", + "rhs": "" + }, + { + "desc": "List Definition", + "noremap": true, + "lhs": "rl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Previous Usage", + "noremap": true, + "lhs": "rk", + "mode": "n", + "rhs": "" + }, + { + "desc": "Next Usage", + "noremap": true, + "lhs": "rj", + "mode": "n", + "rhs": "" + }, + { + "desc": "Inline Variable", + "noremap": true, + "lhs": "ri", + "mode": "n", + "rhs": "lua require('refactoring').refactor('Inline Variable')" + }, + { + "desc": "List Definition Head", + "noremap": true, + "lhs": "rh", + "mode": "n", + "rhs": "" + }, + { + "desc": "Extract To File", + "noremap": true, + "lhs": "rf", + "mode": "n", + "rhs": "lua require('refactoring').refactor('Extract Block To File')" + }, + { + "desc": "Extract Block", + "noremap": true, + "lhs": "re", + "mode": "n", + "rhs": "lua require('refactoring').refactor('Extract Block')" + }, + { + "desc": "Go To Definition", + "noremap": true, + "lhs": "rd", + "mode": "n", + "rhs": "" + }, + { + "desc": "Replace Buffer", + "noremap": true, + "lhs": "rb", + "mode": "n", + "rhs": "lua require('spectre').open_file_search()" + }, + { + "desc": "Replace", + "noremap": true, + "lhs": "rS", + "mode": "n", + "rhs": "lua require('spectre').open()" + }, + { + "desc": "Refactor Commands", + "noremap": true, + "lhs": "rR", + "mode": "n", + "rhs": "lua require('telescope').extensions.refactoring.refactors()" + }, + { + "desc": "Code Runner", + "noremap": true, + "lhs": "rc", + "mode": "n", + "rhs": "" + }, + { + "desc": "Write and Quit", + "noremap": true, + "lhs": "qw", + "mode": "n", + "rhs": "wq" + }, + { + "desc": "Close Split", + "noremap": true, + "lhs": "qs", + "mode": "n", + "rhs": "c" + }, + { + "desc": "Quit", + "noremap": true, + "lhs": "qq", + "mode": "n", + "rhs": "q" + }, + { + "desc": "Close Others", + "noremap": true, + "lhs": "qo", + "mode": "n", + "rhs": ":%bdelete|b#|bdelete#" + }, + { + "desc": "Force Quit", + "noremap": true, + "lhs": "qf", + "mode": "n", + "rhs": "qall!" + }, + { + "desc": "Delete Buffer", + "noremap": true, + "lhs": "qd", + "mode": "n", + "rhs": "bdelete" + }, + { + "desc": "Close Buffer", + "noremap": true, + "lhs": "qc", + "mode": "n", + "rhs": "bw" + }, + { + "desc": "Quit All", + "noremap": true, + "lhs": "qa", + "mode": "n", + "rhs": "qall" + }, + { + "desc": "Save ASCII code snapshot into clipboard", + "noremap": true, + "lhs": "pi", + "mode": "x", + "rhs": "CodeSnapASCII" + }, + { + "desc": "Save selected code snapshot in ~/Pictures", + "noremap": true, + "lhs": "ps", + "mode": "x", + "rhs": "CodeSnapSave" + }, + { + "desc": "Save selected code snapshot into clipboard", + "noremap": true, + "lhs": "py", + "mode": "x", + "rhs": "CodeSnap" + }, + { + "desc": "All Options", + "noremap": true, + "lhs": "oo", + "mode": "n", + "rhs": "Telescope vim_options" + }, + { + "desc": "Relative Numbers", + "noremap": true, + "lhs": "on", + "mode": "n", + "rhs": "set relativenumber!" + }, + { + "desc": "Highlight Colors", + "noremap": true, + "lhs": "oh", + "mode": "n", + "rhs": "Telescope highlights" + }, + { + "desc": "Colorscheme", + "noremap": true, + "lhs": "oc", + "mode": "n", + "rhs": "Telescope colorscheme" + }, + { + "desc": "Don't Save Current Session", + "noremap": true, + "lhs": "md", + "mode": "n", + "rhs": "" + }, + { + "desc": "Restore Last Session", + "noremap": true, + "lhs": "ml", + "mode": "n", + "rhs": "" + }, + { + "desc": "Restore Session", + "noremap": true, + "lhs": "ms", + "mode": "n", + "rhs": "" + }, + { + "desc": "Peek Type Definition", + "noremap": true, + "lhs": "lt", + "mode": "n", + "rhs": "Lspsaga peek_type_definition" + }, + { + "desc": "Document Symbols", + "noremap": true, + "lhs": "ls", + "mode": "n", + "rhs": "Telescope lsp_document_symbols theme=get_ivy" + }, + { + "desc": "Rename", + "noremap": true, + "lhs": "lr", + "mode": "n", + "rhs": "Lspsaga rename" + }, + { + "desc": "Stop LSP", + "noremap": true, + "lhs": "lq", + "mode": "n", + "rhs": "LspStop" + }, + { + "desc": "Incoming Calls", + "noremap": true, + "lhs": "lp", + "mode": "n", + "rhs": "Telescope lsp_incoming_calls" + }, + { + "desc": "Outline", + "noremap": true, + "lhs": "lo", + "mode": "n", + "rhs": "Lspsaga outline" + }, + { + "desc": "File Diagnostics", + "noremap": true, + "lhs": "ll", + "mode": "n", + "rhs": "Telescope diagnostics layout_strategy=vertical" + }, + { + "desc": "Prev Diagnostic", + "noremap": true, + "lhs": "lk", + "mode": "n", + "rhs": "Lspsaga diagnostic_jump_prev" + }, + { + "desc": "Next Diagnostic", + "noremap": true, + "lhs": "lj", + "mode": "n", + "rhs": "Lspsaga diagnostic_jump_next" + }, + { + "desc": "LSP Info", + "noremap": true, + "lhs": "li", + "mode": "n", + "rhs": "LspInfo" + }, + { + "desc": "Hover", + "noremap": true, + "lhs": "lh", + "mode": "n", + "rhs": "Lspsaga hover_doc" + }, + { + "desc": "Goto Definition", + "noremap": true, + "lhs": "lg", + "mode": "n", + "rhs": "Lspsaga goto_definition" + }, + { + "desc": "Finder", + "noremap": true, + "lhs": "lf", + "mode": "n", + "rhs": "Lspsaga finder" + }, + { + "desc": "Peek Definition", + "noremap": true, + "lhs": "ld", + "mode": "n", + "rhs": "Lspsaga peek_definition" + }, + { + "desc": "Code Action", + "noremap": true, + "lhs": "la", + "mode": "n", + "rhs": "Lspsaga code_action" + }, + { + "desc": "Goto Type Definition", + "noremap": true, + "lhs": "lT", + "mode": "n", + "rhs": "Lspsaga goto_type_definition" + }, + { + "desc": "Workspace Symbols", + "noremap": true, + "lhs": "lS", + "mode": "n", + "rhs": "Telescope lsp_dynamic_workspace_symbols" + }, + { + "desc": "Replace", + "noremap": true, + "lhs": "lR", + "mode": "n", + "rhs": "Lspsaga project_replace" + }, + { + "desc": "Restart LSP", + "noremap": true, + "lhs": "lQ", + "mode": "n", + "rhs": "LspRestart" + }, + { + "desc": "Outgoing Calls", + "noremap": true, + "lhs": "lP", + "mode": "n", + "rhs": "Telescope lsp_outgoing_calls" + }, + { + "desc": "Workspace Diagnostics", + "noremap": true, + "lhs": "lL", + "mode": "n", + "rhs": "Lspsaga show_workspace_diagnostics" + }, + { + "desc": "References", + "noremap": true, + "lhs": "lF", + "mode": "n", + "rhs": "Telescope lsp_references layout_strategy=vertical" + }, + { + "desc": "Toggle keys", + "noremap": true, + "lhs": "kt", + "mode": "n", + "rhs": "Screenkey" + }, + { + "desc": "Current Word", + "noremap": true, + "lhs": "jw", + "mode": "n", + "rhs": "lua require(\"flash\").jump({ pattern = vim.fn.expand(\"cword>\")})" + }, + { + "desc": "Remote Treesitter", + "noremap": true, + "lhs": "jt", + "mode": "n", + "rhs": "lua require('flash').treesitter_search()" + }, + { + "desc": "Search", + "noremap": true, + "lhs": "js", + "mode": "n", + "rhs": "lua require('flash').jump()" + }, + { + "desc": "Previous Jump", + "noremap": true, + "lhs": "jp", + "mode": "n", + "rhs": "lua require('flash').jump({continue = true})" + }, + { + "desc": "Search Forward", + "noremap": true, + "lhs": "jn", + "mode": "n", + "rhs": "lua require('flash').jump({search = { forward = true, wrap = false, multi_window = false },})" + }, + { + "desc": "Forward", + "noremap": true, + "lhs": "jl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Treesitter", + "noremap": true, + "lhs": "jk", + "mode": "n", + "rhs": "lua require('flash').treesitter()" + }, + { + "desc": "Remote", + "noremap": true, + "lhs": "jj", + "mode": "n", + "rhs": "lua require('flash').remote()" + }, + { + "desc": "Backward", + "noremap": true, + "lhs": "jh", + "mode": "n", + "rhs": "" + }, + { + "desc": "Jumplist", + "noremap": true, + "lhs": "jf", + "mode": "n", + "rhs": "Telescope jumplist" + }, + { + "desc": "Diagnostics", + "noremap": true, + "lhs": "jd", + "mode": "n", + "rhs": "FlashDiagnostics" + }, + { + "desc": "Word", + "noremap": true, + "lhs": "jc", + "mode": "n", + "rhs": "*" + }, + { + "desc": "Search Backward", + "noremap": true, + "lhs": "jN", + "mode": "n", + "rhs": "lua require('flash').jump({search = { forward = false, wrap = false, multi_window = false },})" + }, + { + "desc": "Time", + "noremap": true, + "lhs": "it", + "mode": "n", + "rhs": "put =strftime('## %r')" + }, + { + "desc": "Registers", + "noremap": true, + "lhs": "ir", + "mode": "n", + "rhs": "Telescope registers" + }, + { + "desc": "Relative Path", + "noremap": true, + "lhs": "ip", + "mode": "n", + "rhs": "put %" + }, + { + "desc": "Nerd Glyphs", + "noremap": true, + "lhs": "in", + "mode": "n", + "rhs": "Nerdy" + }, + { + "desc": "File Name", + "noremap": true, + "lhs": "if", + "mode": "n", + "rhs": "put =expand('%:t')" + }, + { + "desc": "Emojis", + "noremap": true, + "lhs": "ie", + "mode": "n", + "rhs": "Telescope symbols" + }, + { + "desc": "Date", + "noremap": true, + "lhs": "id", + "mode": "n", + "rhs": "put =strftime('## %a, %d %b, %Y, %r')" + }, + { + "desc": "Absolute Path", + "noremap": true, + "lhs": "iP", + "mode": "n", + "rhs": "put %:p" + }, + { + "desc": "Man Pages", + "noremap": true, + "lhs": "hm", + "mode": "n", + "rhs": "Telescope man_pages" + }, + { + "desc": "Hover Doc", + "noremap": true, + "lhs": "hk", + "mode": "n", + "rhs": "Lspsaga hover_doc" + }, + { + "desc": "Inspect Position", + "noremap": true, + "lhs": "hi", + "mode": "n", + "rhs": "vim.show_pos" + }, + { + "desc": "Help Pages", + "noremap": true, + "lhs": "hh", + "mode": "n", + "rhs": "Telescope help_tags" + }, + { + "desc": "Fuzzy Find in File", + "noremap": true, + "lhs": "fs", + "mode": "n", + "rhs": "Telescope current_buffer_fuzzy_find" + }, + { + "desc": "Quickfix", + "noremap": true, + "lhs": "fq", + "mode": "n", + "rhs": "Telescope quickfix" + }, + { + "desc": "Undo History", + "noremap": true, + "lhs": "fu", + "mode": "n", + "rhs": "Telescope undo" + }, + { + "desc": "Diagnostics", + "noremap": true, + "lhs": "fd", + "mode": "n", + "rhs": "Telescope diagnostics" + }, + { + "desc": "Search History", + "noremap": true, + "lhs": "ks", + "mode": "n", + "rhs": "Telescope search_history" + }, + { + "desc": "Command History", + "noremap": true, + "lhs": "kh", + "mode": "n", + "rhs": "Telescope command_history" + }, + { + "desc": "Commands", + "noremap": true, + "lhs": "kc", + "mode": "n", + "rhs": "Telescope commands" + }, + { + "desc": "Keymaps", + "noremap": true, + "lhs": "kk", + "mode": "n", + "rhs": "Telescope keymaps" + }, + { + "desc": "Grep String", + "noremap": true, + "lhs": "fG", + "mode": "n", + "rhs": "Telescope grep_string" + }, + { + "desc": "Find Highlight Groups", + "noremap": true, + "lhs": "fH", + "mode": "n", + "rhs": "Telescope highlights" + }, + { + "desc": "Marks", + "noremap": true, + "lhs": "fm", + "mode": "n", + "rhs": "Telescope marks" + }, + { + "desc": "Old Recent Files", + "noremap": true, + "lhs": "fo", + "mode": "n", + "rhs": "Telescope oldfiles" + }, + { + "desc": "Find Help", + "noremap": true, + "lhs": "fh", + "mode": "n", + "rhs": "Telescope help_tags" + }, + { + "desc": "Buffers", + "noremap": true, + "lhs": "fb", + "mode": "n", + "rhs": "Telescope buffers" + }, + { + "desc": "Live Grep", + "noremap": true, + "lhs": "fg", + "mode": "n", + "rhs": "Telescope live_grep" + }, + { + "desc": "Find Files (CWD)", + "noremap": true, + "lhs": "ff", + "mode": "n", + "rhs": "Telescope find_files" + }, + { + "desc": "New File", + "noremap": true, + "lhs": "en", + "mode": "n", + "rhs": "new" + }, + { + "desc": "Readme", + "noremap": true, + "lhs": "em", + "mode": "n", + "rhs": "e README.md" + }, + { + "desc": "File Browser", + "noremap": true, + "lhs": "ef", + "mode": "n", + "rhs": "Telescope file_browser" + }, + { + "desc": "Left File Explorer", + "noremap": true, + "lhs": "eE", + "mode": "n", + "rhs": ":Neotree toggle left" + }, + { + "desc": "Float File Explorer", + "noremap": true, + "lhs": "ee", + "mode": "n", + "rhs": ":Neotree toggle float" + }, + { + "desc": "Config Dir", + "noremap": true, + "lhs": "ed", + "mode": "n", + "rhs": "lua require(\"telescope.builtin\").find_files({cwd = vim.fn.stdpath(\"config\")})" + }, + { + "desc": "Config", + "noremap": true, + "lhs": "ec", + "mode": "n", + "rhs": "e $MYVIMRC" + }, + { + "desc": "Alternate File", + "noremap": true, + "lhs": "ea", + "mode": "n", + "rhs": "b#" + }, + { + "desc": "DB Last query", + "noremap": true, + "lhs": "dl", + "mode": "n", + "rhs": "DBUILastQueryInfo" + }, + { + "desc": "DB Rename buffer", + "noremap": true, + "lhs": "dr", + "mode": "n", + "rhs": "DBUIRenameBuffer" + }, + { + "desc": "DB Find buffer", + "noremap": true, + "lhs": "db", + "mode": "n", + "rhs": "DBUIFindBuffer" + }, + { + "desc": "Toggle DB UI", + "noremap": true, + "lhs": "du", + "mode": "n", + "rhs": "DBUIToggle" + }, + { + "desc": "Delete Comment Style", + "noremap": true, + "lhs": "Cd", + "mode": "n", + "rhs": "CBd" + }, + { + "desc": "Catalog", + "noremap": true, + "lhs": "Cc", + "mode": "n", + "rhs": "CBcatalog" + }, + { + "desc": "Marked", + "noremap": true, + "lhs": "Cm", + "mode": "n", + "rhs": "CBllbox14" + }, + { + "desc": "Line", + "noremap": true, + "lhs": "Cl", + "mode": "n", + "rhs": "CBline" + }, + { + "desc": "Tiled line", + "noremap": true, + "lhs": "Ct", + "mode": "n", + "rhs": "CBllline" + }, + { + "desc": "Comment Box", + "noremap": true, + "lhs": "Cb", + "mode": "n", + "rhs": "CBccbox" + }, + { + "desc": "Reload Module", + "noremap": true, + "lhs": "cr", + "mode": "n", + "rhs": "Telescope reloader" + }, + { + "desc": "Pick Color", + "noremap": true, + "lhs": "cp", + "mode": "n", + "rhs": "CccPick" + }, + { + "desc": "Dashboard", + "noremap": true, + "lhs": "co", + "mode": "n", + "rhs": "Dashboard" + }, + { + "desc": "Notifications", + "noremap": true, + "lhs": "cn", + "mode": "n", + "rhs": "Telescope notify" + }, + { + "desc": "Markdown Preview", + "noremap": true, + "lhs": "cm", + "mode": "n", + "rhs": "MarkdownPreviewToggle" + }, + { + "desc": "Clean Empty Lines", + "noremap": true, + "lhs": "cl", + "mode": "n", + "rhs": ":g/^\\s*$/d" + }, + { + "desc": "Hardtime", + "noremap": true, + "lhs": "ch", + "mode": "n", + "rhs": "Hardtime toggle" + }, + { + "desc": "Root Directory", + "noremap": true, + "lhs": "cd", + "mode": "n", + "rhs": "RootDir" + }, + { + "desc": "Highlight Colors", + "noremap": true, + "lhs": "cc", + "mode": "n", + "rhs": "CccHighlighterToggle" + }, + { + "desc": "Reload Configs", + "noremap": true, + "lhs": "cR", + "mode": "n", + "rhs": "ReloadConfig" + }, + { + "desc": "Convert Color", + "noremap": true, + "lhs": "cP", + "mode": "n", + "rhs": "CccConvert" + }, + { + "desc": "Fix Tabs", + "noremap": true, + "lhs": "cF", + "mode": "n", + "rhs": "retab" + }, + { + "desc": "Toggle Alternate", + "noremap": true, + "lhs": "a", + "mode": "n", + "rhs": "Alternate" + }, + { + "desc": "Exit", + "noremap": true, + "lhs": "bx", + "mode": "n", + "rhs": "DapTerminate" + }, + { + "desc": "Debugger", + "noremap": true, + "lhs": "bt", + "mode": "n", + "rhs": "DapUIToggle" + }, + { + "desc": "Repl", + "noremap": true, + "lhs": "br", + "mode": "n", + "rhs": "DapToggleRepl" + }, + { + "desc": "Over", + "noremap": true, + "lhs": "bo", + "mode": "n", + "rhs": "DapStepOver" + }, + { + "desc": "Last", + "noremap": true, + "lhs": "bl", + "mode": "n", + "rhs": "lua require'dap'.run_last()" + }, + { + "desc": "Into", + "noremap": true, + "lhs": "bi", + "mode": "n", + "rhs": "DapStepInto" + }, + { + "desc": "Continue", + "noremap": true, + "lhs": "bc", + "mode": "n", + "rhs": "DapContinue" + }, + { + "desc": "Breakpoint", + "noremap": true, + "lhs": "bb", + "mode": "n", + "rhs": "DapToggleBreakpoint" + }, + { + "desc": "Restart Frame", + "noremap": true, + "lhs": "bR", + "mode": "n", + "rhs": "DapRestartFrame" + }, + { + "desc": "Out", + "noremap": true, + "lhs": "bO", + "mode": "n", + "rhs": "DapStepOut" + }, + { + "desc": "Dismiss All Notifications", + "noremap": true, + "lhs": "mn", + "mode": "n", + "rhs": "" + }, + { + "desc": "", + "noremap": true, + "lhs": "mt", + "mode": "n", + "rhs": "lua require(\"onedark\").toggle()" + }, + { + "desc": "", + "noremap": false, + "lhs": "/", + "mode": "v", + "rhs": "gcc" + }, + { + "desc": "", + "noremap": false, + "lhs": "/", + "mode": "n", + "rhs": "gcc" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "" + }, + { + "desc": ":help v_#-default", + "noremap": true, + "lhs": "#", + "mode": "x", + "rhs": "" + }, + { + "desc": "", + "noremap": false, + "lhs": "%", + "mode": "x", + "rhs": "(MatchitVisualForward)" + }, + { + "desc": "", + "noremap": false, + "lhs": "%", + "mode": "n", + "rhs": "(MatchitNormalForward)" + }, + { + "desc": ":help &-default", + "noremap": true, + "lhs": "&", + "mode": "n", + "rhs": ":&&" + }, + { + "desc": ":help v_star-default", + "noremap": true, + "lhs": "*", + "mode": "x", + "rhs": "" + }, + { "desc": "", "noremap": true, "lhs": "-", "mode": "x", "rhs": "" }, + { + "desc": "", + "noremap": true, + "lhs": "-", + "mode": "n", + "rhs": "" + }, + { + "desc": "Highlight and snapshot selected code into clipboard", + "noremap": true, + "lhs": "h", + "mode": "x", + "rhs": "CodeSnapHighlight" + }, + { "desc": "", "noremap": true, "lhs": "<", "mode": "v", "rhs": "gv" }, + { "desc": "", "noremap": true, "lhs": "=", "mode": "x", "rhs": "" }, + { "desc": "", "noremap": true, "lhs": "=", "mode": "n", "rhs": "" }, + { "desc": "", "noremap": true, "lhs": ">", "mode": "v", "rhs": ">gv" }, + { + "desc": ":help v_@-default", + "noremap": true, + "lhs": "@", + "mode": "x", + "rhs": "mode() ==# 'V' ? ':normal! @'.getcharstr().'' : '@'" + }, + { + "desc": "Previous Buffer", + "noremap": true, + "lhs": "H", + "mode": "n", + "rhs": "bprevious" + }, + { + "desc": "", + "noremap": true, + "lhs": "J", + "mode": "x", + "rhs": ":move '>+1gv-gv" + }, + { "desc": "", "noremap": true, "lhs": "J", "mode": "n", "rhs": "mzJ`z" }, + { + "desc": "LSP Hover", + "noremap": true, + "lhs": "K", + "mode": "n", + "rhs": "Lspsaga hover_doc" + }, + { + "desc": "", + "noremap": true, + "lhs": "K", + "mode": "x", + "rhs": ":move '-2gv-gv" + }, + { + "desc": "Next Buffer", + "noremap": true, + "lhs": "L", + "mode": "n", + "rhs": "bnext" + }, + { + "desc": "Prev search result", + "noremap": true, + "lhs": "N", + "mode": "x", + "rhs": "'nN'[v:searchforward]" + }, + { + "desc": "Prev search result", + "noremap": true, + "lhs": "N", + "mode": "n", + "rhs": "'nN'[v:searchforward]" + }, + { + "desc": "Put yanked text before cursor", + "noremap": true, + "lhs": "P", + "mode": "x", + "rhs": "(YankyPutBefore)" + }, + { + "desc": "Put yanked text before cursor", + "noremap": true, + "lhs": "P", + "mode": "n", + "rhs": "(YankyPutBefore)" + }, + { + "desc": "Force Quit!", + "noremap": true, + "lhs": "Q", + "mode": "n", + "rhs": "qall!" + }, + { + "desc": ":help v_Q-default", + "noremap": true, + "lhs": "Q", + "mode": "x", + "rhs": "mode() ==# 'V' ? ':normal! @=reg_recorded()' : 'Q'" + }, + { + "desc": "Flash Treesitter", + "noremap": true, + "lhs": "S", + "mode": "x", + "rhs": "" + }, + { + "desc": "Flash Treesitter", + "noremap": true, + "lhs": "S", + "mode": "n", + "rhs": "" + }, + { + "desc": "Redo", + "noremap": true, + "lhs": "U", + "mode": "n", + "rhs": "redo" + }, + { + "desc": ":help Y-default", + "noremap": true, + "lhs": "Y", + "mode": "n", + "rhs": "y$" + }, + { + "desc": "Git Hunk", + "noremap": true, + "lhs": "[g", + "mode": "n", + "rhs": "Gitsigns prev_hunk" + }, + { "desc": "Edit", "noremap": true, "lhs": "[e", "mode": "n", "rhs": "g;" }, + { + "desc": "Undo backward", + "noremap": true, + "lhs": "[u", + "mode": "n", + "rhs": "lua MiniBracketed.undo('backward')" + }, + { + "desc": "Undo first", + "noremap": true, + "lhs": "[U", + "mode": "n", + "rhs": "lua MiniBracketed.undo('first')" + }, + { + "desc": "Treesitter backward", + "noremap": true, + "lhs": "[n", + "mode": "x", + "rhs": "lua MiniBracketed.treesitter('backward')" + }, + { + "desc": "Treesitter backward", + "noremap": true, + "lhs": "[n", + "mode": "n", + "rhs": "lua MiniBracketed.treesitter('backward')" + }, + { + "desc": "Treesitter first", + "noremap": true, + "lhs": "[N", + "mode": "x", + "rhs": "lua MiniBracketed.treesitter('first')" + }, + { + "desc": "Treesitter first", + "noremap": true, + "lhs": "[N", + "mode": "n", + "rhs": "lua MiniBracketed.treesitter('first')" + }, + { + "desc": "Location backward", + "noremap": true, + "lhs": "[l", + "mode": "n", + "rhs": "lua MiniBracketed.location('backward')" + }, + { + "desc": "Location first", + "noremap": true, + "lhs": "[L", + "mode": "n", + "rhs": "lua MiniBracketed.location('first')" + }, + { + "desc": "Oldfile backward", + "noremap": true, + "lhs": "[o", + "mode": "n", + "rhs": "lua MiniBracketed.oldfile('backward')" + }, + { + "desc": "Oldfile first", + "noremap": true, + "lhs": "[O", + "mode": "n", + "rhs": "lua MiniBracketed.oldfile('first')" + }, + { + "desc": "Jump", + "noremap": true, + "lhs": "[j", + "mode": "n", + "rhs": "" + }, + { + "desc": "Jump first", + "noremap": true, + "lhs": "[J", + "mode": "n", + "rhs": "lua MiniBracketed.jump('first')" + }, + { + "desc": "Indent backward", + "noremap": true, + "lhs": "[i", + "mode": "x", + "rhs": "lua MiniBracketed.indent('backward')" + }, + { + "desc": "Indent backward", + "noremap": true, + "lhs": "[i", + "mode": "n", + "rhs": "lua MiniBracketed.indent('backward')" + }, + { + "desc": "Indent first", + "noremap": true, + "lhs": "[I", + "mode": "x", + "rhs": "lua MiniBracketed.indent('first')" + }, + { + "desc": "Indent first", + "noremap": true, + "lhs": "[I", + "mode": "n", + "rhs": "lua MiniBracketed.indent('first')" + }, + { + "desc": "Diagnostic backward", + "noremap": true, + "lhs": "[d", + "mode": "x", + "rhs": "lua MiniBracketed.diagnostic('backward')" + }, + { + "desc": "Diagnostic first", + "noremap": true, + "lhs": "[D", + "mode": "x", + "rhs": "lua MiniBracketed.diagnostic('first')" + }, + { + "desc": "Diagnostic first", + "noremap": true, + "lhs": "[D", + "mode": "n", + "rhs": "lua MiniBracketed.diagnostic('first')" + }, + { + "desc": "Conflict backward", + "noremap": true, + "lhs": "[x", + "mode": "x", + "rhs": "lua MiniBracketed.conflict('backward')" + }, + { + "desc": "Conflict backward", + "noremap": true, + "lhs": "[x", + "mode": "n", + "rhs": "lua MiniBracketed.conflict('backward')" + }, + { + "desc": "Conflict first", + "noremap": true, + "lhs": "[X", + "mode": "x", + "rhs": "lua MiniBracketed.conflict('first')" + }, + { + "desc": "Conflict first", + "noremap": true, + "lhs": "[X", + "mode": "n", + "rhs": "lua MiniBracketed.conflict('first')" + }, + { + "desc": "Comment backward", + "noremap": true, + "lhs": "[c", + "mode": "x", + "rhs": "lua MiniBracketed.comment('backward')" + }, + { + "desc": "Comment backward", + "noremap": true, + "lhs": "[c", + "mode": "n", + "rhs": "lua MiniBracketed.comment('backward')" + }, + { + "desc": "Comment first", + "noremap": true, + "lhs": "[C", + "mode": "x", + "rhs": "lua MiniBracketed.comment('first')" + }, + { + "desc": "Comment first", + "noremap": true, + "lhs": "[C", + "mode": "n", + "rhs": "lua MiniBracketed.comment('first')" + }, + { + "desc": "Buffer", + "noremap": true, + "lhs": "[b", + "mode": "n", + "rhs": "bprevious" + }, + { + "desc": "First Buffer", + "noremap": true, + "lhs": "[B", + "mode": "n", + "rhs": "bfirst" + }, + { + "desc": "", + "noremap": false, + "lhs": "[%", + "mode": "x", + "rhs": "(MatchitVisualMultiBackward)" + }, + { + "desc": "", + "noremap": false, + "lhs": "[%", + "mode": "n", + "rhs": "(MatchitNormalMultiBackward)" + }, + { + "desc": "Diagnostic", + "noremap": true, + "lhs": "[d", + "mode": "n", + "rhs": "Lspsaga diagnostic_jump_prev" + }, + { + "desc": "Git Hunk", + "noremap": true, + "lhs": "]g", + "mode": "n", + "rhs": "Gitsigns next_hunk" + }, + { "desc": "Edit", "noremap": true, "lhs": "]e", "mode": "n", "rhs": "g," }, + { + "desc": "Undo forward", + "noremap": true, + "lhs": "]u", + "mode": "n", + "rhs": "lua MiniBracketed.undo('forward')" + }, + { + "desc": "Undo last", + "noremap": true, + "lhs": "]U", + "mode": "n", + "rhs": "lua MiniBracketed.undo('last')" + }, + { + "desc": "Treesitter forward", + "noremap": true, + "lhs": "]n", + "mode": "x", + "rhs": "lua MiniBracketed.treesitter('forward')" + }, + { + "desc": "Treesitter forward", + "noremap": true, + "lhs": "]n", + "mode": "n", + "rhs": "lua MiniBracketed.treesitter('forward')" + }, + { + "desc": "Treesitter last", + "noremap": true, + "lhs": "]N", + "mode": "x", + "rhs": "lua MiniBracketed.treesitter('last')" + }, + { + "desc": "Treesitter last", + "noremap": true, + "lhs": "]N", + "mode": "n", + "rhs": "lua MiniBracketed.treesitter('last')" + }, + { + "desc": "Location forward", + "noremap": true, + "lhs": "]l", + "mode": "n", + "rhs": "lua MiniBracketed.location('forward')" + }, + { + "desc": "Location last", + "noremap": true, + "lhs": "]L", + "mode": "n", + "rhs": "lua MiniBracketed.location('last')" + }, + { + "desc": "Oldfile forward", + "noremap": true, + "lhs": "]o", + "mode": "n", + "rhs": "lua MiniBracketed.oldfile('forward')" + }, + { + "desc": "Oldfile last", + "noremap": true, + "lhs": "]O", + "mode": "n", + "rhs": "lua MiniBracketed.oldfile('last')" + }, + { + "desc": "Jump", + "noremap": true, + "lhs": "]j", + "mode": "n", + "rhs": "" + }, + { + "desc": "Jump last", + "noremap": true, + "lhs": "]J", + "mode": "n", + "rhs": "lua MiniBracketed.jump('last')" + }, + { + "desc": "Indent forward", + "noremap": true, + "lhs": "]i", + "mode": "x", + "rhs": "lua MiniBracketed.indent('forward')" + }, + { + "desc": "Indent forward", + "noremap": true, + "lhs": "]i", + "mode": "n", + "rhs": "lua MiniBracketed.indent('forward')" + }, + { + "desc": "Indent last", + "noremap": true, + "lhs": "]I", + "mode": "x", + "rhs": "lua MiniBracketed.indent('last')" + }, + { + "desc": "Indent last", + "noremap": true, + "lhs": "]I", + "mode": "n", + "rhs": "lua MiniBracketed.indent('last')" + }, + { + "desc": "Diagnostic forward", + "noremap": true, + "lhs": "]d", + "mode": "x", + "rhs": "lua MiniBracketed.diagnostic('forward')" + }, + { + "desc": "Diagnostic last", + "noremap": true, + "lhs": "]D", + "mode": "x", + "rhs": "lua MiniBracketed.diagnostic('last')" + }, + { + "desc": "Diagnostic last", + "noremap": true, + "lhs": "]D", + "mode": "n", + "rhs": "lua MiniBracketed.diagnostic('last')" + }, + { + "desc": "Conflict forward", + "noremap": true, + "lhs": "]x", + "mode": "x", + "rhs": "lua MiniBracketed.conflict('forward')" + }, + { + "desc": "Conflict forward", + "noremap": true, + "lhs": "]x", + "mode": "n", + "rhs": "lua MiniBracketed.conflict('forward')" + }, + { + "desc": "Conflict last", + "noremap": true, + "lhs": "]X", + "mode": "x", + "rhs": "lua MiniBracketed.conflict('last')" + }, + { + "desc": "Conflict last", + "noremap": true, + "lhs": "]X", + "mode": "n", + "rhs": "lua MiniBracketed.conflict('last')" + }, + { + "desc": "Comment forward", + "noremap": true, + "lhs": "]c", + "mode": "x", + "rhs": "lua MiniBracketed.comment('forward')" + }, + { + "desc": "Comment forward", + "noremap": true, + "lhs": "]c", + "mode": "n", + "rhs": "lua MiniBracketed.comment('forward')" + }, + { + "desc": "Comment last", + "noremap": true, + "lhs": "]C", + "mode": "x", + "rhs": "lua MiniBracketed.comment('last')" + }, + { + "desc": "Comment last", + "noremap": true, + "lhs": "]C", + "mode": "n", + "rhs": "lua MiniBracketed.comment('last')" + }, + { + "desc": "Buffer", + "noremap": true, + "lhs": "]b", + "mode": "n", + "rhs": "bnext" + }, + { + "desc": "Buffer", + "noremap": true, + "lhs": "]B", + "mode": "n", + "rhs": "blast" + }, + { + "desc": "", + "noremap": false, + "lhs": "]%", + "mode": "x", + "rhs": "(MatchitVisualMultiForward)" + }, + { + "desc": "", + "noremap": false, + "lhs": "]%", + "mode": "n", + "rhs": "(MatchitNormalMultiForward)" + }, + { + "desc": "Diagnostic", + "noremap": true, + "lhs": "]d", + "mode": "n", + "rhs": "Lspsaga diagnostic_jump_next" + }, + { + "desc": "Around last textobject", + "noremap": false, + "lhs": "al", + "mode": "x", + "rhs": "" + }, + { + "desc": "Around next textobject", + "noremap": false, + "lhs": "an", + "mode": "x", + "rhs": "" + }, + { + "desc": "Around textobject", + "noremap": false, + "lhs": "a", + "mode": "x", + "rhs": "" + }, + { + "desc": "", + "noremap": false, + "lhs": "a%", + "mode": "x", + "rhs": "(MatchitVisualTextObject)" + }, + { + "desc": "Change without replacing clipboard", + "noremap": true, + "lhs": "c", + "mode": "n", + "rhs": "\"_c" + }, + { + "desc": "Delete without replacing clipboard", + "noremap": true, + "lhs": "d", + "mode": "n", + "rhs": "\"_d" + }, + { + "desc": "Put yanked text before selection", + "noremap": true, + "lhs": "gP", + "mode": "x", + "rhs": "(YankyGPutBefore)" + }, + { + "desc": "Put yanked text before selection", + "noremap": true, + "lhs": "gP", + "mode": "n", + "rhs": "(YankyGPutBefore)" + }, + { + "desc": "Put yanked text after selection", + "noremap": true, + "lhs": "gp", + "mode": "x", + "rhs": "(YankyGPutAfter)" + }, + { + "desc": "Put yanked text after selection", + "noremap": true, + "lhs": "gp", + "mode": "n", + "rhs": "(YankyGPutAfter)" + }, + { + "desc": "Highlight next surrounding", + "noremap": true, + "lhs": "gshn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find next left surrounding", + "noremap": true, + "lhs": "gsFn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find next right surrounding", + "noremap": true, + "lhs": "gsfn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Replace next surrounding", + "noremap": true, + "lhs": "gsrn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Delete next surrounding", + "noremap": true, + "lhs": "gsdn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Highlight previous surrounding", + "noremap": true, + "lhs": "gshl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find previous left surrounding", + "noremap": true, + "lhs": "gsFl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find previous right surrounding", + "noremap": true, + "lhs": "gsfl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Replace previous surrounding", + "noremap": true, + "lhs": "gsrl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Delete previous surrounding", + "noremap": true, + "lhs": "gsdl", + "mode": "n", + "rhs": "" + }, + { + "desc": "Add surrounding to selection", + "noremap": true, + "lhs": "gsa", + "mode": "x", + "rhs": ":lua MiniSurround.add('visual')" + }, + { + "desc": "Update `MiniSurround.config.n_lines`", + "noremap": true, + "lhs": "gsn", + "mode": "n", + "rhs": "" + }, + { + "desc": "Highlight surrounding", + "noremap": true, + "lhs": "gsh", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find left surrounding", + "noremap": true, + "lhs": "gsF", + "mode": "n", + "rhs": "" + }, + { + "desc": "Find right surrounding", + "noremap": true, + "lhs": "gsf", + "mode": "n", + "rhs": "" + }, + { + "desc": "Replace surrounding", + "noremap": true, + "lhs": "gsr", + "mode": "n", + "rhs": "" + }, + { + "desc": "Delete surrounding", + "noremap": true, + "lhs": "gsd", + "mode": "n", + "rhs": "" + }, + { + "desc": "Add surrounding", + "noremap": true, + "lhs": "gsa", + "mode": "n", + "rhs": "" + }, + { + "desc": "Move to right \"around\"", + "noremap": false, + "lhs": "g]", + "mode": "x", + "rhs": "" + }, + { + "desc": "Move to right \"around\"", + "noremap": false, + "lhs": "g]", + "mode": "n", + "rhs": "" + }, + { + "desc": "Move to left \"around\"", + "noremap": false, + "lhs": "g[", + "mode": "x", + "rhs": "" + }, + { + "desc": "Move to left \"around\"", + "noremap": false, + "lhs": "g[", + "mode": "n", + "rhs": "" + }, + { + "desc": "", + "noremap": false, + "lhs": "g%", + "mode": "x", + "rhs": "(MatchitVisualBackward)" + }, + { + "desc": "", + "noremap": false, + "lhs": "g%", + "mode": "n", + "rhs": "(MatchitNormalBackward)" + }, + { + "desc": "Beginning of line", + "noremap": true, + "lhs": "gh", + "mode": "x", + "rhs": "^" + }, + { + "desc": "Beginning of line", + "noremap": true, + "lhs": "gh", + "mode": "n", + "rhs": "^" + }, + { + "desc": "End of line", + "noremap": true, + "lhs": "gl", + "mode": "x", + "rhs": "$" + }, + { + "desc": "End of line", + "noremap": true, + "lhs": "gl", + "mode": "n", + "rhs": "$" + }, + { + "desc": "Comment line", + "noremap": true, + "lhs": "gcc", + "mode": "n", + "rhs": "" + }, + { + "desc": "Comment selection", + "noremap": true, + "lhs": "gc", + "mode": "x", + "rhs": "" + }, + { + "desc": "Comment", + "noremap": true, + "lhs": "gc", + "mode": "n", + "rhs": "" + }, + { + "desc": "Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)", + "noremap": true, + "lhs": "gx", + "mode": "x", + "rhs": "" + }, + { + "desc": "Opens filepath or URI under cursor with the system handler (file explorer, web browser, …)", + "noremap": true, + "lhs": "gx", + "mode": "n", + "rhs": "" + }, + { + "desc": "Inside last textobject", + "noremap": false, + "lhs": "il", + "mode": "x", + "rhs": "" + }, + { + "desc": "Inside next textobject", + "noremap": false, + "lhs": "in", + "mode": "x", + "rhs": "" + }, + { + "desc": "Inside textobject", + "noremap": false, + "lhs": "i", + "mode": "x", + "rhs": "" + }, + { + "desc": "", + "noremap": true, + "lhs": "j", + "mode": "n", + "rhs": "v:count == 0 ? 'gj' : 'j'" + }, + { + "desc": "", + "noremap": true, + "lhs": "k", + "mode": "n", + "rhs": "v:count == 0 ? 'gk' : 'k'" + }, + { + "desc": "Next search result", + "noremap": true, + "lhs": "n", + "mode": "x", + "rhs": "'Nn'[v:searchforward]" + }, + { + "desc": "Next search result", + "noremap": true, + "lhs": "n", + "mode": "n", + "rhs": "'Nn'[v:searchforward]" + }, + { + "desc": "Put yanked text after cursor", + "noremap": true, + "lhs": "p", + "mode": "x", + "rhs": "(YankyPutAfter)" + }, + { + "desc": "Put yanked text after cursor", + "noremap": true, + "lhs": "p", + "mode": "n", + "rhs": "(YankyPutAfter)" + }, + { + "desc": "Flash", + "noremap": true, + "lhs": "s", + "mode": "n", + "rhs": "" + }, + { + "desc": "Flash", + "noremap": true, + "lhs": "s", + "mode": "x", + "rhs": "" + }, + { + "desc": "", + "noremap": true, + "lhs": "u", + "mode": "n", + "rhs": "ulua MiniBracketed.register_undo_state()" + }, + { + "desc": "Cut without replacing clipboard", + "noremap": true, + "lhs": "x", + "mode": "n", + "rhs": "\"_x" + }, + { "desc": "", "noremap": true, "lhs": "x", "mode": "x", "rhs": "\"_x" }, + { + "desc": "Yank text", + "noremap": true, + "lhs": "y", + "mode": "x", + "rhs": "(YankyYank)" + }, + { + "desc": "Yank text", + "noremap": true, + "lhs": "y", + "mode": "n", + "rhs": "(YankyYank)" + }, + { + "desc": "Multi Edit Next", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": ":call vm#commands#ctrln(v:count1)" + }, + { + "desc": "Add Cursor Down", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": ":call vm#commands#add_cursor_up(0, v:count1)" + }, + { + "desc": "Add Cursor Down", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": ":call vm#commands#add_cursor_down(0, v:count1)" + }, + { + "desc": "Add Cursor Up", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": ":call vm#commands#add_cursor_up(0, v:count1)" + }, + { + "desc": "Add Cursor Down", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": ":call vm#commands#add_cursor_down(0, v:count1)" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "(YankyCycleBackward)" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "(YankyCycleForward)" + }, + { + "desc": "Previous Buffer", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "bprevious" + }, + { + "desc": "Previous Pane", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "p" + }, + { + "desc": "Move Up", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "k" + }, + { + "desc": "Move Down", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "j" + }, + { + "desc": "Move Left", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "h" + }, + { + "desc": "Lazygit", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "Fterm lazygit" + }, + { + "desc": "Find Files", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "Telescope find_files" + }, + { + "desc": "Increase window height", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "resize +10which_key.add(no_leader_mappings)" + }, + { + "desc": "Increase window width", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "vertical resize +10" + }, + { + "desc": "Decrease window width", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "vertical resize -10" + }, + { + "desc": "Decrease window height", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "resize -10" + }, + { + "desc": "Move line up", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "lua MiniMove.move_line('up')" + }, + { + "desc": "Move line down", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "lua MiniMove.move_line('down')" + }, + { + "desc": "Move line right", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "lua MiniMove.move_line('right')" + }, + { + "desc": "Move line left", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "lua MiniMove.move_line('left')" + }, + { + "desc": "Move up", + "noremap": true, + "lhs": "", + "mode": "x", + "rhs": "lua MiniMove.move_selection('up')" + }, + { + "desc": "Move down", + "noremap": true, + "lhs": "", + "mode": "x", + "rhs": "lua MiniMove.move_selection('down')" + }, + { + "desc": "Move right", + "noremap": true, + "lhs": "", + "mode": "x", + "rhs": "lua MiniMove.move_selection('right')" + }, + { + "desc": "Move left", + "noremap": true, + "lhs": "", + "mode": "x", + "rhs": "lua MiniMove.move_selection('left')" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "lua MiniBracketed.register_undo_state()" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "zz" + }, + { + "desc": "", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "zz" + }, + { "desc": "", "noremap": true, "lhs": "", "mode": "n", "rhs": "ggVG" }, + { + "desc": "Show diagnostics under the cursor", + "noremap": false, + "lhs": "", + "mode": "n", + "rhs": "d" + }, + { + "desc": "Show diagnostics under the cursor", + "noremap": true, + "lhs": "d", + "mode": "n", + "rhs": "" + }, + { + "desc": "Move Right", + "noremap": true, + "lhs": "", + "mode": "n", + "rhs": "l" + } + ], + "plugins": [ + "2kabhishek/nerdy.nvim", + "2kabhishek/termim.nvim", + "Exafunction/codeium.vim", + "HiPhish/rainbow-delimiters.nvim", + "L3MON4D3/LuaSnip", + "LudoPinelli/comment-box.nvim", + "LunarVim/bigfile.nvim", + "MunifTanjim/nui.nvim", + "NStefan002/screenkey.nvim", + "ThePrimeagen/refactoring.nvim", + "akinsho/toggleterm.nvim", + "altermo/ultimate-autopair.nvim", + "antosha417/nvim-lsp-file-operations", + "creativenull/dotfyle-metadata.nvim", + "debugloop/telescope-undo.nvim", + "echasnovski/mini.files", + "echasnovski/mini.icons", + "echasnovski/mini.nvim", + "folke/flash.nvim", + "folke/lazy.nvim", + "folke/noice.nvim", + "folke/persistence.nvim", + "folke/trouble.nvim", + "folke/twilight.nvim", + "folke/which-key.nvim", + "folke/zen-mode.nvim", + "gbprod/yanky.nvim", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-nvim-lsp-signature-help", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-path", + "hrsh7th/nvim-cmp", + "iamcco/markdown-preview.nvim", + "kristijanhusak/vim-dadbod-completion", + "kristijanhusak/vim-dadbod-ui", + "lukas-reineke/indent-blankline.nvim", + "m-demare/hlargs.nvim", + "m4xshen/hardtime.nvim", + "max397574/better-escape.nvim", + "mfussenegger/nvim-dap", + "mfussenegger/nvim-lint", + "mg979/vim-visual-multi", + "michaelb/sniprun", + "mistricky/codesnap.nvim", + "mstuttgart/odoo-snippets", + "mvllow/modes.nvim", + "nacro90/numb.nvim", + "navarasu/onedark.nvim", + "neovim/nvim-lspconfig", + "numToStr/Navigator.nvim", + "nvim-lua/plenary.nvim", + "nvim-lualine/lualine.nvim", + "nvim-neo-tree/neo-tree.nvim", + "nvim-neotest/neotest", + "nvim-neotest/neotest-jest", + "nvim-neotest/neotest-python", + "nvim-neotest/nvim-nio", + "nvim-pack/nvim-spectre", + "nvim-telescope/telescope-file-browser.nvim", + "nvim-telescope/telescope-fzf-native.nvim", + "nvim-telescope/telescope-symbols.nvim", + "nvim-telescope/telescope-ui-select.nvim", + "nvim-telescope/telescope.nvim", + "nvim-treesitter/nvim-treesitter", + "nvim-treesitter/nvim-treesitter-context", + "nvim-treesitter/nvim-treesitter-textobjects", + "nvimdev/dashboard-nvim", + "nvimdev/lspsaga.nvim", + "olimorris/neotest-rspec", + "onsails/lspkind.nvim", + "rafamadriz/friendly-snippets", + "rcarriga/nvim-dap-ui", + "rcarriga/nvim-notify", + "rshkarin/mason-nvim-lint", + "saadparwaiz1/cmp_luasnip", + "smjonas/inc-rename.nvim", + "stevearc/conform.nvim", + "stevearc/dressing.nvim", + "ton/vim-alternate", + "tpope/vim-dadbod", + "uga-rosa/ccc.nvim", + "wakatime/vim-wakatime", + "williamboman/mason-lspconfig.nvim", + "williamboman/mason.nvim", + "willothy/flatten.nvim", + "windwp/nvim-ts-autotag", + "zapling/mason-conform.nvim", + "zapling/mason-lock.nvim" + ], + "pluginManager": "lazy.nvim", + "treesitterParsers": [ + "bash", + "c", + "cpp", + "css", + "html", + "java", + "javascript", + "json", + "liquid", + "lua", + "markdown", + "markdown_inline", + "python", + "scss", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc" + ], + "lspServers": [ + "basedpyright", + "bashls", + "clangd", + "cssls", + "emmet_ls", + "jdtls", + "jsonls", + "lua_ls", + "pyright", + "ruff", + "tailwindcss", + "tsserver" + ], + "leaderKey": "" +} + diff --git a/lua/core/keys.lua b/lua/core/keys.lua index 9a4631d..5147217 100644 --- a/lua/core/keys.lua +++ b/lua/core/keys.lua @@ -22,8 +22,15 @@ map('n', '', 'ggG') -- Use jj as escape map('i', 'jj', '', opts) +map('i', 'jk', '', opts) +map('i', 'kj', '', opts) map('t', 'JJ', '', opts) +-- Terminal Mappings +map('t', 'jk', '') +map('t', 'kj', '') +map('t', '', '') + -- Visual overwrite paste map({ 'v', 'x' }, 'p', '"_dP', opts) diff --git a/lua/lock.json b/lua/lock.json index 5d9e061..55a3aa3 100644 --- a/lua/lock.json +++ b/lua/lock.json @@ -1,9 +1,9 @@ { - "LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" }, + "LuaSnip": { "branch": "master", "commit": "787dee55ca364cc9119787165418fe93b74c1842" }, "Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" }, - "better-escape.nvim": { "branch": "master", "commit": "d337e02b140d909345441392de47a42d283747c1" }, + "better-escape.nvim": { "branch": "master", "commit": "bb197e51a91a635deb88630813c3bfc284413697" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, - "ccc.nvim": { "branch": "main", "commit": "790aa881d7f47bc7cc07ad03f1216bb7caf9ef67" }, + "ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, @@ -11,83 +11,85 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "codeium.vim": { "branch": "main", "commit": "1513aef682a9b3363c0bf60292e6ddc781c716ce" }, - "codesnap.nvim": { "branch": "main", "commit": "c2924bf6c9a2c2c03318fae9b7fe0706412b9d9c" }, + "codeium.vim": { "branch": "main", "commit": "8c01979323b2b480c8bf160d3ff85bd1668baa49" }, + "codesnap.nvim": { "branch": "main", "commit": "6400480aa6cc366cbd931146c429aaa64680dab9" }, "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, - "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, - "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, + "conform.nvim": { "branch": "master", "commit": "5fbea7d7043bae2499d643c97b407f6da44abff4" }, + "dashboard-nvim": { "branch": "master", "commit": "d2c5a4d1341f5ca1ed2ecb4ecfcff2bc8ea18b14" }, "dotfyle-metadata.nvim": { "branch": "main", "commit": "342ef8f3f98f3ccc451c9cf2be74e95149ced05d" }, - "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" }, + "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "flatten.nvim": { "branch": "main", "commit": "e420e531d2ab24aebcf7b3c9fca28e6c5c34964d" }, - "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, - "hardtime.nvim": { "branch": "main", "commit": "6513bf42cd9261669d1ee41ff8b4065dfdc53a09" }, - "hlargs.nvim": { "branch": "main", "commit": "9adab9f2a3270c6413b808405479caaf972be953" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "hardtime.nvim": { "branch": "main", "commit": "027d6f991927a71bd510a7673ae5bb404ca2a1c7" }, + "hlargs.nvim": { "branch": "main", "commit": "53ec5d8ca6ed012de5545ba83ea1eb3d636b09fb" }, "inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" }, - "indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" }, - "lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" }, - "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, - "lspsaga.nvim": { "branch": "main", "commit": "4ce44df854f447cf0a8972e5387b3aeb5efc798b" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, + "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, + "leap.nvim": { "branch": "main", "commit": "c6bfb191f1161fbabace1f36f578a20ac6c7642c" }, + "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, + "lspsaga.nvim": { "branch": "main", "commit": "d027f8b9c7c55e26cf4030c8657a2fc8222ed762" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-conform.nvim": { "branch": "main", "commit": "abce2be529f3b4b336c56d0ba6336a9144e0fee6" }, "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" }, "mason-nvim-lint": { "branch": "main", "commit": "b579a00ee39dcd590b1023028dc8fb3d203a67b0" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.files": { "branch": "main", "commit": "2e262838a773c0bc3ccbc9c4bcf4a1a012497ea2" }, - "mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" }, - "mini.nvim": { "branch": "main", "commit": "08430e1ae29d54f2cb54a7d3f9062f2f2a0b4909" }, + "mini.files": { "branch": "main", "commit": "6abe854f1410fc6aec69897a78b1db994c32d9c6" }, + "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, + "mini.nvim": { "branch": "main", "commit": "77533e69cc4fadb7f4c25f23255ae0890a058818" }, "modes.nvim": { "branch": "main", "commit": "3188692abf02a8838ec75e59d68c2ce3e4323f5c" }, - "neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" }, - "neotest": { "branch": "master", "commit": "6d6ad113f56edc7c3f2a77a0836ea8c1b955ebea" }, + "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, "neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" }, - "neotest-python": { "branch": "master", "commit": "72603dfdbaad5695160268cb10531a14cc37236e" }, + "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, "neotest-rspec": { "branch": "main", "commit": "53fc108a06ae43d7f873d42ee5189c2301e33623" }, "nerdy.nvim": { "branch": "main", "commit": "b467d6609b78d6a5f1e12cbc08fcc1ac87af20f5" }, - "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, - "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" }, - "nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, - "nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" }, + "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, + "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, + "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, - "nvim-lspconfig": { "branch": "master", "commit": "3ad562700d0615818bf358268ac8914f6ce2b079" }, + "nvim-lspconfig": { "branch": "master", "commit": "edd9591199d1c78c0cb20514231f7f936f9412a2" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" }, - "nvim-treesitter": { "branch": "master", "commit": "64cc1ef764a0b137a642d05cacdfe1126124fb35" }, - "nvim-treesitter-context": { "branch": "master", "commit": "0ec9a8e00cedfb52e3c2259b55f46a7c18fc2429" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3a3c6244553f13fdd92d312c82722b57ce6c4bec" }, + "nvim-treesitter": { "branch": "master", "commit": "377039daa260b71f304c881d1b21d643c501a261" }, + "nvim-treesitter-context": { "branch": "master", "commit": "e7fdb4cdf0942cd6e63dd822110a93c0ec777fe5" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, "odoo-snippets": { "branch": "main", "commit": "5e6b7191e3ea60bba00df6cdbc031291b194768d" }, "onedark.nvim": { "branch": "master", "commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, - "plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "bb48714623a4fae73c42e4b318b4587464111769" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, "refactoring.nvim": { "branch": "master", "commit": "c406fc5fb4d7ba5fce7b668637075fad6e75e9f8" }, - "screenkey.nvim": { "branch": "main", "commit": "b1516d5d610c89555062397d29fa7f32fc8ec431" }, - "sniprun": { "branch": "master", "commit": "a29d7b1c313b00980015ad79fa0ab512a0729940" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "a46780830b576049c675680650f773bedfa8677a" }, + "screenkey.nvim": { "branch": "main", "commit": "0589de3c857721e150ea694cfe66d6d0e8aecacb" }, + "sniprun": { "branch": "master", "commit": "67ac2d84d03f3b857d59571ff5fefb6080dffa2d" }, + "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-undo.nvim": { "branch": "main", "commit": "51be9ae7c42fc27c0b05505e3a0162e0f05fbb6a" }, - "telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" }, + "telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" }, "termim.nvim": { "branch": "main", "commit": "58344167abb97bcef9bf720a762ea653a94e9daa" }, "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, - "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "53ed7c65e466963c916251f9ce6df7dd3685dc36" }, - "vim-alternate": { "branch": "master", "commit": "57a6d2797b3bec39f5c075104082b0c0835535ed" }, - "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "9e3209190c22953566ae4e6436ad2b4ff4dabb95" }, + "vim-alternate": { "branch": "master", "commit": "b3b7d5e9982f228a4d62fbbe2f2fe3e3ae92768c" }, + "vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" }, "vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" }, - "vim-dadbod-ui": { "branch": "master", "commit": "2f344874918a3ab6bbe68fb866b3f003a639a5d2" }, - "vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" }, - "vim-wakatime": { "branch": "master", "commit": "53bba6bb8342de9cbdafc82142a9b5e82008d858" }, - "which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" }, + "vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" }, + "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, + "vim-wakatime": { "branch": "master", "commit": "f699e30ca1ba0c7f316847316fd0ba19d3ee51c1" }, + "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }, "yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" }, "zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" } } diff --git a/lua/plugins/coding.lua b/lua/plugins/coding.lua index 97147de..c713eae 100644 --- a/lua/plugins/coding.lua +++ b/lua/plugins/coding.lua @@ -1,6 +1,7 @@ --Coding related return { + { 'max397574/better-escape.nvim', event = 'InsertEnter', diff --git a/lua/plugins/configs/alpha.lua b/lua/plugins/configs/alpha.lua new file mode 100644 index 0000000..405ec4b --- /dev/null +++ b/lua/plugins/configs/alpha.lua @@ -0,0 +1,94 @@ +local alpha = require('alpha') +local dashboard = require('alpha.themes.dashboard') + +dashboard.section.header.val = { + [[ ]], + [[  ]], + [[ ████ ██████ █████ ██ ]], + [[ ███████████ █████  ]], + [[ █████████ ███████████████████ ███ ███████████ ]], + [[ █████████ ███ █████████████ █████ ██████████████ ]], + [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], + [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], + [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], + [[ ]], +} +dashboard.section.header.opts.hl = 'AlphaHeader' + +local function button(sc, txt, leader_txt, keybind, keybind_opts) + local sc_after = sc:gsub('%s', ''):gsub(leader_txt, '') + + local opts = { + position = 'center', + shortcut = sc, + cursor = 5, + width = 36, + align_shortcut = 'right', + hl_shortcut = 'AlphaShortcut', + } + + if nil == keybind then + keybind = sc_after + end + + keybind_opts = vim.F.if_nil(keybind_opts, { noremap = true, silent = true, nowait = true }) + opts.keymap = { 'n', sc_after, keybind, keybind_opts } + + local function on_press() + local key = vim.api.nvim_replace_termcodes(sc_after .. '', true, false, true) + vim.api.nvim_feedkeys(key, 't', false) + end + + return { + type = 'button', + val = txt, + on_press = on_press, + opts = opts, + } +end + +local leader = ' ' +dashboard.section.buttons.val = { + button('space f f', ' Find File ', leader, ':Telescope find_files'), + button('space f h', '󰗹 Find Hidden File ', leader, ':Telescope find_files hidden=true no_ignore=true'), + button('space f o', '󱋡 Recent File ', leader, ':Telescope oldfiles'), + button('space f w', '󱀽 Find Word ', leader, ':Telescope live_grep'), + button('space f n', '󱇧 New File ', leader, ':ene startinsert '), + button('space n', ' Settings', leader, ':e $MYVIMRC | :cd %:p:h '), + button('space l', '󰒲 Lazy', leader, ':Lazy'), + button('space q', ' Quit', leader, ':qa'), +} +dashboard.section.buttons.opts.hl = 'String' + +local function footer() + local stats = require('lazy').stats() + local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) + return '  Have fun with Neovim' .. ' 󱐋 Neovim loaded ' .. stats.count .. ' plugins in ' .. ms .. 'ms' +end + +dashboard.section.footer.val = footer() +dashboard.section.footer.opts.hl = 'AlphaFooter' + +local head_butt_padding = 2 +local occu_height = #dashboard.section.header.val + 2 * #dashboard.section.buttons.val + head_butt_padding +local header_padding = math.max(0, math.ceil((vim.fn.winheight('$') - occu_height) * 0.40)) +local foot_butt_padding = 1 + +dashboard.config.layout = { + { type = 'padding', val = header_padding }, + dashboard.section.header, + { type = 'padding', val = head_butt_padding }, + dashboard.section.buttons, + { type = 'padding', val = foot_butt_padding }, + dashboard.section.footer, +} + +alpha.setup(dashboard.opts) + +vim.api.nvim_create_autocmd('User', { + pattern = 'LazyVimStarted', + callback = function() + dashboard.section.footer.val = footer() + pcall(vim.cmd.AlphaRedraw) + end, +}) diff --git a/lua/plugins/configs/lsp.lua b/lua/plugins/configs/lsp.lua index 87a3618..75f15e3 100644 --- a/lua/plugins/configs/lsp.lua +++ b/lua/plugins/configs/lsp.lua @@ -1,13 +1,17 @@ -- Define nvim-lspconfig LSP servers here local lsp_servers = { - 'basedpyright', + -- 'basedpyright', + 'pyright', + 'pylsp', 'lua_ls', - 'tsserver', + 'ts_ls', 'tailwindcss', 'emmet_ls', 'bashls', 'jdtls', 'clangd', + 'html', + 'cssls', } local lspconfig = require('lspconfig') @@ -115,20 +119,54 @@ mason_lspconfig.setup({ }, }) end, - ['basedpyright'] = function() + ['pyright'] = function() -- configure pyright server (with special settings) - lspconfig['basedpyright'].setup({ + lspconfig['pyright'].setup({ capabilities = capabilities, settings = { python = { hint = { enable = true }, + analysis = { + ignore = { '*' }, + autoImportCompletions = false, + }, }, + -- pyright = { + -- -- Using Ruff's import organizer + -- disableOrganizeImports = true, + -- }, }, handlers = { ['textDocument/publishDiagnostics'] = function() end, }, }) end, + -- ['pylsp'] = function() + -- lspconfig['pylsp'].setup({ + -- capabilities = capabilities, + -- settings = { + -- pylsp = { + -- plugins = { + -- autopep8 = { + -- enabled = true, + -- }, + -- pycodestyle = { + -- enabled = true, + -- ignore = { 'E501', 'E231', 'W503' }, + -- maxLineLength = 79, + -- }, + -- pylint = { + -- enabled = true, + -- executable = 'pylint', + -- args = { + -- '--enable=W0611,W0614', + -- }, + -- }, + -- }, + -- }, + -- }, + -- }) + -- end, ['emmet_ls'] = function() -- configure emmet language server lspconfig['emmet_ls'].setup({ @@ -144,5 +182,24 @@ mason_lspconfig.setup({ }, }) end, + ['cssls'] = function() + lspconfig.cssls.setup({ + capabilities = capabilities, + settings = { + css = { + validate = true, + lint = { + unknownAtRules = 'ignore', + }, + }, + scss = { + validate = true, + lint = { + unknownAtRules = 'ignore', + }, + }, + }, + }) + end, }, }) diff --git a/lua/plugins/configs/whichkey.lua b/lua/plugins/configs/whichkey.lua index 42b5473..e277db2 100644 --- a/lua/plugins/configs/whichkey.lua +++ b/lua/plugins/configs/whichkey.lua @@ -86,7 +86,7 @@ local n_mappings = { { 'ea', 'b#', desc = 'Alternate File' }, { 'ec', 'e $MYVIMRC', desc = 'Config' }, { - 'ed', + 'eC', 'lua require("telescope.builtin").find_files({cwd = vim.fn.stdpath("config")})', desc = 'Config Dir', }, @@ -95,6 +95,10 @@ local n_mappings = { { 'ef', 'Telescope file_browser', desc = 'File Browser' }, { 'em', 'e README.md', desc = 'Readme' }, { 'en', 'new', desc = 'New File' }, + { 'ex', '!chmod +x %', desc = 'Make Current File Executable' }, + { 'es', 'w', desc = 'Save File' }, + { 'ed', '!rm %', desc = 'Delete File' }, + { 'eD', '!rm %bdelete', desc = 'Delete File and Buffer' }, { 'f', group = ' Find' }, { 'ff', 'Telescope find_files', desc = 'Find Files (CWD)' }, @@ -318,6 +322,7 @@ local n_mappings = { { 't2', '2ToggleTerm', desc = 'Toggle Terminal' }, { 'th', 'Sterm', desc = 'Horizontal Terminal' }, { 'tv', 'Vterm', desc = 'Vertical Terminal' }, + { 'tc', 'close', desc = 'Hide Terminal' }, { 'u', group = ' Test' }, { 'uc', 'lua require("neotest").run.run()', desc = 'Run Current Test' }, diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 8d18477..fc016ec 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -1,4 +1,8 @@ return { + { + 'lambdalisue/suda.vim', + cmd = { 'SudaRead', 'SudaWrite' }, + }, { 'nvim-neo-tree/neo-tree.nvim', cmd = { 'Neotree' }, diff --git a/lua/plugins/extra.lua b/lua/plugins/extra.lua index a9d6fc8..b3040cc 100644 --- a/lua/plugins/extra.lua +++ b/lua/plugins/extra.lua @@ -1,4 +1,11 @@ return { + { + 'ggandor/leap.nvim', + -- event = { "BufAdd", "BufNewFile", "BufRead" }, + config = function() + require('leap').add_default_mappings() + end, + }, { 'ThePrimeagen/refactoring.nvim', config = function() diff --git a/lua/plugins/formater.lua b/lua/plugins/formater.lua index b6d3701..699c547 100644 --- a/lua/plugins/formater.lua +++ b/lua/plugins/formater.lua @@ -9,6 +9,8 @@ local formatting_servers = { 'php-cs-fixer', 'google-java-formatter', 'codespell', + 'autoflake', + 'djlint', } return { @@ -38,6 +40,7 @@ return { lua = { 'stylua' }, python = { 'isort', 'black' }, php = { 'php-cs-fixer' }, + htmldjango = { 'djlint' }, java = { 'google-java-formatter' }, graphql = { 'prettier' }, liquid = { 'prettier' }, @@ -46,6 +49,23 @@ return { ['*'] = { 'codespell' }, ['_'] = { 'trim_whitespace' }, }, + formatters = { + prettier = { + javascript = { + args = { '--single-quote' }, + }, + }, + isort = { + python = { + args = { '--profile', 'black' }, + }, + }, + black = { + python = { + args = { '--fast', '--line-length', '80' }, + }, + }, + }, format_on_save = function(bufnr) -- Disable with a global or buffer-local variable if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then @@ -54,7 +74,7 @@ return { return { lsp_fallback = true, async = false, - timeout_ms = 500, + timeout_ms = 2500, } end, }) @@ -63,7 +83,7 @@ return { conform.format({ lsp_fallback = true, async = true, - timeout_ms = 1000, + timeout_ms = 2500, }) end, { desc = 'Format file or range (in visual mode)' }) diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index dcf8e83..4cfd8a6 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -7,6 +7,7 @@ local linting_servers = { 'trivy', 'phpcs', 'markdownlint', + 'pylint', } return { diff --git a/snippets/django.json b/snippets/django.json new file mode 100644 index 0000000..0bb986f --- /dev/null +++ b/snippets/django.json @@ -0,0 +1,1052 @@ +{ + "adminview": { + "prefix": "adminview", + "body": [ + "@admin.register(${1})", + "class ${1}Admin(admin.ModelAdmin):", + "\t'''Admin View for ${1}'''", + "", + "\tlist_display = ('${2}',)", + "\tlist_filter = ('${3}',)", + "\tinlines = [", + "\t\t${4}Inline,", + "\t]", + "\traw_id_fields = ('${5}',)", + "\treadonly_fields = ('${6}',)", + "\tsearch_fields = ('${7}',)", + "\tdate_hierarchy = '${8}'", + "\tordering = ('${9}',)" + ], + "description": "Model Admin View", + "scope": "source.python" + }, + "stackedinline": { + "prefix": "stackedinline", + "body": [ + "class ${1}Inline(admin.StackedInline):", + "\t'''Stacked Inline View for ${1}'''", + "", + "\tmodel = ${2:${1}}", + "\tmin_num = ${3:3}", + "\tmax_num = ${4:20}", + "\textra = ${5:1}", + "\traw_id_fields = (${6},)" + ], + "description": "Stacked Inline", + "scope": "source.python" + }, + "tabularinline": { + "prefix": "tabularinline", + "body": [ + "class ${1}Inline(admin.TabularInline):", + "\t'''Tabular Inline View for ${1}'''", + "", + "\tmodel = ${2:${1}}", + "\tmin_num = ${3:3}", + "\tmax_num = ${4:20}", + "\textra = ${5:1}", + "\traw_id_fields = (${6},)" + ], + "description": "Tabular Inline", + "scope": "source.python" + }, + "simplelistfilter": { + "prefix": "simplelistfilter", + "body": [ + "class ${1:NAME}Filter(admin.SimpleListFilter):", + "", + "\ttitle = '$2'", + "\tparameter_name = '$0'", + "", + "\tdef lookups(self, request, model_admin):", + "\t\tpass", + "", + "\tdef queryset(self, request, queryset):", + "\t\treturn queryset" + ], + "description": "Admin SimpleList Filter", + "scope": "source.python" + }, + "iadmin": { + "prefix": "iadmin", + "body": "from django.contrib import admin", + "description": "from ... import admin", + "scope": "source.python" + }, + "iadminsite": { + "prefix": "iadminsite", + "body": "from django.contrib.admin import AdminSite", + "description": "from ... import AdminSite", + "scope": "source.python" + }, + "register": { + "prefix": "register", + "body": "admin.site.register($1)", + "description": "register the model class without providing a ModelAdmin description.", + "scope": "source.python" + }, + "registermadmin": { + "prefix": "registermadmin", + "body": "admin.site.register($1, $1Admin)", + "description": "register the model class providing a ModelAdmin description", + "scope": "source.python" + }, + "fieldsets": { + "prefix": "fieldsets", + "body": [ + "fieldsets = (", + "\t(None, {", + "\t\t'fields': (", + "\t\t\t$1", + "\t\t),", + "\t}),", + ")" + ], + "description": "", + "scope": "source.python" + }, + "Form": { + "prefix": "Form", + "body": [ + "class ${1:FORMNAME}(forms.Form):", + "\t\"\"\"${2:$1 definition}.\"\"\"", + "", + "\t${3:# TODO: Define form fields here}", + "" + ], + "description": "Form", + "scope": "source.python" + }, + "ModelForm": { + "prefix": "ModelForm", + "body": [ + "class ${1:MODELNAME}Form(forms.ModelForm):", + "\t\"\"\"${2:Form definition for $1}.\"\"\"", + "", + "\tclass Meta:", + "\t\t\"\"\"Meta definition for ${1}form.\"\"\"", + "", + "\t\tmodel = $1", + "\t\tfields = ('$3',)", + "" + ], + "description": "ModelForm", + "scope": "source.python" + }, + "fbool": { + "prefix": "fbool", + "body": "${1:FIELDNAME} = forms.BooleanField($2, required=${3:False})", + "description": "BooleanField (fbool)", + "scope": "source.python" + }, + "fchar": { + "prefix": "fchar", + "body": "${1:FIELDNAME} = forms.CharField($2,${3: max_length=$4,} required=${5:False})", + "description": "CharField (fchar)", + "scope": "source.python" + }, + "fchoice": { + "prefix": "fchoice", + "body": "${1:FIELDNAME} = forms.ChoiceField($2, choices=[${3:CHOICES}], required=${4:False})", + "description": "ChoiceField (fchoice)", + "scope": "source.python" + }, + "fcombo": { + "prefix": "fcombo", + "body": "${1:FIELDNAME} = forms.ComboField($2)", + "description": "ComboField (fcombo)", + "scope": "source.python" + }, + "fdate": { + "prefix": "fdate", + "body": "${1:FIELDNAME} = forms.DateField($2, required=${3:False})", + "description": "DateField (fdate)", + "scope": "source.python" + }, + "fdatetime": { + "prefix": "fdatetime", + "body": "${1:FIELDNAME} = forms.DateTimeField($2, required=${3:False})", + "description": "DateTimeField (fdatetime)", + "scope": "source.python" + }, + "fdecimal": { + "prefix": "fdecimal", + "body": "${1:FIELDNAME} = forms.DecimalField($2, required=${3:False})", + "description": "DecimalField (fdecimal)", + "scope": "source.python" + }, + "fduration": { + "prefix": "fduration", + "body": "${1:FIELDNAME} = forms.DurationField($2, required=${3:False})", + "description": "DurationField (fduration)", + "scope": "source.python" + }, + "femail": { + "prefix": "femail", + "body": "${1:FIELDNAME} = forms.EmailField($2, required=${3:False})", + "description": "EmailField (femail)", + "scope": "source.python" + }, + "ffile": { + "prefix": "ffile", + "body": "${1:FIELDNAME} = forms.FileField($2,${3: max_length=$4,} required=${5:False})", + "description": "FileField (ffile)", + "scope": "source.python" + }, + "ffilepath": { + "prefix": "ffilepath", + "body": "${1:FIELDNAME} = forms.FilePathField($2, path=${3:/absolute_path/}, required=${4:False})", + "description": "FilePathField (ffilepath)", + "scope": "source.python" + }, + "ffloat": { + "prefix": "ffloat", + "body": "${1:FIELDNAME} = forms.FloatField($2, required=${3:False})", + "description": "FloatField (ffloat)", + "scope": "source.python" + }, + "fip": { + "prefix": "fip", + "body": "${1:FIELDNAME} = forms.IPAddressField($2)", + "description": "IPAddressField (fip).\n\nThis field has been deprecated since version 1.7 in favor of GenericIPAddressField.\n\n", + "scope": "source.python" + }, + "fgenericip": { + "prefix": "fip", + "body": "${1:FIELDNAME} = forms.GenericIPAddressField($2)", + "description": "IPAddressField (fgenericip)", + "scope": "source.python" + }, + "fimg": { + "prefix": "fimg", + "body": "${1:FIELDNAME} = forms.ImageField($2, required=${3:False})", + "description": "ImageField (fimg)", + "scope": "source.python" + }, + "fint": { + "prefix": "fint", + "body": "${1:FIELDNAME} = forms.IntegerField($2, required=${3:False})", + "description": "IntegerField (fint)", + "scope": "source.python" + }, + "fmochoice": { + "prefix": "fmochoice", + "body": "${1:FIELDNAME} = forms.ModelChoiceField($2)", + "description": "ModelChoiceField (fmochoice)", + "scope": "source.python" + }, + "fmomuchoice": { + "prefix": "fmomuchoice", + "body": "${1:FIELDNAME} = forms.ModelMultipleChoiceField($2)", + "description": "ModelMultipleChoiceField (fmomuchoice)", + "scope": "source.python" + }, + "fmuval": { + "prefix": "fmuval", + "body": "${1:FIELDNAME} = forms.MultiValueField($2)", + "description": "MultiValueField (fmuval)", + "scope": "source.python" + }, + "fmuchoice": { + "prefix": "fmuchoice", + "body": "${1:FIELDNAME} = forms.MultipleChoiceField($2, choices=[${3:CHOICES}], required=${4:False})", + "description": "MultipleChoiceField (fmuchoice)", + "scope": "source.python" + }, + "ftypedmuchoice": { + "prefix": "ftypedmuchoice", + "body": "${1:FIELDNAME} = forms.TypedMultipleChoiceField($2, choices=[${3:CHOICES}], coerce=${4:TYPE}, required=${5:False})", + "description": "TypedMultipleChoiceField (ftypedmuchoice)", + "scope": "source.python" + }, + "fnullbool": { + "prefix": "fnullbool", + "body": "${1:FIELDNAME} = forms.NullBooleanField($2, required=${3:False})", + "description": "NullBooleanField (fnullbool)", + "scope": "source.python" + }, + "fregex": { + "prefix": "fregex", + "body": "${1:FIELDNAME} = forms.RegexField($2, regex=${3:REGEX}, required=${4:False})", + "description": "RegexField (fregex)", + "scope": "source.python" + }, + "fslug": { + "prefix": "fslug", + "body": "${1:FIELDNAME} = forms.SlugField($2, allow_unicode=${3:False}, required=${4:False})", + "description": "SlugField (fslug)", + "scope": "source.python" + }, + "fsdatetime": { + "prefix": "fsdatetime", + "body": "${1:FIELDNAME} = forms.SplitDateTimeField($2)", + "description": "SplitDateTimeField (fsdatetime)", + "scope": "source.python" + }, + "ftime": { + "prefix": "ftime", + "body": "${1:FIELDNAME} = forms.TimeField($2, required=${3:False})", + "description": "TimeField (ftime)", + "scope": "source.python" + }, + "ftchoice": { + "prefix": "ftchoice", + "body": "${1:FIELDNAME} = forms.TypedChoiceField($2, required=${3:False})", + "description": "TypedChoiceField (ftchoice)", + "scope": "source.python" + }, + "ftmuchoice": { + "prefix": "ftmuchoice", + "body": "${1:FIELDNAME} = forms.TypedMultipleChoiceField($2)", + "description": "TypedMultipleChoiceField (ftmuchoice)", + "scope": "source.python" + }, + "furl": { + "prefix": "furl", + "body": "${1:FIELDNAME} = forms.URLField($2, required=${3:False})", + "description": "URLField (furl)", + "scope": "source.python" + }, + "fuuid": { + "prefix": "fuuid", + "body": "${1:FIELDNAME} = forms.UUIDField($2, required=${3:False})", + "description": "UUIDField (fuuid)", + "scope": "source.python" + }, + "fsimplearray": { + "prefix": "fsimplearray", + "body": "${1:FIELDNAME} = SimpleArrayField()", + "description": "SimpleArrayField (fsimplearray).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fsplitarray": { + "prefix": "fsplitarray", + "body": "${1:FIELDNAME} = SplitArrayField()", + "description": "SplitArrayField (fsplitarray).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fhstore": { + "prefix": "fhstore", + "body": "${1:FIELDNAME} = HStoreField()", + "description": "HStoreField (fhstore).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fjson": { + "prefix": "fjson", + "body": "${1:FIELDNAME} = JSONField()", + "description": "JSONField (fjson).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fintrange": { + "prefix": "fintrange", + "body": "${1:FIELDNAME} = IntegerRangeField()", + "description": "IntegerRangeField (fintrange).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "ffloatrange": { + "prefix": "ffloatrange", + "body": "${1:FIELDNAME} = FloatRangeField()", + "description": "FloatRangeField (ffloatrange).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fdatetimerange": { + "prefix": "fdatetimerange", + "body": "${1:FIELDNAME} = DateTimeRangeField()", + "description": "DateTimeRangeField (fdatetimerange).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "fdaterange": { + "prefix": "fdaterange", + "body": "${1:FIELDNAME} = DateRangeField()", + "description": "DateRangeField (fdaterange).\n\n*PostgreSQL specific form fields*.", + "scope": "source.python" + }, + "ffi": { + "prefix": "ffi", + "body": "from .forms import $1", + "description": "", + "scope": "source.python" + }, + "iforms": { + "prefix": "iforms", + "body": "from django import forms", + "description": "from ... import forms", + "scope": "source.python" + }, + "ipostgresff": { + "prefix": "ipostgresff", + "body": "from django.contrib.postgres.forms import ${1|SimpleArrayField,SplitArrayField,HStoreField,JSONField,IntegerRangeField,FloatRangeField,DateTimeRangeField,DateRangeField|}", + "description": "PostgreSQL specific forms fields", + "scope": "source.python" + }, + "clean_data": { + "prefix": "clean_data", + "body": [ + "def clean_${1:FIELD}(self):", + "\t${1:FIELD} = self.cleaned_data.get('${1:FIELD}')", + "\n\n\t # TODO Validation\n", + "\treturn ${1:FIELD}" + ], + "description": "", + "scope": "source.python" + }, + "Model_full": { + "prefix": "Model_full", + "body": [ + "class ${1:MODELNAME}(models.Model):", + "\t\"\"\"${2:Model definition for $1}.\"\"\"", + "", + "\t${3:# TODO: Define fields here}", + "", + "\tclass Meta:", + "\t\t\"\"\"Meta definition for $1.\"\"\"", + "", + "\t\tverbose_name = '$1'", + "\t\tverbose_name_plural = '$1s'", + "", + "\tdef ${4|__str__,__unicode__|}(self):", + "\t\t\"\"\"Unicode representation of $1.\"\"\"", + "\t\t${7|pass,return '{}'.format(self. ) # TODO,return f'{self. }' # TODO|}", + "", + "\tdef save(self):", + "\t\t\"\"\"Save method for $1.\"\"\"", + "\t\tpass", + "", + "\tdef get_absolute_url(self):", + "\t\t\"\"\"Return absolute url for $1.\"\"\"", + "\t\treturn ('')", + "", + "\t${6:# TODO: Define custom methods here}", + "" + ], + "description": "Model (full)", + "scope": "source.python" + }, + "Model": { + "prefix": "Model", + "body": [ + "class ${1:MODELNAME}(models.Model):", + "\t\"\"\"${2:Model definition for $1}.\"\"\"", + "", + "\t${3:# TODO: Define fields here}", + "", + "\tclass Meta:", + "\t\t\"\"\"Meta definition for $1.\"\"\"", + "", + "\t\tverbose_name = '$1'", + "\t\tverbose_name_plural = '$1s'", + "", + "\tdef ${4|__str__,__unicode__|}(self):", + "\t\t\"\"\"Unicode representation of $1.\"\"\"", + "\t\t${5|pass,return '{}'.format(self. ) # TODO,return f'{self. }' # TODO|}", + "" + ], + "description": "Model", + "scope": "source.python" + }, + "modelmixin": { + "prefix": "modelmixin", + "body": [ + "class $1Mixin(models.Model):", + "\t${2:# TODO}\r\n", + "\tclass Meta:", + "\t\tabstract = True" + ], + "description": "", + "scope": "source.python" + }, + "queryset": { + "prefix": "qs", + "body": ["class $1QuerySet(models.QuerySet):", "\tpass"], + "description": "", + "scope": "source.python" + }, + "manager": { + "prefix": "mngr", + "body": [ + "class $1Manager(models.Manager):", + "\tdef get_queryset(self):", + "\t\treturn super ($1Manager, self).get_queryset().${2|filter,exclude,order_by,distinct,reverse|}($3)" + ], + "description": "Add extra Manager methods", + "scope": "source.python" + }, + "queryset_from_manager": { + "prefix": "qs_mngr", + "body": [ + "class $1Manager(models.Manager):", + "\tdef get_queryset(self):", + "\t\treturn $1QuerySet(self.model, using=self._db)" + ], + "description": "Modify the initial QuerySet the Manager returns.", + "scope": "source.python" + }, + "mauto": { + "prefix": "mauto", + "body": "${1:FIELDNAME} = models.AutoField($2)", + "description": "AutoField (mauto).\n\nAn IntegerField that automatically increments according to available IDs.\n\n", + "scope": "source.python" + }, + "mbigauto": { + "prefix": "mbigauto", + "body": "${1:FIELDNAME} = models.BigAutoField($2)", + "description": "BigAutoField (mbigauto).\n\n[New in Django 1.10.]\n\nA 64-bit integer, much like an AutoField.\n\n", + "scope": "source.python" + }, + "mbigint": { + "prefix": "mbigint", + "body": "${1:FIELDNAME} = models.BigIntegerField($2)", + "description": "BigIntegerField (mbigint).\n\nA 64-bit integer, much like an IntegerField.\n\n", + "scope": "source.python" + }, + "mbinary": { + "prefix": "mbinary", + "body": "${1:FIELDNAME} = models.BinaryField($2)", + "description": "BinaryField (mbinary).\n\nA field to store raw binary data.\n\n", + "scope": "source.python" + }, + "mbool": { + "prefix": "mbool", + "body": "${1:FIELDNAME} = models.BooleanField($2)", + "description": "BooleanField (mbool).\n\nA true/false field.\n\n", + "scope": "source.python" + }, + "mchar": { + "prefix": "mchar", + "body": "${1:FIELDNAME} = models.CharField($2, max_length=${3:50})", + "description": "CharField (mchar)", + "scope": "source.python" + }, + "mcoseint": { + "prefix": "mcoseint", + "body": "${1:FIELDNAME} = models.CommaSeparatedIntegerField($2)", + "description": "CommaSeparatedIntegerField (mcoseint).\n\nThis field is deprecated since 1.9 in favor of CharField with validators.\n\n", + "scope": "source.python" + }, + "mdate": { + "prefix": "mdate", + "body": "${1:FIELDNAME} = models.DateField($2, auto_now=${3:False}, auto_now_add=${4:False})", + "description": "DateField (mdate).\n\nA date, represented in Python by a datetime.date instance.\n\n", + "scope": "source.python" + }, + "mdatetime": { + "prefix": "mdatetime", + "body": "${1:FIELDNAME} = models.DateTimeField($2, auto_now=${3:False}, auto_now_add=${4:False})", + "description": "DateTimeField (mdatetime).\n\nA date, represented in Python by a datetime.datetime instance.\n\n", + "scope": "source.python" + }, + "mdecimal": { + "prefix": "mdecimal", + "body": "${1:FIELDNAME} = models.DecimalField($2, max_digits=${3:5}, decimal_places=${4:2})", + "description": "DecimalField (mdecimal).\n\nA fixed-precision decimal number, represented in Python by a Decimal instance.\n\n", + "scope": "source.python" + }, + "mduration": { + "prefix": "mduration", + "body": "${1:FIELDNAME} = models.DurationField($2)", + "description": "DurationField (mduration).\n\nA field for storing periods of time - modeled in Python by timedelta.\n\n", + "scope": "source.python" + }, + "memail": { + "prefix": "memail", + "body": "${1:FIELDNAME} = models.EmailField($2, max_length=${3:254})", + "description": "EmailField (memail).\n\nA CharField that checks that the value is a valid email address.\n\n", + "scope": "source.python" + }, + "mfile": { + "prefix": "mfile", + "body": "${1:FIELDNAME} = models.FileField($2, upload_to=${3:None}, max_length=${4:100})", + "description": "FileField (mfile).\n\nA file-upload field.\n\n", + "scope": "source.python" + }, + "mfilepath": { + "prefix": "mfilepath", + "body": "${1:FIELDNAME} = models.FilePathField($2, path=${3:None}, match=${4:None}, recursive=${5:recursive}, max_length=${6:100})", + "description": "FilePathField (mfilepath).\n\nA CharField whose choices are limited to the filenames in a certain directory on the filesystem.\n\n", + "scope": "source.python" + }, + "mfloat": { + "prefix": "mfloat", + "body": "${1:FIELDNAME} = models.FloatField($2)", + "description": "FloatField (mfloat).\n\nA floating-point number represented in Python by a float instance.\n\n", + "scope": "source.python" + }, + "fk": { + "prefix": "fk", + "body": "${1:FIELDNAME} = models.ForeignKey(${2:OTHERMODEL}, on_delete=models.${3|CASCADE,PROTECT,SET_NULL,SET_DEFAULT,SET(),DO_NOTHING|})", + "description": "ForeignKey (fk).\n\nA many-to-one relationship.\n\non_delete will become a required argument in Django 2.0. In older versions it defaults to CASCADE.\n\n", + "scope": "source.python" + }, + "mip": { + "prefix": "mip", + "body": "${1:FIELDNAME} = models.IPAddressField($2)", + "description": "IPAddressField (mip).\n\nThis field has been deprecated since version 1.7 in favor of GenericIPAddressField.\n\n", + "scope": "source.python" + }, + "mimg": { + "prefix": "mimg", + "body": "${1:FIELDNAME} = models.ImageField($2, upload_to=${3:None}, height_field=${4:None}, width_field=${5:None}, max_length=${5:100})", + "description": "ImageField (mimg).\n\nInherits all attributes and methods from FileField, but also validates that the uploaded object is a valid image.\n\n", + "scope": "source.python" + }, + "mint": { + "prefix": "mint", + "body": "${1:FIELDNAME} = models.IntegerField($2)", + "description": "IntegerField (mint).\n\nAn integer. Values from -2147483648 to 2147483647 are safe in all databases supported by Django.\n\n", + "scope": "source.python" + }, + "mgenericip": { + "prefix": "mgenericip", + "body": "${1:FIELDNAME} = models.GenericIPAddressField($2, protocol=${3:'both'}, unpack_ipv4=${4:False})", + "description": "GenericIPAddressField (mimg).\n\nAn IPv4 or IPv6 address, in string format.\n\n", + "scope": "source.python" + }, + "m2m": { + "prefix": "m2m", + "body": "${1:FIELDNAME} = models.ManyToManyField(${2:OTHERMODEL})", + "description": "ManyToManyField (m2m).\n\nA many-to-many relationship.\n\n", + "scope": "source.python" + }, + "mnullbool": { + "prefix": "mnullbool", + "body": "${1:FIELDNAME} = models.NullBooleanField($2)", + "description": "NullBooleanField (mnullbool).\n\nLike a BooleanField, but allows NULL as one of the options.\n\n", + "scope": "source.python" + }, + "o2o": { + "prefix": "o2o", + "body": "${1:FIELDNAME} = models.OneToOneField(${2:OTHERMODEL}, on_delete=models.${3|CASCADE,PROTECT,SET_NULL,SET_DEFAULT,SET(),DO_NOTHING|})", + "description": "OneToOneField (o2o).\n\nA one-to-one relationship.\n\non_delete will become a required argument in Django 2.0. In older versions it defaults to CASCADE.\n\n", + "scope": "source.python" + }, + "mphone": { + "prefix": "mphone", + "body": "${1:FIELDNAME} = models.PhoneNumberField($2)", + "description": "PhoneNumberField (mphone).\n\n*external package: django-phonenumber-field*\n\n", + "scope": "source.python" + }, + "mposint": { + "prefix": "mposint", + "body": "${1:FIELDNAME} = models.PositiveIntegerField($2)", + "description": "PositiveIntegerField (mposint).\n\nLike an IntegerField, but must be either positive or zero (0).\n\n", + "scope": "source.python" + }, + "mpossmallint": { + "prefix": "mpossmallint", + "body": "${1:FIELDNAME} = models.PositiveSmallIntegerField($2)", + "description": "PositiveSmallIntegerField (mpossmallint).\n\nLike a PositiveIntegerField, but only allows values under a certain (database-dependent) point.\n\n", + "scope": "source.python" + }, + "mslug": { + "prefix": "mslug", + "body": "${1:FIELDNAME} = models.SlugField($2)", + "description": "SlugField (mslug).\n\nA slug is a short label for something, containing only letters, numbers, underscores or hyphens. They’re generally used in URLs.\n\n", + "scope": "source.python" + }, + "msmallint": { + "prefix": "msmallint", + "body": "${1:FIELDNAME} = models.SmallIntegerField($2)", + "description": "SmallIntegerField (msmallint).\n\nLike an IntegerField, but only allows values under a certain (database-dependent) point.\n\n", + "scope": "source.python" + }, + "mtext": { + "prefix": "mtext", + "body": "${1:FIELDNAME} = models.TextField($2)", + "description": "TextField (mtext).\n\nA large text field.\n\n", + "scope": "source.python" + }, + "mtime": { + "prefix": "mtime", + "body": "${1:FIELDNAME} = models.TimeField($2, auto_now=${4:False}, auto_now_add=${5:False})", + "description": "TimeField (mtime).\n\nA time, represented in Python by a datetime.time instance.\n\n", + "scope": "source.python" + }, + "murl": { + "prefix": "murl", + "body": "${1:FIELDNAME} = models.URLField($2, max_length=${3:200})", + "description": "URLField (murl).\n\nA CharField for a URL.\n\n", + "scope": "source.python" + }, + "musstate": { + "prefix": "musstate", + "body": "${1:FIELDNAME} = models.USStateField($2)", + "description": "USStateField (musstate).\n\n*external package: django-localflavor*\n\n", + "scope": "source.python" + }, + "muuid": { + "prefix": "muuid", + "body": "${1:FIELDNAME} = models.UUIDField($2)", + "description": "UUIDField (muuid).\n\nA field for storing universally unique identifiers. Uses Python’s UUID class.\n\n", + "scope": "source.python" + }, + "mxml": { + "prefix": "mxml", + "body": "${1:FIELDNAME} = models.XMLField($2)", + "description": "XMLField (mxml).\n\n*All uses of XMLField can be replaced with TextField. This field has been deprecated since version 1.3*\n\n", + "scope": "source.python" + }, + "mstore": { + "prefix": "mstore", + "body": "${1:FIELDNAME} = HStoreField()", + "description": "HStoreField (mstore).\n\n*PostgreSQL specific model fields*.\n\nA field for storing key-value pairs. The Python data type used is a dict.\n\n", + "scope": "source.python" + }, + "mjson": { + "prefix": "mjson", + "body": "${1:FIELDNAME} = JSONField()", + "description": "JSONField (mjson).\n\n*PostgreSQL specific model fields*.\n\n[New in Django 1.11.]\n\nA field for storing JSON encoded data.\n\n", + "scope": "source.python" + }, + "marray": { + "prefix": "marray", + "body": "${1:FIELDNAME} = ArrayField()", + "description": "ArrayField (marray).\n\n*PostgreSQL specific model fields*.\n\nA field for storing lists of data\n\n", + "scope": "source.python" + }, + "fmai": { + "prefix": "fmai", + "body": "from .managers import $1QuerySet", + "description": "", + "scope": "source.python" + }, + "fmi": { + "prefix": "fmi", + "body": "from .models import $1", + "description": "", + "scope": "source.python" + }, + "imodels": { + "prefix": "imodels", + "body": "from django.db import models", + "description": "from ... import models", + "scope": "source.python" + }, + "ipy2_unicode_compatible": { + "prefix": "iuc", + "body": "from django.utils.encoding import python_2_unicode_compatible", + "description": "For forwards compatibility, this decorator is available as of Django 1.4.2.", + "scope": "source.python" + }, + "ipostgresmf": { + "prefix": "ipostgresmf", + "body": "from django.contrib.postgres.fields import ${1|ArrayField,JSONField,HStoreField|}", + "description": "PostgreSQL specific model fields", + "scope": "source.python" + }, + "isignals": { + "prefix": "isignals", + "body": "from django.db.models.signals import ${1|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}", + "description": "Signals for Django Model", + "scope": "source.python" + }, + "__str__": { + "prefix": "str", + "body": ["def __str__(self):", "\treturn self${1: # TODO}"], + "description": "", + "scope": "source.python" + }, + "get_absolute_url": { + "prefix": "get_absolute_url", + "body": [ + "def get_absolute_url(self):", + "\tfrom django.core.urlresolvers import reverse", + "\treturn reverse('$1', kwargs={'pk': self.pk})" + ], + "description": "", + "scope": "source.python" + }, + "receiver": { + "prefix": "receiver", + "body": [ + "def ${1:FUNCTIONNAME}_${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}_receiver(sender, instance, *args, **kwargs):", + "\tpass", + "\n\n${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}.connect(${1:name}_${2|pre_init,post_init,pre_save,post_save,pre_delete,post_delete,m2m_changed,class_prepared,Management signals,pre_migrate,post_migrate|}_receiver, sender=${3:MODELNAME})" + ], + "description": "", + "scope": "source.python" + }, + "__init__": { + "prefix": "__init__", + "body": "\r\ndef __init__(self, *args, **kwargs):\r\n super(${1:CLASS_NAME}, self).__init__(*args, **kwargs)\r\n", + "description": "", + "scope": "source.python" + }, + "ipdb": { + "prefix": "ipdb", + "body": "import ipdb; ipdb.set_trace()", + "description": "ipdb debug tool", + "scope": "source.python" + }, + "npdb": { + "prefix": "npdb", + "body": "from nose.tools import set_trace; set_trace()", + "description": "nose pdb debug tool", + "scope": "source.python" + }, + "pdb": { + "prefix": "pdb", + "body": "import pdb; pdb.set_trace()", + "description": "pdb debug tool", + "scope": "source.python" + }, + "traceback": { + "prefix": "traceback", + "body": "import traceback; traceback.print_exc();", + "description": "traceback print exception", + "scope": "source.python" + }, + "utfc": { + "prefix": "utfc", + "body": "# -*- coding: utf-8 -*-", + "description": "coding: utf-8", + "scope": "source.python" + }, + "iunicode_literals": { + "prefix": "iul", + "body": "from __future__ import unicode_literals", + "description": "In order to enable the same behavior in Python 2, every module must import: \n", + "scope": "source.python" + }, + "ilib": { + "prefix": "ilib", + "body": ["from django import template", "register = template.Library()"], + "description": "", + "scope": "source.python" + }, + "li18n": { + "prefix": "li18n", + "body": "{% load i18n %}", + "description": "", + "scope": "text.html.django" + }, + "lstatic": { + "prefix": "lstatic", + "body": "{% load staticfiles %}", + "description": "", + "scope": "text.html.django" + }, + "ltags": { + "prefix": "ltags", + "body": "{% load $SELECTION$1_tags %}", + "description": "", + "scope": "text.html.django" + }, + "register_assignment_tag": { + "prefix": "register_assignment_tag", + "body": [ + "def get_$1(context):", + "\trequest = context.get('request')", + "\t$1 = ${2:[]}", + "\treturn ${3:$1}" + ], + "description": "", + "scope": "source.python" + }, + "register_filter": { + "prefix": "register_filter", + "body": ["@register.filter", "def $1(value):", "\treturn value$2"], + "description": "", + "scope": "source.python" + }, + "register_inclusion_tag": { + "prefix": "register_inclusion_tag", + "body": [ + "@register.inclusion_tag(${2:'$1.html'}, takes_context=True)", + "def $1(context):", + "\trequest = context.get('request')", + "\t$3", + "\treturn {", + "\t\t'request': request,", + "\t\t$4", + "\t}" + ], + "description": "", + "scope": "source.python" + }, + "register_simple_tag": { + "prefix": "register_simple_tag", + "body": [ + "@register.simple_tag(takes_context=True)", + "def $1(context):", + "\trequest = context.get('request')", + "\treturn ${2:'It Works!'}" + ], + "description": "", + "scope": "source.python" + }, + "urlresolvers": { + "prefix": "iurlresolvers", + "body": "from django.core.urlresolvers import ${1|reverse,reverse_lazy,resolve,get_script_prefix|}", + "description": "*Deprecated since version 1.10*\n\nUtility functions.\n\n", + "scope": "source.python" + }, + "urls (≥1.10 & ≤1.11)": { + "prefix": "iurls", + "body": "from django.urls import ${1|reverse,reverse_lazy,resolve,get_script_prefix|}", + "description": "Utility functions for use in URLconfs.", + "scope": "source.python" + }, + "conf.urls (≤1.11)": { + "prefix": "iconf_urls", + "body": "from django.conf.urls import ${1|static,url,include,handler400,handler403,handler404,handler500|}", + "description": "Utility functions for use in URLconfs.", + "scope": "source.python" + }, + "urls (≥2.0)": { + "prefix": "iurls", + "body": "from django.urls import ${1|path,re_path,include,reverse,reverse_lazy,register_converter|}", + "description": "Utility functions for use in URLconfs.", + "scope": "source.python" + }, + "conf.urls (≥2.0)": { + "prefix": "iconf_urls", + "body": "from django.conf.urls import ${1|static,url,handler400,handler403,handler404,handler500|}", + "description": "Utilityfunctions for use in URLconfs.", + "scope": "source.python" + }, + "url_stack": { + "prefix": "url_stack", + "body": [ + "${1|url,re_path|}(", + "\tr'^${2:REGEX}/$',", + "\t${3:VIEW}${4:.as_view()},", + "\tname='$5'", + ")," + ], + "description": "url(regex, view, kwargs=None, name=None)\n\n*url is an alias to re_path*\n\n", + "scope": "source.python" + }, + "url_inline": { + "prefix": "url_inline", + "body": [ + "${1|url,re_path|}(r'^${2:REGEX}/$', ${3:VIEW}${4:.as_view()}, name='$5')," + ], + "description": "url(regex, view, kwargs=None, name=None)\n\n*url is an alias to re_path*\n\n", + "scope": "source.python" + }, + "path_stack": { + "prefix": "path_stack", + "body": [ + "path(", + "\t'${1:ROUTE}/',", + "\t${2:VIEW}${3:.as_view()},", + "\tname='$4'", + ")," + ], + "description": "path(route, view, kwargs=None, name=None)", + "scope": "source.python" + }, + "path_inline": { + "prefix": "path_inline", + "body": ["path('${1:ROUTE}/', ${2:VIEW}${3:.as_view()}, name='$4'),"], + "description": "path(route, view, kwargs=None, name=None)", + "scope": "source.python" + }, + "urlpatterns": { + "prefix": "urlpatterns", + "body": ["urlpatterns = [", "\t$0", "]"], + "description": "", + "scope": "source.python" + }, + "repk": { + "prefix": "repk", + "body": "r'^(?P<${1:pk}>d+)/$'", + "description": "PK URL regex", + "scope": "source.python" + }, + "reslug": { + "prefix": "reslug", + "body": "r'^(?P<${1:slug}>[-w]+)/$'", + "description": "Slug URL regex", + "scope": "source.python" + }, + "reusername": { + "prefix": "reusername", + "body": "r'^(?P[w.@+-]+)/$'", + "description": "Username regex", + "scope": "source.python" + }, + "createview": { + "prefix": "createview", + "body": "\r\nclass ${1:MODEL_NAME}CreateView(CreateView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "deleteview": { + "prefix": "deleteview", + "body": "\r\nclass ${1:MODEL_NAME}DeleteView(DeleteView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "detailview": { + "prefix": "detailview", + "body": "\r\nclass ${1:MODEL_NAME}DetailView(DetailView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "listview": { + "prefix": "listview", + "body": "\r\nclass ${1:MODEL_NAME}ListView(ListView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "templateview": { + "prefix": "templateview", + "body": "\r\nclass ${1:CLASS_NAME}(TemplateView):\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "updateview": { + "prefix": "updateview", + "body": "\r\nclass ${1:MODEL_NAME}UpdateView(UpdateView):\r\n model = ${1:MODEL_NAME}\r\n template_name = \"${2:TEMPLATE_NAME}\"\r\n", + "description": "", + "scope": "source.python" + }, + "from views import": { + "prefix": "fvi", + "body": "from . import $1", + "description": "", + "scope": "source.python" + }, + "igenericviews": { + "prefix": "igenericviews", + "body": "from django.views.generic import ${1|CreateView,DetailView,FormView,ListView,TemplateView,UpdateView|}", + "description": "Generic class-based views", + "scope": "source.python" + }, + "isettings": { + "prefix": "isettings", + "body": "from django.conf import settings", + "description": "from django.conf import settings", + "scope": "source.python" + }, + "view": { + "prefix": "view", + "body": "def ${1:VIEWNAME}(request):", + "description": "View", + "scope": "source.python" + }, + "dispatch": { + "prefix": "dispatch", + "body": "\r\ndef dispatch(self, request, *args, **kwargs):\r\n return super(${1:CLASS_NAME}, self).dispatch(request, *args, **kwargs)\r\n", + "description": "", + "scope": "source.python" + }, + "context": { + "prefix": "get_context_data", + "body": "\r\ndef get_context_data(self, **kwargs):\r\n context = super(${1:CLASS_NAME}, self).get_context_data(**kwargs)\r\n return context\r\n", + "description": "", + "scope": "source.python" + }, + "get_queryset": { + "prefix": "get_queryset", + "body": [ + "def get_queryset(self):", + "\tqueryset = super(${1:CLASS_NAME}, self).get_queryset()", + "\tqueryset = queryset${3: # TODO}", + "\treturn queryset" + ], + "description": "", + "scope": "source.python" + } +} diff --git a/snippets/htmldjango.json b/snippets/htmldjango.json new file mode 100644 index 0000000..de55e6a --- /dev/null +++ b/snippets/htmldjango.json @@ -0,0 +1,266 @@ +{ + "autoescape": { + "prefix": "autoescape", + "body": "\r\n{% autoescape ${1:off} %}\r\n\t${2:$SELECTION}\r\n{% endautoescape %}\r\n", + "description": "autoescape", + "scope": "text.html.django" + }, + "block": { + "prefix": "block", + "body": "\r\n{% block ${1:blockname} %}\r\n\t${2:$SELECTION}\r\n{% endblock ${1:blockname} %}\r\n\t", + "description": "block", + "scope": "text.html.django" + }, + "blocktrans": { + "prefix": "blocktrans", + "body": "\r\n{% blocktrans %}\r\n\t${1:$SELECTION}\r\n{% endblocktrans %}\r\n", + "description": "blocktrans", + "scope": "text.html.django" + }, + "comment": { + "prefix": "comment", + "body": "\r\n{% comment %}\r\n\t${1:$SELECTION}\r\n{% endcomment %}\r\n\t", + "description": "comment", + "scope": "text.html.django" + }, + "var": { + "prefix": "var", + "body": "{{ ${1:$SELECTION} }}", + "description": "context variable (var)", + "scope": "text.html.django" + }, + "csrf": { + "prefix": "csrf", + "body": "{% csrf_token %}", + "description": "csrf_token", + "scope": "text.html.django" + }, + "cycle": { + "prefix": "cycle", + "body": "{% cycle $1 %}", + "description": "cycle", + "scope": "text.html.django" + }, + "debug": { + "prefix": "debug", + "body": "{% debug %}", + "description": "debug", + "scope": "text.html.django" + }, + "elif": { + "prefix": "elif", + "body": "{% elif %}", + "description": "elif", + "scope": "text.html.django" + }, + "else": { + "prefix": "else", + "body": "{% else %}", + "description": "else", + "scope": "text.html.django" + }, + "ext": { + "prefix": "ext", + "body": "{% extends '${1:$SELECTION}' %}", + "description": "extends (ext)", + "scope": "text.html.django" + }, + "extends": { + "prefix": "extends", + "body": "{% extends '${1:$SELECTION}' %}", + "description": "extends", + "scope": "text.html.django" + }, + "extrahead": { + "prefix": "extrahead", + "body": "\r\n{% block extrahead %}\r\n\t${1:$SELECTION}\r\n{% endblock extrahead %}\r\n\t", + "description": "block extrahead", + "scope": "text.html.django" + }, + "extrastyle": { + "prefix": "extrastyle", + "body": "\r\n{% block extrastyle %}\r\n\t${1:$SELECTION}\r\n{% endblock extrastyle %}\r\n\t", + "description": "block extrastyle", + "scope": "text.html.django" + }, + "filter": { + "prefix": "filter", + "body": "\r\n{% filter $1 %}\r\n\t${2:$SELECTION}\r\n{% endfilter %}\r\n", + "description": "filter", + "scope": "text.html.django" + }, + "firstof": { + "prefix": "firstof", + "body": "{% firstof $1 %}", + "description": "firstof", + "scope": "text.html.django" + }, + "for": { + "prefix": "for", + "body": "\r\n{% for $1 in $2 %}\r\n\t${3:$SELECTION}\r\n{% endfor %}\r\n\t", + "description": "for", + "scope": "text.html.django" + }, + "fore": { + "prefix": "fore", + "body": "\r\n{% for $1 in $2 %}\r\n\t$3\r\n{% empty %}\r\n\t$4\r\n{% endfor %}\r\n\t", + "description": "for... empty...", + "scope": "text.html.django" + }, + "iblock": { + "prefix": "iblock", + "body": "{% block ${1:blockname} %}${2:$SELECTION}{% endblock ${1:blockname} %}", + "description": "inline block", + "scope": "text.html.django" + }, + "if": { + "prefix": "if", + "body": "\r\n{% if $1 %}\r\n\t${2:$SELECTION}\r\n{% endif %}\r\n\t", + "description": "if", + "scope": "text.html.django" + }, + "ifchanged": { + "prefix": "ifchanged", + "body": "\r\n{% ifchanged $1 %}\r\n\t${2:$SELECTION}\r\n{% endifchanged %}\r\n\t", + "description": "ifchanged", + "scope": "text.html.django" + }, + "ife": { + "prefix": "ife", + "body": "\r\n{% if $1 %}\r\n\t$2\r\n{% else %}\r\n\t$3\r\n{% endif %}\r\n\t", + "description": "if... else...", + "scope": "text.html.django" + }, + "ifelse": { + "prefix": "ifelse", + "body": "\r\n{% if $1 %}\r\n\t$2\r\n{% else %}\r\n\t$3\r\n{% endif %}\r\n\t", + "description": "if... else...", + "scope": "text.html.django" + }, + "ifeq": { + "prefix": "ifeq", + "body": "\r\n{% ifequal $1 $2 %}\r\n\t${3:$SELECTION}\r\n{% endifequal %}\r\n\t", + "description": "ifequal (ifeq)", + "scope": "text.html.django" + }, + "ifequal": { + "prefix": "ifequal", + "body": "\r\n{% ifequal $1 $2 %} \r\n\t${3:$SELECTION}\r\n{% endifequal %}\r\n\t", + "description": "ifequal", + "scope": "text.html.django" + }, + "ifnotequal": { + "prefix": "ifnotequal", + "body": "\r\n{% ifnotequal $1 $2 %}\r\n\t${3:$SELECTION}\r\n{% endifnotequal %}\r\n\t", + "description": "ifnotequal", + "scope": "text.html.django" + }, + "inc": { + "prefix": "inc", + "body": "{% include ${1:'$2'} %}", + "description": "include (inc)", + "scope": "text.html.django" + }, + "include": { + "prefix": "include", + "body": "{% include ${1:'$2'} %}", + "description": "include", + "scope": "text.html.django" + }, + "load": { + "prefix": "load", + "body": "{% load $1 %}", + "description": "load", + "scope": "text.html.django" + }, + "media": { + "prefix": "media", + "body": "{{ MEDIA_URL }} ", + "description": "media", + "scope": "text.html.django" + }, + "now": { + "prefix": "now", + "body": "{% now '$1' %}", + "description": "now", + "scope": "text.html.django" + }, + "regroup": { + "prefix": "regroup", + "body": "{% regroup $1 by $2 as $3 %}", + "description": "regroup", + "scope": "text.html.django" + }, + "spaceless": { + "prefix": "spaceless", + "body": "\r\n{% spaceless %}\r\n\t${1:$SELECTION}\r\n{% endspaceless %}\r\n\t", + "description": "spaceless", + "scope": "text.html.django" + }, + "ssi": { + "prefix": "ssi", + "body": "{% ssi $1 ${2:parsed} %}", + "description": "ssi", + "scope": "text.html.django" + }, + "static": { + "prefix": "static", + "body": "{% static '${1:$SELECTION}' %}", + "description": "static", + "scope": "text.html.django" + }, + "staticu": { + "prefix": "staticu", + "body": "{{ STATIC_URL }} ", + "description": "static URL", + "scope": "text.html.django" + }, + "super": { + "prefix": "super", + "body": "{{ block.super }}", + "description": "block.super", + "scope": "text.html.django" + }, + "tag": { + "prefix": "tag", + "body": "{% $1 %}", + "description": "tag braces", + "scope": "text.html.django" + }, + "templatetag": { + "prefix": "templatetag", + "body": "{% templatetag $1 %}", + "description": "templatetag", + "scope": "text.html.django" + }, + "trans": { + "prefix": "trans", + "body": "{% trans '${1:$SELECTION}' %}", + "description": "trans", + "scope": "text.html.django" + }, + "url": { + "prefix": "url", + "body": "{% url $1 %}", + "description": "url", + "scope": "text.html.django" + }, + "verbatim": { + "prefix": "verbatim", + "body": "\r\n{% verbatim %}\r\n\t${1:$SELECTION}\r\n{% endverbatim %}\r\n\t", + "description": "verbatim", + "scope": "text.html.django" + }, + "widthratio": { + "prefix": "widthratio", + "body": "{% widthratio ${1:this_value} ${2:max_value} ${3:100} %}", + "description": "widthratio", + "scope": "text.html.django" + }, + "with": { + "prefix": "with", + "body": "\r\n{% with $1 as $2 %}\r\n\t${3:$SELECTION}\r\n{% endwith %}\r\n\t", + "description": "with", + "scope": "text.html.django" + } +} diff --git a/snippets/javascript.json b/snippets/javascript.json new file mode 100644 index 0000000..4cea561 --- /dev/null +++ b/snippets/javascript.json @@ -0,0 +1,349 @@ +{ + "addEventListener": { + "prefix": "ae", + "body": "${1:document}.addEventListener('${2:event}', ${3:ev} => {\n\t${0}\n})" + }, + "removeEventListener": { + "prefix": "rel", + "body": "${1:document}.removeEventListener('${2:event}', ${3:listener})" + }, + "getElementById": { + "prefix": "gi", + "body": "${1:document}.getElementById('${2:id}')" + }, + "getElementsByClassName": { + "prefix": "gc", + "body": "Array.from(${1:document}.getElementsByClassName('${2:class}'))" + }, + "getElementsByTagName": { + "prefix": "gt", + "body": "Array.from(${1:document}.getElementsByTagName('${2:tag}'))" + }, + "querySelector": { + "prefix": "qs", + "body": "${1:document}.querySelector('${2:selector}')" + }, + "querySelectorAll": { + "prefix": "qsa", + "body": "Array.from(${1:document}.querySelectorAll('${2:selector}'))" + }, + "createDocumentFragment": { + "prefix": "cdf", + "body": "${1:document}.createDocumentFragment(${2:elem})" + }, + "createElement": { + "prefix": "cel", + "body": "${1:document}.createElement(${2:elem})" + }, + "await Promise.all": { + "prefix": "apa", + "body": "await Promise.all(${1:value})" + }, + "await Promise.all with destructuring": { + "prefix": "apad", + "body": "const [${0}] = await Promise.all(${1:value})" + }, + "await Promise.all map": { + "prefix": "apm", + "body": "await Promise.all(${1:array}.map(async (${2:value}) => {\n\t${0}\n}))" + }, + "await sleep": { + "prefix": "ast", + "body": "await new Promise((r) => setTimeout(r, ${0}))" + }, + "Node callback": { + "prefix": "cb", + "body": "function (err, ${1:value}) {\n\tif (err) throw err\n\t${0}\n}" + }, + "process.env": { + "prefix": "pe", + "body": "process.env" + }, + "Promise.all": { + "prefix": "pa", + "body": "Promise.all(${1:value})" + }, + "Promise.resolve": { + "prefix": "prs", + "body": "Promise.resolve(${1:value})" + }, + "Promise.reject": { + "prefix": "prj", + "body": "Promise.reject(${1:value})" + }, + "Promise": { + "prefix": "p", + "body": "Promise" + }, + "new Promise": { + "prefix": "np", + "body": "new Promise((resolve, reject) => {\n\t${0}\n})" + }, + "Promise.then": { + "prefix": "pt", + "body": "${1:promise}.then((${2:value}) => {\n\t${0}\n})" + }, + "Promise.catch": { + "prefix": "pc", + "body": "${1:promise}.catch(error => {\n\t${0}\n})" + }, + "await": { + "prefix": "a", + "body": "await ${0}" + }, + "If Statement": { + "prefix": "if", + "body": ["if (${1:condition}) {", "\t$0", "}"], + "description": "If Statement" + }, + "If-Else Statement": { + "prefix": "ifelse", + "body": ["if (${1:condition}) {", "\t$0", "} else {", "\t", "}"], + "description": "If-Else Statement" + }, + "While Statement": { + "prefix": "while", + "body": ["while (${1:condition}) {", "\t$0", "}"], + "description": "While Statement" + }, + "Do-While Statement": { + "prefix": "dowhile", + "body": ["do {", "\t$0", "} while (${1:condition});"], + "description": "Do-While Statement" + }, + "try/catch": { + "prefix": "tc", + "body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n}" + }, + "Function Statement": { + "prefix": "fun", + "body": ["function ${1:name}(${2:params}) {", "\t$0", "}"], + "description": "Function Statement" + }, + "console.log a variable": { + "prefix": "cv", + "body": "console.log('${1}:', ${1})" + }, + "Express GET": { + "prefix": "eget", + "body": ["router.get('${1:route}', ${2:unimplemented!})"] + }, + + "Express POST": { + "prefix": "epost", + "body": ["router.post('${1:route}', ${2:unimplemented!})"] + }, + + "Express DELETE": { + "prefix": "edel", + "body": ["router.delete('${1:route}', ${2:unimplemented!})"] + }, + + "Express PUT": { + "prefix": "eput", + "body": ["router.put('${1:route}', ${2:unimplemented!})"] + }, + "consoleAssert": { + "prefix": "cas", + "body": ["console.assert(${1:first}, ${2:second})"], + "description": "If the specified expression is false, the message is written to the console along with a stack trace" + }, + "consoleClear": { + "prefix": "ccl", + "body": ["console.clear()"], + "description": "Clears the console" + }, + "consoleCount": { + "prefix": "cco", + "body": ["console.count(${1:first})"], + "description": "Writes the the number of times that count() has been invoked at the same line and with the same label" + }, + "consoleDir": { + "prefix": "cdi", + "body": ["console.dir(${1:first})"], + "description": "Prints a JavaScript representation of the specified object" + }, + "consoleError": { + "prefix": "cer", + "body": ["console.error(${1:first})"], + "description": "Displays a message in the console and also includes a stack trace from where the method was called" + }, + "consoleGroup": { + "prefix": "cgr", + "body": ["console.group('${1:first}')"], + "description": "Groups and indents all following output by an additional level, until console.groupEnd() is called." + }, + "consoleGroupEnd": { + "prefix": "cge", + "body": ["console.groupEnd()"], + "description": "Closes out the corresponding console.group()." + }, + "consoleLog": { + "prefix": "clg", + "body": ["console.log(${1:first})"], + "description": "Displays a message in the console" + }, + "consoleTrace": { + "prefix": "ctr", + "body": ["console.trace(${1:first})"], + "description": "Prints a stack trace from the point where the method was called" + }, + "consoleLogObject": { + "prefix": "clo", + "body": ["console.log('${1:first}', ${1:first})"], + "description": "Logs property with name." + }, + "consoleLogJson": { + "prefix": "clj", + "body": ["console.log('${1:first}', JSON.stringify(${1:first}, null, 2))"], + "description": "Logs stringified JSON property with name." + }, + "consoleTime": { + "prefix": "ctm", + "body": ["console.time('${1:first}')"], + "description": "Console time wrapper" + }, + "consoleTimeEnd": { + "prefix": "cte", + "body": ["console.timeEnd('${1:first}')"], + "description": "Console time end wrapper" + }, + "consoleWarn": { + "prefix": "cwa", + "body": ["console.warn(${1:first})"], + "description": "Displays a message in the console but also displays a yellow warning icon along with the logged message" + }, + "consoleInfo": { + "prefix": "cin", + "body": ["console.info(${1:first})"], + "description": "Displays a message in the console but also displays a blue information icon along with the logged message" + }, + "consoleTable": { + "prefix": "ctl", + "body": ["console.table([${1:first}])"], + "description": "Logs table to console" + }, + "importAs": { + "prefix": "ima", + "body": ["import { ${2:second} as ${3:third} } from '${1:first}'"] + }, + "importDestructing": { + "prefix": "imd", + "body": ["import { ${2:second} } from '${1:first}'"] + }, + "importEverything": { + "prefix": "ime", + "body": ["import * as ${2:second} from '${1:first}'"] + }, + "importNoModuleName": { + "prefix": "imn", + "body": ["import '${1:first}'"] + }, + "import": { + "prefix": "imp", + "body": ["import ${2:second} from '${1:first}'"] + }, + "destructingObject": { + "prefix": "dob", + "body": ["const {${2:second}} = ${1:first}"], + "description": "Creates and assigns a local variable using object destructing" + }, + "destructingArray": { + "prefix": "dar", + "body": ["const [${2:second}] = ${1:first}"], + "description": "Creates and assigns a local variable using array destructing" + }, + "forOf": { + "prefix": "fof", + "body": ["for(let ${1:first} of ${2:second}) {${3:third}}"], + "description": "Iterating over property names of iterable objects" + }, + "forIn": { + "prefix": "fin", + "body": ["for(let ${1:first} in ${2:second}) {${3:third}}"], + "description": "Iterating over property values of iterable objects" + }, + "try/catch/finally": { + "prefix": "tcf", + "body": "try {\n\t${0}\n} catch (${1:err}) {\n\t\n} finally {\n\t\n}" + }, + "anonymousFunction": { + "prefix": "anfn", + "body": ["(${1:first}) => { ${2:second} }"], + "description": "Creates an anonymous function" + }, + "namedFunction": { + "prefix": "nfn", + "body": ["const ${1:first} = (${2:second}) => { ${3:third} }"], + "description": "Creates a named function" + }, + "forEach": { + "prefix": "fre", + "body": ["${1:first}.forEach(${2:second} => {${3:third}})"], + "description": "Creates a forEach statement" + }, + "map": { + "prefix": "map", + "body": "${1:iterable}.map((${2:item}) => {\n\t${0}\n})" + }, + "reduce": { + "prefix": "reduce", + "body": "${1:iterable}.reduce((${2:previous}, ${3:current}) => {\n\t${0}\n}${4:, initial})" + }, + "filter": { + "prefix": "filter", + "body": "${1:iterable}.filter((${2:item}) => {\n\t${0}\n})" + }, + "find": { + "prefix": "find", + "body": "${1:iterable}.find((${2:item}) => {\n\t${0}\n})" + }, + "every": { + "prefix": "every", + "body": "${1:iterable}.every((${2:item}) => {\n\t${0}\n})" + }, + "some": { + "prefix": "some", + "body": "${1:iterable}.some((${2:item}) => {\n\t${0}\n})" + }, + "appendChild": { + "prefix": "heac", + "body": "${1:el}.appendChild(${2:elem})" + }, + "removeChild": { + "prefix": "herc", + "body": "${1:el}.removeChild(${2:elem})" + }, + "exportDefault": { + "prefix": "exp", + "body": ["export default ${1:first}"] + }, + "exportDestructing": { + "prefix": "exd", + "body": ["export { ${2:second} } from '${1:first}'"] + }, + "exportAs": { + "prefix": "exa", + "body": ["export { ${2:second} as ${3:third} } from '${1:first}'"] + }, + "exportNamedFunction": { + "prefix": "enf", + "body": ["export const ${1:first} = (${2:second}) => {${3:third}}"], + "description": "Export named function" + }, + "exportDefaultFunction": { + "prefix": "edf", + "body": ["export default (${1:first}) => {${2:second}}"], + "description": "Export default function" + }, + "exportDefaultNamedFunction": { + "prefix": "ednf", + "body": ["export default function ${1:first}(${2:second}) {${3:third}}"], + "description": "Export default named function" + }, + "method": { + "prefix": "met", + "body": ["${1:first} = (${2:second}) => {${3:third}}"], + "description": "Creates a method inside a class" + } +} diff --git a/snippets/javascriptreact.json b/snippets/javascriptreact.json new file mode 100644 index 0000000..98cc497 --- /dev/null +++ b/snippets/javascriptreact.json @@ -0,0 +1,734 @@ +{ + "exportType": { + "body": ["export type ${1:first} = {${2:second}}"], + "prefix": "exptp" + }, + "exportInterface": { + "prefix": "expint", + "body": ["export interface ${1:first} {${2:second}}"] + }, + "reactArrowFunctionComponent": { + "prefix": "rafc", + "body": [ + "export const ${1:${TM_FILENAME_BASE}} = () => {", + " return (", + "
${1:first}
", + " )", + "}", + "" + ], + "description": "Creates a React Arrow Function Component with ES7 module system" + }, + "reactArrowFunctionComponentWithPropTypes": { + "prefix": "rafcp", + "body": [ + "import PropTypes from 'prop-types'", + "", + "const ${1:${TM_FILENAME_BASE}} = props => {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "${1:${TM_FILENAME_BASE}}.propTypes = {}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React Arrow Function Component with ES7 module system with PropTypes" + }, + "reactArrowFunctionExportComponent": { + "prefix": "rafce", + "body": [ + "const ${1:${TM_FILENAME_BASE}} = () => {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React Arrow Function Component with ES7 module system" + }, + "reactClassComponent": { + "prefix": "rcc", + "body": [ + "import { Component } from 'react'", + "", + "export default class ${1:${TM_FILENAME_BASE}} extends Component {", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "" + ], + "description": "Creates a React component class with ES7 module system" + }, + "reactClassComponentPropTypes": { + "prefix": "rccp", + "body": [ + "import PropTypes from 'prop-types'", + "import { Component } from 'react'", + "", + "export default class ${1:${TM_FILENAME_BASE}} extends Component {", + " static propTypes = {${2:second}: ${3:third}}", + "", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "" + ], + "description": "Creates a React component class with PropTypes and ES7 module system" + }, + "reactClassComponentRedux": { + "prefix": "rcredux", + "body": [ + "import { Component } from 'react'", + "import { connect } from 'react-redux'", + "", + "export class ${1:${TM_FILENAME_BASE}} extends Component {", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "", + "const mapStateToProps = (state) => ({})", + "", + "const mapDispatchToProps = {}", + "", + "export default connect(mapStateToProps, mapDispatchToProps)(${1:${TM_FILENAME_BASE}})" + ], + "description": "Creates a React component class with connected redux and ES7 module system" + }, + "reactClassComponentReduxPropTypes": { + "prefix": "rcreduxp", + "body": [ + "import PropTypes from 'prop-types'", + "import { Component } from 'react'", + "import { connect } from 'react-redux'", + "", + "export class ${1:${TM_FILENAME_BASE}} extends Component {", + " static propTypes = {", + " ${2:second}: ${3:third}", + " }", + "", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "", + "const mapStateToProps = (state) => ({})", + "", + "const mapDispatchToProps = {}", + "", + "export default connect(mapStateToProps, mapDispatchToProps)(${1:${TM_FILENAME_BASE}})" + ], + "description": "Creates a React component class with PropTypes with connected redux and ES7 module system" + }, + "reactClassExportComponent": { + "prefix": "rce", + "body": [ + "import { Component } from 'react'", + "", + "export class ${1:${TM_FILENAME_BASE}} extends Component {", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React component class with ES7 module system" + }, + "reactClassExportComponentWithPropTypes": { + "prefix": "rcep", + "body": [ + "import PropTypes from 'prop-types'", + "import { Component } from 'react'", + "", + "export class ${1:${TM_FILENAME_BASE}} extends Component {", + " static propTypes = {}", + "", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React component class with ES7 module system" + }, + "reactClassExportPureComponent": { + "prefix": "rpce", + "body": [ + "import { PureComponent } from 'react'", + "", + "export class ${1:${TM_FILENAME_BASE}} extends PureComponent {", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React pure component class with ES7 module system export" + }, + "reactClassPureComponent": { + "prefix": "rpc", + "body": [ + "import { PureComponent } from 'react'", + "", + "export default class ${1:${TM_FILENAME_BASE}} extends PureComponent {", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "" + ], + "description": "Creates a React pure component class with ES7 module system" + }, + "reactClassPureComponentWithPropTypes": { + "prefix": "rpcp", + "body": [ + "import PropTypes from 'prop-types'", + "import { PureComponent } from 'react'", + "", + "export default class ${1:${TM_FILENAME_BASE}} extends PureComponent {", + " static propTypes = {}", + "", + " render() {", + " return (", + "
${1:first}
", + " )", + " }", + "}", + "" + ], + "description": "Creates a React component class with ES7 module system" + }, + "reactFunctionMemoComponent": { + "prefix": "rmc", + "body": [ + "import { memo } from 'react'", + "", + "const ${1:${TM_FILENAME_BASE}} = memo(() => {", + " return (", + "
${1:first}
", + " )", + "})", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React Memo Function Component with ES7 module system" + }, + "reactFunctionMemoComponentWithPropTypes": { + "prefix": "rmcp", + "body": [ + "import PropTypes from 'prop-types'", + "import { memo } from 'react'", + "", + "const ${1:${TM_FILENAME_BASE}} = memo((props) => {", + " return (", + "
${1:first}
", + " )", + "})", + "", + "${1:${TM_FILENAME_BASE}}.propTypes = {}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React Memo Function Component with ES7 module system with PropTypes" + }, + "reactFunctionalComponent": { + "prefix": "rfc", + "body": [ + "import React from 'react'", + "", + "export default function ${1:${TM_FILENAME_BASE}}() {", + " return (", + "
${1:first}
", + " )", + "}", + "" + ], + "description": "Creates a React Functional Component with ES7 module system" + }, + "reactFunctionalComponentRedux": { + "prefix": "rfcredux", + "body": [ + "import { connect } from 'react-redux'", + "", + "export const ${1:${TM_FILENAME_BASE}} = (props) => {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "const mapStateToProps = (state) => ({})", + "", + "const mapDispatchToProps = {}", + "", + "export default connect(mapStateToProps, mapDispatchToProps)(${1:${TM_FILENAME_BASE}})" + ], + "description": "Creates a React functional component with connected redux and ES7 module system" + }, + "reactFunctionalComponentReduxPropTypes": { + "prefix": "rfcreduxp", + "body": [ + "import PropTypes from 'prop-types'", + "import { connect } from 'react-redux'", + "", + "export const ${1:${TM_FILENAME_BASE}} = (props) => {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "${1:${TM_FILENAME_BASE}}.propTypes = {", + " ${2:second}: PropTypes.${3:third}", + "}", + "", + "const mapStateToProps = (state) => ({})", + "", + "const mapDispatchToProps = {}", + "", + "export default connect(mapStateToProps, mapDispatchToProps)(${1:${TM_FILENAME_BASE}})" + ], + "description": "DEPRECATED: Creates a React functional component with PropTypes with connected redux and ES7 module system" + }, + "reactFunctionalComponentWithPropTypes": { + "prefix": "rfcp", + "body": [ + "import PropTypes from 'prop-types'", + "", + "function ${1:${TM_FILENAME_BASE}}(props) {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "${1:${TM_FILENAME_BASE}}.propTypes = {}", + "", + "export default ${1:${TM_FILENAME_BASE}}", + "" + ], + "description": "Creates a React Functional Component with ES7 module system with PropTypes" + }, + "reactFunctionalExportComponent": { + "prefix": "rfce", + "body": [ + "function ${1:${TM_FILENAME_BASE}}() {", + " return (", + "
${1:first}
", + " )", + "}", + "", + "export default ${1:${TM_FILENAME_BASE}}" + ], + "description": "Creates a React Functional Component with ES7 module system" + }, + "useCallback": { + "prefix": "useCallbackSnippet", + "body": [ + "useCallback(", + " () => {", + " ${1:first}", + " },", + " [${2:second}],", + ")", + "" + ] + }, + "useContext": { + "prefix": "useContextSnippet", + "body": ["const ${1:first} = useContext(${2:second})"] + }, + "useEffect": { + "prefix": "useEffectSnippet", + "body": [ + "useEffect(() => {", + " ${1:first}", + "", + " return () => {", + " ${2:second}", + " }", + "}, [${3:third}])", + "" + ] + }, + "useImperativeHandle": { + "prefix": "useImperativeHandleSnippet", + "body": [ + "useImperativeHandle(", + " ${1:first},", + " () => {", + " ${2:second}", + " },", + " [${3:third}],", + ")" + ] + }, + "useLayoutEffect": { + "prefix": "useLayoutEffectSnippet", + "body": [ + "useLayoutEffect(() => {", + " ${1:first}", + "", + " return () => {", + " ${2:second}", + " };", + "}, [${3:third}])" + ] + }, + "useMemo": { + "prefix": "useMemoSnippet", + "body": ["useMemo(() => ${1:first}, [${2:second}])"] + }, + "useReducer": { + "prefix": "useReducerSnippet", + "body": [ + "const [state, dispatch] = useReducer(${1:first}, ${2:second}, ${3:third})" + ] + }, + "useRef": { + "prefix": "useRefSnippet", + "body": ["const ${1:first} = useRef(${2:second})"] + }, + "useState": { + "prefix": "useStateSnippet", + "body": [ + "const [${1:first}, set${1/(.*)/${1:/capitalize}/}] = useState(${2:second})" + ] + }, + "importPropTypes": { + "prefix": "impt", + "body": ["import PropTypes from 'prop-types'"] + }, + "importReact": { + "prefix": "imr", + "body": ["import React from 'react'"] + }, + "importReactDom": { + "prefix": "imrd", + "body": ["import ReactDOM from 'react-dom'"] + }, + "importReactWithComponent": { + "prefix": "imrc", + "body": ["import React, { Component } from 'react'"] + }, + "importReactWithComponentAndPropTypes": { + "prefix": "imrcp", + "body": [ + "import React, { Component } from 'react'", + "import PropTypes from 'prop-types'", + "" + ] + }, + "importReactWithMemo": { + "prefix": "imrm", + "body": ["import React, { memo } from 'react'"] + }, + "importReactWithMemoAndPropTypes": { + "prefix": "imrmp", + "body": [ + "import React, { memo } from 'react'", + "import PropTypes from 'prop-types'", + "" + ] + }, + "importReactWithPureComponent": { + "prefix": "imrpc", + "body": ["import React, { PureComponent } from 'react'"] + }, + "importReactWithPureComponentAndPropTypes": { + "prefix": "imrpcp", + "body": [ + "import React, { PureComponent } from 'react'", + "import PropTypes from 'prop-types'", + "" + ] + }, + "importRouterLink": { + "prefix": "imbrl", + "body": ["import { Link } from 'react-router-dom'"] + }, + "importRouterNavLink": { + "prefix": "imbrnl", + "body": ["import { NavLink } from 'react-router-dom'"] + }, + "importRouterSetup": { + "prefix": "imbrc", + "body": [ + "import { Route, Switch, NavLink, Link } from 'react-router-dom'" + ] + }, + "importRouterSwitch": { + "prefix": "imbrs", + "body": ["import { Switch } from 'react-router-dom'"] + }, + "propTypeArray": { + "prefix": "pta", + "body": ["PropTypes.array"], + "description": "Array prop type" + }, + "propTypeArrayRequired": { + "prefix": "ptar", + "body": ["PropTypes.array.isRequired"], + "description": "Array prop type required" + }, + "propTypeBool": { + "prefix": "ptb", + "body": ["PropTypes.bool"], + "description": "Bool prop type" + }, + "propTypeBoolRequired": { + "prefix": "ptbr", + "body": ["PropTypes.bool.isRequired"], + "description": "Bool prop type required" + }, + "propTypeFunc": { + "prefix": "ptf", + "body": ["PropTypes.func"], + "description": "Func prop type" + }, + "propTypeFuncRequired": { + "prefix": "ptfr", + "body": ["PropTypes.func.isRequired"], + "description": "Func prop type required" + }, + "propTypeNumber": { + "prefix": "ptn", + "body": ["PropTypes.number"], + "description": "Number prop type" + }, + "propTypeNumberRequired": { + "prefix": "ptnr", + "body": ["PropTypes.number.isRequired"], + "description": "Number prop type required" + }, + "propTypeObject": { + "prefix": "pto", + "body": ["PropTypes.object"], + "description": "Object prop type" + }, + "propTypeObjectRequired": { + "prefix": "ptor", + "body": ["PropTypes.object.isRequired"], + "description": "Object prop type required" + }, + "propTypeString": { + "prefix": "pts", + "body": ["PropTypes.string"], + "description": "String prop type" + }, + "propTypeStringRequired": { + "prefix": "ptsr", + "body": ["PropTypes.string.isRequired"], + "description": "String prop type required" + }, + "propTypeNode": { + "prefix": "ptnd", + "body": ["PropTypes.node"], + "description": "Anything that can be rendered: numbers, strings, elements or an array" + }, + "propTypeNodeRequired": { + "prefix": "ptndr", + "body": ["PropTypes.node.isRequired"], + "description": "Anything that can be rendered: numbers, strings, elements or an array required" + }, + "propTypeElement": { + "prefix": "ptel", + "body": ["PropTypes.element"], + "description": "React element prop type" + }, + "propTypeElementRequired": { + "prefix": "ptelr", + "body": ["PropTypes.element.isRequired"], + "description": "React element prop type required" + }, + "propTypeInstanceOf": { + "prefix": "pti", + "body": ["PropTypes.instanceOf($0)"], + "description": "Is an instance of a class prop type" + }, + "propTypeInstanceOfRequired": { + "prefix": "ptir", + "body": ["PropTypes.instanceOf($0).isRequired"], + "description": "Is an instance of a class prop type required" + }, + "propTypeEnum": { + "prefix": "pte", + "body": ["PropTypes.oneOf(['$0'])"], + "description": "Prop type limited to specific values by treating it as an enum" + }, + "propTypeEnumRequired": { + "prefix": "pter", + "body": ["PropTypes.oneOf(['$0']).isRequired"], + "description": "Prop type limited to specific values by treating it as an enum required" + }, + "propTypeOneOfType": { + "prefix": "ptet", + "body": ["PropTypes.oneOfType([", " $0", "])"], + "description": "An object that could be one of many types" + }, + "propTypeOneOfTypeRequired": { + "prefix": "ptetr", + "body": ["PropTypes.oneOfType([", " $0", "]).isRequired"], + "description": "An object that could be one of many types required" + }, + "propTypeArrayOf": { + "prefix": "ptao", + "body": ["PropTypes.arrayOf($0)"], + "description": "An array of a certain type" + }, + "propTypeArrayOfRequired": { + "prefix": "ptaor", + "body": ["PropTypes.arrayOf($0).isRequired"], + "description": "An array of a certain type required" + }, + "propTypeObjectOf": { + "prefix": "ptoo", + "body": ["PropTypes.objectOf($0)"], + "description": "An object with property values of a certain type" + }, + "propTypeObjectOfRequired": { + "prefix": "ptoor", + "body": ["PropTypes.objectOf($0).isRequired"], + "description": "An object with property values of a certain type required" + }, + "propTypeShape": { + "prefix": "ptsh", + "body": ["PropTypes.shape({", " $0", "})"], + "description": "An object taking on a particular shape" + }, + "propTypeShapeRequired": { + "prefix": "ptshr", + "body": ["PropTypes.shape({", " $0", "}).isRequired"], + "description": "An object taking on a particular shape required" + }, + "propTypeExact": { + "prefix": "ptex", + "body": ["PropTypes.exact({", " $0", "})"], + "description": "An object with warnings on extra properties" + }, + "propTypeExactRequired": { + "prefix": "ptexr", + "body": ["PropTypes.exact({", " $0", "}).isRequired"], + "description": "An object with warnings on extra properties required" + }, + "propTypeAny": { + "prefix": "ptany", + "body": ["PropTypes.any"], + "description": "Any prop type" + }, + "destructProps": { + "prefix": "cp", + "body": ["const { ${1:first} } = this.props"], + "description": "Creates and assigns a local variable using props destructing" + }, + "destructState": { + "prefix": "cs", + "body": ["const { ${1:first} } = this.state"], + "description": "Creates and assigns a local variable using state destructing" + }, + "classConstructor": { + "prefix": "rconst", + "body": [ + "constructor(props) {", + " super(props)", + "", + " this.state = {", + " ${1:first}", + " }", + "}" + ], + "description": "Adds a default constructor for it('', () => {})the class that contains props as arguments" + }, + "emptyState": { + "prefix": "est", + "body": ["state = { ${1:first} }"], + "description": "Creates empty state object. To be used in a constructor." + }, + "componentDidMount": { + "prefix": "cdm", + "body": ["componentDidMount() { ${1:first} }"], + "description": "Invoked once, only on the client (not on the server), immediately after the initial rendering occurs." + }, + "shouldComponentUpdate": { + "prefix": "scu", + "body": ["shouldComponentUpdate(nextProps, nextState) { ${1:first} }"], + "description": "Invoked before rendering when new props or state are being received. " + }, + "componentDidUpdate": { + "prefix": "cdup", + "body": ["componentDidUpdate(prevProps, prevState) { ${1:first}} "], + "description": "Invoked immediately after the component's updates are flushed to the DOM." + }, + "componentWillUnmount": { + "prefix": "cwun", + "body": ["componentWillUnmount() {${1:first} }"], + "description": "Invoked immediately before a component is unmounted from the DOM." + }, + "getDerivedStateFromProps": { + "prefix": "gdsfp", + "body": ["static getDerivedStateFromProps(props, state) {${1:first}}"], + "description": "Invoked right before calling the render method, both on the initial mount and on subsequent updates." + }, + "getSnapshotBeforeUpdate": { + "prefix": "gsbu", + "body": [ + "getSnapshotBeforeUpdate = (prevProps, prevState) => {${1:first}}" + ], + "description": "Called right before mutations are made (e.g. before the DOM is updated)" + }, + "createContext": { + "prefix": "rcontext", + "body": ["const ${1:first} = React.createContext()"], + "description": "Create React context" + }, + "createRef": { + "prefix": "cref", + "body": ["this.${1:first}Ref = React.createRef()"], + "description": "Create ref statement used inside constructor" + }, + "componentSetStateObject": { + "prefix": "sst", + "body": ["this.setState({${1:first}})"], + "description": "Performs a shallow merge of nextState into current state" + }, + "componentSetStateFunc": { + "prefix": "ssf", + "body": ["this.setState((state, props) => { return { ${1:first} }})"], + "description": "Performs a shallow merge of nextState into current state" + }, + "componentProps": { + "prefix": "props", + "body": ["this.props.${1:first}"], + "description": "Access component's props" + }, + "componentState": { + "prefix": "state", + "body": ["this.state.${1:first}"] + }, + "bindThis": { + "prefix": "bnd", + "body": ["this.${1:first} = this.${1:first}.bind(this)"], + "description": "Binds this to a method" + } +} diff --git a/snippets/lua.json b/snippets/lua.json new file mode 100644 index 0000000..3fee76f --- /dev/null +++ b/snippets/lua.json @@ -0,0 +1,98 @@ +{ + "require": { + "prefix": "req", + "body": ["require(\"${1:module}\")"], + "description": "Require module" + }, + "return": { + "prefix": "rt", + "body": ["return $0"], + "description": "return value" + }, + "assigment": { + "prefix": "ll", + "body": ["local ${1:varName} = ${0:value}"], + "description": "create a variable" + }, + "local": { + "prefix": "l", + "body": ["local ${0}"], + "description": "create a variable" + }, + "locreq": { + "prefix": "lreq", + "body": ["local ${1:var} = require(\"${2:module}\")"], + "description": "Require module as a variable" + }, + "class": { + "prefix": "cl", + "body": [ + "${1:className} = {}\n", + "$1.${2:new} = function($3)", + "\tlocal ${4:varName} = ${5:value}\n", + "\t${6: --code}\n", + "\treturn $4", + "end" + ], + "description": "Create a class" + }, + "if": { + "prefix": "if", + "body": ["if ${1:true} then", "\t$0", "end"] + }, + "elseif": { + "prefix": "elseif", + "body": ["elseif ${1:true} then", "\t$0"] + }, + "for": { + "prefix": "for", + "body": ["for ${1:i}=${2:1},${3:10} do", "\t$0", "end"], + "description": "for loop range" + }, + "foreach": { + "prefix": "foreach", + "body": ["for i, ${1:x} in pairs(${2:table}) do", "\t$0", "end"] + }, + "forline": { + "prefix": "forline", + "body": [ + "f = io.open(${1:\"${2:filename}\"}, \"${3:r}\")\n", + "while true do", + "\tline = f:read()", + "\tif line == nil then break end\n", + "\t${0:-- code}", + "end" + ], + "description": "read file line by line" + }, + "function": { + "prefix": "fu", + "body": ["function ${1:name}($2)", "\t${0:-- code}", "end"] + }, + "inline-function": { + "prefix": "f=", + "body": ["local ${1:name} = function($2)", "\t${0:-- code}", "end"] + }, + "print": { + "prefix": "p", + "body": ["print(${0})"] + }, + "self": { + "prefix": "self:", + "body": ["function self:${1:methodName}($2)", "\t$0", "end"] + }, + "while": { + "prefix": "while", + "body": ["while ${1:true} do", "\t$0", "end"] + }, + "pcall": { + "prefix": "pca", + "body": ["pcall(${1:function})"], + "description": "Protect call a function" + }, + "locpcall": { + "prefix": "lpca", + "body": ["local ${1:status}, ${2:err_or_value} = pcall(${3:function})"], + "description": "Protect call a function as a variable" + } +} diff --git a/snippets/markdown.json b/snippets/markdown.json new file mode 100644 index 0000000..566c957 --- /dev/null +++ b/snippets/markdown.json @@ -0,0 +1,404 @@ +{ + "Create title header": { + "prefix": "title", + "body": [ + "---", + "title: '${1:title}'", + "author: '${2:autor}'", + "date: '${3:fecha}'", + "---" + ] + }, + "LTEX en ingles": { + "prefix": "eng", + "body": [""] + }, + "header 1": { + "prefix": "h1", + "body": ["# ${0}"], + "description": "Add header level 1" + }, + "header 2": { + "prefix": "h2", + "body": ["## ${0}"], + "description": "Add header level 2" + }, + "header 3": { + "prefix": "h3", + "body": ["### ${0}"], + "description": "Add header level 3" + }, + "header 4": { + "prefix": "h4", + "body": ["#### ${0}"], + "description": "Add header level 4" + }, + "header 5": { + "prefix": "h5", + "body": ["##### ${0}"], + "description": "Add header level 5" + }, + "header 6": { + "prefix": "h6", + "body": ["###### ${0}"], + "description": "Add header level 6" + }, + "Links": { + "prefix": ["l", "link"], + "body": ["[${1:text}](${2:url}) ${0}"], + "description": "Add links" + }, + "URLS": { + "prefix": ["u", "url"], + "body": ["<${1}> ${0}"], + "description": "Add urls" + }, + "Images": { + "prefix": "img", + "body": ["![${1:alt text}](${2:path}) ${0}"], + "description": "Add images" + }, + "Insert strikethrough": { + "prefix": "strikethrough", + "body": "~~${1}~~ ${0}", + "description": "Insert strikethrough" + }, + "Insert bold text": { + "prefix": ["bold", "b"], + "body": "**${1}** $0", + "description": "Insert bold text" + }, + "Insert italic text": { + "prefix": ["i", "italic"], + "body": "*${1}* $0", + "description": "Insert italic text" + }, + "Insert bold and italic text": { + "prefix": ["bold and italic", "bi"], + "body": "***${1}*** $0", + "description": "Insert bold and italic text" + }, + "Insert quoted text": { + "prefix": "quote", + "body": "> ${1}", + "description": "Insert quoted text" + }, + "Insert code": { + "prefix": "code", + "body": "`${1}` $0", + "description": "Insert code" + }, + "Insert code block": { + "prefix": "codeblock", + "body": ["```${1:language}", "$0", "```"], + "description": "Insert fenced code block" + }, + "Insert unordered list": { + "prefix": "unordered list", + "body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"], + "description": "Insert unordered list" + }, + "Insert ordered list": { + "prefix": "ordered list", + "body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"], + "description": "Insert ordered list" + }, + "Insert horizontal rule": { + "prefix": "horizontal rule", + "body": "----------\n", + "description": "Insert horizontal rule" + }, + "Insert task list": { + "prefix": "task", + "body": ["- [${1| ,x|}] ${2:text}", "${0}"], + "description": "Insert task list" + }, + "Insert task list 2": { + "prefix": "task2", + "body": ["- [${1| ,x|}] ${2:text}", "- [${3| ,x|}] ${4:text}", "${0}"], + "description": "Insert task list with 2 tasks" + }, + "Insert task list 3": { + "prefix": "task3", + "body": [ + "- [${1| ,x|}] ${2:text}", + "- [${3| ,x|}] ${4:text}", + "- [${5| ,x|}] ${6:text}", + "${0}" + ], + "description": "Insert task list with 3 tasks" + }, + "Insert task list 4": { + "prefix": "task4", + "body": [ + "- [${1| ,x|}] ${2:text}", + "- [${3| ,x|}] ${4:text}", + "- [${5| ,x|}] ${6:text}", + "- [${7| ,x|}] ${8:text}", + "${0}" + ], + "description": "Insert task list with 4 tasks" + }, + "Insert task list 5": { + "prefix": "task5", + "body": [ + "- [${1| ,x|}] ${2:text}", + "- [${3| ,x|}] ${4:text}", + "- [${5| ,x|}] ${6:text}", + "- [${7| ,x|}] ${8:text}", + "- [${9| ,x|}] ${10:text}", + "${0}" + ], + "description": "Insert task list with 5 tasks" + }, + "Insert table": { + "prefix": "table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} |", + "|-------------- | -------------- | -------------- |", + "| ${4:Item1} | ${5:Item1} | ${6:Item1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 3 columns. First row is heading." + }, + "Insert 2x1 table": { + "prefix": "2x1table", + "body": [ + "| ${1:Column1} |", + "|-------------- |", + "| ${2:Item1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 1 column. First row is heading." + }, + "Insert 3x1 table": { + "prefix": "3x1table", + "body": [ + "| ${1:Column1} |", + "|-------------- |", + "| ${2:Item1} |", + "| ${3:Item2} |", + "${0}" + ], + "description": "Insert table with 3 rows and 1 column. First row is heading." + }, + "Insert 4x1 table": { + "prefix": "4x1table", + "body": [ + "| ${1:Column1} |", + "|-------------- |", + "| ${2:Item1} |", + "| ${3:Item2} |", + "| ${4:Item3} |", + "${0}" + ], + "description": "Insert table with 4 rows and 1 column. First row is heading." + }, + "Insert 5x1 table": { + "prefix": "5x1table", + "body": [ + "| ${1:Column1} |", + "|-------------- |", + "| ${2:Item1} |", + "| ${3:Item2} |", + "| ${4:Item3} |", + "| ${5:Item4} |", + "${0}" + ], + "description": "Insert table with 5 rows and 1 column. First row is heading." + }, + "Insert 2x2 table": { + "prefix": "2x2table", + "body": [ + "| ${1:Column1} | ${2:Column2} |", + "|--------------- | --------------- |", + "| ${3:Item1.1} | ${4:Item2.1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 2 columns. First row is heading." + }, + "Insert 3x2 table": { + "prefix": "3x2table", + "body": [ + "| ${1:Column1} | ${2:Column2} |", + "|--------------- | --------------- |", + "| ${3:Item1.1} | ${4:Item2.1} |", + "| ${5:Item1.2} | ${6:Item2.2} |", + "${0}" + ], + "description": "Insert table with 3 rows and 2 columns. First row is heading." + }, + "Insert 4x2 table": { + "prefix": "4x2table", + "body": [ + "| ${1:Column1} | ${2:Column2} |", + "|--------------- | --------------- |", + "| ${3:Item1.1} | ${4:Item2.1} |", + "| ${5:Item1.2} | ${6:Item2.2} |", + "| ${7:Item1.3} | ${8:Item2.3} |", + "${0}" + ], + "description": "Insert table with 4 rows and 2 columns. First row is heading." + }, + "Insert 5x2 table": { + "prefix": "5x2table", + "body": [ + "| ${1:Column1} | ${2:Column2} |", + "|--------------- | --------------- |", + "| ${3:Item1.1} | ${4:Item2.1} |", + "| ${4:Item1.2} | ${5:Item2.2} |", + "| ${6:Item1.3} | ${7:Item2.3} |", + "| ${8:Item1.4} | ${9:Item2.4} |", + "${0}" + ], + "description": "Insert table with 5 rows and 2 columns. First row is heading." + }, + "Insert 2x3 table": { + "prefix": "2x3table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} |", + "|---------------- | --------------- | --------------- |", + "| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 3 columns. First row is heading." + }, + "Insert 3x3 table": { + "prefix": "3x3table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} |", + "|---------------- | --------------- | --------------- |", + "| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |", + "| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |", + "${0}" + ], + "description": "Insert table with 3 rows and 3 columns. First row is heading." + }, + "Insert 4x3 table": { + "prefix": "4x3table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} |", + "|---------------- | --------------- | --------------- |", + "| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |", + "| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |", + "| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |", + "${0}" + ], + "description": "Insert table with 4 rows and 3 columns. First row is heading." + }, + "Insert 5x3 table": { + "prefix": "5x3table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} |", + "|---------------- | --------------- | --------------- |", + "| ${4:Item1.1} | ${5:Item2.1} | ${6:Item3.1} |", + "| ${7:Item1.2} | ${8:Item2.2} | ${9:Item3.2} |", + "| ${10:Item1.3} | ${11:Item2.3} | ${12:Item3.3} |", + "| ${13:Item1.4} | ${14:Item2.4} | ${15:Item3.4} |", + "${0}" + ], + "description": "Insert table with 5 rows and 3 columns. First row is heading." + }, + "Insert 2x4 table": { + "prefix": "2x4table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |", + "|---------------- | --------------- | --------------- | --------------- |", + "| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 4 columns. First row is heading." + }, + "Insert 3x4 table": { + "prefix": "3x4table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |", + "|---------------- | --------------- | --------------- | --------------- |", + "| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |", + "| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |", + "${0}" + ], + "description": "Insert table with 3 rows and 4 columns. First row is heading." + }, + "Insert 4x4 table": { + "prefix": "4x4table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |", + "|---------------- | --------------- | --------------- | --------------- |", + "| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |", + "| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |", + "| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |", + "${0}" + ], + "description": "Insert table with 4 rows and 4 columns. First row is heading." + }, + "Insert 5x4 table": { + "prefix": "5x4table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} |", + "|---------------- | --------------- | --------------- | --------------- |", + "| ${5:Item1.1} | ${6:Item2.1} | ${7:Item3.1} | ${8:Item4.1} |", + "| ${9:Item1.2} | ${10:Item2.2} | ${11:Item3.2} | ${12:Item4.2} |", + "| ${13:Item1.3} | ${14:Item2.3} | ${15:Item3.3} | ${16:Item4.3} |", + "| ${17:Item1.4} | ${18:Item2.4} | ${19:Item3.4} | ${20:Item4.4} |", + "${0}" + ], + "description": "Insert table with 5 rows and 4 columns. First row is heading." + }, + "Insert 2x5 table": { + "prefix": "2x5table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |", + "|---------------- | --------------- | --------------- | --------------- | --------------- |", + "| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |", + "${0}" + ], + "description": "Insert table with 2 rows and 5 columns. First row is heading." + }, + "Insert 3x5 table": { + "prefix": "3x5table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |", + "|---------------- | --------------- | --------------- | --------------- | --------------- |", + "| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |", + "| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |", + "${0}" + ], + "description": "Insert table with 3 rows and 5 columns. First row is heading." + }, + "Insert 4x5 table": { + "prefix": "4x5table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |", + "|---------------- | --------------- | --------------- | --------------- | --------------- |", + "| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |", + "| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |", + "| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |", + "${0}" + ], + "description": "Insert table with 4 rows and 5 columns. First row is heading." + }, + "Insert 5x5 table": { + "prefix": "5x5table", + "body": [ + "| ${1:Column1} | ${2:Column2} | ${3:Column3} | ${4:Column4} | ${5:Column5} |", + "|---------------- | --------------- | --------------- | --------------- | --------------- |", + "| ${6:Item1.1} | ${7:Item2.1} | ${8:Item3.1} | ${9:Item4.1} | ${10:Item5.1} |", + "| ${11:Item1.2} | ${12:Item2.2} | ${13:Item3.2} | ${14:Item4.2} | ${15:Item5.2} |", + "| ${16:Item1.3} | ${17:Item2.3} | ${18:Item3.3} | ${19:Item4.3} | ${20:Item5.3} |", + "| ${21:Item1.4} | ${22:Item2.4} | ${23:Item3.4} | ${24:Item4.4} | ${25:Item5.4} |", + "${0}" + ], + "description": "Insert table with 5 rows and 5 columns. First row is heading." + }, + "Insert subscript": { + "prefix": "sub", + "body": ["${1}${0}"], + "description": "Create a subscript." + }, + "Insert superscript": { + "prefix": "sup", + "body": ["${1}${0}"], + "description": "Create a superscript." + } +} diff --git a/snippets/package.json b/snippets/package.json new file mode 100644 index 0000000..cbf4f55 --- /dev/null +++ b/snippets/package.json @@ -0,0 +1,65 @@ +{ + "name": "my-custom-snippets", + "engines": { + "vscode": "^1.11.0" + }, + "contributes": { + "snippets": [ + { + "language": ["sql"], + "path": "./sql.json" + }, + { + "language": ["rust"], + "path": "./rust.json" + }, + { + "language": ["lua"], + "path": "./lua.json" + }, + { + "language": ["markdown"], + "path": "./markdown.json" + }, + { + "language": [ + "javascript", + "javascriptreact", + "vue", + "svelte", + "astro", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx" + ], + "path": "./javascript.json" + }, + { + "language": [ + "javascriptreact", + "javascript.jsx", + "typescriptreact", + "typescript.tsx" + ], + "path": "./javascriptreact.json" + }, + { + "language": ["tex"], + "path": "./tex.json" + }, + { + "language": ["python"], + "path": "./django.json" + }, + { + "language": ["python"], + "path": "./python.json" + }, + { + "language": ["html"], + "path": "./htmldjango.json" + } + ] + } +} diff --git a/snippets/python.json b/snippets/python.json new file mode 100644 index 0000000..4ba6145 --- /dev/null +++ b/snippets/python.json @@ -0,0 +1,326 @@ +{ + "#!/usr/bin/env python": { + "prefix": "env", + "body": "#!/usr/bin/env python\n$0", + "description": "Adds shebang line for default python interpreter." + }, + "#!/usr/bin/env python3": { + "prefix": "env3", + "body": "#!/usr/bin/env python3\n$0", + "description": "Adds shebang line for default python 3 interpreter." + }, + "# -*- coding=utf-8 -*-": { + "prefix": "enc", + "body": "# -*- coding=utf-8 -*-\n$0", + "description": "set default python2.x encoding specification to utf-8 as it is mentioned in pep-0263." + }, + "# coding=utf-8": { + "prefix": "enco", + "body": "# coding=utf-8\n$0", + "description": "Set default python3 encoding specification to utf-8, by default this is the encoding for python3.x as it is mentioned in pep-3120." + }, + "from future import ...": { + "prefix": "fenc", + "body": [ + "# -*- coding: utf-8 -*-", + "from __future__ import absolute_import, division, print_function, unicode_literals" + ], + "description": "Import future statement definitions for python2.x scripts using utf-8 as encoding." + }, + "from future import ... v1": { + "prefix": "fenco", + "body": [ + "# coding: utf-8", + "from __future__ import absolute_import, division, print_function, unicode_literals" + ], + "description": "Import future statement definitions for python3.x scripts using utf-8 as encoding." + }, + "import": { + "prefix": "im", + "body": "import ${1:package/module}$0", + "description": "Import a package or module" + }, + "from ... import ...": { + "prefix": "fim", + "body": "from ${1:package/module} import ${2:names}$0", + "description": "Import statement that allows individual objects from the module to be imported directly into the caller’s symbol table." + }, + "class": { + "prefix": "class", + "body": ["class ${1:classname}(${2:object}):", "\t${3:pass}"], + "description": "Code snippet for a class definition" + }, + "New class": { + "prefix": "classi", + "body": "class ${1:ClassName}(${2:object}):\n\t\"\"\"${3:docstring for $1.}\"\"\"\n\tdef __init__(self, ${4:arg}):\n\t\t${5:super($1, self).__init__()}\n\t\tself.arg = arg\n\t\t$0", + "description": "Code snippet for a class definition." + }, + "New method": { + "prefix": "defs", + "body": "def ${1:mname}(self, ${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for a class method definition." + }, + "New method w/ return": { + "prefix": "defst", + "body": "def ${1:mname}(self, ${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0", + "description": "Code snippet for a class method definition." + }, + "New function": { + "prefix": "def", + "body": "def ${1:fname}(${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for function definition." + }, + "New function w/ return": { + "prefix": "deft", + "body": "def ${1:fname}(${2:arg}) -> ${3:return_type}:\n\t${4:pass}$0", + "description": "Code snippet for function definition." + }, + "New async function": { + "prefix": "adef", + "body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}$0", + "description": "Code snippet for async function definition." + }, + "New property": { + "prefix": "property", + "body": "@property\ndef ${1:foo}(self):\n \"\"\"${2:The $1 property.}\"\"\"\n ${3:return self._$1}\n@${4:$1}.setter\ndef ${5:$1}(self, value):\n ${6:self._$1} = value", + "description": "New property: get and set via decorator" + }, + "if": { + "prefix": "if", + "body": "if ${1:condition}:\n\t${2:pass}$0", + "description": "Code snippet for the if statement." + }, + "if/else": { + "prefix": "if/else", + "body": ["if ${1:condition}:", "\t${2:pass}", "else:", "\t${3:pass}"], + "description": "Code snippet for an if statement with else" + }, + "elif": { + "prefix": "elif", + "body": ["elif ${1:expression}:", "\t${2:pass}"], + "description": "Code snippet for an elif" + }, + "else": { + "prefix": "else", + "body": ["else:", "\t${1:pass}"], + "description": "Code snippet for an else" + }, + "for": { + "prefix": "for", + "body": "for ${1:value} in ${2:iterable}:\n\t${3:pass}$0", + "description": "Code snippet to create a for loop structure." + }, + "for/else": { + "prefix": "for/else", + "body": [ + "for ${1:target_list} in ${2:expression_list}:", + "\t${3:pass}", + "else:", + "\t${4:pass}" + ], + "description": "Code snippet for a for loop with else" + }, + "while": { + "prefix": "while", + "body": "while ${1:condition}:\n\t${2:pass}$0", + "description": "Code snippet to create a while loop structure." + }, + "while/else": { + "prefix": "while/else", + "body": ["while ${1:expression}:", "\t${2:pass}", "else:", "\t${3:pass}"], + "description": "Code snippet for a while loop with else" + }, + "try:except:": { + "prefix": "try", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}$0", + "description": "Code Snippet for a try and except blocks." + }, + "try:except:else:finally": { + "prefix": "tryef", + "body": "try:\n\t${1:pass}\nexcept${2: ${3:Exception} as ${4:e}}:\n\t${5:raise}\nelse:\n\t${6:pass}\nfinally:\n\t${7:pass}$0", + "description": "Code Snippet for a try/except/finally with else statement." + }, + "try:except:else": { + "prefix": "trye", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nelse:\n\t${5:pass}$0", + "description": "Code Snippet for a try/except with else statement." + }, + "try:except:finally": { + "prefix": "tryf", + "body": "try:\n\t${1:pass}\nexcept ${2:Exception} as ${3:e}:\n\t${4:raise $3}\nfinally:\n\t${5:pass}$0", + "description": "Code Snippet for a try/except/finally." + }, + "with": { + "prefix": "with", + "body": ["with ${1:expression} as ${2:target}:", "\t${3:pass}"], + "description": "Code snippet for a with statement" + }, + "self": { + "prefix": ".", + "body": "self.$0", + "description": "Shortend snippet to reference the self property in an object." + }, + "__magic__": { + "prefix": "__", + "body": "__${1:init}__$0", + "description": "Code snippet to create magic methods." + }, + "if __name__ == \"__main__\"": { + "prefix": "ifmain", + "body": "if __name__ == \"__main__\":\n\t${1:main()}$0", + "description": "Create implicitly all the code at the top level using the __name__ special variable." + }, + "List comprehension": { + "prefix": "lc", + "body": "[${1:value} for ${2:value} in ${3:iterable}]$0", + "description": "List comprehension for creating a list based on existing lists." + }, + "List comprehension if else": { + "prefix": "lcie", + "body": "[${1:value} if ${2:condition} else ${3:condition} for ${4:value} in ${5:iterable}]$0", + "description": "List comprehension for creating a list based on existing lists, with conditional if-else statement." + }, + "List comprehension if filter": { + "prefix": "lci", + "body": "[${1:value} for ${2:value} in ${3:iterable} if ${4:condition}$0]", + "description": "List comprehension for creating a list based on existing lists, with conditional if statement." + }, + "Dictionary comprehension": { + "prefix": "dc", + "body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable}}$0", + "description": "Handy and faster way to create dictories based on existing dictionaries." + }, + "Dictionary comprehension if filter": { + "prefix": "dci", + "body": "{${1:key}: ${2:value} for ${3:key}, ${4:value} in ${5:iterable} if ${6:condition}}$0", + "description": "Handy and faster way to create dictories based on existing dictionaries, with conditional if statement." + }, + "Set comprehension": { + "prefix": "sc", + "body": "{${1:value} for ${2:value} in ${3:iterable}}$0", + "description": "Create a set based on existing iterables." + }, + "Set Comprehension if filter": { + "prefix": "sci", + "body": "{${1:value} for ${2:value} in ${3:iterable} if ${4:condition}}$0", + "description": "Create a set based on existing iterables, with condition if statement." + }, + "Generator comprehension": { + "prefix": "gc", + "body": "(${1:key} for ${2:value} in ${3:iterable})$0", + "description": "Create a generator based on existing iterables." + }, + "Generator comprehension if filter": { + "prefix": "gci", + "body": "(${1:key} for ${2:value} in ${3:iterable} if ${4:condition})$0", + "description": "Create a generator based on existing iterables, with condition if statement." + }, + "try/except": { + "prefix": "try/except", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}" + ], + "description": "Code snippet for a try/except statement" + }, + "try/finally": { + "prefix": "try/finally", + "body": ["try:", "\t${1:pass}", "finally:", "\t${2:pass}"], + "description": "Code snippet for a try/finally statement" + }, + "try/except/else": { + "prefix": "try/except/else", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "else:", + "\t${5:pass}" + ], + "description": "Code snippet for a try/except/else statement" + }, + "try/except/finally": { + "prefix": "try/except/finally", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "finally:", + "\t${5:pass}" + ], + "description": "Code snippet for a try/except/finally statement" + }, + "try/except/else/finally": { + "prefix": "try/except/else/finally", + "body": [ + "try:", + "\t${1:pass}", + "except ${2:expression} as ${3:identifier}:", + "\t${4:pass}", + "else:", + "\t${5:pass}", + "finally:", + "\t${6:pass}" + ], + "description": "Code snippet for a try/except/else/finally statement" + }, + "def(class method)": { + "prefix": "def class method", + "body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\t${3:pass}"], + "description": "Code snippet for a class method" + }, + "def(static class method)": { + "prefix": "def static class method", + "body": ["@staticmethod", "def ${1:funcname}(${2:parameter_list}):", "\t${3:pass}"], + "description": "Code snippet for a static class method" + }, + "def(abstract class method)": { + "prefix": "def abstract class method", + "body": ["def ${1:funcname}(self, ${2:parameter_list}):", "\traise NotImplementedError"], + "description": "Code snippet for an abstract class method" + }, + "lambda": { + "prefix": "lambda", + "body": ["lambda ${1:parameter_list}: ${2:expression}"], + "description": "Code snippet for a lambda statement" + }, + "if(main)": { + "prefix": "__main__", + "body": ["if __name__ == \"__main__\":", " ${1:pass}"], + "description": "Code snippet for a `if __name__ == \"__main__\": ...` block" + }, + "async/def": { + "prefix": "async/def", + "body": ["async def ${1:funcname}(${2:parameter_list}):", "\t${3:pass}"], + "description": "Code snippet for an async statement" + }, + "async/for": { + "prefix": "async/for", + "body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}"], + "description": "Code snippet for an async for statement" + }, + "async/for/else": { + "prefix": "async/for/else", + "body": ["async for ${1:target} in ${2:iter}:", "\t${3:block}", "else:", "\t${4:block}"], + "description": "Code snippet for an async for statement with else" + }, + "async/with": { + "prefix": "async/with", + "body": ["async with ${1:expr} as ${2:var}:", "\t${3:block}"], + "description": "Code snippet for an async with statement" + }, + "add/new/cell": { + "prefix": "add/new/cell", + "body": "# %%", + "description": "Code snippet to add a new cell" + }, + "mark/markdown": { + "prefix": "mark/markdown", + "body": "# %% [markdown]", + "description": "Code snippet to add a new markdown cell" + } +} diff --git a/snippets/rust.json b/snippets/rust.json new file mode 100644 index 0000000..374982f --- /dev/null +++ b/snippets/rust.json @@ -0,0 +1,433 @@ +{ + "Complete format to test": { + "prefix": "testformat", + "body": [ + "#[cfg(test)]", + "mod tests {", + " #[test]", + " fn ${1:name}() {", + " ${2:unimplemented!();}", + " }", + "}" + ] + }, + "allow": { + "prefix": "allow", + "body": ["#![allow(${1})]"], + "description": "#![allow(…)]" + }, + "deny": { + "prefix": "deny", + "body": ["#![deny(${1})]"], + "description": "#![deny(…)]" + }, + "warn": { + "prefix": "warn", + "body": ["#![warn(${1})]"], + "description": "#![warn(…)]" + }, + "no_std": { + "prefix": "no_std", + "body": ["#![no_std]"], + "description": "#![no_std]" + }, + "no_core": { + "prefix": "no_core", + "body": ["#![no_core]"], + "description": "#![no_core]" + }, + "feature": { + "prefix": "feature", + "body": ["#![feature(${1})]"], + "description": "#![feature(…)]" + }, + "macro_use": { + "prefix": "macro_use", + "body": ["#[macro_use(${1})]"], + "description": "#[macro_use(…)]" + }, + "repr": { + "prefix": "repr", + "body": ["#[repr(${1})]"], + "description": "#[repr(…)]" + }, + "cfg": { + "prefix": "cfg", + "body": ["#[cfg(${1})]"], + "description": "#[cfg(…)]" + }, + "cfg_attr": { + "prefix": "cfg_attr", + "body": ["#[cfg_attr(${1}, ${2})]"], + "description": "#[cfg_attr(…, …)]" + }, + "cfg!": { + "prefix": "cfg!", + "body": ["cfg!(${1})"], + "description": "cfg!(…)" + }, + "column": { + "prefix": "column", + "body": ["column!()"], + "description": "column!()" + }, + "concat": { + "prefix": "concat", + "body": ["concat!(${1})"], + "description": "concat!(…)" + }, + "concat_idents": { + "prefix": "concat_idents", + "body": ["concat_idents!(${1})"], + "description": "concat_idents!(…)" + }, + "debug_assert": { + "prefix": "debug_assert", + "body": ["debug_assert!(${1});"], + "description": "debug_assert!(…)" + }, + "debug_assert_eq": { + "prefix": "debug_assert_eq", + "body": ["debug_assert_eq!(${1}, ${2});"], + "description": "debug_assert_eq!(…, …)" + }, + "env": { + "prefix": "env", + "body": ["env!(\"${1}\")"], + "description": "env!(\"…\")" + }, + "file": { + "prefix": "file", + "body": ["file!()"], + "description": "file!()" + }, + "format": { + "prefix": "format", + "body": ["format!(\"${1}\")"], + "description": "format!(…)" + }, + "format_args": { + "prefix": "format_args", + "body": ["format_args!(\"${1}\")"], + "description": "format_args!(…)" + }, + "include": { + "prefix": "include", + "body": ["include!(\"${1}\");"], + "description": "include!(\"…\");" + }, + "include_bytes": { + "prefix": "include_bytes", + "body": ["include_bytes!(\"${1}\")"], + "description": "include_bytes!(\"…\")" + }, + "include_str": { + "prefix": "include_str", + "body": ["include_str!(\"${1}\")"], + "description": "include_str!(\"…\")" + }, + "line": { + "prefix": "line", + "body": ["line!()"], + "description": "line!()" + }, + "module_path": { + "prefix": "module_path", + "body": ["module_path!()"], + "description": "module_path!()" + }, + "option_env": { + "prefix": "option_env", + "body": ["option_env!(\"${1}\")"], + "description": "option_env!(\"…\")" + }, + "panic": { + "prefix": "panic", + "body": ["panic!(\"${1}\");"], + "description": "panic!(…);" + }, + "print": { + "prefix": "print", + "body": ["print!(\"${1}\");"], + "description": "print!(…);" + }, + "println": { + "prefix": "println", + "body": ["println!(\"${1}\");"], + "description": "println!(…);" + }, + "stringify": { + "prefix": "stringify", + "body": ["stringify!(${1})"], + "description": "stringify!(…)" + }, + "thread_local": { + "prefix": "thread_local", + "body": ["thread_local!(static ${1:STATIC}: ${2:Type} = ${4:init});"], + "description": "thread_local!(static …: … = …);" + }, + "try": { + "prefix": "try", + "body": ["try!(${1})"], + "description": "try!(…)" + }, + "unimplemented": { + "prefix": "unimplemented", + "body": ["unimplemented!()"], + "description": "unimplemented!()" + }, + "unreachable": { + "prefix": "unreachable", + "body": ["unreachable!(${1})"], + "description": "unreachable!(…)" + }, + "vec": { + "prefix": "vec", + "body": ["vec![${1}]"], + "description": "vec![…]" + }, + "write": { + "prefix": "write", + "body": ["write!(${1}, \"${2}\")"], + "description": "write!(…)" + }, + "writeln": { + "prefix": "writeln", + "body": ["writeln!(${1}, \"${2}\")"], + "description": "writeln!(…, …)" + }, + "Err": { + "prefix": "Err", + "body": ["Err(${1})"], + "description": "Err(…)" + }, + "Ok": { + "prefix": "Ok", + "body": ["Ok(${1:result})"], + "description": "Ok(…)" + }, + "Some": { + "prefix": "Some", + "body": ["Some(${1})"], + "description": "Some(…)" + }, + "assert": { + "prefix": "assert", + "body": ["assert!(${1});"], + "description": "assert!(…);" + }, + "assert_eq": { + "prefix": "assert_eq", + "body": ["assert_eq!(${1}, ${2});"], + "description": "assert_eq!(…, …);" + }, + "bench": { + "prefix": "bench", + "body": [ + "#[bench]", + "fn ${1:name}(b: &mut test::Bencher) {", + " ${2:b.iter(|| ${3:/* benchmark code */})}", + "}" + ], + "description": "#[bench]" + }, + "const": { + "prefix": "const", + "body": ["const ${1:CONST}: ${2:Type} = ${4:init};"], + "description": "const …: … = …;" + }, + "derive": { + "prefix": "derive", + "body": ["#[derive(${1})]"], + "description": "#[derive(…)]" + }, + "else": { + "prefix": "else", + "body": ["else {", " ${1:todo!();}", "}"], + "description": "else { … }" + }, + "enum": { + "prefix": "enum", + "body": [ + "#[derive(Debug)]", + "enum ${1:Name} {", + " ${2:Variant1},", + " ${3:Variant2},", + "}" + ], + "description": "enum … { … }" + }, + "extern-crate": { + "prefix": "extern-crate", + "body": ["extern crate ${1:name};"], + "description": "extern crate …;" + }, + "extern-fn": { + "prefix": "extern-fn", + "body": [ + "extern \"C\" fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {", + " ${5:// add code here}", + "}" + ], + "description": "extern \"C\" fn …(…) { … }" + }, + "extern-mod": { + "prefix": "extern-mod", + "body": ["extern \"C\" {", " ${2:// add code here}", "}"], + "description": "extern \"C\" { … }" + }, + "pfn": { + "prefix": "pfn", + "body": [ + "pub fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {", + " ${5:todo!();}", + "}" + ], + "description": "pub fn …(…) { … }" + }, + "fn": { + "prefix": "fn", + "body": [ + "fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {", + " ${5:todo!();}", + "}" + ], + "description": "fn …(…) { … }" + }, + "for": { + "prefix": "for", + "body": ["for ${1:pat} in ${2:expr} {", " ${3:todo!();}", "}"], + "description": "for … in … { … }" + }, + "if-let": { + "prefix": "if-let", + "body": ["if let ${1:Some(pat)} = ${2:expr} {", " ${0:todo!();}", "}"], + "description": "if let … = … { … }" + }, + "if": { + "prefix": "if", + "body": ["if ${1:condition} {", " ${2:todo!();}", "}"], + "description": "if … { … }" + }, + "impl-trait": { + "prefix": "impl-trait", + "body": [ + "impl ${1:Trait} for ${2:Type} {", + " ${3:// add code here}", + "}" + ], + "description": "impl … for … { … }" + }, + "impl": { + "prefix": "impl", + "body": ["impl ${1:Type} {", " ${2:// add code here}", "}"], + "description": "impl … { … }" + }, + "inline-fn": { + "prefix": "inline-fn", + "body": ["#[inline]", "pub fn ${1:name}() {", " ${2:todo!();}", "}"], + "description": "inlined function" + }, + "let": { + "prefix": "let", + "body": ["let ${1:pat} = ${2:expr};"], + "description": "let … = …;" + }, + "loop": { + "prefix": "loop", + "body": ["loop {", " ${2:todo!();}", "}"], + "description": "loop { … }" + }, + "macro_rules": { + "prefix": "macro_rules", + "body": ["macro_rules! ${1:name} {", " (${2}) => (${3})", "}"], + "description": "macro_rules! … { … }" + }, + "main": { + "prefix": "main", + "body": ["fn main() {", " ${1:todo!();}", "}"], + "description": "fn main() { … }" + }, + "match": { + "prefix": "match", + "body": ["match ${1:expr} {}"], + "description": "match … { … }" + }, + "mod": { + "prefix": "mod", + "body": ["mod ${1:name};"], + "description": "mod …;" + }, + "mod-block": { + "prefix": "mod-block", + "body": ["mod ${1:name} {", " ${2:// add code here}", "}"], + "description": "mod … { … }" + }, + "static": { + "prefix": "static", + "body": ["static ${1:STATIC}: ${2:Type} = ${4:init};"], + "description": "static …: … = …;" + }, + "struct-tuple": { + "prefix": "struct-tuple", + "body": ["struct ${1:Name}(${2:Type});"], + "description": "struct …(…);" + }, + "struct-unit": { + "prefix": "struct-unit", + "body": ["struct ${1:Name};"], + "description": "struct …;" + }, + "struct": { + "prefix": "struct", + "body": [ + "#[derive(Debug)]", + "struct ${1:Name} {", + " ${2:field}: ${3:Type}", + "}" + ], + "description": "struct … { … }" + }, + "modtest": { + "prefix": "modtest", + "body": [ + "#[cfg(test)]", + "mod test {", + " #[test]", + " fn ${1:name}() {", + " ${2:todo!();}", + " }", + "}" + ], + "description": "#[cfg(test)]\nmod test {...}" + }, + "test": { + "prefix": "test", + "body": ["#[test]", "fn ${1:name}() {", " ${2:todo!();}", "}"], + "description": "#[test]" + }, + "trait": { + "prefix": "trait", + "body": ["trait ${1:Name} {", " ${2:// add code here}", "}", ""], + "description": "trait … { … }" + }, + "type": { + "prefix": "type", + "body": ["type ${1:Alias} = ${2:Type};"], + "description": "type … = …;" + }, + "while-let": { + "prefix": "while-let", + "body": [ + "while let ${1:Some(pat)} = ${2:expr} {", + " ${0:todo!();}", + "}" + ], + "description": "while let … = … { … }" + }, + "while": { + "prefix": "while", + "body": ["while ${1:condition} {", " ${2:todo!();}", "}"], + "description": "while … { … }" + } +} diff --git a/snippets/sql.json b/snippets/sql.json new file mode 100644 index 0000000..621f83a --- /dev/null +++ b/snippets/sql.json @@ -0,0 +1,62 @@ +{ + "INTEGER NOT NULL": { + "prefix": "int", + "body": ["INTEGER NOT NULL"] + }, + "VARCHAR NOT NULL": { + "prefix": "varchar", + "body": ["VARCHAR($1) NOT NULL$0"] + }, + "BOOLEAN NOT NULL": { + "prefix": "bool", + "body": ["BOOLEAN NOT NULL"] + }, + "REAL NOT NULL": { + "prefix": "real", + "body": ["REAL NOT NULL"] + }, + "SERIAL PRIMARY KEY": { + "prefix": "srk", + "body": ["SERIAL PRIMARY KEY"] + }, + "FOREIGN KEY": { + "prefix": "fgk", + "body": [ + "FOREIGN KEY (${1:attribute}) REFERENCES ${2:tableName}(${3:attribute}) ON DELETE RESTRICT" + ], + "description": "Foreign Key" + }, + "CREATE TABLE": { + "prefix": "ctt", + "body": ["CREATE TABLE ${1:tableName} (", "\t${2:attribute(s)}", ");"], + "description": "Create regular table" + }, + "CREATE TYPE": { + "prefix": "cte", + "body": [ + "CREATE TYPE ${1:typeName} AS ENUM (", + "\t${2:attribute(s)}", + ");" + ], + "description": "Create type enum" + }, + "INSERT": { + "prefix": "ins", + "body": [ + "INSERT INTO ${1:tableName} (", + "\t${2:attribute(s)}", + ") VALUES ( ${3:values} )" + ], + "description": "Insert value(s)" + }, + "DROP TABLE": { + "prefix": "dpt", + "body": ["DROP TABLE ${1:tableName};"], + "description": "Drop table" + }, + "DROP TYPE": { + "prefix": "dpe", + "body": ["DROP TYPE ${1:typeNAme};"], + "description": "Drop type enum" + } +}