diff --git a/.github/workflows/lint_code.yml b/.github/workflows/lint_code.yml index 5ebd7fcdd..f5ed67ddc 100644 --- a/.github/workflows/lint_code.yml +++ b/.github/workflows/lint_code.yml @@ -8,4 +8,4 @@ jobs: - uses: actions/checkout@v4 - uses: lunarmodules/luacheck@v1 with: - args: . --std luajit --globals vim _toggle_lazygit _command_panel _debugging --max-line-length 150 --no-config + args: . --std luajit --globals vim _toggle_lazygit _command_panel _flash_esc_or_noh _debugging --max-line-length 150 --no-config diff --git a/lazy-lock.json b/lazy-lock.json index 17b352bc1..69963ba04 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,14 +1,14 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" }, + "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, - "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, + "aerial.nvim": { "branch": "master", "commit": "ef08437108247d8805ae388f2699537eac2fd810" }, + "alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" }, "autoclose.nvim": { "branch": "main", "commit": "37e11589aac55b0e8810dc5865f898f9cb36fef6" }, "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, - "bigfile.nvim": { "branch": "main", "commit": "9616b73670ffeb92679677554ded88854ae42cf8" }, - "bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" }, - "catppuccin": { "branch": "refactor/syntax-highlighting", "commit": "2c814f46dd02e8b8cc6ab5f5f3c38781573cb20b" }, - "clever-f.vim": { "branch": "master", "commit": "6a3ac5e3688598af9411ab741737f98c47370c22" }, + "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, + "bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" }, + "catppuccin": { "branch": "refactor/syntax-highlighting", "commit": "9da4a01fd5e4eb092be8d3b34ec879e6d2acf601" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, @@ -21,78 +21,78 @@ "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, - "copilot.lua": { "branch": "master", "commit": "688762a3999eeee54b78f447719854f52672ec02" }, - "crates.nvim": { "branch": "main", "commit": "aac57ef84cf4fecf7907114b22e875f84a6128ee" }, - "csv.vim": { "branch": "master", "commit": "4fd88346aed02123aa5daa1a363868a576c6fdcf" }, - "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" }, - "fidget.nvim": { "branch": "legacy", "commit": "90c22e47be057562ee9566bad313ad42d622c1d3" }, + "copilot.lua": { "branch": "master", "commit": "38a41d0d78f8823cc144c99784528b9a68bdd608" }, + "crates.nvim": { "branch": "main", "commit": "b8ea20fda2e1029fbbb1bae7a9eab35c84037ca0" }, + "csv.vim": { "branch": "master", "commit": "962f88787ec6873eba1c7dbbd81d2723f1ee3c4b" }, + "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, + "fidget.nvim": { "branch": "main", "commit": "300018af4abd00610a345e382ca1f4b7ba420f77" }, + "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "focus.nvim": { "branch": "master", "commit": "5269ea70e2003d9dac199584b093323752a472ba" }, - "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, "fzy-lua-native": { "branch": "master", "commit": "820f745b7c442176bcc243e8f38ef4b985febfaf" }, - "gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" }, + "gitsigns.nvim": { "branch": "main", "commit": "e93a158b8773946dc9940a4321d35c1b52c8e293" }, "glance.nvim": { "branch": "master", "commit": "8ed5cf3b3b1231ea696d88c9efd977027429d869" }, - "hop.nvim": { "branch": "master", "commit": "275dcbc84e8167c7d64b4584770d837f3ce21562" }, - "indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" }, + "hop.nvim": { "branch": "master", "commit": "df0b5b693ef8c3d414b5b85e4bc11cea99c4958d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, "knap": { "branch": "main", "commit": "503010f541696e99ed5c62f658620e546cebf8b0" }, - "lazy.nvim": { "branch": "main", "commit": "16603c6917435d8446f7357cb61095138a417085" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lsp-format-modifications.nvim": { "branch": "main", "commit": "006d4cd88f4f09fdc4375fcb75dd5b7d981a723b" }, - "lsp_signature.nvim": { "branch": "master", "commit": "733d95e7a76eebfb464143b0adadf139002304a4" }, - "lspsaga.nvim": { "branch": "main", "commit": "85f7c38d96924fd3c457ea0a31667cc1bd06b5e0" }, + "lsp_signature.nvim": { "branch": "master", "commit": "8fe76edd43f541e3abaad191a964950d769c06a9" }, + "lspsaga.nvim": { "branch": "main", "commit": "68d42e24295b4254fdf82a8a686fcf951f8a8d9a" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "40301e1c74bc0946eece13edf2b1c561cc497491" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "f0cd12f7a8a310c58cecebddb6b219ffad1cfd0f" }, - "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "5b4db7c0d6873436b42bcda0ba7cd4efa9206745" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "neodim": { "branch": "master", "commit": "9477da03b93f1984a81fee3b92e6ac7c6ada6aa4" }, - "neoscroll.nvim": { "branch": "master", "commit": "4bc0212e9f2a7bc7fe7a6bceb15b33e39f0f41fb" }, - "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, + "neoscroll.nvim": { "branch": "master", "commit": "be4ebf855a52f71ca4338694a5696675d807eff9" }, + "none-ls.nvim": { "branch": "main", "commit": "45d0e8fa9094dcc3fabad9065a5822af9cf099c7" }, "nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" }, - "nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" }, + "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, - "nvim-dap": { "branch": "master", "commit": "79dbc70eb79271ad801e4ff293887cde324c28d0" }, + "nvim-dap": { "branch": "master", "commit": "d7749eb3d9933a75d2244820308ce442f646c7ae" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-lspconfig": { "branch": "master", "commit": "d0467b9574b48429debf83f8248d8cee79562586" }, + "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, - "nvim-scrollview": { "branch": "main", "commit": "e8befc94ea66194700495d2f71419ba112634b0b" }, - "nvim-tree.lua": { "branch": "master", "commit": "7e3c0bee7b246ca835d5f7453db6fa19de359bab" }, + "nvim-scrollview": { "branch": "main", "commit": "7eb9030662fad8bfbc1df2c6cfc165aa4a8904b2" }, + "nvim-tree.lua": { "branch": "master", "commit": "7d1760f892951dd6a118dae1d7a1d8df5f029edf" }, "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, - "nvim-treesitter": { "branch": "master", "commit": "efec7115d8175bdb6720eeb4e26196032cb52593" }, - "nvim-treesitter-context": { "branch": "master", "commit": "2806d83e3965017382ce08792ee527e708fa1bd4" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "e69a504baf2951d52e1f1fbb05145d43f236cbf1" }, + "nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" }, + "nvim-treesitter-context": { "branch": "master", "commit": "bf4d15ee4e96ff5201f16a4ed14443670662eb90" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" }, - "nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" }, - "obsidian.nvim": { "branch": "main", "commit": "37b0ddccbd223c465ea97faadee2039b41ff1d70" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, + "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, + "obsidian.nvim": { "branch": "main", "commit": "46fce1673983bdedd721946aa3340f7a4e1c8ccd" }, "paint.nvim": { "branch": "main", "commit": "6ce64212804f425073c61ab0d9c2b034f0435260" }, - "persisted.nvim": { "branch": "main", "commit": "deae7ab2021abe31418ff7b088048054fbe79c45" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, + "persisted.nvim": { "branch": "main", "commit": "fc9f398393cc3bb0e4e81cb9f7c133cd2b21467f" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "df8cdf68234fbf056202a9684931c3dfa89988c1" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "47404636a34580db1636dc0cf35027bdf77abba5" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, - "smartyank.nvim": { "branch": "master", "commit": "7e3905578f646503525b2f7018b8afd17861018c" }, - "sniprun": { "branch": "master", "commit": "1c4bc063522946676dd178d01d6fc130d3e41da5" }, + "smartyank.nvim": { "branch": "master", "commit": "b048fec8c6b7d122adab6f78606057d59975ece7" }, + "sniprun": { "branch": "master", "commit": "7a8bc30fcf04fd4efec43be368f12eb4266fabf6" }, "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" }, "suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" }, - "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "tabout.nvim": { "branch": "master", "commit": "0d275c8d25f32457e67b5c66d6ae43f26a61bce5" }, - "telescope-bibtex.nvim": { "branch": "master", "commit": "4adb8f494b2063a74766e1253f3d18e99117e5f4" }, - "telescope-frecency.nvim": { "branch": "master", "commit": "daf59744f60e34cbb48a40a092e9e735553b6f21" }, + "telescope-bibtex.nvim": { "branch": "master", "commit": "b10ec78df938a1e06217f965b32fb1b960681cff" }, + "telescope-frecency.nvim": { "branch": "master", "commit": "de410701811f4142315ce89183256a969a08ff9d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "851c0997d55601f2afd7290db0f90dc364e29f58" }, - "telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" }, + "telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "4522d7e3ea75ffddabdc39957168a8a7060b5df0" }, - "toggleterm.nvim": { "branch": "main", "commit": "c80844fd52ba76f48fabf83e2b9f9b93273f418d" }, + "telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" }, + "toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "vim-cool": { "branch": "master", "commit": "662e7b11064cbeedad17c45d2fe926e78d3cd0b6" }, "vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }, "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, - "vim-go": { "branch": "master", "commit": "1401b576c6ac382529188d3d26cff866139f2f9a" }, + "vim-go": { "branch": "master", "commit": "e8c18054cc44973ee4f59ee463dda4bf6439713c" }, "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, - "vim-matchup": { "branch": "master", "commit": "6dbe108230c7dbbf00555b7d4d9f6a891837ef07" }, + "vim-matchup": { "branch": "master", "commit": "269f9bea87e20a01438085eb13df539929a12727" }, "vim-pencil": { "branch": "master", "commit": "6d70438a8886eaf933c38a7a43a61adb0a7815ed" }, - "vimtex": { "branch": "master", "commit": "7785ecd75b9a71a22ac33a8250e3bf4eaca6b439" }, + "vimtex": { "branch": "master", "commit": "8dad59abe76c7a9ad3485d3015b8101b2e737892" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, "wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" } } \ No newline at end of file diff --git a/lua/core/init.lua b/lua/core/init.lua index 60fb8dbe2..fdc31e54f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -22,11 +22,11 @@ local createdir = function() end local disable_distribution_plugins = function() - -- disable menu loading + -- Disable menu loading vim.g.did_install_default_menus = 1 vim.g.did_install_syntax_menu = 1 - -- Uncomment this if you define your own filetypes in `after/ftplugin` + -- Comment this if you define your own filetypes in `after/ftplugin` -- vim.g.did_load_filetypes = 1 -- Do not load native syntax completion @@ -46,8 +46,8 @@ local disable_distribution_plugins = function() -- Do not load tohtml.vim vim.g.loaded_2html_plugin = 1 - -- Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all these plugins are - -- related to checking files inside compressed files) + -- Do not load zipPlugin.vim, gzip.vim and tarPlugin.vim (all of these plugins are + -- related to reading files inside compressed containers) vim.g.loaded_gzip = 1 vim.g.loaded_tar = 1 vim.g.loaded_tarPlugin = 1 @@ -56,19 +56,20 @@ local disable_distribution_plugins = function() vim.g.loaded_zip = 1 vim.g.loaded_zipPlugin = 1 - -- Do not use builtin matchit.vim and matchparen.vim since the use of vim-matchup + -- Do not use builtin matchit.vim and matchparen.vim because we're using vim-matchup vim.g.loaded_matchit = 1 vim.g.loaded_matchparen = 1 - -- Disable sql omni completion. + -- Disable sql omni completion vim.g.loaded_sql_completion = 1 - -- Disable EditorConfig support + -- Set this to 0 in order to disable native EditorConfig support vim.g.editorconfig = 1 -- Disable remote plugins - -- NOTE: Disabling rplugin.vim will show error for `wilder.nvim` in :checkhealth, - -- NOTE: but since it's config doesn't require python rtp, it's fine to ignore. + -- NOTE: + -- > Disabling rplugin.vim will make `wilder.nvim` complain about missing rplugins during :checkhealth, + -- > but since it's config doesn't require python rtp (strictly), it's fine to ignore that for now. -- vim.g.loaded_remote_plugins = 1 end @@ -84,7 +85,7 @@ end local neovide_config = function() vim.api.nvim_set_option_value("guifont", "Hack:h15", {}) - for name, config in ipairs(settings.neovide_config) do + for name, config in pairs(settings.neovide_config) do vim.g["neovide_" .. name] = config end end diff --git a/lua/core/mapping.lua b/lua/core/mapping.lua index 39c58cf97..ea53edc95 100644 --- a/lua/core/mapping.lua +++ b/lua/core/mapping.lua @@ -2,6 +2,7 @@ local bind = require("keymap.bind") local map_cr = bind.map_cr local map_cu = bind.map_cu local map_cmd = bind.map_cmd +local map_callback = bind.map_callback local core_map = { -- Suckless @@ -12,7 +13,12 @@ local core_map = { ["n|n"] = map_cmd("nzzzv"):with_noremap():with_desc("edit: Next search result"), ["n|N"] = map_cmd("Nzzzv"):with_noremap():with_desc("edit: Prev search result"), ["n|J"] = map_cmd("mzJ`z"):with_noremap():with_desc("edit: Join next line"), - ["n|"] = map_cr("noh"):with_noremap():with_silent():with_desc("edit: Clear search highlight"), + ["n|"] = map_callback(function() + _flash_esc_or_noh() + end) + :with_noremap() + :with_silent() + :with_desc("edit: Clear search highlight"), ["n|"] = map_cmd("h"):with_noremap():with_desc("window: Focus left"), ["n|"] = map_cmd("l"):with_noremap():with_desc("window: Focus right"), ["n|"] = map_cmd("j"):with_noremap():with_desc("window: Focus down"), diff --git a/lua/core/settings.lua b/lua/core/settings.lua index fd44daf16..7b107a457 100644 --- a/lua/core/settings.lua +++ b/lua/core/settings.lua @@ -112,7 +112,7 @@ settings["lsp_deps"] = { -- Set the general-purpose servers that will be installed during bootstrap here. -- Check the below link for all supported sources. -- in `code_actions`, `completion`, `diagnostics`, `formatting`, `hover` folders: --- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins +-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins ---@type string[] settings["null_ls_deps"] = { "clang_format", diff --git a/lua/keymap/completion.lua b/lua/keymap/completion.lua index 4163db789..5472eba5c 100644 --- a/lua/keymap/completion.lua +++ b/lua/keymap/completion.lua @@ -15,7 +15,13 @@ function mapping.lsp(buf) -- LSP-related keymaps, ONLY effective in buffers with LSP(s) attached ["n|li"] = map_cr("LspInfo"):with_silent():with_buffer(buf):with_desc("lsp: Info"), ["n|lr"] = map_cr("LspRestart"):with_silent():with_buffer(buf):with_nowait():with_desc("lsp: Restart"), - ["n|go"] = map_cr("SymbolsOutline"):with_silent():with_buffer(buf):with_desc("lsp: Toggle outline"), + ["n|go"] = map_cr("AerialToggle!"):with_silent():with_buffer(buf):with_desc("lsp: Toggle outline"), + ["n|gto"] = map_callback(function() + require("telescope").extensions.aerial.aerial() + end) + :with_silent() + :with_buffer(buf) + :with_desc("lsp: Toggle outline in Telescope"), ["n|g["] = map_cr("Lspsaga diagnostic_jump_prev") :with_silent() :with_buffer(buf) diff --git a/lua/keymap/editor.lua b/lua/keymap/editor.lua index ac213183e..1de214678 100644 --- a/lua/keymap/editor.lua +++ b/lua/keymap/editor.lua @@ -22,14 +22,6 @@ local plug_map = { -- Plugin: nvim-bufdel ["n|"] = map_cr("BufDel"):with_noremap():with_silent():with_desc("buffer: Close current"), - -- Plugin: clever-f - ["n|;"] = map_callback(function() - return et("(clever-f-repeat-forward)") - end):with_expr(), - ["n|,"] = map_callback(function() - return et("(clever-f-repeat-back)") - end):with_expr(), - -- Plugin: comment.nvim ["n|gcc"] = map_callback(function() return vim.v.count == 0 and et("(comment_toggle_linewise_current)") diff --git a/lua/keymap/helpers.lua b/lua/keymap/helpers.lua index f4f26d26f..2604b2146 100644 --- a/lua/keymap/helpers.lua +++ b/lua/keymap/helpers.lua @@ -11,6 +11,17 @@ _G._command_panel = function() }) end +_G._flash_esc_or_noh = function() + local flash_active, state = pcall(function() + return require("flash.plugins.char").state + end) + if flash_active and state then + state:hide() + else + vim.cmd([[noh]]) + end +end + local _lazygit = nil _G._toggle_lazygit = function() if vim.fn.executable("lazygit") == 1 then diff --git a/lua/keymap/tool.lua b/lua/keymap/tool.lua index 988e11702..e9a514cd5 100644 --- a/lua/keymap/tool.lua +++ b/lua/keymap/tool.lua @@ -116,7 +116,9 @@ local plug_map = { :with_desc("find: Word in project"), ["n|fe"] = map_cu("Telescope oldfiles"):with_noremap():with_silent():with_desc("find: File by history"), ["n|ff"] = map_cu("Telescope find_files"):with_noremap():with_silent():with_desc("find: File in project"), - ["n|fc"] = map_cu("Telescope colorscheme") + ["n|fc"] = map_callback(function() + require("telescope.builtin").colorscheme({ enable_preview = true }) + end) :with_noremap() :with_silent() :with_desc("ui: Change colorscheme for current session"), diff --git a/lua/modules/configs/completion/aerial.lua b/lua/modules/configs/completion/aerial.lua new file mode 100644 index 000000000..4c89afd5a --- /dev/null +++ b/lua/modules/configs/completion/aerial.lua @@ -0,0 +1,80 @@ +return function() + require("modules.utils").load_plugin("aerial", { + lazy_load = false, + close_on_select = true, + highlight_on_jump = false, + disable_max_lines = 8500, + disable_max_size = 1000000, + ignore = { filetypes = { "NvimTree", "terminal", "nofile" } }, + -- Use symbol tree for folding. Set to true or false to enable/disable + -- Set to "auto" to manage folds if your previous foldmethod was 'manual' + -- This can be a filetype map (see :help aerial-filetype-map) + manage_folds = "auto", + layout = { + -- Determines the default direction to open the aerial window. The 'prefer' + -- options will open the window in the other direction *if* there is a + -- different buffer in the way of the preferred direction + -- Enum: prefer_right, prefer_left, right, left, float + default_direction = "prefer_right", + }, + -- Keymaps in aerial window. Can be any value that `vim.keymap.set` accepts OR a table of keymap + -- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true }) + -- Additionally, if it is a string that matches "actions.", + -- it will use the mapping at require("aerial.actions"). + -- Set to `false` to remove a keymap + keymaps = { + ["?"] = "actions.show_help", + ["g?"] = "actions.show_help", + [""] = "actions.jump", + ["<2-LeftMouse>"] = "actions.jump", + [""] = "actions.jump_vsplit", + [""] = "actions.jump_split", + [""] = "actions.down_and_scroll", + [""] = "actions.up_and_scroll", + ["{"] = "actions.prev", + ["}"] = "actions.next", + ["[["] = "actions.prev_up", + ["]]"] = "actions.next_up", + ["q"] = "actions.close", + ["o"] = "actions.tree_toggle", + ["O"] = "actions.tree_toggle_recursive", + ["zr"] = "actions.tree_increase_fold_level", + ["zR"] = "actions.tree_open_all", + ["zm"] = "actions.tree_decrease_fold_level", + ["zM"] = "actions.tree_close_all", + ["zx"] = "actions.tree_sync_folds", + ["zX"] = "actions.tree_sync_folds", + }, + -- A list of all symbols to display. Set to false to display all symbols. + -- This can be a filetype map (see :help aerial-filetype-map) + -- To see all available values, see :help SymbolKind + filter_kind = { + "Array", + "Boolean", + "Class", + "Constant", + "Constructor", + "Enum", + "EnumMember", + "Event", + "Field", + "File", + "Function", + "Interface", + "Key", + "Method", + "Module", + "Namespace", + "Null", + -- "Number", + "Object", + "Operator", + "Package", + -- "Property", + -- "String", + "Struct", + -- "TypeParameter", + -- "Variable", + }, + }) +end diff --git a/lua/modules/configs/completion/lspsaga.lua b/lua/modules/configs/completion/lspsaga.lua index 35c2a2a5d..bca447da0 100644 --- a/lua/modules/configs/completion/lspsaga.lua +++ b/lua/modules/configs/completion/lspsaga.lua @@ -26,7 +26,7 @@ return function() set_sidebar_icons() require("modules.utils").load_plugin("lspsaga", { - -- Breadcrumbs: https://dev.neovim.pro/lspsaga/breadcrumbs/ + -- Breadcrumbs: https://nvimdev.github.io/lspsaga/breadcrumbs/ symbol_in_winbar = { enable = true, separator = " " .. icons.ui.Separator, @@ -36,7 +36,7 @@ return function() color_mode = true, delay = 100, }, - -- https://dev.neovim.pro/lspsaga/callhierarchy/ + -- Callhierarchy: https://nvimdev.github.io/lspsaga/callhierarchy/ callhierarchy = { layout = "float", keys = { @@ -50,7 +50,7 @@ return function() close = "", }, }, - -- https://dev.neovim.pro/lspsaga/codeaction/ + -- Code Action: https://nvimdev.github.io/lspsaga/codeaction/ code_action = { num_shortcut = true, only_in_cursor = false, @@ -61,7 +61,7 @@ return function() exec = "", }, }, - -- https://dev.neovim.pro/lspsaga/diagnostic/ + -- Diagnostics: https://nvimdev.github.io/lspsaga/diagnostic/ diagnostic = { show_code_action = true, jump_num_shortcut = true, @@ -82,21 +82,21 @@ return function() quit_in_show = { "q", "" }, }, }, - -- https://dev.neovim.pro/lspsaga/hover/ + -- Hover: https://nvimdev.github.io/lspsaga/hover/ hover = { max_width = 0.45, max_height = 0.7, open_link = "gl", open_cmd = "silent !" .. require("core.settings").external_browser, }, - -- https://dev.neovim.pro/lspsaga/implement/ + -- Impl: https://nvimdev.github.io/lspsaga/implement/ implement = { enable = true, sign = true, virtual_text = false, priority = 100, }, - -- https://dev.neovim.pro/lspsaga/lightbulb/ + -- LightBulb: https://nvimdev.github.io/lspsaga/lightbulb/ lightbulb = { enable = false, sign = true, @@ -104,7 +104,7 @@ return function() debounce = 10, sign_priority = 20, }, - -- https://dev.neovim.pro/lspsaga/rename/ + -- Rename: https://nvimdev.github.io/lspsaga/rename/ rename = { in_select = false, auto_save = false, @@ -116,12 +116,12 @@ return function() select = "x", }, }, - -- https://dev.neovim.pro/lspsaga/misc/#beacon + -- Beacon: https://nvimdev.github.io/lspsaga/misc/#beacon beacon = { enable = true, frequency = 12, }, - -- https://dev.neovim.pro/lspsaga/misc/#generic-ui-options + -- Generic UI Options: https://nvimdev.github.io/lspsaga/misc/#generic-ui-options ui = { border = "single", -- Can be single, double, rounded, solid, shadow. devicon = true, @@ -173,7 +173,7 @@ return function() Value = { icons.kind.Value, "LspKindValue" }, }, }, - -- https://dev.neovim.pro/lspsaga/misc/#scrolling-keymaps + -- Scrolling Keymaps: https://nvimdev.github.io/lspsaga/misc/#scrolling-keymaps scroll_preview = { scroll_down = "", scroll_up = "", diff --git a/lua/modules/configs/completion/null-ls.lua b/lua/modules/configs/completion/null-ls.lua index ab42abdd7..b2c29c07e 100644 --- a/lua/modules/configs/completion/null-ls.lua +++ b/lua/modules/configs/completion/null-ls.lua @@ -2,12 +2,23 @@ return function() local null_ls = require("null-ls") local btns = null_ls.builtins + ---Return formatter args required by `extra_args` + ---@param formatter_name string + ---@return table|nil + local function formatter_args(formatter_name) + local ok, args = pcall(require, "user.configs.formatters." .. formatter_name) + if not ok then + args = require("completion.formatters." .. formatter_name) + end + return args + end + -- Please set additional flags for the supported servers here -- Don't specify any config here if you are using the default one. local sources = { btns.formatting.clang_format.with({ filetypes = { "c", "cpp" }, - extra_args = require("completion.formatters.clang_format"), + extra_args = formatter_args("clang_format"), }), btns.formatting.prettier.with({ filetypes = { diff --git a/lua/modules/configs/completion/symbols-outline.lua b/lua/modules/configs/completion/symbols-outline.lua deleted file mode 100644 index e44a9268e..000000000 --- a/lua/modules/configs/completion/symbols-outline.lua +++ /dev/null @@ -1,69 +0,0 @@ -return function() - local icons = { - kind = require("modules.utils.icons").get("kind", true), - type = require("modules.utils.icons").get("type", true), - ui = require("modules.utils.icons").get("ui", true), - } - - require("modules.utils").load_plugin("symbols-outline", { - highlight_hovered_item = true, - show_guides = true, - auto_preview = false, - position = "right", - relative_width = true, - width = 18, - auto_close = true, - show_numbers = false, - show_symbol_details = true, - autofold_depth = 5, - auto_unfold_hover = true, - fold_markers = { icons.ui.ArrowClosed, icons.ui.ArrowOpen }, - wrap = false, - keymaps = { - close = { "", "q" }, - goto_location = "", - focus_location = "o", - hover_symbol = "gs", - toggle_preview = "K", - rename_symbol = "r", - code_actions = "ca", - fold = "c", - unfold = "o", - fold_all = "C", - unfold_all = "O", - fold_reset = "R", - }, - symbols = { - -- Kind - Class = { icon = icons.kind.Class, hl = "LspKindClass" }, - Constant = { icon = icons.kind.Constant, hl = "LspKindConstant" }, - Constructor = { icon = icons.kind.Constructor, hl = "LspKindConstructor" }, - Component = { icon = icons.kind.Snippet, hl = "LspKindSnippet" }, - Enum = { icon = icons.kind.Enum, hl = "LspKindEnum" }, - EnumMember = { icon = icons.kind.EnumMember, hl = "LspKindEnumMember" }, - Event = { icon = icons.kind.Event, hl = "LspKindEvent" }, - Field = { icon = icons.kind.Field, hl = "LspKindField" }, - File = { icon = icons.kind.File, hl = "LspKindFile" }, - Fragment = { icon = icons.kind.Fragment, hl = "LspKindKey" }, - Function = { icon = icons.kind.Function, hl = "LspKindFunction" }, - Interface = { icon = icons.kind.Interface, hl = "LspKindInterface" }, - Key = { icon = icons.kind.Keyword, hl = "LspKindKey" }, - Method = { icon = icons.kind.Method, hl = "LspKindMethod" }, - Module = { icon = icons.kind.Module, hl = "LspKindModule" }, - Namespace = { icon = icons.kind.Namespace, hl = "LspKindNamespace" }, - Number = { icon = icons.kind.Number, hl = "LspKindNumber" }, - Operator = { icon = icons.kind.Operator, hl = "LspKindOperator" }, - Package = { icon = icons.kind.Package, hl = "LspKindPackage" }, - Property = { icon = icons.kind.Property, hl = "LspKindProperty" }, - Struct = { icon = icons.kind.Struct, hl = "LspKindStruct" }, - TypeParameter = { icon = icons.kind.TypeParameter, hl = "LspKindTypeParameter" }, - Variable = { icon = icons.kind.Variable, hl = "LspKindVariable" }, - -- Type - Array = { icon = icons.type.Array, hl = "LspKindArray" }, - Boolean = { icon = icons.type.Boolean, hl = "LspKindBoolean" }, - Null = { icon = icons.type.Null, hl = "LspKindNull" }, - Object = { icon = icons.type.Object, hl = "LspKindObject" }, - String = { icon = icons.type.String, hl = "LspKindString" }, - }, - }) -end diff --git a/lua/modules/configs/editor/cleverf.lua b/lua/modules/configs/editor/cleverf.lua deleted file mode 100644 index 2b640a933..000000000 --- a/lua/modules/configs/editor/cleverf.lua +++ /dev/null @@ -1,13 +0,0 @@ -return function() - vim.api.nvim_set_hl( - 0, - "CleverChar", - { underline = true, bold = true, fg = "Orange", bg = "NONE", ctermfg = "Red", ctermbg = "NONE" } - ) - vim.g.clever_f_mark_char_color = "CleverChar" - vim.g.clever_f_mark_direct_color = "CleverChar" - vim.g.clever_f_mark_direct = true - vim.g.clever_f_timeout_ms = 1500 - - require("modules.utils").load_plugin("cleverf", nil, true) -end diff --git a/lua/modules/configs/editor/flash.lua b/lua/modules/configs/editor/flash.lua new file mode 100644 index 000000000..4d86a0169 --- /dev/null +++ b/lua/modules/configs/editor/flash.lua @@ -0,0 +1,37 @@ +return function() + vim.api.nvim_set_hl( + 0, + "FlashLabel", + { underline = true, bold = true, fg = "Orange", bg = "NONE", ctermfg = "Red", ctermbg = "NONE" } + ) + + require("modules.utils").load_plugin("flash", { + labels = "asdfghjklqwertyuiopzxcvbnm", + label = { + -- allow uppercase labels + uppercase = true, + -- add a label for the first match in the current window. + -- you can always jump to the first match with `` + current = true, + -- for the current window, label targets closer to the cursor first + distance = true, + }, + modes = { + search = { enabled = false }, + -- options used when flash is activated through + -- `f`, `F`, `t`, `T`, `;` and `,` motions + char = { + enabled = true, + -- hide after jump when not using jump labels + autohide = false, + -- show jump labels + jump_labels = false, + -- set to `false` to use the current line only + multi_line = true, + -- When using jump labels, don't use these keys + -- This allows using those keys directly after the motion + label = { exclude = "hjkliardc" }, + }, + }, + }) +end diff --git a/lua/modules/configs/editor/treesitter.lua b/lua/modules/configs/editor/treesitter.lua index 60a55e0a1..e9fe90151 100644 --- a/lua/modules/configs/editor/treesitter.lua +++ b/lua/modules/configs/editor/treesitter.lua @@ -16,7 +16,7 @@ return vim.schedule_wrap(function() local ok, is_large_file = pcall(vim.api.nvim_buf_get_var, bufnr, "bigfile_disable_treesitter") return ok and is_large_file end, - additional_vim_regex_highlighting = { "c", "cpp", "markdown" }, + additional_vim_regex_highlighting = false, }, textobjects = { select = { @@ -49,7 +49,7 @@ return vim.schedule_wrap(function() }, }, }, - context_commentstring = { enable = true, enable_autocmd = false }, + indent = { enable = true }, matchup = { enable = true }, }, false, require("nvim-treesitter.configs").setup) require("nvim-treesitter.install").prefer_git = true diff --git a/lua/modules/configs/editor/ts-context-commentstring.lua b/lua/modules/configs/editor/ts-context-commentstring.lua new file mode 100644 index 000000000..ebefadcab --- /dev/null +++ b/lua/modules/configs/editor/ts-context-commentstring.lua @@ -0,0 +1,7 @@ +return function() + vim.g.skip_ts_context_commentstring_module = true + require("modules.utils").load_plugin("ts_context_commentstring", { + -- Whether to update the `commentstring` on the `CursorHold` autocmd + enable_autocmd = false, + }) +end diff --git a/lua/modules/configs/editor/ts-context.lua b/lua/modules/configs/editor/ts-context.lua index 7dcf25c44..186a52558 100644 --- a/lua/modules/configs/editor/ts-context.lua +++ b/lua/modules/configs/editor/ts-context.lua @@ -1,7 +1,7 @@ return function() require("modules.utils").load_plugin("treesitter-context", { enable = true, - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit. min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. line_numbers = true, multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line diff --git a/lua/modules/configs/editor/vim-illuminate.lua b/lua/modules/configs/editor/vim-illuminate.lua index 906489008..f82df5124 100644 --- a/lua/modules/configs/editor/vim-illuminate.lua +++ b/lua/modules/configs/editor/vim-illuminate.lua @@ -10,15 +10,14 @@ return function() "DoomInfo", "DressingSelect", "NvimTree", - "Outline", "TelescopePrompt", "Trouble", + "aerial", "alpha", "dashboard", "dirvish", "fugitive", "help", - "lsgsagaoutline", "neogitstatus", "norg", "toggleterm", diff --git a/lua/modules/configs/tool/telescope.lua b/lua/modules/configs/tool/telescope.lua index 1c4c7f59e..70cdc6747 100644 --- a/lua/modules/configs/tool/telescope.lua +++ b/lua/modules/configs/tool/telescope.lua @@ -44,6 +44,13 @@ return function() buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker, }, extensions = { + aerial = { + show_lines = false, + show_nesting = { + ["_"] = false, -- This key will be the default + lua = true, -- You can set the option for specific filetypes + }, + }, fzf = { fuzzy = false, override_generic_sorter = true, @@ -92,4 +99,5 @@ return function() require("telescope").load_extension("zoxide") require("telescope").load_extension("persisted") require("telescope").load_extension("bibtex") + require("telescope").load_extension("aerial") end diff --git a/lua/modules/configs/ui/alpha.lua b/lua/modules/configs/ui/alpha.lua index b3d5f1a6d..4db42ba7b 100644 --- a/lua/modules/configs/ui/alpha.lua +++ b/lua/modules/configs/ui/alpha.lua @@ -60,7 +60,7 @@ return function() local leader = " " dashboard.section.buttons.val = { - button("space f c", " Scheme change", leader, nil, { + button("space f c", " Scheme change", leader, nil, { noremap = true, silent = true, nowait = true, diff --git a/lua/modules/configs/ui/bufferline.lua b/lua/modules/configs/ui/bufferline.lua index f497a72cd..6012acda5 100644 --- a/lua/modules/configs/ui/bufferline.lua +++ b/lua/modules/configs/ui/bufferline.lua @@ -32,7 +32,7 @@ return function() padding = 0, }, { - filetype = "Outline", + filetype = "aerial", text = "Symbol Outline", text_align = "center", padding = 0, diff --git a/lua/modules/configs/ui/catppuccin.lua b/lua/modules/configs/ui/catppuccin.lua index 6973f5c03..6de2a315b 100644 --- a/lua/modules/configs/ui/catppuccin.lua +++ b/lua/modules/configs/ui/catppuccin.lua @@ -47,7 +47,7 @@ return function() information = { "underline" }, }, }, - aerial = false, + aerial = true, alpha = false, barbar = false, beacon = false, @@ -58,7 +58,7 @@ return function() dropbar = { enabled = true, color_mode = true }, fern = false, fidget = true, - flash = false, + flash = true, gitgutter = false, gitsigns = true, harpoon = false, @@ -85,7 +85,7 @@ return function() rainbow_delimiters = true, sandwich = false, semantic_tokens = true, - symbols_outline = true, + symbols_outline = false, telekasten = false, telescope = { enabled = true, style = "nvchad" }, treesitter_context = true, diff --git a/lua/modules/configs/ui/fidget.lua b/lua/modules/configs/ui/fidget.lua index e2ef87a61..ee920a3f6 100644 --- a/lua/modules/configs/ui/fidget.lua +++ b/lua/modules/configs/ui/fidget.lua @@ -1,11 +1,25 @@ return function() + local icons = { + ui = require("modules.utils.icons").get("ui"), + } + require("modules.utils").load_plugin("fidget", { - window = { blend = 0 }, - sources = { - ["null-ls"] = { ignore = true }, + progress = { + suppress_on_insert = false, -- Suppress new messages while in insert mode + ignore_done_already = false, -- Ignore new tasks that are already complete + ignore = { "null-ls" }, -- List of LSP servers to ignore + display = { + render_limit = 5, -- How many LSP messages to show at once + done_ttl = 2, -- How long a message should persist after completion + done_icon = icons.ui.Accepted, -- Icon shown when all LSP progress tasks are complete + }, }, - fmt = { - max_messages = 3, -- The maximum number of messages stacked at any give time + notification = { + override_vim_notify = false, -- Automatically override vim.notify() with Fidget + window = { + winblend = 0, -- Background color opacity in the notification window + zindex = 75, -- Stacking priority of the notification window + }, }, }) end diff --git a/lua/modules/configs/ui/indent-blankline.lua b/lua/modules/configs/ui/indent-blankline.lua index 809749c1b..1f55ea3a9 100644 --- a/lua/modules/configs/ui/indent-blankline.lua +++ b/lua/modules/configs/ui/indent-blankline.lua @@ -65,6 +65,7 @@ return function() exclude = { filetypes = { "", -- for all buffers without a file type + "aerial", "alpha", "big_file_disabled_ft", "dashboard", @@ -78,7 +79,6 @@ return function() "log", "markdown", "NvimTree", - "Outline", "peekaboo", "startify", "TelescopePrompt", diff --git a/lua/modules/configs/ui/lualine.lua b/lua/modules/configs/ui/lualine.lua index 18f487b2b..bbdd29be1 100644 --- a/lua/modules/configs/ui/lualine.lua +++ b/lua/modules/configs/ui/lualine.lua @@ -64,7 +64,7 @@ return function() } local outline = { sections = mini_sections, - filetypes = { "Outline" }, + filetypes = { "aerial" }, } local diffview = { sections = mini_sections, diff --git a/lua/modules/configs/ui/scrollview.lua b/lua/modules/configs/ui/scrollview.lua index 78a7c7ce7..40678d089 100644 --- a/lua/modules/configs/ui/scrollview.lua +++ b/lua/modules/configs/ui/scrollview.lua @@ -3,7 +3,7 @@ return function() require("modules.utils").load_plugin("scrollview", { scrollview_mode = "virtual", - excluded_filetypes = { "NvimTree", "terminal", "nofile", "Outline" }, + excluded_filetypes = { "NvimTree", "terminal", "nofile", "aerial" }, winblend = 0, signs_on_startup = { "diagnostics", "folds", "marks", "search", "spell" }, diagnostics_error_symbol = icons.diagnostics.Error, diff --git a/lua/modules/plugins/completion.lua b/lua/modules/plugins/completion.lua index f69637820..75594043d 100644 --- a/lua/modules/plugins/completion.lua +++ b/lua/modules/plugins/completion.lua @@ -20,21 +20,21 @@ completion["nvimdev/lspsaga.nvim"] = { config = require("completion.lspsaga"), dependencies = { "nvim-tree/nvim-web-devicons" }, } -completion["dnlhc/glance.nvim"] = { +completion["stevearc/aerial.nvim"] = { lazy = true, event = "LspAttach", - config = require("completion.glance"), + config = require("completion.aerial"), } -completion["simrat39/symbols-outline.nvim"] = { +completion["dnlhc/glance.nvim"] = { lazy = true, event = "LspAttach", - config = require("completion.symbols-outline"), + config = require("completion.glance"), } completion["joechrisellis/lsp-format-modifications.nvim"] = { lazy = true, event = "LspAttach", } -completion["jose-elias-alvarez/null-ls.nvim"] = { +completion["nvimtools/none-ls.nvim"] = { lazy = true, event = { "CursorHold", "CursorHoldI" }, config = require("completion.null-ls"), diff --git a/lua/modules/plugins/editor.lua b/lua/modules/plugins/editor.lua index b87866162..563a0c1ec 100644 --- a/lua/modules/plugins/editor.lua +++ b/lua/modules/plugins/editor.lua @@ -38,10 +38,17 @@ editor["ojroques/nvim-bufdel"] = { lazy = true, cmd = { "BufDel", "BufDelAll", "BufDelOthers" }, } -editor["rhysd/clever-f.vim"] = { +-- NOTE: `flash.nvim` is a powerful plugin that can be used as partial or complete replacements for: +-- > `hop.nvim`, +-- > `wilder.nvim` +-- > `nvim-treehopper` +-- Considering its steep learning curve as well as backward compatibility issues... +-- > We have no plan to remove the above plugins for the time being. +-- But as usual, you can always tweak the plugin to your liking. +editor["folke/flash.nvim"] = { lazy = true, event = { "CursorHold", "CursorHoldI" }, - config = require("editor.cleverf"), + config = require("editor.flash"), } editor["numToStr/Comment.nvim"] = { lazy = true, @@ -84,23 +91,18 @@ editor["nvim-treesitter/nvim-treesitter"] = { lazy = true, build = function() if #vim.api.nvim_list_uis() ~= 0 then - vim.api.nvim_command("TSUpdate") + vim.api.nvim_command([[TSUpdate]]) end end, - event = "BufReadPost", + event = "BufReadPre", config = require("editor.treesitter"), dependencies = { - { "nvim-treesitter/nvim-treesitter-textobjects" }, - { "JoosepAlviste/nvim-ts-context-commentstring" }, - { "mfussenegger/nvim-treehopper" }, { "andymass/vim-matchup" }, + { "mfussenegger/nvim-treehopper" }, + { "nvim-treesitter/nvim-treesitter-textobjects" }, { - "hiphish/rainbow-delimiters.nvim", - config = require("editor.rainbow_delims"), - }, - { - "nvim-treesitter/nvim-treesitter-context", - config = require("editor.ts-context"), + "abecodes/tabout.nvim", + config = require("editor.tabout"), }, { "windwp/nvim-ts-autotag", @@ -111,8 +113,16 @@ editor["nvim-treesitter/nvim-treesitter"] = { config = require("editor.colorizer"), }, { - "abecodes/tabout.nvim", - config = require("editor.tabout"), + "hiphish/rainbow-delimiters.nvim", + config = require("editor.rainbow_delims"), + }, + { + "nvim-treesitter/nvim-treesitter-context", + config = require("editor.ts-context"), + }, + { + "JoosepAlviste/nvim-ts-context-commentstring", + config = require("editor.ts-context-commentstring"), }, }, } diff --git a/lua/modules/plugins/ui.lua b/lua/modules/plugins/ui.lua index 94da9b46b..47e0c2030 100644 --- a/lua/modules/plugins/ui.lua +++ b/lua/modules/plugins/ui.lua @@ -18,7 +18,6 @@ ui["Jint-lzxy/nvim"] = { } ui["j-hui/fidget.nvim"] = { lazy = true, - branch = "legacy", event = "LspAttach", config = require("ui.fidget"), } diff --git a/lua/modules/utils/icons.lua b/lua/modules/utils/icons.lua index 406df91a9..8c7c1d635 100644 --- a/lua/modules/utils/icons.lua +++ b/lua/modules/utils/icons.lua @@ -164,6 +164,7 @@ local data = { Added = "", Ghost = "󰊠", ManUp = "", + Neovim = "", Vim = "", }, cmp = { diff --git a/lua/user_template/configs/formatters/.gitkeep b/lua/user_template/configs/formatters/.gitkeep new file mode 100644 index 000000000..e69de29bb