diff --git a/modules/nvim/after/plugin/treesitter.lua b/modules/nvim/after/plugin/treesitter.lua index 9b3a3a4..7b8846d 100644 --- a/modules/nvim/after/plugin/treesitter.lua +++ b/modules/nvim/after/plugin/treesitter.lua @@ -3,7 +3,9 @@ if not present then return end -local parser_config = require("nvim-treesitter.parsers").get_parser_configs() +local parsers = require("nvim-treesitter.parsers") + +local parser_config = parsers.get_parser_configs() parser_config.gotmpl = { install_info = { url = "https://github.com/ngalaiko/tree-sitter-go-template", @@ -13,7 +15,7 @@ parser_config.gotmpl = { used_by = { "gohtmltmpl", "gotexttmpl", "gotmpl", "yaml", "helm" }, } -local ft_to_parser = require("nvim-treesitter.parsers").filetype_to_parsername +local ft_to_parser = parsers.filetype_to_parsername ft_to_parser.helm = "gotmpl" treesitter.setup({ @@ -49,3 +51,7 @@ treesitter.setup({ "yaml", }, }) + +vim.o.foldmethod = "expr" +vim.o.foldexpr = "nvim_treesitter#foldexpr()" +vim.o.foldenable = false diff --git a/modules/nvim/init.lua b/modules/nvim/init.lua index 430e169..993f9c2 100644 --- a/modules/nvim/init.lua +++ b/modules/nvim/init.lua @@ -1,4 +1,3 @@ --- vim:fdm=marker pcall(require, "impatient") vim.g.mapleader = " " diff --git a/modules/nvim/lazy-lock.json b/modules/nvim/lazy-lock.json index 56614ef..1a62795 100644 --- a/modules/nvim/lazy-lock.json +++ b/modules/nvim/lazy-lock.json @@ -19,10 +19,10 @@ "fidget.nvim": { "branch": "main", "commit": "9dc6d15fdb877b2fb09ea0ba2dfde9beccb5965a" }, "friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" }, "gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" }, - "go.nvim": { "branch": "master", "commit": "470349cff528448969efeca65b2f9bdb64730e1b" }, - "guihua.lua": { "branch": "master", "commit": "dca755457a994d99f3fe63ee29dbf8e2ac20ae3a" }, + "go.nvim": { "branch": "master", "commit": "e752dfd0ebeb633c9b0fefa7cf1ceb55c6c3990b" }, + "guihua.lua": { "branch": "master", "commit": "00f8c4b15e65f2a3e53d7a4c51c982f083096704" }, "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, - "lazy.nvim": { "branch": "main", "commit": "ddaffa07156a090383bd32ef88669eea1b22c11a" }, + "lazy.nvim": { "branch": "main", "commit": "a1471103902a9836d88732eeeeabd11d00a2cb3e" }, "lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" }, "lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, "ltex-extra.nvim": { "branch": "master", "commit": "1d2f288ceedc70d5a9c00f55c0d0cc788b5164f2" }, @@ -33,10 +33,10 @@ "nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" }, "nvim-colorizer.lua": { "branch": "master", "commit": "760e27df4dd966607e8fb7fd8b6b93e3c7d2e193" }, "nvim-dap": { "branch": "master", "commit": "0d77088e0a3532ae653996abbefb8d951b4ed7ac" }, - "nvim-dap-ui": { "branch": "master", "commit": "94aa67d7bd60d3dffa5cd1967c2cefa6ba906406" }, + "nvim-dap-ui": { "branch": "master", "commit": "100c67dd63c870819fb998fec4867b17d02db4b7" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "7f7f2af549e72a0b7bddc3b4f827beb027ea8ce3" }, "nvim-lspconfig": { "branch": "master", "commit": "aeb76066212b09c7c01a3abb42fe82f0130ef402" }, - "nvim-surround": { "branch": "main", "commit": "c0835d2a33898b1509e804b7a3ad49737b90d98a" }, + "nvim-surround": { "branch": "main", "commit": "90821ad682aac189cd0a38fd83fc96f0cbcc5d29" }, "nvim-tree.lua": { "branch": "master", "commit": "02fdc262eba188198a7deb2117b3b996e6763d65" }, "nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" }, "nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" }, @@ -47,7 +47,7 @@ "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "py_lsp.nvim": { "branch": "main", "commit": "6f160d0e1864b1a46c932c542a132a57abd7f1c1" }, "rust-tools.nvim": { "branch": "master", "commit": "bd1aa99ffb911a1cf99b3fcf3b44c0391c57e3ef" }, - "schemastore.nvim": { "branch": "main", "commit": "fd5ddd82b13b52b72f887e2c0f2784d82381951d" }, + "schemastore.nvim": { "branch": "main", "commit": "b37874a63ceac681a15b83d5c8e67f58fe571341" }, "stabilize.nvim": { "branch": "master", "commit": "34069870a8e72632c5447188e638e1c6bfebc353" }, "telescope-asynctasks.nvim": { "branch": "main", "commit": "065300fb0a8ba6a1c81991da1873c73e136dcdc0" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" }, @@ -64,6 +64,7 @@ "vim-fugitive": { "branch": "master", "commit": "2019e0e4139390f485a024d7a2411218b004a5b3" }, "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, "vim-helm": { "branch": "master", "commit": "c2e7b85711d410e1d73e64eb5df7b70b1c4c10eb" }, + "vim-just": { "branch": "master", "commit": "838c9096d4c5d64d1000a6442a358746324c2123" }, "vim-table-mode": { "branch": "master", "commit": "9555a3e6e5bcf285ec181b7fc983eea90500feb4" }, "vim-vsnip": { "branch": "master", "commit": "8dde8c0ef10bb1afdbb301e2bd7eb1c153dd558e" }, "which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" } diff --git a/modules/nvim/lua/plugins.lua b/modules/nvim/lua/plugins.lua index 9b6e060..3712c6a 100644 --- a/modules/nvim/lua/plugins.lua +++ b/modules/nvim/lua/plugins.lua @@ -35,6 +35,7 @@ local plugins = { vim.g.astro_typescript = "enable" end, }, + "NoahTheDuke/vim-just", { "numToStr/Comment.nvim", opts = {} }, "gpanders/editorconfig.nvim",