diff --git a/README.md b/README.md index 6cbac98..b9d4dcf 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,3 @@ ## Requirements * [ripgrep](https://github.com/BurntSushi/ripgrep) * [fd](https://github.com/sharkdp/fd) -* [sed](https://www.gnu.org/software/sed) - required for search/replace diff --git a/init.lua b/init.lua index ab477f5..5e26aa6 100644 --- a/init.lua +++ b/init.lua @@ -20,3 +20,18 @@ require("lazy").setup("plugins") -- Set vim.notify vim.notify = require("notify") + +-- Terminal mappings +function _G.set_terminal_keymaps() + local opts = { buffer = 0 } + local set = vim.keymap.set + set("t", "", [[]], opts) + set("t", "jk", [[]], opts) + set("t", "", [[wincmd h]], opts) + set("t", "", [[wincmd j]], opts) + set("t", "", [[wincmd k]], opts) + set("t", "", [[wincmd l]], opts) + set("t", "", [[]], opts) +end + +vim.cmd("autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()") diff --git a/lazy-lock.json b/lazy-lock.json index ef62e16..63c2283 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,44 +1,39 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "57c9f5c31b3d712376c704673eac8e948c82e9c1" }, + "LuaSnip": { "branch": "master", "commit": "8ae1dedd988eb56441b7858bd1e8554dfadaa46d" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, "buffer_manager.nvim": { "branch": "main", "commit": "4fa47504a23d9a94216f02b1d84f7b0a2dbe2b72" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, - "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "flutter-tools.nvim": { "branch": "main", "commit": "7cb01c52ac9ece55118be71e0f7457783d5522a4" }, - "git-blame.nvim": { "branch": "master", "commit": "f07e913b7143f19edd6787229f2d51759b478600" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, - "go.nvim": { "branch": "master", "commit": "e352271f8268e6559e92801a33258f73697b2be9" }, - "guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" }, + "dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" }, + "flutter-tools.nvim": { "branch": "main", "commit": "b65ad58462116785423d81aeb2ee6c8c16f78679" }, + "gitsigns.nvim": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" }, + "go.nvim": { "branch": "master", "commit": "24d2fa373d55d9900cd4b502a88214dc17e6fab6" }, "guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" }, - "image.nvim": { "branch": "master", "commit": "4d1dd5ddc63b37e5af303af0a3a8ed752d43a95c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3084950d1b66426d207064a509477cbfa96362c6" }, + "image.nvim": { "branch": "master", "commit": "2090055394d5c8efb5f23143cc2f3d9fac68a61e" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lsp_signature.nvim": { "branch": "master", "commit": "fed2c8389c148ff1dfdcdca63c2b48d08a50dea0" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, - "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, + "neogit": { "branch": "master", "commit": "760d6d74c328ce2a38b02677bf5161999b992da2" }, + "neorg": { "branch": "main", "commit": "a489e7c4f9d7edb3caa04250d07bb6c6a5b9b890" }, + "nui.nvim": { "branch": "main", "commit": "80445d015d2b5f9af0d9e8bce63d303bc86eda8a" }, "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, - "nvim-notify": { "branch": "master", "commit": "ebcdd8219e2a2cbc0a4bef68002f6867f1fde269" }, - "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, - "nvim-treesitter": { "branch": "master", "commit": "c4da7945641b2e74915313cd1e608b43877a56b7" }, + "nvim-lspconfig": { "branch": "master", "commit": "ce0e625df61be77abe1340fbc9afe9ad39b31dd8" }, + "nvim-notify": { "branch": "master", "commit": "1576123bff3bed67bc673a3076e591abfe5d8ca9" }, + "nvim-treesitter": { "branch": "master", "commit": "0da349ed303bea955942f409d29059cdb89dbe2c" }, "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, - "nvim-web-devicons": { "branch": "master", "commit": "78d41a9930532f9bba3ea075907aa92892b9a3eb" }, + "nvim-web-devicons": { "branch": "master", "commit": "3e24abe1ae66532135cec911562f553fe247cb56" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, + "toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, - "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, - "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-wakatime": { "branch": "master", "commit": "8c8856327815a077cbebeba8c7456312a3d2c39c" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua deleted file mode 100644 index 2406d0f..0000000 --- a/lua/plugins/colorizer.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - "NvChad/nvim-colorizer.lua", - event = "BufEnter", - opts = { - filetypes = { - "*"; - "!markdown"; - "!neorg"; - }, - buftypes = { - "*", - "!prompt", - "!popup" - }, - user_default_options = { - RRGGBBAA = true, - AARRGGBB = true, - rgb_fn = true, - hsl_fn = true, - css = true, - css_fn = true, - sass = { enable = true } - } - } -} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b0c2fb6..19b81dc 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -7,28 +7,12 @@ return { -- NOTE: Plugins { - "nvim-pack/nvim-spectre", - dependencies = "nvim-lua/plenary.nvim" - }, - - { - "folke/todo-comments.nvim", - event = "BufRead", - dependencies = "nvim-lua/plenary.nvim", + "lukas-reineke/indent-blankline.nvim", + event = "BufEnter", + main = "ibl", config = true }, - { - "nmac427/guess-indent.nvim", - lazy = false, - config = true - }, - - { - "f-person/git-blame.nvim", - cmd = "GitBlameToggle" - }, - { "lewis6991/gitsigns.nvim", event = "BufEnter", @@ -36,16 +20,12 @@ return { }, { - "sindrets/diffview.nvim", - dependencies = "nvim-lua/plenary.nvim", - cmd = "DiffviewOpen", - config = true - }, - - { - "lukas-reineke/indent-blankline.nvim", - event = "BufEnter", - main = "ibl", + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", + "sindrets/diffview.nvim", + "nvim-telescope/telescope.nvim" + }, config = true }, @@ -61,25 +41,12 @@ return { dependencies = "neovim/nvim-lspconfig", config = true }, - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - config = true - }, - { - "folke/trouble.nvim", - dependencies = "nvim-tree/nvim-web-devicons", - cmd = "TroubleToggle", - config = true - }, { "numToStr/Comment.nvim", lazy = false, config = true }, - "RRethy/vim-illuminate", - -- NOTE: Flutter { diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..080773c --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,20 @@ +return { + "nvim-neorg/neorg", + build = ":Neorg sync-parsers", + dependencies = "nvim-lua/plenary.nvim", + opts = { + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + notes = "~/Sync/Neorg", + work = "~/Sync/Work" + }, + default_workspace = "notes" + } + } + } + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 33e1386..be50f47 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -12,9 +12,15 @@ return { local telescope = require("telescope") telescope.setup { + defaults = { + layout_config = { + vertical = { width = 0.5 } + } + }, pickers = { - fd = { theme = "dropdown" }, - current_buffer_fuzzy_find = { theme = "dropdown" } + fd = { layout_strategy = "vertical" }, + live_grep = { layout_strategy = "vertical" }, + current_buffer_fuzzy_find = { layout_strategy = "vertical" } } } diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua new file mode 100644 index 0000000..287543c --- /dev/null +++ b/lua/plugins/toggleterm.lua @@ -0,0 +1,11 @@ +return { + "akinsho/toggleterm.nvim", + version = "*", + opts = { + open_mapping = [[]], + direction = "float", + float_opts = { + border = "curved" + } + } +} diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 372cf7f..0b4da18 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -31,20 +31,19 @@ local function config() r = { "lua vim.lsp.buf.rename()", "Rename" } }, - -- Spectre - r = { - name = "Spectre", - r = { "lua require('spectre').open_file_search({select_word=true})", "Search & Replace" }, - R = { "lua require('spectre').toggle()", "Replace All" } - }, - -- Buffers b = { "lua require('buffer_manager.ui').toggle_quick_menu()", "Buffer Manager" }, -- Misc h = { "noh", "No highlight" }, s = { "SymbolsOutline", "Symbols outline" }, - t = { "TroubleToggle", "Toggle trouble" } + + -- Terminal + t = { + t = { "ToggleTerm size=40 direction=horizontal", "Horizontal Terminal" } + }, + + T = { "TroubleToggle", "Toggle trouble" } }, g = { @@ -56,7 +55,7 @@ local function config() [""] = { "Telescope current_buffer_fuzzy_find", "Find in file" }, -- Neotree - [""] = { "Neotree", "Neotree" }, + [""] = { "Neotree reveal_force_cwd", "Neotree" }, -- Misc K = { "lua vim.lsp.buf.hover()", "Hover" }