Skip to content

Commit 9844d31

Browse files
committed
Updated plugins
1 parent d479a79 commit 9844d31

File tree

4 files changed

+114
-210
lines changed

4 files changed

+114
-210
lines changed

init.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -976,12 +976,9 @@ require('lazy').setup({
976976
-- This is the easiest way to modularize your config.
977977
--
978978
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
979-
-- { import = 'custom.plugins' },
980-
--
981-
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
982-
-- Or use telescope!
983-
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
984-
-- you can continue same window with `<space>sr` which resumes last telescope search
979+
980+
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
981+
{ import = 'custom.plugins' },
985982
}, {
986983
ui = {
987984
-- If you are using a Nerd Font: set icons to an empty table which will use the

lazy-lock.json

Lines changed: 34 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,150 +1,36 @@
11
{
2-
"Comment.nvim": {
3-
"branch": "master",
4-
"commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb"
5-
},
6-
"LuaSnip": {
7-
"branch": "master",
8-
"commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc"
9-
},
10-
"cmp-nvim-lsp": {
11-
"branch": "main",
12-
"commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d"
13-
},
14-
"cmp_luasnip": {
15-
"branch": "master",
16-
"commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843"
17-
},
18-
"copilot.vim": {
19-
"branch": "release",
20-
"commit": "25f73977033c597d530c7ab0e211d99b60927d2d"
21-
},
22-
"fidget.nvim": {
23-
"branch": "main",
24-
"commit": "d855eed8a06531a7e8fd0684889b2943f373c469"
25-
},
26-
"friendly-snippets": {
27-
"branch": "main",
28-
"commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4"
29-
},
30-
"gitsigns.nvim": {
31-
"branch": "main",
32-
"commit": "f4928ba14eb6c667786ac7d69927f6aee6719f1e"
33-
},
34-
"indent-blankline.nvim": {
35-
"branch": "master",
36-
"commit": "65e20ab94a26d0e14acac5049b8641336819dfc7"
37-
},
38-
"lazy.nvim": {
39-
"branch": "main",
40-
"commit": "9a374a0fb4d3ac42dac4a129d4bead7252473c77"
41-
},
42-
"lualine.nvim": {
43-
"branch": "master",
44-
"commit": "544dd1583f9bb27b393f598475c89809c4d5e86b"
45-
},
46-
"mason-lspconfig.nvim": {
47-
"branch": "main",
48-
"commit": "58bc9119ca273c0ce5a66fad1927ef0f617bd81b"
49-
},
50-
"mason.nvim": {
51-
"branch": "main",
52-
"commit": "e2f7f9044ec30067bc11800a9e266664b88cda22"
53-
},
54-
"neodev.nvim": {
55-
"branch": "main",
56-
"commit": "46aa467dca16cf3dfe27098042402066d2ae242d"
57-
},
58-
"nvim-autopairs": {
59-
"branch": "master",
60-
"commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d"
61-
},
62-
"nvim-cmp": {
63-
"branch": "main",
64-
"commit": "d818fd0624205b34e14888358037fb6f5dc51234"
65-
},
66-
"nvim-comment": {
67-
"branch": "main",
68-
"commit": "e9ac16ab056695cad6461173693069ec070d2b23"
69-
},
70-
"nvim-lspconfig": {
71-
"branch": "master",
72-
"commit": "e26da408cf955afa8e9ddbadd510e84ea8976cd7"
73-
},
74-
"nvim-surround": {
75-
"branch": "main",
76-
"commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f"
77-
},
78-
"nvim-treesitter": {
79-
"branch": "master",
80-
"commit": "4e387dd47833c1bb8c8df6c3a7cab0d4c55583f3"
81-
},
82-
"nvim-treesitter-textobjects": {
83-
"branch": "master",
84-
"commit": "34867c69838078df7d6919b130c0541c0b400c47"
85-
},
86-
"nvim-ufo": {
87-
"branch": "main",
88-
"commit": "1b5f2838099f283857729e820cc05e2b19df7a2c"
89-
},
90-
"onedark.nvim": {
91-
"branch": "master",
92-
"commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37"
93-
},
94-
"plenary.nvim": {
95-
"branch": "master",
96-
"commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
97-
},
98-
"promise-async": {
99-
"branch": "main",
100-
"commit": "28c1d5a295eb5310afa2523d4ae9aa41ec5a9de2"
101-
},
102-
"sort.nvim": {
103-
"branch": "main",
104-
"commit": "c789da6968337d2a61104a929880b5f144e02855"
105-
},
106-
"telescope-fzf-native.nvim": {
107-
"branch": "main",
108-
"commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b"
109-
},
110-
"telescope.nvim": {
111-
"branch": "0.1.x",
112-
"commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026"
113-
},
114-
"vim-256noir": {
115-
"branch": "master",
116-
"commit": "e8668a18a4a90272c1cae87e655f8bddc5ac3665"
117-
},
118-
"vim-easy-align": {
119-
"branch": "master",
120-
"commit": "9815a55dbcd817784458df7a18acacc6f82b1241"
121-
},
122-
"vim-fugitive": {
123-
"branch": "master",
124-
"commit": "0444df68cd1cdabc7453d6bd84099458327e5513"
125-
},
126-
"vim-helm": {
127-
"branch": "master",
128-
"commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358"
129-
},
130-
"vim-rhubarb": {
131-
"branch": "master",
132-
"commit": "ee69335de176d9325267b0fd2597a22901d927b1"
133-
},
134-
"vim-sleuth": {
135-
"branch": "master",
136-
"commit": "1cc4557420f215d02c4d2645a748a816c220e99b"
137-
},
138-
"vim-terraform": {
139-
"branch": "master",
140-
"commit": "24de93afb05078bac6a2e966402cc1f672277708"
141-
},
142-
"which-key.nvim": {
143-
"branch": "main",
144-
"commit": "6e61b0904e9c038b6c511c43591ae2d811b4975e"
145-
},
146-
"yaml.nvim": {
147-
"branch": "main",
148-
"commit": "77aa8812e652acc44ae16fd1dbeb5a952db937e0"
149-
}
2+
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
3+
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
4+
"conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" },
5+
"copilot.vim": { "branch": "release", "commit": "a9228e015528c9307890c48083c925eb98a64a79" },
6+
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
7+
"gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" },
8+
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
9+
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
10+
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
11+
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
12+
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
13+
"mini.nvim": { "branch": "main", "commit": "bddfbfc4c1dbca6b852f512e554cf2e05c2960a8" },
14+
"nvim-autopairs": { "branch": "master", "commit": "2a406cdd8c373ae7fe378a9e062a5424472bd8d8" },
15+
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
16+
"nvim-lspconfig": { "branch": "master", "commit": "4ea9083b6d3dff4ddc6da17c51334c3255b7eba5" },
17+
"nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
18+
"nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" },
19+
"nvim-ufo": { "branch": "main", "commit": "a026364df62e88037b26d37c9f14c17c006fd577" },
20+
"orgmode": { "branch": "master", "commit": "e66a64183e211842c195f34fd6dcb97d7b534812" },
21+
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
22+
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
23+
"sort.nvim": { "branch": "main", "commit": "c789da6968337d2a61104a929880b5f144e02855" },
24+
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
25+
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
26+
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
27+
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
28+
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
29+
"vim-256noir": { "branch": "master", "commit": "e8668a18a4a90272c1cae87e655f8bddc5ac3665" },
30+
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
31+
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" },
32+
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
33+
"vim-terraform": { "branch": "master", "commit": "8912ca1be3025a1c9fab193618f3b99517e01973" },
34+
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
35+
"yaml.nvim": { "branch": "main", "commit": "4ada1cbb23bceb1f3e2ff25abe2aa088338d51f3" }
15036
}

lua/custom/plugins/nvim-ufa.lua

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
return {
2-
"kevinhwang91/nvim-ufo",
3-
dependencies = "kevinhwang91/promise-async",
4-
event = "VimEnter", -- needed for folds to load in time and comments closed
5-
keys = {
2+
'kevinhwang91/nvim-ufo',
3+
dependencies = 'kevinhwang91/promise-async',
4+
event = 'VimEnter', -- needed for folds to load in time and comments closed
5+
keys = {
66
-- stylua: ignore start
77
{ "zm", function() require("ufo").closeAllFolds() end, desc = "󱃄 Close All Folds" },
88
{ "zr", function() require("ufo").openFoldsExceptKinds { "comment", "imports" } end, desc = "󱃄 Open All Regular Folds" },
@@ -11,58 +11,60 @@ return {
1111
{ "z2", function() require("ufo").closeFoldsWith(2) end, desc = "󱃄 Close L2 Folds" },
1212
{ "z3", function() require("ufo").closeFoldsWith(3) end, desc = "󱃄 Close L3 Folds" },
1313
{ "z4", function() require("ufo").closeFoldsWith(4) end, desc = "󱃄 Close L4 Folds" },
14-
-- stylua: ignore end
15-
},
16-
init = function()
17-
-- INFO fold commands usually change the foldlevel, which fixes folds, e.g.
18-
-- auto-closing them after leaving insert mode, however ufo does not seem to
19-
-- have equivalents for zr and zm because there is no saved fold level.
20-
-- Consequently, the vim-internal fold levels need to be disabled by setting
21-
-- them to 99
22-
vim.opt.foldlevel = 99
23-
vim.opt.foldlevelstart = 99
14+
-- stylua: ignore end
15+
},
16+
init = function()
17+
-- INFO fold commands usually change the foldlevel, which fixes folds, e.g.
18+
-- auto-closing them after leaving insert mode, however ufo does not seem to
19+
-- have equivalents for zr and zm because there is no saved fold level.
20+
-- Consequently, the vim-internal fold levels need to be disabled by setting
21+
-- them to 99
22+
vim.opt.foldlevel = 99
23+
vim.opt.foldlevelstart = 99
24+
end,
25+
opts = {
26+
provider_selector = function(_, ft, _)
27+
-- INFO some filetypes only allow indent, some only LSP, some only
28+
-- treesitter. However, ufo only accepts two kinds as priority,
29+
-- therefore making this function necessary :/
30+
local lspWithOutFolding = { 'markdown', 'sh', 'css', 'html', 'python' }
31+
if vim.tbl_contains(lspWithOutFolding, ft) then
32+
return { 'treesitter', 'indent' }
33+
end
34+
return { 'lsp', 'indent' }
2435
end,
25-
opts = {
26-
provider_selector = function(_, ft, _)
27-
-- INFO some filetypes only allow indent, some only LSP, some only
28-
-- treesitter. However, ufo only accepts two kinds as priority,
29-
-- therefore making this function necessary :/
30-
local lspWithOutFolding = { "markdown", "sh", "css", "html", "python" }
31-
if vim.tbl_contains(lspWithOutFolding, ft) then return { "treesitter", "indent" } end
32-
return { "lsp", "indent" }
33-
end,
34-
-- when opening the buffer, close these fold kinds
35-
-- use `:UfoInspect` to get available fold kinds from the LSP
36-
close_fold_kinds_for_ft = {
37-
default = { "imports", "comment" },
38-
},
39-
open_fold_hl_timeout = 800,
40-
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
41-
local hlgroup = "NonText"
42-
local newVirtText = {}
43-
local suffix = "" .. tostring(endLnum - lnum)
44-
local sufWidth = vim.fn.strdisplaywidth(suffix)
45-
local targetWidth = width - sufWidth
46-
local curWidth = 0
47-
for _, chunk in ipairs(virtText) do
48-
local chunkText = chunk[1]
49-
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
50-
if targetWidth > curWidth + chunkWidth then
51-
table.insert(newVirtText, chunk)
52-
else
53-
chunkText = truncate(chunkText, targetWidth - curWidth)
54-
local hlGroup = chunk[2]
55-
table.insert(newVirtText, { chunkText, hlGroup })
56-
chunkWidth = vim.fn.strdisplaywidth(chunkText)
57-
if curWidth + chunkWidth < targetWidth then
58-
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
59-
end
60-
break
61-
end
62-
curWidth = curWidth + chunkWidth
63-
end
64-
table.insert(newVirtText, { suffix, hlgroup })
65-
return newVirtText
66-
end,
36+
-- when opening the buffer, close these fold kinds
37+
-- use `:UfoInspect` to get available fold kinds from the LSP
38+
close_fold_kinds_for_ft = {
39+
default = { 'imports', 'comment' },
6740
},
41+
open_fold_hl_timeout = 800,
42+
fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate)
43+
local hlgroup = 'NonText'
44+
local newVirtText = {}
45+
local suffix = '' .. tostring(endLnum - lnum)
46+
local sufWidth = vim.fn.strdisplaywidth(suffix)
47+
local targetWidth = width - sufWidth
48+
local curWidth = 0
49+
for _, chunk in ipairs(virtText) do
50+
local chunkText = chunk[1]
51+
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
52+
if targetWidth > curWidth + chunkWidth then
53+
table.insert(newVirtText, chunk)
54+
else
55+
chunkText = truncate(chunkText, targetWidth - curWidth)
56+
local hlGroup = chunk[2]
57+
table.insert(newVirtText, { chunkText, hlGroup })
58+
chunkWidth = vim.fn.strdisplaywidth(chunkText)
59+
if curWidth + chunkWidth < targetWidth then
60+
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
61+
end
62+
break
63+
end
64+
curWidth = curWidth + chunkWidth
65+
end
66+
table.insert(newVirtText, { suffix, hlgroup })
67+
return newVirtText
68+
end,
69+
},
6870
}

lua/custom/plugins/orgmode.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
return {
2+
'nvim-orgmode/orgmode',
3+
event = 'VeryLazy',
4+
ft = { 'org' },
5+
config = function()
6+
-- Setup orgmode
7+
require('orgmode').setup {
8+
org_agenda_files = '~/orgfiles/**/*',
9+
org_default_notes_file = '~/orgfiles/refile.org',
10+
}
11+
12+
-- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option
13+
-- add ~org~ to ignore_install
14+
-- require('nvim-treesitter.configs').setup({
15+
-- ensure_installed = 'all',
16+
-- ignore_install = { 'org' },
17+
-- })
18+
end,
19+
}

0 commit comments

Comments
 (0)