diff --git a/.stylua.toml b/.stylua.toml index ecb6dca..ca1541c 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -1,6 +1,6 @@ column_width = 120 line_endings = "Unix" indent_type = "Spaces" -indent_width = 2 +indent_width = 4 quote_style = "AutoPreferDouble" call_parentheses = "None" diff --git a/lazy-lock.json b/lazy-lock.json index 10b395c..f02efa8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -27,11 +27,13 @@ "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, "nvim-jdtls": { "branch": "master", "commit": "4d77ff02063cf88963d5cf10683ab1fd15d072de" }, "nvim-lspconfig": { "branch": "master", "commit": "b0caeef0d835fbe19df6ad71dbc4345eaaea649c" }, + "nvim-origami": { "branch": "main", "commit": "7601195576615ba209d79f3dccc764f82d802b5c" }, "nvim-tree.lua": { "branch": "master", "commit": "f0e9951778802526b14c934f7bf746e1e0ae5ed0" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "ui": { "branch": "v3.0", "commit": "af4407decaf6528cb21a7b0fd8925664c8e573c0" }, "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } diff --git a/lua/custom/plugins/nvim-origami.lua b/lua/custom/plugins/nvim-origami.lua new file mode 100644 index 0000000..abac4b0 --- /dev/null +++ b/lua/custom/plugins/nvim-origami.lua @@ -0,0 +1,13 @@ +return { + "chrisgrieser/nvim-origami", + event = "VeryLazy", + opts = { + foldKeymaps = { setup = false }, + }, -- needed even when using default config + + -- recommended: disable vim's auto-folding + init = function() + vim.opt.foldlevel = 99 + vim.opt.foldlevelstart = 99 + end, +} diff --git a/lua/custom/plugins/todo-comments.lua b/lua/custom/plugins/todo-comments.lua new file mode 100644 index 0000000..82b958c --- /dev/null +++ b/lua/custom/plugins/todo-comments.lua @@ -0,0 +1,13 @@ +return { + "folke/todo-comments.nvim", + dependencies = "nvim-lua/plenary.nvim", + lazy = true, --optional + event = { "BufReadPost", "BufWritePost", "BufNewFile" }, + config = function() + require("todo-comments").setup { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } + end, +} diff --git a/lua/mappings.lua b/lua/mappings.lua index f5a1dc1..5c74ee1 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -20,3 +20,11 @@ end) map("t", "", function() term.toggle() end) + +-- folds +map("n", "", function() + require("origami").h() +end) +map("n", "", function() + require("origami").l() +end)