From 17875c86ce440439af85acdab8a7146e6e6b6962 Mon Sep 17 00:00:00 2001 From: Kore Francis Date: Tue, 4 Jun 2024 18:36:32 +0300 Subject: [PATCH] updates: 20240604 --- .gitignore | 16 +- .neoconf.json | 30 +-- init.lua | 4 +- lazy-lock.json | 138 ++++++------ lazyvim.json | 22 +- lua/config/autocmds.lua | 6 +- lua/config/keymaps.lua | 6 +- lua/config/lazy.lua | 92 ++++---- lua/config/options.lua | 6 +- lua/plugins/beacon.lua | 6 +- lua/plugins/clojure.lua | 16 +- lua/plugins/colors.lua | 138 ++++++------ lua/plugins/elixir-tools.lua | 58 ++--- lua/plugins/flash.lua | 96 ++++----- lua/plugins/git.lua | 6 +- lua/plugins/hop.lua | 8 +- lua/plugins/luarocks.lua | 16 ++ lua/plugins/neorg.lua | 76 +++---- lua/plugins/neovim-tasks.lua | 30 +++ lua/plugins/nvim-treesitter-textobjects.lua | 20 +- lua/plugins/oil.lua | 12 +- lua/plugins/org.lua | 24 +-- lua/plugins/rest.lua | 8 + lua/plugins/simple-denote.lua | 13 ++ lua/plugins/symbol.lua | 12 +- lua/plugins/taskwarrior.lua | 18 ++ lua/plugins/tmux.lua | 34 +-- lua/plugins/treesitter.lua | 228 ++++++++++---------- lua/plugins/yaml.lua | 16 +- neoconf.json | 2 +- stylua.toml | 4 +- 31 files changed, 640 insertions(+), 521 deletions(-) create mode 100644 lua/plugins/luarocks.lua create mode 100644 lua/plugins/neovim-tasks.lua create mode 100644 lua/plugins/rest.lua create mode 100644 lua/plugins/simple-denote.lua create mode 100644 lua/plugins/taskwarrior.lua diff --git a/.gitignore b/.gitignore index cc5457a..18df58e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ -tt.* -.tests -doc/tags -debug -.repro -foo.* -*.log -data +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/.neoconf.json b/.neoconf.json index 7c48087..6e89f00 100644 --- a/.neoconf.json +++ b/.neoconf.json @@ -1,15 +1,15 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/init.lua b/init.lua index 2514f9e..98952e4 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,2 @@ --- bootstrap lazy.nvim, LazyVim and your plugins -require("config.lazy") +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/lazy-lock.json b/lazy-lock.json index ad101fc..4f0af70 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,74 +1,90 @@ { - "LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, - "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "aurora": { "branch": "master", "commit": "6157dffe86f20d891df723c0c6734676295b01e0" }, + "LazyVim": { "branch": "main", "commit": "0c396e298a3fb9e405651288b260779d67f79956" }, + "SchemaStore.nvim": { "branch": "main", "commit": "1a4958e3d30c7dba8bf7c73bd57515edfba869cf" }, + "aurora": { "branch": "master", "commit": "fe84aed4bcf6648381adbe1f81ccf3aec752fa45" }, "beacon.nvim": { "branch": "master", "commit": "a786c9a89b2c739c69f9500a2f70f2586c06ec27" }, - "bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" }, - "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, + "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, + "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, + "cmake-tools.nvim": { "branch": "master", "commit": "8853f796b0173f34689dd07c8bd654b8fb3f1dc1" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, - "dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" }, - "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, - "elixir-tools.nvim": { "branch": "main", "commit": "4b559351d824122bb79a4553f48ea9dae0e3be7d" }, - "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "conform.nvim": { "branch": "master", "commit": "88b699b595703f1ae9d9061c050e52b1fe7c33f1" }, + "dashboard-nvim": { "branch": "master", "commit": "5346d023afc4bfc7ff63d05c70bcdb0784bb657a" }, + "dial.nvim": { "branch": "master", "commit": "7af2daaaf933b0617ded0f78b49f4d5fc45f9f64" }, + "dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" }, + "elixir-tools.nvim": { "branch": "main", "commit": "815cf0b0aab0421f8490199c0dd7442d22a7c1b7" }, + "flash.nvim": { "branch": "main", "commit": "0b85b5ea6eaaebab5e012fab3496102094550686" }, + "friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" }, + "gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" }, "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, - "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, - "kanagawa.nvim": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" }, - "komau.vim": { "branch": "master", "commit": "84ed877351031218f6a75920206f0c8e99325611" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, - "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, - "lush.nvim": { "branch": "main", "commit": "2e8d34e748642621d761a65e3c2a198154b914e8" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, - "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, - "mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" }, - "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, - "mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" }, - "mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" }, - "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, - "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, - "neoconf.nvim": { "branch": "main", "commit": "8d7150e9d6113f01421c34c5aeb0f586afa232e0" }, - "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, - "neorg": { "branch": "main", "commit": "ee020b8d0e7c334a1cf01fbd6da542532c00b650" }, - "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, - "nui.nvim": { "branch": "main", "commit": "fbb139c6f14896b434d0229099e1acd863ae6bec" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, - "nvim-lspconfig": { "branch": "master", "commit": "7f5cf1121f772850a30bdaf83fb448e88846aa58" }, - "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, - "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, - "nvim-treesitter": { "branch": "master", "commit": "212b7a504cf56f85d1acc5be237261b42d7560c5" }, - "nvim-treesitter-context": { "branch": "master", "commit": "53cdd58446521575d8f1052152099e08b15ca53c" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "3532f6095efd4723f7c066a5ac3fe632506cc09e" }, - "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, - "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, - "oil.nvim": { "branch": "master", "commit": "18dfd2458dc741fea683357a17aaa95870b25a3c" }, - "orgmode": { "branch": "master", "commit": "24748addd977228ce4e675a7ba4b7ec53a070153" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, + "kanagawa.nvim": { "branch": "master", "commit": "08ed29989834f5f2606cb1ef9d5b24c5ea7b8fa5" }, + "komau.vim": { "branch": "master", "commit": "c525eebc9a46e889144216dc3a965783abaccf98" }, + "lazy.nvim": { "branch": "main", "commit": "b0ba3f9399bf48c86abaa4db1a40bd0b681d5018" }, + "lazydev.nvim": { "branch": "main", "commit": "e2bc1915b1056c422256f58025ff9a1e0488018c" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, + "lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.ai": { "branch": "main", "commit": "7859b6344f5cee567a94f173859d25e20ba1a77e" }, + "mini.animate": { "branch": "main", "commit": "0a35f6db55cfac04a0999abe3465f7b692dc56a7" }, + "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, + "neorg": { "branch": "main", "commit": "b451a10011664af91b2b890b6dae61b5f02b91e3" }, + "neovim-tasks": { "branch": "master", "commit": "7a73b5bbe67e12c8b23304825c3a239c43d07fed" }, + "noice.nvim": { "branch": "main", "commit": "2bf04290b32dc5b1a002a4888c95147bb91ec6f2" }, + "nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" }, + "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, + "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, + "nvim-dap-go": { "branch": "main", "commit": "a0c5a2b991d7e9304a9a032cf177e22a4b0acda1" }, + "nvim-dap-python": { "branch": "master", "commit": "ae0225d0d4a46e18e6057ab3701ef87bbbd6aaad" }, + "nvim-dap-ruby": { "branch": "main", "commit": "4176405d186a93ebec38a6344df124b1689cfcfd" }, + "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, + "nvim-lint": { "branch": "master", "commit": "1a3a8d047bc01f1760ae4a0f5e80f111ea222e67" }, + "nvim-lspconfig": { "branch": "master", "commit": "74e14808cdb15e625449027019406e1ff6dda020" }, + "nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-snippets": { "branch": "main", "commit": "cff37a199a92f3c3cd52bb1593a7d01669b35d23" }, + "nvim-spectre": { "branch": "master", "commit": "4d22fe03554056de4325762add3e546c77e3a275" }, + "nvim-treesitter": { "branch": "master", "commit": "5a8e9644c49f992f47bacd7900f4404df6fd9d38" }, + "nvim-treesitter-context": { "branch": "master", "commit": "5efba33af0f39942e426340da7bc15d7dec16474" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "fd41b7ccc5490a3a99c734d1ee418b68d06c48a9" }, + "nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, + "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, + "oil.nvim": { "branch": "master", "commit": "bbc0e67eebc15342e73b146a50d9b52e6148161b" }, + "orgmode": { "branch": "master", "commit": "c34ae3c20f63786a2d7b60467589c51ec32955aa" }, "oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" }, - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, - "rasmus.nvim": { "branch": "main", "commit": "f824de95d446686e479781c0c2b778c177da528f" }, + "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, + "rasmus.nvim": { "branch": "main", "commit": "86d608bd1d12a53b39d9b4b2847cd7c3ea81d473" }, + "rest.nvim": { "branch": "main", "commit": "f96edb54a2940322bc7ed81a1031be04db7d3a99" }, + "simple-denote.nvim": { "branch": "main", "commit": "45c6c2c12f97f91d0550db2aa888f68f68116e9a" }, "styler.nvim": { "branch": "main", "commit": "2cd29996d08cec8b31270c6de64465f716ef9d71" }, "symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" }, - "telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, - "tmux.nvim": { "branch": "main", "commit": "9c02adf16ff2f18c8e236deba91e9cf4356a02d2" }, - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, - "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, - "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, + "taskwarrior.nvim": { "branch": "master", "commit": "5383427b88912ff3c37653d76e48b1fc197844dc" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" }, + "tmux.nvim": { "branch": "main", "commit": "53ea7eab504730e7e8397fd2ae0133053d56afc8" }, + "todo-comments.nvim": { "branch": "main", "commit": "70a93ce66083699571adc361166504b03cc39c2b" }, + "tokyonight.nvim": { "branch": "main", "commit": "7e5ef71a103e7de5fe6c05f5d6ab97d1640f08cf" }, + "trouble.nvim": { "branch": "main", "commit": "915179759c9459b69faae90a38da6fc1ca6b90d7" }, + "ts-comments.nvim": { "branch": "main", "commit": "e339090c076871069c00e488b11def49aaf4e413" }, + "venv-selector.nvim": { "branch": "main", "commit": "1d306371b1bf01bcc892630107d45fa7ad0161e2" }, "vim-fireplace": { "branch": "master", "commit": "f2be859ea48a761fd25a07efa037514f84abdf30" }, - "vim-fugitive": { "branch": "master", "commit": "41beedabc7e948c787ea5696e04c3544c3674e23" }, - "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" }, + "vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" }, "vim-salve": { "branch": "master", "commit": "81f131b494cd7baa8e4e1f9242721e7107ea2f2b" }, "vim-sexp-mappings-for-regular-people": { "branch": "master", "commit": "cc5923e357373ea6ef0c13eae82f44e6b9b1d374" }, - "vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" }, + "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, - "yaml.nvim": { "branch": "main", "commit": "77aa8812e652acc44ae16fd1dbeb5a952db937e0" } + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, + "vimtex": { "branch": "master", "commit": "366ba106795db13879fdbfb4d6e4b8e1d616b684" }, + "which-key.nvim": { "branch": "main", "commit": "4b7167f8fb2dba3d01980735e3509e172c024c29" }, + "yaml.nvim": { "branch": "main", "commit": "77aa8812e652acc44ae16fd1dbeb5a952db937e0" }, + "yanky.nvim": { "branch": "main", "commit": "79338563e85a868e59cda02c51b54d90a5514a12" } } \ No newline at end of file diff --git a/lazyvim.json b/lazyvim.json index b46ccb1..5969660 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,9 +1,25 @@ { "extras": [ - + "lazyvim.plugins.extras.coding.yanky", + "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.editor.dial", + "lazyvim.plugins.extras.lang.cmake", + "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.kotlin", + "lazyvim.plugins.extras.lang.python", + "lazyvim.plugins.extras.lang.ruby", + "lazyvim.plugins.extras.lang.tex", + "lazyvim.plugins.extras.lang.toml", + "lazyvim.plugins.extras.lang.yaml", + "lazyvim.plugins.extras.ui.mini-animate", + "lazyvim.plugins.extras.ui.treesitter-context", + "lazyvim.plugins.extras.util.dot", + "lazyvim.plugins.extras.util.gitui", + "lazyvim.plugins.extras.util.project", + "lazyvim.plugins.extras.util.startuptime" ], "news": { - "NEWS.md": "2191" + "NEWS.md": "5204" }, - "version": 2 + "version": 6 } \ No newline at end of file diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 27e9e06..d9ea6db 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -1,3 +1,3 @@ --- Autocmds are automatically loaded on the VeryLazy event --- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua --- Add any additional autocmds here +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 2c134f7..5e9025d 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,3 +1,3 @@ --- Keymaps are automatically loaded on the VeryLazy event --- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua --- Add any additional keymaps here +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 4a45288..4d3dab2 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,46 +1,46 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - -- bootstrap lazy.nvim - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) -end -vim.opt.rtp:prepend(vim.env.LAZY or lazypath) - -require("lazy").setup({ - spec = { - -- add LazyVim and import its plugins - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import any extras modules here - -- { import = "lazyvim.plugins.extras.lang.typescript" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, - -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, - -- import/override with your plugins - { import = "plugins" }, - }, - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, - --install = { colorscheme = { "catpuccin-mocha", "oxocarbon", "tokyonight", "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates - performance = { - rtp = { - -- disable some rtp plugins - disabled_plugins = { - "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, -}) +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + -- bootstrap lazy.nvim + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import any extras modules here + -- { import = "lazyvim.plugins.extras.lang.typescript" }, + -- { import = "lazyvim.plugins.extras.lang.json" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- import/override with your plugins + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + --install = { colorscheme = { "catpuccin-mocha", "oxocarbon", "tokyonight", "habamax" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/lua/config/options.lua b/lua/config/options.lua index 3ea1454..415944a 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,3 +1,3 @@ --- Options are automatically loaded before lazy.nvim startup --- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua --- Add any additional options here +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here diff --git a/lua/plugins/beacon.lua b/lua/plugins/beacon.lua index 77ac0e4..ec0f9c3 100644 --- a/lua/plugins/beacon.lua +++ b/lua/plugins/beacon.lua @@ -1,3 +1,3 @@ -return { - "danilamihailov/beacon.nvim", -} +return { + "danilamihailov/beacon.nvim", +} diff --git a/lua/plugins/clojure.lua b/lua/plugins/clojure.lua index 0384c55..8aeffe4 100644 --- a/lua/plugins/clojure.lua +++ b/lua/plugins/clojure.lua @@ -1,8 +1,8 @@ -return { - "tpope/vim-fireplace", - dependencies = { - "tpope/vim-sexp-mappings-for-regular-people", - "tpope/vim-surround", - "tpope/vim-salve", - }, -} +return { + "tpope/vim-fireplace", + dependencies = { + "tpope/vim-sexp-mappings-for-regular-people", + "tpope/vim-surround", + "tpope/vim-salve", + }, +} diff --git a/lua/plugins/colors.lua b/lua/plugins/colors.lua index b1c930c..8b4ddf8 100644 --- a/lua/plugins/colors.lua +++ b/lua/plugins/colors.lua @@ -1,69 +1,69 @@ --- local colors_citylight = { --- black = "#1f252b", --- white = "#b7c5d3", --- red = "#e27e8d", --- green = "#54af83", --- blue = "#68a1f0", --- yellow = "#ebda65", --- grey = "#718ca1", --- darkgrey = "#41505e", --- aqua = "#9effff", --- orange = "#ebbf83", --- sage = "#008b94", --- steel = "#718ca1", --- teal = "#70e1e8", --- azure = "#5ec4ff", --- errorRed = "#f88070", --- successGreen = "#8bd49c", --- } - -return { - { "rebelot/kanagawa.nvim" }, - { "rktjmp/lush.nvim" }, - { "kvrohit/rasmus.nvim" }, - { "ntk148v/komau.vim" }, - { "ray-x/aurora" }, - { "nyoom-engineering/oxocarbon.nvim" }, - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, - config = function() - local catppuccin = require("catppuccin") - catppuccin.setup({ - transparent_background = true, - italic = true, - altfont = true, - styles = { - comments = { "italic" }, -- Change the style of comments - conditionals = { "italic" }, - loops = {}, - functions = { "altfont", "italic" }, - keywords = {}, - strings = { "italic" }, - variables = {}, - numbers = {}, - booleans = { "altfont", "bold" }, - properties = {}, - types = {}, - operators = {}, - }, - color_overrides = {}, - }) - end, - }, - { - "folke/styler.nvim", - config = function() - require("styler").setup({ - themes = { - markdown = { colorscheme = "komau" }, - help = { colorscheme = "catppuccin-mocha", background = "dark" }, - elixir = { colorscheme = "catppuccin-mocha" }, - lua = { colorscheme = "catppuccin-mocha" }, - org = { colorscheme = "catppuccin-frappe" }, - }, - }) - end, - }, -} +-- local colors_citylight = { +-- black = "#1f252b", +-- white = "#b7c5d3", +-- red = "#e27e8d", +-- green = "#54af83", +-- blue = "#68a1f0", +-- yellow = "#ebda65", +-- grey = "#718ca1", +-- darkgrey = "#41505e", +-- aqua = "#9effff", +-- orange = "#ebbf83", +-- sage = "#008b94", +-- steel = "#718ca1", +-- teal = "#70e1e8", +-- azure = "#5ec4ff", +-- errorRed = "#f88070", +-- successGreen = "#8bd49c", +-- } + +return { + { "rebelot/kanagawa.nvim" }, + { "rktjmp/lush.nvim" }, + { "kvrohit/rasmus.nvim" }, + { "ntk148v/komau.vim" }, + { "ray-x/aurora" }, + { "nyoom-engineering/oxocarbon.nvim" }, + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + config = function() + local catppuccin = require("catppuccin") + catppuccin.setup({ + transparent_background = true, + italic = true, + altfont = true, + styles = { + comments = { "italic" }, -- Change the style of comments + conditionals = { "italic" }, + loops = {}, + functions = { "altfont", "italic" }, + keywords = {}, + strings = { "italic" }, + variables = {}, + numbers = {}, + booleans = { "altfont", "bold" }, + properties = {}, + types = {}, + operators = {}, + }, + color_overrides = {}, + }) + end, + }, + { + "folke/styler.nvim", + config = function() + require("styler").setup({ + themes = { + markdown = { colorscheme = "komau" }, + help = { colorscheme = "catppuccin-mocha", background = "dark" }, + elixir = { colorscheme = "catppuccin-mocha" }, + lua = { colorscheme = "catppuccin-mocha" }, + org = { colorscheme = "catppuccin-frappe" }, + }, + }) + end, + }, +} diff --git a/lua/plugins/elixir-tools.lua b/lua/plugins/elixir-tools.lua index a81fee2..f8b2ba3 100644 --- a/lua/plugins/elixir-tools.lua +++ b/lua/plugins/elixir-tools.lua @@ -1,29 +1,29 @@ -return { - "elixir-tools/elixir-tools.nvim", - version = "*", - event = { "BufReadPre", "BufNewFile" }, - config = function() - local elixir = require("elixir") - local elixirls = require("elixir.elixirls") - - elixir.setup({ - nextls = { enable = true }, - credo = {}, - elixirls = { - enable = true, - settings = elixirls.settings({ - dialyzerEnabled = false, - enableTestLenses = false, - }), - on_attach = function(_, _) - vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) - vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) - vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) - end, - }, - }) - end, - dependencies = { - "nvim-lua/plenary.nvim", - }, -} +return { + "elixir-tools/elixir-tools.nvim", + version = "*", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local elixir = require("elixir") + local elixirls = require("elixir.elixirls") + + elixir.setup({ + nextls = { enable = true }, + credo = {}, + elixirls = { + enable = true, + settings = elixirls.settings({ + dialyzerEnabled = false, + enableTestLenses = false, + }), + on_attach = function(_, _) + vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) + vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) + vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) + end, + }, + }) + end, + dependencies = { + "nvim-lua/plenary.nvim", + }, +} diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua index 6d1ed9a..e5163e1 100644 --- a/lua/plugins/flash.lua +++ b/lua/plugins/flash.lua @@ -1,48 +1,48 @@ -return { - "folke/flash.nvim", - event = "VeryLazy", - ---@type Flash.Config - opts = {}, - keys = { - { - "s", - mode = { "n", "x", "o" }, - function() - require("flash").jump() - end, - desc = "Flash", - }, - { - "S", - mode = { "n", "o", "x" }, - function() - require("flash").treesitter() - end, - desc = "Flash Treesitter", - }, - { - "r", - mode = "o", - function() - require("flash").remote() - end, - desc = "Remote Flash", - }, - { - "R", - mode = { "o", "x" }, - function() - require("flash").treesitter_search() - end, - desc = "Flash Treesitter Search", - }, - { - "", - mode = { "c" }, - function() - require("flash").toggle() - end, - desc = "Toggle Flash Search", - }, - }, -} +return { + "folke/flash.nvim", + event = "VeryLazy", + ---@type Flash.Config + opts = {}, + keys = { + { + "s", + mode = { "n", "x", "o" }, + function() + require("flash").jump() + end, + desc = "Flash", + }, + { + "S", + mode = { "n", "o", "x" }, + function() + require("flash").treesitter() + end, + desc = "Flash Treesitter", + }, + { + "r", + mode = "o", + function() + require("flash").remote() + end, + desc = "Remote Flash", + }, + { + "R", + mode = { "o", "x" }, + function() + require("flash").treesitter_search() + end, + desc = "Flash Treesitter Search", + }, + { + "", + mode = { "c" }, + function() + require("flash").toggle() + end, + desc = "Toggle Flash Search", + }, + }, +} diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index 2c2efeb..760bf69 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -1,3 +1,3 @@ -return { - "tpope/vim-fugitive", -} +return { + "tpope/vim-fugitive", +} diff --git a/lua/plugins/hop.lua b/lua/plugins/hop.lua index 11c75d8..5be8b57 100644 --- a/lua/plugins/hop.lua +++ b/lua/plugins/hop.lua @@ -1,4 +1,4 @@ -return { - "phaazon/hop.nvim", - branch = "v2", -} +return { + "phaazon/hop.nvim", + branch = "v2", +} diff --git a/lua/plugins/luarocks.lua b/lua/plugins/luarocks.lua new file mode 100644 index 0000000..92ea862 --- /dev/null +++ b/lua/plugins/luarocks.lua @@ -0,0 +1,16 @@ +return { + "vhyrro/luarocks.nvim", + priority = 1000, + config = true, + opts = { + rocks = { + "luasec", + "lua-utils", --"lua-curl", + "nvim-nio", + "mimetypes", + "xml2lua", + "pathlib.nvim", + "fzy", + }, + }, +} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index d44782e..653ed0b 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -1,37 +1,39 @@ -return { - "nvim-neorg/neorg", - build = ":Neorg sync-parsers", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require("neorg").setup({ - load = { - ["core.defaults"] = {}, - ["core.highlights"] = {}, - ["core.concealer"] = {}, - ["core.dirman"] = { - config = { - workspaces = { - notes = "~/Documents/vorg/work", - gtd = "~/Documents/vorg/gtd", - }, - index = "index.norg", - default_workspace = "notes", - open_last_workspace = true, - use_popup = true, - }, - }, - ["core.qol.todo_items"] = { - config = { - create_todo_items = true, - }, - }, - ["core.presenter"] = { - config = { - zen_mode = "truezen", - }, - }, - ["core.export"] = {}, - }, - }) - end, -} +return { + "nvim-neorg/neorg", + build = ":Neorg sync-parsers", + dependencies = { "luarocks.nvim" }, + lazy = false, + version = "*", + config = function() + require("neorg").setup({ + load = { + ["core.defaults"] = {}, + ["core.highlights"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + notes = "~/Documents/vorg/work", + gtd = "~/Documents/vorg/gtd", + }, + index = "index.norg", + default_workspace = "notes", + open_last_workspace = true, + use_popup = true, + }, + }, + ["core.qol.todo_items"] = { + config = { + create_todo_items = true, + }, + }, + ["core.presenter"] = { + config = { + zen_mode = "truezen", + }, + }, + ["core.export"] = {}, + }, + }) + end, +} diff --git a/lua/plugins/neovim-tasks.lua b/lua/plugins/neovim-tasks.lua new file mode 100644 index 0000000..622b462 --- /dev/null +++ b/lua/plugins/neovim-tasks.lua @@ -0,0 +1,30 @@ +return { + "Shatur/neovim-tasks", + config = function() + local tasks = require("tasks") + local Path = require("plenary.path") + + tasks.setup({ + default_params = { + cmake = { + cmd = "cmake", + build_dir = tostring(Path:new("{cwd}", "build")), + build_type = "Debug", + dap_name = "lldb", + args = { + configure = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" }, + }, + }, + }, + save_before_run = true, + params_file = "neovim.json", + quickfix = { + pos = "botright", + height = 12, + }, + dap_open_command = function() + return require("dapiu").open() + end, + }) + end, +} diff --git a/lua/plugins/nvim-treesitter-textobjects.lua b/lua/plugins/nvim-treesitter-textobjects.lua index c118d5a..da0b520 100644 --- a/lua/plugins/nvim-treesitter-textobjects.lua +++ b/lua/plugins/nvim-treesitter-textobjects.lua @@ -1,10 +1,10 @@ -return { - "nvim-treesitter/nvim-treesitter-textobjects", - init = function() - -- disable rtp plugin, as we only need its queries for mini.ai - -- In case other textobject modules are enabled, we will load them - -- once nvim-treesitter is loaded - require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") - load_textobjects = true - end, -} +return { + "nvim-treesitter/nvim-treesitter-textobjects", + init = function() + -- disable rtp plugin, as we only need its queries for mini.ai + -- In case other textobject modules are enabled, we will load them + -- once nvim-treesitter is loaded + require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") + load_textobjects = true + end, +} diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index a5c8618..d81d45a 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -1,6 +1,6 @@ -return { - "stevearc/oil.nvim", - opts = {}, - -- Optional dependencies - dependencies = { "nvim-tree/nvim-web-devicons" }, -} +return { + "stevearc/oil.nvim", + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, +} diff --git a/lua/plugins/org.lua b/lua/plugins/org.lua index 44749bf..405c341 100644 --- a/lua/plugins/org.lua +++ b/lua/plugins/org.lua @@ -1,12 +1,12 @@ -return { - "nvim-orgmode/orgmode", - ft = { "org" }, - config = function() - local org = require("orgmode") - org.setup_ts_grammar() - org.setup({ - org_agenda_files = { "~/Documents/org/*" }, - org_default_notes_file = "~/Documents/org/refile.org", - }) - end, -} +return { + "nvim-orgmode/orgmode", + ft = { "org" }, + config = function() + local org = require("orgmode") + org.setup_ts_grammar() + org.setup({ + org_agenda_files = { "~/Documents/org/*" }, + org_default_notes_file = "~/Documents/org/refile.org", + }) + end, +} diff --git a/lua/plugins/rest.lua b/lua/plugins/rest.lua new file mode 100644 index 0000000..eb92a9d --- /dev/null +++ b/lua/plugins/rest.lua @@ -0,0 +1,8 @@ +return { + "rest-nvim/rest.nvim", + ft = "http", + dependencies = { "luarocks.nvim" }, + config = function() + require("rest-nvim").setup() + end, +} diff --git a/lua/plugins/simple-denote.lua b/lua/plugins/simple-denote.lua new file mode 100644 index 0000000..5ee1389 --- /dev/null +++ b/lua/plugins/simple-denote.lua @@ -0,0 +1,13 @@ +return { + "DefaultGen/simple-denote.nvim", + config = function() + local map = vim.keymap.set + require("simple-denote").setup({ + ext = "org", -- Note file extension + dir = "~/org", -- Notes directory (should already exist) + add_heading = true, -- Add a md/org heading to new notes + retitle_hea = true, -- Replace the first line with a new heading when retitling + }) + map({ "n" }, "nn", "Denote note", { noremap = true }) + end, +} diff --git a/lua/plugins/symbol.lua b/lua/plugins/symbol.lua index be39bc2..82b80f5 100644 --- a/lua/plugins/symbol.lua +++ b/lua/plugins/symbol.lua @@ -1,6 +1,6 @@ -return { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, - config = true, -} +return { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + config = true, +} diff --git a/lua/plugins/taskwarrior.lua b/lua/plugins/taskwarrior.lua new file mode 100644 index 0000000..6fe7409 --- /dev/null +++ b/lua/plugins/taskwarrior.lua @@ -0,0 +1,18 @@ +return { + "ribelo/taskwarrior.nvim", + config = function() + local map = vim.keymap.set + local taskwarrior = require("taskwarrior_nvim.taskwarrior") + + map({ "n" }, "ta", function() + vim.ui.input({ prompt = "Custom command: " }, function(input) + vim.notify(input) + taskwarrior.add_task({ input }) + end) + end, { noremap = true }) + + map({ "n" }, "tb", function() + require("taskwarrior_nvim").browser({ "ready" }) + end, { noremap = true }) + end, +} diff --git a/lua/plugins/tmux.lua b/lua/plugins/tmux.lua index 20bf721..8181c45 100644 --- a/lua/plugins/tmux.lua +++ b/lua/plugins/tmux.lua @@ -1,17 +1,17 @@ -return { - { - "aserowy/tmux.nvim", - config = function() - return require("tmux").setup({}) - end, - }, - { - "christoomey/vim-tmux-navigator", - keys = { - [" TmuxNavigatorLeft", "Window Left" }, - [" TmuxNavigatorRight", "Window Right" }, - [" TmuxNavigatorDown", "Window Down" }, - [" TmuxNavigatorUp", "Window Up" }, - }, - }, -} +return { + { + "aserowy/tmux.nvim", + config = function() + return require("tmux").setup({}) + end, + }, + { + "christoomey/vim-tmux-navigator", + keys = { + [" TmuxNavigatorLeft", "Window Left" }, + [" TmuxNavigatorRight", "Window Right" }, + [" TmuxNavigatorDown", "Window Down" }, + [" TmuxNavigatorUp", "Window Up" }, + }, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 4216843..0d95172 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,114 +1,114 @@ -return { - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - build = ":TSUpdate", - event = { "BufReadPost", "BufNewFile" }, - dependencies = { - { - "nvim-treesitter/nvim-treesitter-textobjects", - init = function() - -- disable rtp plugin, as we only need its queries for mini.ai - -- In case other textobject modules are enabled, we will load them - -- once nvim-treesitter is loaded - require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") - load_textobjects = true - end, - }, - }, - cmd = { "TSUpdateSync" }, - keys = { - { "", desc = "Increment selection" }, - { "", desc = "Decrement selection", mode = "x" }, - }, - ---@type TSConfig - opts = { - highlight = { enable = true, additional_vim_regex_highlighting = { "org" } }, - indent = { enable = true }, - ensure_installed = { - "bash", - "bicep", - "c", - "clojure", - "comment", - "commonlisp", - "cpp", - "eex", - --"elisp", - "elixir", - "erlang", - "go", - "haskell", - "html", - "java", - "javascript", - "json", - "kotlin", - "latex", - "ledger", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "nix", - "ocaml", - "org", - "perl", - "php", - "phpdoc", - "python", - "query", - "regex", - "ruby", - "rust", - "scala", - "scheme", - "sql", - "tsx", - "typescript", - "vim", - "vimdoc", - "yaml", - "zig", - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - }, - ---@param opts TSConfig - config = function(_, opts) - if type(opts.ensure_installed) == "table" then - ---@type table - local added = {} - opts.ensure_installed = vim.tbl_filter(function(lang) - if added[lang] then - return false - end - added[lang] = true - return true - end, opts.ensure_installed) - end - require("nvim-treesitter.configs").setup(opts) - - if load_textobjects then - -- PERF: no need to load the plugin, if we only need its queries for mini.ai - if opts.textobjects then - for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do - if opts.textobjects[mod] and opts.textobjects[mod].enable then - local Loader = require("lazy.core.loader") - Loader.disabled_rtp_plugins["nvim-treesitter-textobjects"] = nil - local plugin = require("lazy.core.config").plugins["nvim-treesitter-textobjects"] - require("lazy.core.loader").source_runtime(plugin.dir, "plugin") - break - end - end - end - end - end, -} +return { + "nvim-treesitter/nvim-treesitter", + version = false, -- last release is way too old and doesn't work on Windows + build = ":TSUpdate", + event = { "BufReadPost", "BufNewFile" }, + dependencies = { + { + "nvim-treesitter/nvim-treesitter-textobjects", + init = function() + -- disable rtp plugin, as we only need its queries for mini.ai + -- In case other textobject modules are enabled, we will load them + -- once nvim-treesitter is loaded + require("lazy.core.loader").disable_rtp_plugin("nvim-treesitter-textobjects") + load_textobjects = true + end, + }, + }, + cmd = { "TSUpdateSync" }, + keys = { + { "", desc = "Increment selection" }, + { "", desc = "Decrement selection", mode = "x" }, + }, + ---@type TSConfig + opts = { + highlight = { enable = true, additional_vim_regex_highlighting = { "org" } }, + indent = { enable = true }, + ensure_installed = { + "bash", + "bicep", + "c", + "clojure", + "comment", + "commonlisp", + "cpp", + "eex", + --"elisp", + "elixir", + "erlang", + "go", + "haskell", + "html", + "java", + "javascript", + "json", + "kotlin", + "latex", + "ledger", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "nix", + "ocaml", + "org", + "perl", + "php", + "phpdoc", + "python", + "query", + "regex", + "ruby", + "rust", + "scala", + "scheme", + "sql", + "tsx", + "typescript", + "vim", + "vimdoc", + "yaml", + "zig", + }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "", + node_incremental = "", + scope_incremental = false, + node_decremental = "", + }, + }, + }, + ---@param opts TSConfig + config = function(_, opts) + if type(opts.ensure_installed) == "table" then + ---@type table + local added = {} + opts.ensure_installed = vim.tbl_filter(function(lang) + if added[lang] then + return false + end + added[lang] = true + return true + end, opts.ensure_installed) + end + require("nvim-treesitter.configs").setup(opts) + + if load_textobjects then + -- PERF: no need to load the plugin, if we only need its queries for mini.ai + if opts.textobjects then + for _, mod in ipairs({ "move", "select", "swap", "lsp_interop" }) do + if opts.textobjects[mod] and opts.textobjects[mod].enable then + local Loader = require("lazy.core.loader") + Loader.disabled_rtp_plugins["nvim-treesitter-textobjects"] = nil + local plugin = require("lazy.core.config").plugins["nvim-treesitter-textobjects"] + require("lazy.core.loader").source_runtime(plugin.dir, "plugin") + break + end + end + end + end + end, +} diff --git a/lua/plugins/yaml.lua b/lua/plugins/yaml.lua index 54d58d3..216ee13 100644 --- a/lua/plugins/yaml.lua +++ b/lua/plugins/yaml.lua @@ -1,8 +1,8 @@ -return { - "cuducos/yaml.nvim", - ft = { "yaml" }, -- optional - dependencies = { - "nvim-treesitter/nvim-treesitter", - "nvim-telescope/telescope.nvim", -- optional - }, -} +return { + "cuducos/yaml.nvim", + ft = { "yaml" }, -- optional + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-telescope/telescope.nvim", -- optional + }, +} diff --git a/neoconf.json b/neoconf.json index 8b13789..d3f5a12 100644 --- a/neoconf.json +++ b/neoconf.json @@ -1 +1 @@ - + diff --git a/stylua.toml b/stylua.toml index 5d6c50d..964e1aa 100644 --- a/stylua.toml +++ b/stylua.toml @@ -1,3 +1,3 @@ -indent_type = "Spaces" -indent_width = 2 +indent_type = "Spaces" +indent_width = 2 column_width = 120 \ No newline at end of file